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).
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).