I would like to calculate the current ratio of those holdings securites so that I will rebalance if the ratio is not what I want.
Attached backtest:
- I use self.SetHoldings() to hold SPY with 50% of my account equity.
- I will calculate the value of my holdings monthly
- I will rebalance it and always balance to 50%