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
Hey, what are you trying to achieve? You can use rebalancing to keep the same weights over time. Are you referring to something similar to #77? I just noticed it and will work on that!
Oh my god, you're fantastic! It would have taken me some time to get back and remember how we designed this (I am not the one who implemented rebalancing). Would you like to make a pull request? I don't mind copying the file either, up to you.
Describe the bug
In https://github.com/ssantoshp/Empyrial/blob/main/src/empyrial/main.py#L122-L127, we compute the return of a portfolio as below.
if len(stocks) > 1:
ret_data = assets.pct_change()[1:]
returns = (ret_data * wts).sum(axis=1)
Is this correct?
Expected behavior
As the time changes, the weights of stocks in the portfolio are changing. Should wts be updated when computing the return?
The text was updated successfully, but these errors were encountered: