Hi,
how can I do my rebalancing less frequently than 1 month (e.g. yearly)? For now I've tried to do it like this in before_trading_start:
def before_trading_start(context, data):
now = get_datetime('US/Eastern')
if now.month==rebalancing_month:
pass
else:
return
Thanks for help.