We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fbbb24a commit 420232fCopy full SHA for 420232f
backtesting/_plotting.py
@@ -143,7 +143,7 @@ def _weighted_returns(s, trades=trades):
143
return ((df['Size'].abs() * df['ReturnPct']) / df['Size'].abs().sum()).sum()
144
145
def _group_trades(column):
146
- def f(s, new_index=pd.Index(df.index.view(int)), bars=trades[column]):
+ def f(s, new_index=pd.Index(df.index.astype(int)), bars=trades[column]):
147
if s.size:
148
# Via int64 because on pandas recently broken datetime
149
mean_time = int(bars.loc[s.index].astype(int).mean())
0 commit comments