1 of 18

1

BUFC Quant

Algo Trading On VIX With RandomForest

DATE: 04/25/2023

Made by Zhiwei(William) He, Ryan Gilbert   

2 of 18

1

BUFC Quant

  1. Machine Learning Concepts

  • Performance Using SP500 Dataset

  • Performance Using VIX Dataset

  • Reasons for differing performances

  • Implementing trading strategies

  • What's next?

3 of 18

3

Machinery Industry Analysis

  • A subfield of artificial intelligence, which is broadly defined as the capability of a machine to imitate intelligent human behavior

  • We can use ML algorithms to study the patterns of our dataset to make predictions.

  • The ML model we will be using is Random Forest 

What is Machine Learning

3 Major Types of ML Algorithm

Supervised Learning

Reinforcement Learning

Unsupervised Learning

  • approximates the relationship between the input and output to predict new, unseen data.
  • Mainly finds patterns such as clustering in a dataset that does not contain outputs for each input.
  • The model improves its actions over time using its interactions with an environment.

4 of 18

1

First Attempt : Predicting SP500 Market

Structure of The Model

Predictor Variable

Response Variable

Predictor variables will be the previous 7 days of daily return

Long, short, or no position for the day

Random Forest

By combining the output of several decision trees, Random Forest can make more accurate and reliable predictions or decisions than a single tree would be able to do on its own.

5 of 18

1

Dataset

  • SP500 daily data downloaded from Yahoo Finance
  • Rolling data window: use past x days to train model to predict next day

6 of 18

1

Machine Learning Performance VS Market Performance

7 of 18

1

Performance Using VIX Dataset 

What is VIX?

Why VIX?*

*more on this later

8 of 18

1

Next Attempt : Predicting VIX

Structure of The Model

Predictor Variable

Response Variable

Predictor variables will be the previous 7 daily closes

  • Model outputs a number from –1 to 1 which is translated to:
  • Short, or no position for the day

Random Forest

9 of 18

1

Performance Using VIX Dataset 

10 of 18

1

Performance Using VIX Dataset 

  • Stats for when a short signal is present
  • Great win rate
  • Big loss may be mitigated via max loss, idea to implement later

Wins: 84

Losses: 35

Greatest Loss: -19.68%

Win rate: 71%

Average win: 5.30%

Average loss: 5.76%

11 of 18

1

Performance Using VIX Dataset 

  • VIX Over 7x return in the past 5 years, consistent gains, significantly outperforms market:

12 of 18

1

Stationary Series Fits Machine Learning Model Better

What is Stationarity?

  • A stationary time series is a time series where there are no changes in the underlying system.
    • Constant mean (no trend)
    • Constant variance (no heteroscedacticity)
    • Constant autocorrelation structure(Same relationship between data points at different time interval)
    • No periodic component (no seasonality)

Why Stationary Time Series?

  • Machine learning models makes prediction based on the underlying structure of the data.
  • Stationary time series makes it easier to analyze and predict future data points, as the underlying structure of the data remains stable.

13 of 18

1

VIX vs SP500 Movement (~inverses)

14 of 18

1

VIX Direction Prediction for SP500 Trading

Since VIX roughly inverses the direction of the SP500, can't we trade a position opposite of the prediction?

15 of 18

1

VIX Direction Prediction for SP500 Trading

    • 63% of the time the algorithm made a prediction of –1, the SP500's direction was the opposite (1)
    • Not a terrible result, but still significantly lower than the simple VIX accuracy.

16 of 18

1

VIX Instruments

Is there any way to trade VIX directly?

17 of 18

1

VIX Instruments

  • Lack of data from Yahoo Finance
  • /VX Futures – great liquidity, not 1:1 =>
  • VIX CFDs – nearly 1:1, questionable liq
  • UVXY – leveraged ETF
  • SVXY – short ETF
  • ETF Put options, cap risk

18 of 18

1

What else did we try?

  • Common retail trading indicators: RSI, MACD, SMA
    • Poor performance
  • Other timeframes: Weekly
    • Great performance, but trades occurred less often 
  • Other thresholds
    • Thresholds determine when to snap model output to {–1, 0, 1}
    • "Stricter" thresholds typically increase win rate, but diminish cumulative return