Code for MSc Quantitative Finance Dissertation

Overview

MSc Dissertation Code ReadMe

Sector Volatility Prediction Performance Using GARCH Models and Artificial Neural Networks

Curtis Nybo

MSc Quantitative Finance Dissertation 2020

This repository contains the code developed for my MSc Dissertation.

The Data

The data is retrieved from the Kenneth R. French data library (1). The dataset contains all U.S stocks, sorted into five sectors by SIC code. The datasets I have used in this study are provided in the 'Data' folder. The folder contains the original dataset and a summary of the dataset, and each specific has been extracted to its own file.

The Code

The thesis paper uses six Jupyter notebooks that were developed for this project. Three GARCH specifications and three ANN architectures are considered with one notebook for each.

The ANN notebooks are comprised of one notebook per architecture (5,1,1), (5,12,1), and (5,50,1).

The GARCH notebooks are comprised of one notebook for the GARCH(p,q), GARCH(1,1), and EGARCH(p,q) model.

How to use

Each notebook is commented throughout to guide reproducibility. The data in this repository needs to be placed in a local directory, then the code needs to be changed to point to that directory. The script should then read in the data and follow the same computations in this study.

To replicate the conda environment used to develop and run the code, see the tensorflowML.yml file in the repository. This contains all Python packages used and their corresponding versions. This yml file can be directly imported into Conda to reproduce the environment used in this study.

References

Many thanks to those who provided resources and prior work to leverage in my notebooks and scripts. More specific referencing is completed in each notebook.

(1) Data Library - Kenneth R. French - https://mba.tuck.dartmouth.edu/pages/faculty/ken.french/data_library.html - 2020

(2) Time Series Prediction with LSTM Recurrent Neural Networks in Python with Keras - Jason Brownlee, PhD - https://machinelearningmastery.com/time-series-prediction-lstm-recurrent-neural-networks-python-keras/ - 2016

(3) Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow, 2nd Edition - Aurélien Géron - https://www.oreilly.com/library/view/hands-on-machine-learning/9781492032632/ - 2019

(4) TensorFlow: Large-Scale Machine Learning on Heterogeneous Distributed Systems - https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/45166.pdf - 2015

(5) Kevin Sheppard, Stanislav Khrapov, Gábor Lipták, mikedeltalima, Rob Capellini, esvhd, … jbrockmendel. (2019, November 22). bashtage/arch: Release 4.13 (Version 4.13). Zenodo. http://doi.org/10.5281/zenodo.3551028

(6) Auquan - Time Series Analysis for Financial Data VI— GARCH model and predicting SPX returns - https://medium.com/auquan/time-series-analysis-for-finance-arch-garch-models-822f87f1d755 - 2017

(7) Sarit Maitra - Forecasting using GARCH Processes & Monte-Carlo Simulations: statistical analysis & mathematical model using Python - https://towardsdatascience.com/garch-processes-monte-carlo-simulations-for-analytical-forecast-27edf77b2787 - 2019

You might also like...
Empirical Study of Transformers for Source Code & A Simple Approach for Handling Out-of-Vocabulary Identifiers in Deep Learning for Source Code

Transformers for variable misuse, function naming and code completion tasks The official PyTorch implementation of: Empirical Study of Transformers fo

Reference implementation of code generation projects from Facebook AI Research. General toolkit to apply machine learning to code, from dataset creation to model training and evaluation. Comes with pretrained models.

This repository is a toolkit to do machine learning for programming languages. It implements tokenization, dataset preprocessing, model training and m

Code for the prototype tool in our paper "CoProtector: Protect Open-Source Code against Unauthorized Training Usage with Data Poisoning".

CoProtector Code for the prototype tool in our paper "CoProtector: Protect Open-Source Code against Unauthorized Training Usage with Data Poisoning".

Low-code/No-code approach for deep learning inference on devices
Low-code/No-code approach for deep learning inference on devices

EzEdgeAI A concept project that uses a low-code/no-code approach to implement deep learning inference on devices. It provides a componentized framewor

