Back

Trading Volatility (SVXY/UVXY) with Momentum Indicators

I've tried combining momentum indicators along with the vix/vix3m and vix/vix9d ratios as a mesure of contango/backwardation (I've tried the futures term structure ratios but Quantconnect's futures system makes me want to pull my hair out). I use indicators on SPY since I belive it's the "underlying" and more represtative of the underlying market that ultimately affects VIX values, and technical analysis on a actual ETF makes more sense to me. 

I used the SPY crossing sma as an exit signal for short volatility, and SPY macd as an exit signal for long volatility. I find that macd tends to "want" to switch every once in a while even when growth is sustained (but not gaining momentum) and provides too many false positives as an exit signal for short vol since the majority of the time the market trends upwards gradually, so I used sma as a kind of trailing exit. However for long vol I find that once the party is over you want to get out quickly before the spike crashes, so I attempt to use SPY macd as measure of momentum and an exit to get out and minimze losses. 

Additionally, usually when exiting a long vol position, much of the time the market is recovering even if temporarily, however due to the lingering backwardation this recovery is not always reflected in a short vol ETP such as SVXY, so I take advantage of this period by staying in TQQQ. 

If anyone sees something I missed or could improve, or has thoughts to add it would be much appreciated. (I've also gotten rid of the last 2-3 months cause the coronavirus crash makes any vol strat look amazing, including it returns are 58000%, without it 8000%)

Update Backtest








0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


 

 

 

1

Hi Sunny,

Interesting strategy. Although, I noticed that the `vixRatio` threshold is not very robust. Adjusting the threshold by as little as 1% causes the strategy's returns to drop by >35%. The strategy may be over-fit.

Additionally, the entry conditions are quite extensive. For example,

shortEntry = (vixRatio < 0.94) and not vixCrossUp and not (self.Securities["SPY"].Open <= self.spySma.Current.Value and self.yspy > self.yspySma)

In general, the simpler the strategy, the less likely it is to be over-fit to the historical data.

In regards to drawdown, the strategy experiences quite a large one at 61.5%. I would recommend to try adding a Risk Management module to the algorithm to reduce it. For instance, the Maximum Drawdown Risk Management Module may be a good option. In fact, the entire algorithm could be converted in to one that follows the Algorithm Framework outlined in our documentation. This will separate the algorithm's logic into several isolated classes.

On a final note, I noticed there are several lines of imports at the top of the algorithm. We can remove all the ones above datetime, except `my_custom_data`. Doing so will force the algorithm to automatically import the C# files it needs, resulting in faster execution.

Best,
Derek Melchin

0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Update Backtest





0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Loading...

This discussion is closed