Here's a simple attempt at a mean-reversion/stat-arb startegy using TVIX & VXX. 8.7 Sharpe with very little drawdowns looks way to good to be true. As is, this startegy isn't tradeable because I dont think enough slippage has been taken into account but I am interested in seeing if anyone else can improve on this or has had any luck with mean-reversion. I have been trying to develope a stat arb strategy using the universe selection and a cointegration class that I wrote but it is extremely processor intensive.
Stefan
I believe they are difficult to short. A short-and-hold on the TVIX would also produce massive gains (if possible).
Six figure investing provides some additional arguments. https://sixfigureinvesting.com/2016/10/is-shorting-uvxy-tvix-vxx-the-perfect-trade/
James Reilly
I've shorted both through IB, usually plenty of shares available but you have to be careful with position sizing as anything related to VIX can move very quickly and result in a margin call. The main problem with this algo is the amount of trades it makes due to being an intraday strategy. Slippage almost always kills your profits if your trading timeframe is fairly short. I've run some short term tests and it looks like shorting any of these results in slippage values 3-4 times what is already accounted for in the algo. Hopefully someone can run with this and make it profitable. I definitely would not recommend a buy and hold with TVIX or any of the VIX related products unless it is a fairly small percentage of your portfolio as the spikes can be crippling.
Durable
Hello James:
I tried your example but the backtest just ends in 2013. Any ideas?
Durable
@James why the backtest stops after 10000 trades?
James Reilly
@Durable I just re ran it and it seems to be working fine. Try re-cloning the original?
Jared Broad
amount of storage in the cloud believe it or not! Its basically 1-2MB per
backtest of purely trade storage per backtest.
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.
Petter Hansson
1) There's still alpha if you don't short (but risk is greater ofc.)
2) The main problem is the small gain trades are going to be eaten by IB's fees I think your slippage setting is much too low, a quick calculation on TVIX share price shows your slippage is going to be at least 0.2% per trade, i.e. buy/sell pair. With a 44% win rate, the effective slippage paid for a winning trade is going to be more than two times that. Conincidentally, the amount won per trade is 0.1% something, i.e. eaten by slippage.
Could a variant of this be made to work? Not ruling it out, but I quite often any unmined alpha I come across proves too expensive to extract.
Petter Hansson
Arghh like usual - missing an edit post feature to fix grammar...
Petter Hansson
A thought: Maybe you can find some broker that does not charge a fee proportional to trade size?
I know my Swedish broker has an option to charge a fixed fee, but unfortunately they don't support algo trading (they do have US equities however). I could implement a hackish web crawler interface to them in Lean if I really wanted though. :p
Petter Hansson
Actually never mind, they've introduced a 0.079% minimum. Too good to be true TM
Petter Hansson
That said, the fixed fee with 0% fractional fee remains on Swedish equities. Now, if I could just connect with Lean... ;)
Petter Hansson
Also, apologies all about the spam. I've been working far too long today to the point of my eye sight starting to fail and I normally rely on edit post functionality to incrementally update my written thoughts...
Igor Rivin
What's the story with Tradier? They have fixed commissions, and used to have a relaationship with QC (but, apparently no more...)
Jared Broad
We suspended Tradier's API as it was not stable enough for quantitative based trading. We're waiting for a few key upgrades and will re-enable it when its safe.
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.
Igor Rivin
Thanks, good to know! Their API is a lot cleaner than IB's, so it would be nice if it worked... Their commissions/margin costs are way higher, sadly.
Igor Rivin
By the way, I backtested the strategy all the way to April 7 2017, and the Sharpe from Aug 1 2016 to the present is -9 -ish (yes, that's negative). I guess someone DID decide that the arb was tradeable.
Egor Pavlikhin
You are not using RAW prices, but adjusted prices, that's why you are getting these returns. Look at the trades, VXX did not cost $1000 in 2013, it cost $30.
Jared Broad
return profile?
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.
Egor Pavlikhin
Jared, comission and slippage are usually not calculated correctly, plus price movements, while identical in percentage terms, in absolute terms produce far better results than reaility. Consider ETF that costs $10 and moves $0.01 and one that costs $1000 and moves $1, but your code still thinks that 1 tick is $0.01, and that $1 becomes 100 ticks in profit, when in reality it's not. Back adjusting prices for most ETFs makes no sense, since all splits and reverse-splits are virtual, there are no assets to be adjusted, only screen prices.
Jared Broad
be a standard test for strategies.
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.
James Reilly
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.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!