Back

Trades Summary Enums

Greetings. I am running a simple backtest in Python, and in my code I have a scheduler run every 30 minutes. In the callback, I use the SetHoldings() method to define my exposure to a stock. When I downloaded my Trades Summary, I often times see a price of 0 for the execution (which is wrong) along with various numbers of shares (which are incorrect amounts as well). Furthermore, the Order Type shows a number 4 when this happens (versus a number 0 when the buy or sell order successfully completes). The Status column also shows the number 0 instead of ``Filled''. What are these different values, and why would the SetHoldings method fail in such a way? Thank you.

Update Backtest








Please attach a backtest for community assistance.

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.


Sure - Here is one that exhibits the behavior.

0


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