GithubHelp home page GithubHelp logo

wjcper2008 / rnn_garch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from duffau/rnn_garch

0.0 1.0 0.0 959 KB

Estimating Value-at-Risk with a recurrent neural network (Jordan type) GARCH model

Python 99.28% Shell 0.72%

rnn_garch's Introduction

Recurrent Neural Net predicting Stock volatility

This repository contains Python code to train a recurrent Neural Network which tries to model the volatility of the daily returns of the SP500 index.

To run the code

Download the repository content by clicking "Download ZIP" and unzipping to a folder on your machine.

Download a Python 3.x interpreter from here. Or to make sure all the neccesary modules are installed in one go, download and install the Anaconda module packages, which also comes with a Python 3 interpreter. The Anaconda package can be downloded here.

When Python (and the appropriate packages) are dowloaded. Simply type one of the following commands in your command prompt:

python train_GARCH.py
python train_RNN.py 
python VaR_GARCH.py
python VaR_RNN.py

The first two scripts estimates the GARCH(1,1)-model and the Jordan Neural network with 5 hidden layers on the SP500 daily returns and saves the output in a JSON-file, named GARCH_est_.json, for the ARCH model and Jordan_est_.json for the Neural Network model.

The two scripts: VaR_GARCH and VaR_RNN produces some VaR plots which are saved in your_folder/plots.

Data

The data come from Yahoo fianance https://finance.yahoo.com/q?s=^GSPC and is located in a CSV file in the data-folder.

Paper

This code was made for a University paper. A draft version of the paper in PDF can also be found in the repository, named RNN_GARCH_paper.pdf.

rnn_garch's People

Contributors

duffau avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.