-
When having a |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
@shiosai, yes you can pass SPY returns as |
Beta Was this translation helpful? Give feedback.
-
where exactly do we need to pass this parameter benchmark_rets? sorry I am new to vector bt. |
Beta Was this translation helpful? Give feedback.
@shiosai, yes you can pass SPY returns as
benchmark_rets
. You can usespy.vbt.to_returns()
to convert price series to return series before passing. There is no normalization needed. Although vectorbt additionally forward and backward fills NaNs before calculating returns, so you can do the same usingprice.ffill().bfill()
with pandas.