All Projects → BenjiKCF → Neural Net With Financial Time Series Data

BenjiKCF / Neural Net With Financial Time Series Data

This solution presents an accessible, non-trivial example of machine learning (Deep learning) with financial time series using TensorFlow

Projects that are alternatives of or similar to Neural Net With Financial Time Series Data

Panama Papers Dataset 2016
Structured data about Panama papers collected from official ICIJ website
Stars: ✭ 701 (-1.68%)
Mutual labels:  jupyter-notebook
Lolviz
A simple Python data-structure visualization tool for lists of lists, lists, dictionaries; primarily for use in Jupyter notebooks / presentations
Stars: ✭ 706 (-0.98%)
Mutual labels:  jupyter-notebook
Soft Nms
Object Detection
Stars: ✭ 708 (-0.7%)
Mutual labels:  jupyter-notebook
Intro To Dl
Resources for "Introduction to Deep Learning" course.
Stars: ✭ 703 (-1.4%)
Mutual labels:  jupyter-notebook
Data hacking
Data Hacking Project
Stars: ✭ 705 (-1.12%)
Mutual labels:  jupyter-notebook
Elasticsearch Spark Recommender
Use Jupyter Notebooks to demonstrate how to build a Recommender with Apache Spark & Elasticsearch
Stars: ✭ 707 (-0.84%)
Mutual labels:  jupyter-notebook
Caffenet Benchmark
Evaluation of the CNN design choices performance on ImageNet-2012.
Stars: ✭ 700 (-1.82%)
Mutual labels:  jupyter-notebook
Statistical Rethinking With Python And Pymc3
Python/PyMC3 port of the examples in " Statistical Rethinking A Bayesian Course with Examples in R and Stan" by Richard McElreath
Stars: ✭ 713 (+0%)
Mutual labels:  jupyter-notebook
Fewshot Face Translation Gan
Generative adversarial networks integrating modules from FUNIT and SPADE for face-swapping.
Stars: ✭ 705 (-1.12%)
Mutual labels:  jupyter-notebook
Notes
Notes On Using Data Science & Artificial Intelligence To Fight For Something That Matters.
Stars: ✭ 710 (-0.42%)
Mutual labels:  jupyter-notebook
Polyrnn Pp
Inference Code for Polygon-RNN++ (CVPR 2018)
Stars: ✭ 704 (-1.26%)
Mutual labels:  jupyter-notebook
Machine Learning
머신러닝 입문자 혹은 스터디를 준비하시는 분들에게 도움이 되고자 만든 repository입니다. (This repository is intented for helping whom are interested in machine learning study)
Stars: ✭ 705 (-1.12%)
Mutual labels:  jupyter-notebook
Mlops
MLOps examples
Stars: ✭ 707 (-0.84%)
Mutual labels:  jupyter-notebook
Ai Series
📚 [.md & .ipynb] Series of Artificial Intelligence & Deep Learning, including Mathematics Fundamentals, Python Practices, NLP Application, etc. 💫 人工智能与深度学习实战,数理统计篇 | 机器学习篇 | 深度学习篇 | 自然语言处理篇 | 工具实践 Scikit & Tensoflow & PyTorch 篇 | 行业应用 & 课程笔记
Stars: ✭ 702 (-1.54%)
Mutual labels:  jupyter-notebook
Kaggle Titanic
A tutorial for Kaggle's Titanic: Machine Learning from Disaster competition. Demonstrates basic data munging, analysis, and visualization techniques. Shows examples of supervised machine learning techniques.
Stars: ✭ 709 (-0.56%)
Mutual labels:  jupyter-notebook
Network Analysis Made Simple
An introduction to network analysis and applied graph theory using Python and NetworkX
Stars: ✭ 700 (-1.82%)
Mutual labels:  jupyter-notebook
Pytorch Wavenet
An implementation of WaveNet with fast generation
Stars: ✭ 706 (-0.98%)
Mutual labels:  jupyter-notebook
Research
Notebooks based on financial machine learning.
Stars: ✭ 714 (+0.14%)
Mutual labels:  jupyter-notebook
Coco Caption
Stars: ✭ 712 (-0.14%)
Mutual labels:  jupyter-notebook
Fecon235
Notebooks for financial economics. Keywords: Jupyter notebook pandas Federal Reserve FRED Ferbus GDP CPI PCE inflation unemployment wage income debt Case-Shiller housing asset portfolio equities SPX bonds TIPS rates currency FX euro EUR USD JPY yen XAU gold Brent WTI oil Holt-Winters time-series forecasting statistics econometrics
Stars: ✭ 708 (-0.7%)
Mutual labels:  jupyter-notebook


