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

feat: Add portfolio.position_weights() #205

Merged
merged 1 commit into from
Apr 24, 2024
Merged

Conversation

y5
Copy link
Contributor

@y5 y5 commented Mar 13, 2024

solves #169.

Storing target weights inside of the portfolio seemed a bit off to me, could use an option there but I believe it's better to have that information in the user's rebalancing logic.

There were two approaches that I thought about:

  • Store weights on the portfolio and keep the weights updated with each transaction & price tick
  • Compute weights on the fly when needed

I've picked the second option since most applications have price ticks & transactions more frequently than accessing the portfolio weights (e.g. for rebalancing).

@avhz
Copy link
Owner

avhz commented Mar 13, 2024

I might get @0xJepsen to chime in on this one, as they might be in progress on it.

@avhz avhz merged commit 4f367f0 into avhz:main Apr 24, 2024
3 of 5 checks passed
@github-actions github-actions bot mentioned this pull request Apr 24, 2024
@0xJepsen
Copy link
Contributor

  • Compute weights on the fly when needed

Sorry for the late response here. I think the second option is the right one.

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

Successfully merging this pull request may close these issues.

3 participants