diff --git a/backtesting/backtesting.py b/backtesting/backtesting.py index d90f4b2f..32eb8532 100644 --- a/backtesting/backtesting.py +++ b/backtesting/backtesting.py @@ -701,7 +701,7 @@ def __set_contingent(self, type, price): class _Broker: def __init__(self, *, data, cash, spread, commission, margin, trade_on_close, hedging, exclusive_orders, index): - assert 0 < cash, f"cash should be >0, is {cash}" + assert cash > 0, f"cash should be > 0, is {cash}" assert 0 < margin <= 1, f"margin should be between 0 and 1, is {margin}" self._data: _Data = data self._cash = cash