Neural-Net-with-Financial-Time-Series-Data is an open source software project using endogenous factors to predict daily log return of financial asset. The project includes serveral technical indicators (ie. Stochastics, Moving Average Convergence/Divergence oscillator) to train a LSTM neural network by stochastic gradient descent with warm restart(SGDR) and cosine annealing. This flexible architecture enables you to deploy with Nvidia CuDNN computation without rewriting code by yourself. Hyperparameters are fine-tuned by Bayesian search.

Latest Result:

The current LSTM model result for predicting daily log return. Alt text

Old model Result

This old model uses LSTM to predict stock price.

Alt text

LSTM cell

This is the LSTM cell we used in the model.

Alt text

It is faster than normal LSTM cell because of the implementation of CuDNN LSTM and batch normalization in the model.

Update:

26/03/2017 First update

  1. Recurrent neural network with LSTM is added to the code.
  2. Keras with tensorflow is also implemented.
  3. Tensorboard for neural network visualization is also added to the code.

14/04/2017 Second update

  1. Normalized adjusted close price.
  2. A new data downloader has been implemented for simplicity
  3. Added more variable to predict the adjusted close price
  4. More accurate result, significantly less mean square error
  5. Extra visualization for close price
  6. Denormalization will be fixed soon
  7. Twitter sentiment analysis is currently on testing stage

16/04/2017 Third update

  1. Updated denormalization
  2. More test results available

18/04/2017 Fourth update

  1. Updated fundamental data from Kaggle for NYSE

19/04/2017 Fifth update

  1. Supporting Python 3.5 on Windows 10
  2. Significant improvement in accuracy

29/04/2017 Sixth update

  1. ^GSPC Data since 1970 has been added, more training data, higher accuracy
  2. 7 years of test data
  3. Object oriented programming
  4. Hyperparameters for dropout has been tested

08/05/2017 Seventh update

  1. All Hyperparameters have been tested and results have been uploaded.
  2. Fixed comment for the data loader
  3. More technical analysis like volume, moving average and other indexes will be added

28/05/2017 Eighth update

  1. Using Quandl instead of Pandas datareader
  2. Correlation heatmap has been addded
  3. Using Adjusted OHLCV for the network
  4. All functions can be loaded from lstmstock.py
  5. A Quandl api key is provided temporarily for those who do not own a quandl account
  6. Moving averages have been added

02/10/2017 Nineth update

Alt text

  1. Event driven analysis
  2. Switched to Tensorflow LSTM model

25/06/2018 Tenth update

  1. Complete rewrite of News downloader, removed Newsapi in order to get full access to NYTImes data for free
  2. Moving Average Convergence/Divergence oscillator (MACD), Stochastic Oscillator, Average True Range are added to train the model.
  3. log return is now used as target variable.
  4. Keras on top of Tensorflow is used.
  5. Randomized Search from SKLearn is used for optimization.

11/10/2018 Eleventh update Serveral state of the art techniques are applied

  1. CuDNN LSTM is used to accelerate training
  2. Stochastic gradient descent with warm restart
  3. Cosine annealing
  4. Use Bayesian search to optmize hyperparameters.
  5. New splitting method
  6. Dataset is provided
  7. HDF files are used to accelerate reading time

How to use Quandl

If you want to train your neural network on more data, feel free to load the data directly from Quandl. You should be able to get the historic price data of a particular stock after login. Use Export > Python > api key and insert the api key to your model. https://www.quandl.com/databases/WIKIP Alt text

References:

Bernal, A., Fok, S., & Pidaparthi, R. (2012). Financial Market Time Series Prediction with Recurrent Neural Networks.

Box, G. E., Jenkins, G. M., Reinsel, G. C., & Ljung, G. M. (2015). Time series analysis: forecasting and control. John Wiley & Sons.

Gu, J., Wang, Z., Kuen, J., Ma, L., Shahroudy, A., Shuai, B., ... & Cai, J. (2015). Recent advances in convolutional neural networks. arXiv preprint arXiv:1512.07108.

Hutto, C.J. & Gilbert, E.E. (2014). VADER: A Parsimonious Rule-based Model for Sentiment Analysis of Social Media Text. Eighth International Conference on Weblogs and Social Media (ICWSM-14). Ann Arbor, MI, June 2014.

Jaeger, H. (2001). The “echo state” approach to analysing and training recurrent neural networks-with an erratum note. Bonn, Germany: German National Research Center for Information Technology GMD Technical Report, 148(34), 13.

Jaeger, H. (2002). Tutorial on training recurrent neural networks, covering BPPT, RTRL, EKF and the" echo state network" approach (Vol. 5). GMD-Forschungszentrum Informationstechnik.

Maass, W., Natschläger, T., & Markram, H. (2002). Real-time computing without stable states: A new framework for neural computation based on perturbations. Neural computation, 14(11), 2531-2560.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].