RustQuant
RustQuant copied to clipboard
Feature Request: Implement `get_weights()` method for `Portfolio`
Idea
I am interested in measuring the performance of a variety of rebalance strategies (threshold / interval). For the threshold rebalances you rebalance if weights deviate from some target weight. It would be nice to maybe at a field to the portfolio to have a target weight for each position and an actual weight for each position. perhapses something like this
pub struct Portfolio {
// other fields
pub actual_weight: HashMap<Positions, f32>,
pub target_weight: HashMap<Positions, f32>
}
Let me know what you think! I am happy to work on this
Great idea, thank you. Go ahead :)
Probably need to impl Hash, Eq, and PartialEq for Position if you wanna use it for the keys.