VIX Strategy

Posted By: trenki2

VIX Strategy - 06/10/17 08:50

There is a nice article with a trading strategy here:

Article + Strategy
Posted By: GreenBoat

Re: VIX Strategy - 06/11/17 13:50

Hi, thank you for posting your strategy code. It's always good to have some example scripts for learning.

I would like to test it on my computer, however I have a problem with the historical data of VIX index. It would be great if you could push me in the right direction.

I have SPY historical data, but I am not able to download VIX historical data.

I am trying to download the data from Google, but it doesn't work. I don't know which ticker to use. I tried VIX and INDEXCBOE:VIX, but neither of them works.

VIX is also not available at Quandl WIKI.

It is possible to download VIX historical data on CBOE website:
http://www.cboe.com/products/vix-index-v...historical-data

But I don't know how to transfer the file to the Zorro format.

Any idea?

Or maybe can you post a link to your .t6 historical data files?

Thanks!
Posted By: GreenBoat

Re: VIX Strategy - 06/11/17 14:59

I found the solution already. I downloaded the data from CBOE and managed to create the .t6 file.

My results are attached.

Thanks again, nice test!

Attached picture vix-spy.png
Posted By: Ger1

Re: VIX Strategy - 07/01/17 07:24

Could you explain how you did it?
Posted By: GreenBoat

Re: VIX Strategy - 07/01/17 11:05

I downloaded the data, created one file from it, sort it by date, saved as csv and then created the t6 file by this script:
Code:
void main()
{
	string MyAsset = "VIX";
	dataNew(1,0,7);
	dataParse(1,"%d-%b-%y,f3,f1,f2,f4,f6","History\VIX.csv");
	printf(" %s",MyAsset);
	dataSave(1,strf("History\%s.t6",MyAsset));
}


I hope that's how I did it, I am not sure if I remember it well.
Posted By: firecrest

Re: VIX Strategy - 07/01/17 16:04

Does anyone why they state 0.046 and 0.035 for the strategy in the following?

LifeTime = 8;
if (NumOpenLong == 0 && vixPrice[0] > vixSMA * (1 + 0.046))
enterLong();

if (NumOpenLong > 0 && vixPrice[0] < vixSMA * (1 - 0.035))
exitLong();
Posted By: GreenBoat

Re: VIX Strategy - 07/01/17 16:27

It improves results a bit.

I think it is a typical example of over-optimization.
Posted By: GreenBoat

Re: VIX Strategy - 07/10/17 13:52

I would like to correct myself.

The strategy is probably not overfitted. I made Walk Forward Optimization and it looks that the strategy is quite solid. The parameter is needed, because otherwise there are too many entry signals. It really improves the result, but I don't think it is overfitting.

The problem is, that there are some loosing years. The strategy is not good enough for trading, but it is a nice experiment anyway. It leads to other ideas for using VIX for trading.
© 2024 lite-C Forums