I'd like to modify the attached algo to maintain a 20% position in gold (using the 'GLD'
ETF).
Current = Buys 5 stocks and rebalances daily
Proposed = Buys 4 stocks (80% of holdings) and holds GLD (20% of holdings). Maintains this configuration after rebalancing.
Questions:
1) Is this possible? If so I'd like to get actual code modifications or a modified algo if someone is willing as my coding skills aren't real strong.
2) Can someone also help with the following warnings?
Your algorithm uses APIs that have been deprecated in favor of newer, more powerful versions. For more information, go here.
Line 109: Function update_universe
is deprecated.
Line 45: Checking whether an asset is in data is deprecated.
Line 36: Checking whether an asset is in data is deprecated.
These deprecated APIs will stop working in the future. Please switch to the new APIs as soon as possible.
I would appreciate specifics or code modifications to fix this if possible.
Thanks,
Troy