oronimbus / tactical-asset-allocation

Implements different approaches to tactical and strategic asset allocation
MIT License
26 stars 7 forks source link

Incorrect indexing on RBAA sample code #3

Open indilyone opened 10 months ago

indilyone commented 10 months ago

On the line cond_2 = np.where(strategy_data.reindex(signal_2.index) > signal_2, 1, 0)[:,:-1] compared with strategy_data.reindex(signal_2.index) > signal_2 (dataframe format) when you index by [:,:-1] (exclude last column) The VNQ column is excluded, you intended to compare the price of all asset except cash to its 12m SMA. You should exclude the first column instead.

indilyone commented 10 months ago

Also, in strategy pipeline of RBAA, the weights for the ETFs are incorrect (they sum more than 100%)

https://portfoliodb.co/portfolios/robust-asset-allocation-balanced/

oronimbus commented 10 months ago

Thanks @indilyone I'll look into it when I get a moment. Been busy at work.