LEAN is the open source
algorithmic trading engine powering QuantConnect. Founded in 2013 LEAN has been built by a
global community of 80+ engineers and powers more than a dozen hedge funds today.
Alpha League Competition: $1,000 Weekly Prize Pool
Qualifying Alpha Streams Reentered Weekly Learn
more
Hello, I have an issue with backtesting and stop orders. Stop orders triggered properly on time and value on a backtesting but every time when I try to buy some securities after that I have got "Insufficient buying power to complete order" error. Looks like the stop orders do not release cash back to the portfolio. Please advice.
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.
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.
Max Kovalev
1k
,
Have more details and a backtest for that. Error happened only when I set cash account type for Brokerage model. "SetBrokerageModel(BrokerageName.InteractiveBrokersBrokerage, AccountType.Cash);" Error dose not happened with Margin account type. Why?
0
Shile Wen
63.5k
,
Hi Max,
The reason the Cash is not released back to the account when we use a Cash Account is due to the fact Cash Accounts require 3 days to settle funds. Margin accounts on the other hand don't face this problem as Margin is provided for cases like these.
Best,
Shile Wen
1
Max Kovalev
1k
,
Thank you for the clarification Shile. Are 3 days configured? Can I change that setting for a Cash Account? Usually when you sell some stock money available the next morning. Please advise how to make the backtest more real.Â
0
Shile Wen
63.5k
,
Hi Max,
The settlement period for IB Cash accounts is fixed for 3 days, and this rule is according to US trading laws.
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...
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!