Back

Getting history through Quandl is taking more time than I expected

I am working with Quandl dataset, and I realized that each call to self.History demands about 1 second. I expected an initial delay, because it is getting all the info from Quandl. But I haven't expected 1 second for each self.History, after the dataset was downloaded.

I did 3 tests to summarize. I run a 5 days simulation (daily) with: 

* I) getting 3 last VIX and VXV from Quandl. The whole backtests processed 59 datapoints in 11.08 seconds

* II) Don't call any self.History command. The backtests processed 20 datapoints in 2.12 seconds 

* III) getting 3 last SPY and AAPL (for comparison). The backtest processed 20 datapoints in 3.20 seconds

 

Questions:

* A) Currently it is taking about 2 seconds *per backtesting day* to get VIX and VXV history of a 3 days. Is there any way to improve the times?

* B) Why when I process Quandl VIX and VXV it process 59 datapoints, but when I process SPY and AAPL only 20 datapoints.

Attached is an example backtest for reference. 

Thanks

Update Backtest








Hi Gabriel,

I need the same data for one of my strategies, CBOE VIX and VIX3M (formerly VXV). I am struggling with the implementation though - without giving away the alpha part of your strategy are you able to share your code so I can use is it as a guide to building mine? I had it up and running on Quantopian but havent yet been able to port it across. Also, Have you tried to see what time the data is delivered in LIVE trading mode from Quandl (ie not when running a backtest). 

0

Hi Mark,

We have this example for custom data VIX and VXV. 

https://github.com/QuantConnect/Lean/blob/master/Algorithm.Python/CustomDataIndicatorExtensionsAlgorithm.py
0

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.


Thanks Jing! 

These index's update in real time during the day on the CBOE website. Is it possible to pull MINUTE or TICK data for them? Or even OPEN, CLOSE, or is it just EOD Close?

Regards,

Mark

0

The VIX and VXV data are from Quandl. Only daily frequency is available. You could get the daily Open, Close, High, Low 

def OnData(self, data):
data["CBOE/VIX"].VixClose #VixLow, VixHigh, VixOpen

 

https://www.quandl.com/data/CBOE/VIX-Volatility-Index
0

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.


Update Backtest





0

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.


Loading...

This discussion is closed