backtesting.py
backtesting.py copied to clipboard
Allow for cash to be deposited or withdrawn during a backtest
Sorry for the late turnaround. I'm not yet decided, but certainly not strongly opposed to this change. However, in the style of the rest of this library, I'd prefer Strategy.cash being a @property.
Implementing this would prevent people from accessing self._broker._cash as in https://github.com/kernc/backtesting.py/issues/493, https://github.com/kernc/backtesting.py/issues/340, https://github.com/kernc/backtesting.py/issues/124, ...