Skip to content

Commit dfcab45

Browse files
committed
REF: Avoid further pandas resample offset-string deprecations
Refs 551e7b0
1 parent 78f5167 commit dfcab45

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

backtesting/_plotting.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -105,18 +105,18 @@ def _maybe_resample_data(resample_rule, df, indicators, equity_data, trades):
105105
return df, indicators, equity_data, trades
106106

107107
freq_minutes = pd.Series({
108-
"1T": 1,
109-
"5T": 5,
110-
"10T": 10,
111-
"15T": 15,
112-
"30T": 30,
113-
"1H": 60,
114-
"2H": 60*2,
115-
"4H": 60*4,
116-
"8H": 60*8,
108+
"1min": 1,
109+
"5min": 5,
110+
"10min": 10,
111+
"15min": 15,
112+
"30min": 30,
113+
"1h": 60,
114+
"2h": 60*2,
115+
"4h": 60*4,
116+
"8h": 60*8,
117117
"1D": 60*24,
118118
"1W": 60*24*7,
119-
"1M": np.inf,
119+
"1ME": np.inf,
120120
})
121121
timespan = df.index[-1] - df.index[0]
122122
require_minutes = (timespan / _MAX_CANDLES).total_seconds() // 60

0 commit comments

Comments
 (0)