haapy - a python implementation of Hybrid Asset Allocation
Hybrid Asset Allocation is a tactical investing strategy designed by Wouter J. Keller and Jan Willem Keuning [1, 2]. The strategy combines dual momentum with canary momentum. This script implements the G8/T4 variant and calculates the investment signals.
- Calculate the 12631U momentum scores of all assets.
- First trading day of the month:
- If the TIP momentum score is positive buy the 4 highest momentum assets from the offensive universe (SPY, IWM, VEA, VWO, DBC, VNQ, IEF, TLT) in equal proportion and hold until the end of the month.
- If the TIP score is negative, buy the highest momentum asset from the defensive universe (IEF, BIL)
- Sell all assets and calculate the next holdings. See [1, 2] for further explanations.
There's three options to run this script.
Requirements: docker compose
docker compose up --build
Requirements: python 3.10.2
pip install poetry==1.7.1
poetry shell
python ./src/haapy
https://colab.research.google.com/drive/1bDtbPJI_ldW7JzfSbD7QZl3Nqw_Vvz8y?usp=sharing