I'm using an Alpha Framework algo and backtesting. At some point in each backtest, I hit a string of Invalid orders (intermittently, using a variety of ETFs). I'm attaching an example. What I see is that at some point, instead of a valid price, I get a price of '$USD' on an order. This generates a string of invalid market orders that are re-tried all day. If I switch out the ETF with the invalid price, and re-run the test with other ETFs, eventually I hit the same problem with another ETF.
Jared Broad
Hey Heather; When using daily data the orders are issued and fill at the next morning's price. Because of gaps this means occasionally it miscalculates the allocations and fails to fill the position.
You can solve this by using minute data or having more of a buffer around your positions. The EqualWeightingPortfolioConstructionModel doesn't have a buffer around it now so you'd need to write your own PCM or submit a PR with an upgrade to the EWPCM.
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!