Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Is it possible add cash during the calculation of a strategy? (backtesting strategies for DCA)

I would like to add cash on a monthly basis. ‘initial_capital’ can only be static, it’s not possible to put in a variable unfortunately.

I know I can track the investment with own variables, but I think there must be some way to calculate your overall investment without setting the initial capital to 1M and just take money off that.

I’ve posted this question on Reddit but no solution so far. Thanks in advance.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

No, you cannot modify your equity directly.

The workaround would be, as you suggested, set your initial capital to something very high but limit the amount you use in your trades. Then you can increase your limit each month.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading