avhz / RustQuant

Rust library for quantitative finance.
https://avhz.github.io
Apache License 2.0
1.07k stars 124 forks source link

feat: Add portfolio.position_weights() #205

Closed y5 closed 5 months ago

y5 commented 6 months ago

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:

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 commented 6 months ago

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

0xJepsen commented 5 months ago
  • Compute weights on the fly when needed

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