Let's try a different approach...
Instead of looking at the futures market to predict the performance of a proxy, let's look at another proxy designed to function in the inverse: UVXY.
Algorithm orders XIV with 70% percent of equity capital on 3:1 leverage; the algorithm holds the other 30% in cash until a buy signal is generated for UVXY.
The buy signal: if UVXY opens positive, then take that 30% and open a position in UVXY; that position is held until 5 minutes before the end of trading.
If UVXY is bought, then XIV is sold and the algorithm goes to cash until UVXY opens down and XIV opens up; at that point, the algorithm reenters XIV with the same 3:1 leverage.
When XIV is bought, generate a sell limit order at 1% below the purchase price.
Unfortunately, I lack the coding skills to implement this and perform a back test, but on paper, it should address both drawdown and the potential black swan. If someone happens to have a better sell signal on UVXY, by all means please implement that; I just tossed that out there for simplicity's sake. Not only that, it actually performs fairly well. True, it doesn't capture UVXY at the crest, but it should offer a respectable rate of return to counteract any loses incurred on XIV. The other possibility I considered, and I would love to hear some feedback on this, was is it possible to make this market neutral? In other words, is there some ratio for XIV and UVXY where it essentially becomes a breakeven trade and all you have to do is scale the leverage on XIV to profit? If there is, then that makes the problem quite a bit easier because now all you have to do is determine the leverage on XIV.
I kept thinking about it and the other problem I thought of (and I see another trader even mentioned it too) is the fact that the futures market is open even when the ARCA is closed. That means that both UVXY and XIV could either appreciate or depreciate while the algorithm can not buy and sell them. In an ideal world, this is hedged by taking an opposing position in the futures market opposite of your overnight holdings. For example, say the algorithm is long XIV (read: short the VIX), then when the market closes, it would enter the futures market and go long the VIX (likely using the VIX Weekly's, or maybe options are better here?) overnight using the remaining equity, that 30%, and sell in the morning. That hedge would definitely be a drag on the returns and so to compensate, there are really three options. Firstly, modify the ratio to, say, 60% in XIV and 40% in cash/UVXY/VIX futures or apply leverage to the UVXY trades. The third option, which would be even more complicated, would be for the algorithm to hedge only in certain situations (i.e. if XIV falls a certain percentage, then hedge).
The other issue I would just like to mention is the expense ratio on both UVXY and XIV. I don’t know if that math is done automatically in the backtest, but I would certainly hope so because otherwise will cool down substantially.
The other thing I’ve noticed about UVXY is that it almost never has two consecutive days in positive territory. Unfortunately, when it does, that usually means that we’re in the midst of a potential black swan.
Theoretically, the returns of UVXY and XIV levered 3X should be the exact opposite of each other, no? Yesterday for example though, they weren’t; XIV finished down 3.11%, which multiplied by the leverage factor is a loss of 9.33%, whereas UVXY ended up 5.75%, although at one point in the day it was up almost 11% so perhaps it's just a matter of finding a better sell signal?
If we assume though that a 3X levered XIV will always outpace UVXY (and by the way, the above math assumes a 50/50 equity capital split, which is not true in our case), then the algorithm will suffer from drawdown, although they won’t be as large. For the algorithm to earn a profit independent of market condition would require some kind of highly leveraged hedged and that can only really be found in the futures market. I’m reluctant to apply leverage to UVXY because that’s already insanely volatile at 3X leverage and I wonder what the broker would say if the algorithm tried to leverage an inherently leveraged investment.
Today for example, or should I say yesterday as I will post this in the morning, the algorithm would have suffered a 4.6% loss and that’s with the stop loss order set at 3% and the algorithm only capturing a 5.75% gain on UVXY...