You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran the simple code below and got an error: qs.reports.full(returns=equity_return, benchmark=benchmark_return, output='report.html', title='Strategy')
(with equity_return and benchmark_return being Series and timeframe M30)
and I get the following error:
Passing additional kwargs to DatetimeIndexResampler.sum has no impact on the result and is deprecated. This will raise a TypeError in a future version of pandas.
if resample:
returns = returns.resample(resample).last() if compound else returns.resample(resample).sum()
if isinstance(benchmark, _pd.Series):
benchmark = benchmark.resample(resample).last() if compound else benchmark.resample(resample).sum()
I ran the simple code below and got an error:
qs.reports.full(returns=equity_return, benchmark=benchmark_return, output='report.html', title='Strategy')
(with equity_return and benchmark_return being Series and timeframe M30)
and I get the following error:
Passing additional kwargs to DatetimeIndexResampler.sum has no impact on the result and is deprecated. This will raise a TypeError in a future version of pandas.
UnsupportedFunctionCall Traceback (most recent call last)
in <cell line: 4>()
2 benchmark_return = backtest.data['Close'].pct_change().fillna(0).resample('D').sum()
3 #qs.reports.html(equity_return, benchmark_return, output='report.html')
----> 4 qs.reports.full(returns=equity_return,
5 benchmark=benchmark_return,
6 output='report.html',
5 frames
/usr/local/lib/python3.10/dist-packages/pandas/compat/numpy/function.py in validate_resampler_func(method, args, kwargs)
374 if len(args) + len(kwargs) > 0:
375 if method in RESAMPLER_NUMPY_OPS:
--> 376 raise UnsupportedFunctionCall(
377 "numpy operations are not valid with resample. "
378 f"Use .resample(...).{method}() instead"
UnsupportedFunctionCall: numpy operations are not valid with resample. Use .resample(...).sum() instead
Please guide me how to fix it, thank you !!!
The text was updated successfully, but these errors were encountered: