Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit dfcab45

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

1 file changed

+10-10Lines changed: 10 additions & 10 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎backtesting/_plotting.py‎

Copy file name to clipboardExpand all lines: backtesting/_plotting.py
+10-10Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.