Skip to content

Commit c8e2b37

Browse files
authored
REF: Reword assertion condition: cash > 0 (kernc#962)
more readable Co-authored-by: Juice Man <92176188+ElPettego@users.noreply.github.com>
1 parent f248da9 commit c8e2b37

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backtesting/backtesting.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ def __set_contingent(self, type, price):
701701
class _Broker:
702702
def __init__(self, *, data, cash, spread, commission, margin,
703703
trade_on_close, hedging, exclusive_orders, index):
704-
assert 0 < cash, f"cash should be >0, is {cash}"
704+
assert cash > 0, f"cash should be > 0, is {cash}"
705705
assert 0 < margin <= 1, f"margin should be between 0 and 1, is {margin}"
706706
self._data: _Data = data
707707
self._cash = cash

0 commit comments

Comments
 (0)