Code for all the Advent of Code'21 challenges mostly written in python

Advent of Code 21 Code for all the Advent of Code'21 challenges mostly written in python. They are not necessarily the best or fastest solutions but j

Code to use Augmented Shapiro Wilks Stopping, as well as code for the paper "Statistically Signifigant Stopping of Neural Network Training"

This codebase is being actively maintained, please create and issue if you have issues using it Basics All data files are included under losses and ea

Opinionated code formatter, just like Python's black code formatter but for Beancount

beancount-black Opinionated code formatter, just like Python's black code formatter but for Beancount Try it out online here Features MIT licensed - b

a delightful machine learning tool that allows you to train, test and use models without writing code
a delightful machine learning tool that allows you to train, test and use models without writing code

igel A delightful machine learning tool that allows you to train/fit, test and use models without writing code Note I'm also working on a GUI desktop

Pytorch Lightning code guideline for conferences

Deep learning project seed Use this seed to start new deep learning / ML projects. Built in setup.py Built in requirements Examples with MNIST Badges

Owner
null
MRQy is a quality assurance and checking tool for quantitative assessment of magnetic resonance imaging (MRI) data.

Front-end View Backend View Table of Contents Description Prerequisites Running Basic Information Measurements User Interface Feedback and usage Descr

Center for Computational Imaging and Personalized Diagnostics 58 Dec 2, 2022
Portfolio Optimization and Quantitative Strategic Asset Allocation in Python

Riskfolio-Lib Quantitative Strategic Asset Allocation, Easy for Everyone. Description Riskfolio-Lib is a library for making quantitative strategic ass

Riskfolio 1.7k Jan 7, 2023
BisQue is a web-based platform designed to provide researchers with organizational and quantitative analysis tools for 5D image data. Users can extend BisQue by implementing containerized ML workflows.

Overview BisQue is a web-based platform specifically designed to provide researchers with organizational and quantitative analysis tools for up to 5D

Vision Research Lab @ UCSB 26 Nov 29, 2022
Reinforcement Learning for finance

Reinforcement Learning for Finance We apply reinforcement learning for stock trading. Fetch Data Example import utils # fetch symbols from yahoo fina

Tomoaki Fujii 159 Jan 3, 2023
This is the official source code for SLATE. We provide the code for the model, the training code, and a dataset loader for the 3D Shapes dataset. This code is implemented in Pytorch.

SLATE This is the official source code for SLATE. We provide the code for the model, the training code and a dataset loader for the 3D Shapes dataset.

Gautam Singh 66 Dec 26, 2022
TensorFlow code for the neural network presented in the paper: "Structural Language Models of Code" (ICML'2020)

SLM: Structural Language Models of Code This is an official implementation of the model described in: "Structural Language Models of Code" [PDF] To ap

null 73 Nov 6, 2022
Inference code for "StylePeople: A Generative Model of Fullbody Human Avatars" paper. This code is for the part of the paper describing video-based avatars.

NeuralTextures This is repository with inference code for paper "StylePeople: A Generative Model of Fullbody Human Avatars" (CVPR21). This code is for

Visual Understanding Lab @ Samsung AI Center Moscow 18 Oct 6, 2022
A code generator from ONNX to PyTorch code

onnx-pytorch Generating pytorch code from ONNX. Currently support onnx==1.9.0 and torch==1.8.1. Installation From PyPI pip install onnx-pytorch From

Wenhao Hu 94 Jan 6, 2023
This is the code for our KILT leaderboard submission to the T-REx and zsRE tasks. It includes code for training a DPR model then continuing training with RAG.

KGI (Knowledge Graph Induction) for slot filling This is the code for our KILT leaderboard submission to the T-REx and zsRE tasks. It includes code fo

International Business Machines 72 Jan 6, 2023
Convert Python 3 code to CUDA code.

Py2CUDA Convert python code to CUDA. Usage To convert a python file say named py_file.py to CUDA, run python generate_cuda.py --file py_file.py --arch

Yuval Rosen 3 Jul 14, 2021