Back

5 minute Short only $UVXY on 20/5 MA cross over - 417% annualized return, 200 trades YTD

Feel free to improve the strategy and let me know, if you do.
Update Backtest








I'd suggest doing backtests on much longer time periods :)
1

how often does this code run? Aka, is it running all trading day or is it on/off on 30min intervals?
0

@Daniel, the OnData(TradeBars data) method is called every minute (Resolution.Minute). The OnThirtyMinutes is an event handler for the 'minConsolidator' variable. Consolidators can be used for making bigger bars from smaller ones (min to daily bars). In this case the 'minConsolidator' is a 5 minute bar consolidator, and will call the (poorly named :) ) OnThirtyMinutes method on a new 5min bar.
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.


Interestingly, this strategy goes from making money to losing money if you switch to the VXX. Would be interesting to look at the structural differences in the two ETFs that yield such different results:
1


Looks interesting, can you realistically sell UVXY or VXX short? Did you consider using XIV? Briefly looking at the algorithm on VXX instead of UVXY it produced 100% + returns since 2009.
1

Nick,

yes you can sell short UVXY on IB. It is a hard to borrow issue, so you will pay rather than receive short stock interest (I think @ +/- 15% annualized) ... as with any short, you run the risk of being bought in.
1

@Nick, yes shorting is difficult but $XIV is what I use today. However also backtested $VXX 10/5 DMA cross. I'm looking at using short call spreads dollar cost averaged. Playing with different strikes and exp.
0

I'm curious on why you chose to only run the algo 1x/day...what is your reasoning? How could one change this to trade as many times/day as needed? I couldn't really figure out the logic...any help you can provide would be immensely appreciated!
0

@ Daniel Actually it runs as many times a day as there are 50/20 SMA cross. The algo is active only between 9-2 pm. You can clone the algo and play around with MA timeframes, tolerance as well as window intraday to run the algo
0

does your strategy tester take account of the frequently happening 5 times inverse splits/splits that happen on UVXY? thanks 

0

Your code uses incorrect data for backtests and mostly profits from overnight decay of UVXY, which bears huge risks.

Here is the realistic version of this strategy (close at the end of day and trade on real prices).

1


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