Skip to content

sangramsinghg/vix_predictor

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

VIX Predictor

An awesome README template to jumpstart your projects!
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Presentation

About The Project : VIX PREDICTOR

Team: Paola Carvajal, Sangram Singh, Ahmed Mohamed, Doreen Ngo

The VIX index is a forward indicator of the expected volatility of the S&P500. It moves rapidly and has continuous daily changes. It is called the "fear index". Our group applied Machine Learning and Time Series analysis to find a solution to predicting the VIX.

Through different techniques and models (AdaBoost, Neural Network, technical analysis, Facebook Prophet, Garch) we found three distinct models with more than 50% accuracy. These distinct models, techniques (PCA, Random Oversampler, Standard Scaler, Feature Selection, time series analysis, etc.) and strategies can be used to cater to wide variety of fintech customers. We use yfinance apis, google trends, economic and financial indicators to create features used in the Machine Learning models.

Our ML Model Architecture is:

Logo

Built With

This section should list any major frameworks that you built your project using. Leave any add-ons/plugins for the acknowledgements section. Here are a few examples.

Getting Started

Below are examples of the necessary imports to run the code

 import pandas as pd
from pathlib import Path
import tensorflow as tf
from tensorflow.keras.layers import Dense
from tensorflow.keras.models import Sequential
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler,OneHotEncoder, MinMaxScaler
from sklearn.metrics import classification_report
from sklearn.ensemble import AdaBoostClassifier
from sklearn.tree import DecisionTreeClassifier
import datetime
import numpy as np
import yfinance as yf
from datetime import datetime
from pandas.tseries.offsets import DateOffset
import hvplot
import hvplot.pandas
import matplotlib.pyplot as plt
from sklearn.decomposition import PCA
from vix_functions import garch_fit_and_predict, correlation_filter, retrieve_yahoo_close, retrieve_yahoo_volume
from imblearn.over_sampling import RandomOverSampler
from sklearn.metrics import accuracy_score
from sklearn.metrics import f1_score
from sklearn.metrics import recall_score

Prerequisites /Installation

***To load all the necessary tools and files, please refer to the requirements.txt file

  1. cd to the directory where requirements.txt is located.
  2. activate your virtualenv.
  3. run: pip install -r requirements.txt in your shell.

Model files

  1. vix_adaboost_model.ipynb
  2. vix_predictor_finta.ipynb
  3. vix_predictor_prophet.ipynb
  4. vix_neural_neural_network_model.ipynb

Usage

Below are images and examples of the model implementation to find the accuracy.

AdaBoost model:

We are able to achieve 58% accuracy with the final AdaBoost Model. We plan to use this model for our high end hedge fund customers. This model has showen a ROI of 250x

Logo

We can see that our model is predicting very less negative returns as compared to the actual negative volatility.

Logo

We get 22 features that contribute to the model. These are varied from Garch variables, treasuries, international exposure, global commodities, futures, squared returns, AAPL and the Friday effect.

Logo

We see that this model exhibits 250x ROI

Logo

AdaBoost Models using Technical Indicators:

The AdaBoost models that uses only Technical Indicators such as simple moving averages and bollinger bands. This model shows a ROI of 42X.

Logo

This models shows an accuracy of 55%

Logo

Prophet:

Prophet analysis shows that volatilty dips on Friday and spikes on Monday. This shows a potential to make money by buying VIX on Friday and Selling it on Monday.

Logo

The ROI based on this basic strategy is 28x.

Logo

Roadmap

  • Plan to try other features and more optimizations to see if we can improve the accuracy of the model.
  • We are planning to release an MVP for our early adopters.
  • Plan to release three products - basic plan with buy friday and sell monday strategy, adaboost using Technical Indicators (with 55% accuracy as of now) and adaboost (with the 58% accuracy as of now)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Presentation

Below is a link to the presentation slide to our project:

VIX_PITCHDECK

About

VIX Predictor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •