Is using Open(-1) valid?

I’ve got the rule Open(-1)<Close(0) in a strategy of mine after reading about it from someone on here. Basically, the idea is to buy something only if it opens down from yesterday’s close.

I’ve been using the rule in association with the VIX (like the original poster of the idea) and have noticed that there have been multiple days where the VIX has opened down that a backtest will not include in the results.

I also went and manually backtested following the VIX in this manner (buying, say QQQ, if they VIX opens down) and got dramatically different results than a backtest over the same time period.

Any idea why this could be, and how to rectify it? I can share the spreadsheets where I did the manual testing, and the associated p123 backtest.

Thanks,
James

Just, as an update. I went through the history of Open(-1,$vix)>=1.025*close(0,$vix) using Yahoo’s numbers and found 19 examples of differing results (making about half incorrect), regarding whether the VIX had opened up 2.5% that day or not over the course of the past 365 days. Some of them were:
2021-11-23, 2021-11-08, 2021-10-29, 2021-10-06, 2021-10-01, 2021-09-24

Basically, assuming I’m not making a basic methodological mistake, yahoo’s data said that the VIX had opened up 2.5% higher than the previous close, while it seems like the backtest contradicted that information while there’s also examples of it being correct, throughout the same time period.

There seems to be something wrong with our data for $VIX opening prices. Most of the time it’s equal to the previous day’s close. And I’m not finding any instances where our data matches that of the CBOE. Thanks for calling this to our attention, and we’ll get back to you once we’ve figured out the problem.

deleted

Thanks Yuval, I was losing my mind figuring out if I was wrong or the data was wrong.

Lemmingrush,

Thank you very much for pointing this out.

I believe I am the original author you are referring to and I use the open price of VIX vs. previous close to buy VIXY (daily rebalancing).

ticker(“vixy”)
open(-1,$vix)>1.075*close(0,$vix)

I have been using this to buy VIXY for a while not realizing that a common figure released by CBOE such as VIX could be wrong on P123.

Yuval: Pls investigate and correct this as soon as possible. Is this due to the Factset vs. Compustat issue that Jim has raised before?

Regards
James

.

Lemmingrush,

Based on the backtesting (with P123 existing VIX data), the best way to play VIXY (rather than UVXY because of the larger drawdown and more deviation from VIX) is to wait for a 7.5% increase in VIX on next day opening vs the previous close. I actually make some money a few days ago when VIX spiked at opening because I got out intraday after it fell back a third from day high.

I hope Yuval can fix this VIX data issue asap so that we can have a proper backtest to see if the strategy works again.

Regards
James

Yeah! I understand the idea its brilliant, I just went all out and tested all sorts of relationships with the VIX. Turns out the idea would have day traded UPRO and UVXY in association with a 5% rule (UVXY if VIX opens up 5%) and you could have made about 0.5% per day, with 1 trade a week or so with the backtested results however when I tested it using a spreadsheet, the idea was totally hammered. UVXY lost 0.11% open to open when the VIX opened up 5% and -1.24% when the VIX was up 7.5%.

https://docs.google.com/spreadsheets/d/132QOwZAm6oRjMMqDAOAKEILoYUZew5upNgxFpHOJPnQ/edit?usp=sharing
^^ You can look over that spread sheet if youd like, the results are in the “results” tab.

I could be wrong in my methodology but it seems intelligent to lay off VIXY until it’s sorted :slight_smile:

Lemmingrush,

When I trade VIXY, I don’t let an intraday profit turn into a loss since I keep a trailing stop loss. I only keep the position open until the next day market open if the trailing stop loss is not hit on an intraday basis.

However more importantly, I am beginning to think P123 maybe importing the opening price from Factset/Compustat on VIX for a different time than the VIX CBOE market open which is at 4am in the morning. (maybe 9:30am ET)

I have been trading based on the VIX at 9:30 am ET when the NYSE opens. Let’s just take today for instance, VIX open at 19.32 (4am) vs 17.69 previous close which is more than 9% from previous close. But I am still invested in QQQ/XLK (risk-on) since the VIX at NYSE market opens is only at 4% above previous close.

Nevertheless, I agreed with you that we should wait for Yuval to sort this out asap after looking at your spreadsheet.

EDIT : I just make a quick check with the 1 min VIX data from my Refiniv Eikon, I have reasons to believe that P123 (ie Factset) take the NYSE opening (9:30am ET) of VIX as the opening VIX price. Pls see attached.

Regards
James


Price History_20211228_0412.xlsx (38.3 KB)


.

We use two different data providers for the various index prices. For the following indexes we get open, close, high, and low prices: $DJIA, $NASDAQ, $SP500, $RUI, $RUT, $RUA, $MID, and $SML. For the others–including $VIX–we only get high, low, and close prices, no open prices. Instead, we calculate an approximation for opening prices, which is only an approximation, based on previous high, low, and closing prices. If the previous close is between today’s high and low, we use the previous close as today’s open. If it’s not, we use the midpoint of today’s high and low.

This, obviously, is not a satisfactory solution if you want to rely on the actual opening prices for the $VIX. Fortunately, you can get them all from here: https://cdn.cboe.com/api/global/us_indices/daily_prices/VIX_History.csv. You can easily import the open prices as an imported series here: https://www.portfolio123.com/app/opener/DATASERIES?cat=-2 and then perform all the backtests you’d like. If you have any questions about using this tool, please let me know.

I apologize for the fact that I did not know that we had engineered approximate opening prices for index series at Portfolio123, and hope that this explains the discrepancies you’ve been seeing.

Yuval,

Thanks for the clarification.

Lemmingrush : This also means that the VIXY strategy doesn’t work anymore. I just tried it out.

Regards
James

Sorry, but how do you use this data series once it’s uploaded, in a backtest?

let’s say you named your series OpenVIX. Then you’d use Close(0,GetSeries(“OpenVIX”)) to call up the data.

Oof, ah well. Thanks for the help, I’m glad we now know.

Please enumerate the other indices and update the documentation accordingly. TIA.

Walter

Walter -

These are the indices for which we only get high, low, and close prices:

$DWC
$SPALL
$SPALLENG
$SPALLIND
$SPALLCND
$SPALLCNS
$SPALLFIN
$SPALLINT
$SPALLTCM
$SPALLHEQ
$SPALLPBL
$SPALLGLD
$SPALLEUT
$SP500PG
$SP500PV
$MIDPG
$MIDPV
$SMLPG
$SMLPV
$SPALLPG
$SPALLPV
$SP500EQ
$VIX
$NASDAQ100
$SPALLMAT
$SPALLHEA
$SPALLUTL
$RUId
$RUTd
$RUAd
$RMIC
$TSX
$TSX100
$TSX200
$SPALLREA

I’ll update the documentation now.

Yuval,
That list is bigger than I anticipated. Thanks for the update.
Walter

Yuval,

I appreciate your clear statement of just the facts.

This is a clear example of look-ahead bias is it not? I am not 100% sure what James has been doing with this but he was staking real money on this system, I believe and I do not think it was a trivial amount. He said he was just “lucky.” That might be so.

Specifically, a rule like “I will buy if the ticker opens above yesterday’s close” will work because the opening price is artificially set between the high and low for the sim. It is guaranteed that the ticker will move up from the opening in the simulation (when the ticker opens above the close). A 100% guarantee.

No guarantee that the ticker will close above the opening in the sim but James said he placed a trailing stop. The sim price will ALWAYS move above the opening (because the opening price is artificially set between he high and low) to the high of the day and a trailing stop (fitted to the data) will often be able lock in price above the open.

No worries about buying the stock with an open above the close and having the ticker move downward–below the open–for the entire day. It cannot happen with the sim but undoubtably does in real life.

Is this the first time someone has invested in a strategy that is potentially useless do to look-ahead bias at P123? It would be nice to think so.

Anyway, P123 should make it so that a member joining in the future will not have to read this thread before investing money in a potentially worthless strategy–as James may have done. Although I cannot speak for James by saying he now finds nothing of value in this strategy.

I think members will find what works even if it works due to look-ahead bias. Unfortunately, members are not always aware of data problems when they exist.

Just get rid of opening prices for the above as a start would be my recommendation. It is pure fantasy anyway–even when it does not cause problems. P123 needs to get rid of look-ahead bias where it can be done (and identified in the first place). I may be the only one who thinks, but I doubt it.

Leaving it as it is, hoping members will read this thread and know to import their own data—really?

Best,

Jim