I have a two asset portfolio which rebalances between the two only. How can I have the record_vars function give me the weightings in each asset so I can see it record when building the algorithm, and watching the backtest going.
I have a two asset portfolio which rebalances between the two only. How can I have the record_vars function give me the weightings in each asset so I can see it record when building the algorithm, and watching the backtest going.
@Nathan,
You may try something like this:
for i, sec in enumerate(ASSETS):
if data.can_trade(sec):
record(**{sec.symbol: wt[i]})
order_target_percent(sec, wt[i])