Back

LEAN: backtesting not pulling historical data from Alpaca

Hi, so I reconfigured everything to run from inside the Docker image container (re another post) which I have running on GCP in live mode using the Alpaca API working fine (at least in paper mode so far). I set up Docker on my local Kubuntu machine because I figured it would be easier to load the html file output from a Plotly graph I created to display the algo json output. All working pretty well, except there is a large gap in the historical data starting around July 2018. 

I know this was about the time I stopped working on LEAN last time because there seemed to be no way to get historical data due to the shutdown of Google and Yahoo historical sources. (btw, I'm only using daily data). So, I could check the Data folder, and will, but I'm pretty sure this is the last date of the default included data set for SPY. 

So I've checked the config.json for errors, and tried several permutations between 'backtesting' and 'live-alpaca', and 'live-mode' true or false, and added "data-queue-handler": "AlpacaBrokerage" to backtesting environment., with no luck. The 'live-alpaca' works fine and no errors with the 'backtesting', just no historical data added to fill this gap.

I'm going to try messing with the "history-provider": "QuantConnect.Lean.Engine.HistoricalData.SubscriptionDataReaderHistoryProvider" under 'backtesting', but shouldn't this work out of the box? Or am I setting the config file incorrectly. Or is this another bug with the new Alpaca implementation? Any assistance appreciated, thanks.

PS, is there another historical data provider I should be pulling from.. I have my QC api info added. Or maybe the Alpaca history has constraints?.. But I thought they provided historical daily for a year or two, which should show up as my timeframe is from 2010 to yesterday.

 

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.


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