Skip to content

Commit 990ac10

Browse files
committed
REF: Use Py3.6 PEP 515 underscores in numeric literals
1 parent aca8b7b commit 990ac10

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

backtesting/_plotting.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def lightness(color, lightness=.94):
8686
return color.to_rgb()
8787

8888

89-
_MAX_CANDLES = 10000
89+
_MAX_CANDLES = 10_000
9090

9191

9292
def _maybe_resample_data(resample_rule, df, indicators, equity_data, trades):

backtesting/backtesting.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -969,7 +969,7 @@ def __init__(self,
969969
data: pd.DataFrame,
970970
strategy: Type[Strategy],
971971
*,
972-
cash: float = 10000,
972+
cash: float = 10_000,
973973
commission: float = .0,
974974
margin: float = 1.,
975975
trade_on_close=False,

doc/examples/Quick Start User Guide.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@
646646
"source": [
647647
"from backtesting import Backtest\n",
648648
"\n",
649-
"bt = Backtest(GOOG, SmaCross, cash=10000, commission=.002)\n",
649+
"bt = Backtest(GOOG, SmaCross, cash=10_000, commission=.002)\n",
650650
"stats = bt.run()\n",
651651
"stats"
652652
]

doc/examples/Quick Start User Guide.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def next(self):
155155
# +
156156
from backtesting import Backtest
157157

158-
bt = Backtest(GOOG, SmaCross, cash=10000, commission=.002)
158+
bt = Backtest(GOOG, SmaCross, cash=10_000, commission=.002)
159159
stats = bt.run()
160160
stats
161161
# -

0 commit comments

Comments
 (0)