Skip to content

How to set a benchmark? #247

Answered by polakowo
shiosai asked this question in Q&A
Oct 6, 2021 · 2 comments · 8 replies
Discussion options

You must be logged in to vote

@shiosai, yes you can pass SPY returns as benchmark_rets. You can use spy.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 using price.ffill().bfill() with pandas.

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
2 replies
@shiosai
Comment options

@polakowo
Comment options

Answer selected by shiosai
Comment options

You must be logged in to vote
6 replies
@syedshahab698
Comment options

@polakowo
Comment options

@eervin123
Comment options

@polakowo
Comment options

@eervin123
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants