This is a feature request.
From what I've read, a paper account starts with 100000 in cash, and it's not possible to adjust that amount (neither before the algorithm starts running or during run time).
For me it would be very useful to be able to add funds (cash) to the paper account during run time. The tax laws in my country make it very unfavorable to have an actual account with a broker in another country. So what I would like to do, is to keep my actual account with my local broker, but have QC simulate that account, so that I can just manually copy the trades that my algorithm makes in the QC paper account.
In my actual account, I'm adding funds every month. As long as the paper account isn't able to mirror this, the two accounts loses sync, and the buy and sell signals from the algorithm are eventually useless.
I know that the static amount of cash in paper accounts is by design, but would you be willing to reconsider this? It wouldn't be difficult to implement the the change I'm asking for, but it would make the platform very much more useful to me.
I can, of course, write some code to work around this problem. But I can't really see why it shouldn't be an option to increase funds during run time.
Derek Melchin
Hi Christian,
In order to add funds to a real account, we need to stop the algorithm and redeploy. Therefore, to add funds to a paper account, we need to stop the algorithm and redeploy with the new account balance passed to the `SetCash` method.
When performing these steps currently, the positions and orders of the algorithm are not saved between deployments with the paper brokerage. Although, we have an open GitHub Issue to add this functionality. Subscribe to our progress here.
Best,
Derek Melchin
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.
Christian Piene Gundersen
Thanks again for your reply, Derek.
I am aware that I can stop and redeploy the algorithm for paper trading. But when I do, it ignores the SetCash. It always starts with 100000 in cash (or whatever it had left when I last stopped it).
What I am looking for, is a way to set the amount of cash when I redeploy. Ideally, I would like be able to add cash while the algo is running live in paper mode.
Alexandre Catarino
Hi Christian Piene Gundersen ,
The "ideal" solution of adding cash while the algorithm is running is, let's say, a bit controversial since QuantConnect/Lean Paper Trading is meant to work similarly to other (paper) brokerages we support. Since we need to stop the algorithm, add funds to the account, and finally redeploy it, we should have to do the same for QC Paper.
Please contact support@quantconnect.com for the $100000 restart issue.
Christian Piene Gundersen
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!