Is there a way to have a backtest fill orders at 4pm EST using the current daily data? I want to use the VIX index so I can't use minute data as of 3:59 or other similar tricks since it only has daily resolution. I know that this is unrealistic and that there would be implementation issues to trade this algorithm, but I would like to implement my backtest this way. Otherwise, is there a way to request the close price of the current day before the day ends (forward looking data)?Thanks.
Rahul Chowdhury
Hi Pier-Oliver,
Since VIX data is available only at EOD midnight. There isn't any easy way to do this since Lean provides data in a way to avoid forward bias. One possible work around to access VIX data before market close is to import VIX data as custom data and set its time attribute to 4 PM. You can download VIX data from the cache and you can learn more about importing custom data in the documentation.
Best
Rahul
Pier-Olivier Marquis
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.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!