External Instrument Ratio Plots Differently on Different Datasets
Author: bishop
Creation Date: 4/25/2015 9:13 PM
profile picture

bishop

#1
Hi,

I am trying to plot a vix/vxv ratio on a dataset that do not contain these symbols, but for some reason the ratio plots incorrectly. When I plot it on a dataset that contains both vix and vxv symbol the ratio plots as it should be.

For instance, when I apply the script below to the Yahoo dataset on a ^GSPC symbol, I have an incorrect ratio. When I apply it on CBOE data set, everything is okay.

Does it mean that I have to create ratios only on a dataset that contains both symbol that are used to build the ratio?

CODE:
Please log in to see this code.
profile picture

Eugene

#2
Hi,

QUOTE:
Does it mean that I have to create ratios only on a dataset that contains both symbol that are used to build the ratio?

No, it doesn't mean that. Please read the WealthScript Programming Guide chapter on Secondary Series Synchronization under DataSeries > Accessing Secondary Symbols.
profile picture

bishop

#3
Eugene,

I've already checked this section and still do not understand why it is not working on Yahoo datasets only. When I apply it to any other than Yahoo datasets, the ratio plots correctly. For example, plotting on Stooq's ^SPX index works correctly, while Yahoo's ^GSPC not.

I've even tried the Synchronize function, but it is still not working on Yahoo datasets.

Could you please explain what I am missing?
profile picture

Eugene

#4
Although the terms like "correctly" or "incorrectly" are ambiguous and do not help troubleshooting, I believe that you have VIX (but hardly VXV as Yahoo considers the ticker invalid) downloaded by Yahoo provider before. Since it only has 100 bars of data you have the synch issue when WL looks it up in the Yahoo! provider's BarDataStore. Get rid of the symbol's data or use the GetExternalSymbol() overload that allows to specify your CBOE DataSet as an optional parameter.
profile picture

bishop

#5
Eugene,

Plots incorrectly mean exactly as it says. On Yahoo's ^GSPC the VIX index is always 15.3 starting end of March. In addition, the VIX begins to plot only starting end of December 2014, while VXV goes deep back. For that reason, the ration plots incorrect values.

I've deleted all the Yahoo's VIX symbols in AppData\Roaming\Fidelity Investments\WealthLabDev\1.0.0.0\Data\YahooStaticProvider\Daily as well as here AppData\Roaming\Fidelity Investments\WealthLabDev\1.0.0.0\Data\YahooStaticProvider\Daily\V

however, it didn't help. After the WL restart and applying the code above to ^GSPC symbol, the ratio is plotted incorrectly and VIX symbol is re-created again in AppData\Roaming\Fidelity Investments\WealthLabDev\1.0.0.0\Data\YahooStaticProvider\Daily\V folder.

Do you know why this happens?

Also, I am not sure what GetExternalSymbol() overload means and would greatly appreciate if you provide an example.

Thank you,
profile picture

bishop

#6
Eugene,

I've fixed it by specifying the dataset name. Sorry, I didn't get it right away.

Thank you for your help.
profile picture

Eugene

#7
Vitaly,
QUOTE:
however, it didn't help. After the WL restart and applying the code above to ^GSPC symbol, the ratio is plotted incorrectly and VIX symbol is re-created again in AppData\Roaming\Fidelity Investments\WealthLabDev\1.0.0.0\Data\YahooStaticProvider\Daily\V folder.


The reason is that you have on demand data update enabled. After turning it off, Y! will no longer do backfill in the background. Otherwise deleting the VIX.WL file wouldn't help as it would get downloaded again on demand.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).