Can't load historical VXX data, even though it looks like it exists

Back

Hi.

All I want to do is test a simple strategy where I short 10k of VXX every month forever, from 2009 until now. I tried doing this on Quantopian, but their VXX data is hosed because they don't handle the 2018 transistion to VXXB. It looks like the QuantConnect data is good though.

https://www.quantconnect.com/data/tree/equity/usa/daily/vxx.zip

However, my code gives this runtime error - Backtest Handled Error: VXX: asset price is $0. If using custom data make sure you've set the 'Value' property.

How can I fix this? Is it my code? Or the data? 

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.


I found another post

https://www.quantconnect.com/forum/discussion/6804/vxx-minute-the-issue-starts-from-jan-30th-2009-and-continues-until-jan-17th-2018/p1

 that suggested using the "permtick" "vxx.1", which filled in my early data holes.

How would I look up a "permtick" in the future? Is this a term of art?

0

Hi John,

The $0 error occurs when placing trades for a security that doesn't currently have pricing data. We can ensure we don't run into this error by checking if the CurrentSlice has data for VXX in our scheduled function.

if (CurrentSlice.ContainsKey(vxx)) {
var shares = -100;
MarketOrder(vxx, shares);
Log("Sold " + shares + " of VXX on " + Time);
}

Additionally, when scheduling a function to trade 10 minutes after the open, we need to ensure we have a bar that closed 10 minutes after the open. Daily resolution will cause the algorithm to submit orders with stale prices. This happens because the 10 minutes of trading time between the close of the last daily bar and the current moment hasn't reached our algorithm yet. If we use minute resolution instead, the algorithm will have the bar which closed 10 minutes after the open. To solidify this concept, I recommend reviewing the attached backtest and our documentation on understanding time.

In regards to the permticks, VXX is a particular case that can only be addressed by knowledge of the VXX history (see related discussion). For symbol lookup, we advise using our Data Explorer.

Best,
Derek

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