I have set the cash to 30,000 in my code but when I deploy it to live mode it sets it to 100,000. Normally it's not a big deal but it's important to me because I'm trying to calculate the trade cost vs. profit in high number of trades. Moving the cash from 30,000 to 100,000 completely changes the scenario as Interactive Brokers charges a minimum of $1 if the cost per share is less than $1.
Is there any way to override this behavior?
Thanks.
Jared Broad
In QC Paper trading we set the starting cash for a project to $100k and as the algorithm is started and stopped over time the cash is preserved between deployments giving you an appearance of a real live algorithm. In paper trading with IB we pull the cash from IB's API.
Either way; the IB fee models are not affected by the cash balance. You can update the fee models as you wish if they are a problem,
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.
Patrick Star
Thanks Jared. So the cash in QC Paper trading is hardcoded and cannot be configured programmatically?
Jared Broad
Try this Patrick; would not recommend it though and your equity plot might look funny:
Portfolio.SetCash(_cash);
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.
Patrick Star
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!