Previous rebalance date: 2024-01-22 → Portfolio weights from optimization
gvkey | wgt_sol |
---|---|
001001 | 0.40 |
001002 | 0.35 |
001003 | 0.25 |
Period: 2024-01-22 → 2024-04-22 (next rebalance date)
Calculate cumulative growth for each stock:
cum_growth = ∏(1 + daily_return) over the period
gvkey | Cum Growth | New Weight |
---|---|---|
001001 | 1.08 | 0.40 × 1.08 = 0.432 |
001002 | 0.95 | 0.35 × 0.95 = 0.333 |
001003 | 1.12 | 0.25 × 1.12 = 0.280 |
Renormalize to sum = 1.0:
gvkey | \( w_{\mathrm{prev}} \) (rolled forward) |
---|---|
001001 | 0.432 / 1.045 = 0.413 |
001002 | 0.333 / 1.045 = 0.319 |
001003 | 0.280 / 1.045 = 0.268 |
Date | T10YIE |
---|---|
2024-01-01 | 0.0234 |
2024-01-02 | 0.0241 |
... | ... |
2024-01-08 | 0.0237 |
2024-01-09 | 0.0245 |
Date | gvkey | tr |
---|---|---|
2024-01-08 | 001001 | 0.015 |
2024-01-08 | 001002 | 0.009 |
2024-01-08 | 001003 | 0.021 |
gvkey | wgt |
---|---|
001001 | 0.40 |
001002 | 0.35 |
001003 | 0.25 |
Input: data_bench, rebal_date=2024-01-22, lookback_days=126
lookback_dates = last 126 trading days before 2024-01-22
Index | Date | TIPS Yield |
---|---|---|
[0] | 2024-01-08 | 0.0237 |
[1] | 2024-01-09 | 0.0245 |
[2] | 2024-01-10 | 0.0239 |
... | ... | ... |
[125] | 2024-01-22 | 0.0241 |
✨ Output:
Input: data_tr, baseline, required_dates (from TIPS vector!)
1. Filter universe: baseline selects only 3 stocks from available data_tr
2. Initialize matrix: (126 dates × 3 stocks) filled with zeros
3. Fill column by column using EXACT same dates as TIPS vector:
Date | 001001 (Stock A) | 001002 (Stock B) | 001003 (Stock C) |
---|---|---|---|
2024-01-08 | 0.015 | 0.009 | 0.021 |
2024-01-09 | -0.012 | 0.018 | 0.005 |
2024-01-10 | 0.008 | -0.003 | 0.000 |
... | ... | ... | ... |
2024-01-22 | 0.006 | 0.016 | 0.012 |
feastol = 1e-3
, abstol = 1e-3
, reltol = 1e-3
The sector allocation patterns reveal a sophisticated understanding of inflation hedging:
A sophisticated quantitative strategy for hedging inflation risk through equity portfolio construction