Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

potential error in code #2

Open
turmeric-blend opened this issue Nov 17, 2020 · 0 comments
Open

potential error in code #2

turmeric-blend opened this issue Nov 17, 2020 · 0 comments

Comments

@turmeric-blend
Copy link

hi, thanks for the work on this. I am looking at markowitz_tuning.ipynb for the simulate() function.

def simulate(ht, ut):
    ret = torch.exp(logreturn1p_dist.sample())
    ht = ret * (ht + ut)                  <----- this line
    return ht, ret

from my understanding, ht should be (ret * (ht + ut))/(ret.T @ (ht + ut)) as per formula stated for how holdings evolve in 5.3 of the paper? This formula sums to 1 (as holdings should be), while the line in code doesn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant