Portfolio Exploration

Notes

  1. Model variables × difference orders build the feature set: order 0 is the level (log price, log volume), order 1 its change (returns), order 2 the change of the change (acceleration). Risk always comes from the return block of the covariance; the selected features drive the correlation view and the linear-model forecast.
  2. Linear model μ: each asset's next-day return is regressed on its own lagged features (standardized over the estimation window, ridge-stabilized), and the one-step forecast is annualized. Historical mean is the textbook trailing average.
  3. In-sample optimizes once over the whole range and applies those weights to the same history — it saw the future. Walk-forward re-estimates at each rebalance from the trailing lookback only. The gap between the curves is the overfitting tax.
  4. Prices are split-adjusted daily closes, without dividends — total-return comparisons understate high-yield assets and the SPY benchmark alike.
  5. Fully invested, gross exposure Σ|w| = 1. The Directions control picks which way legs may point: Long only or Short only forces every leg. With both allowed, every re-estimation searches several distinct sign orthants: all-long and all-short baselines, forecast-sign and unconstrained-tangency seeds, plus an expected-return-oriented low-variance covariance-spread seed. Each candidate has its μ and covariance entries sign-flipped, runs through the same constrained sizing machinery, and the best estimated candidate for the selected objective wins. This is deterministic multi-start search rather than the previous per-asset μ < 0 shortcut; borrow and financing costs are still ignored. The max-weight cap applies to absolute weights by clip-and-renormalize; min-variance and max-Sharpe solve in closed form with an active-set pass for negative weights. A short-heavy account whose equity hits zero is treated as a margin wipeout and flatlines.
  6. Currencies enter the same ticker list as pairs vs USD — EUR/USD, JPY/USD, GBP/USD, AUD/USD, CAD/USD, CHF/USD. The daily-candles table holds US-listed equities and ETFs only, so each pair loads its CurrencyShares ETF proxy (FXE, FXY, FXB, FXA, FXC, FXF); USD/JPY loads the inverted series (1/price). Useful as hedging legs against equity exposure.
  7. Shrinkage blends the sample covariance toward a constant-correlation target: Σ = (1−λ)S + λF. The slider is λ.
  8. Commissions default to IBKR fixed pricing ($0.005/share, $1 minimum per order, capped at 1% of trade value). Slippage is a catch-all bps-per-side haircut for spread and impact. A drift band above 0% replaces calendar rebalancing with threshold rebalancing.
  9. The efficient frontier line is the unconstrained analytic frontier in the same direction-transformed space as the selected long/short basket; the cloud is 3,000 random portfolios in those directions, colored by Sharpe.
  10. The robustness map reruns a net walk-forward test for every lookback and covariance-shrinkage pair: monthly for forced directions and quarterly for the more expensive multi-orthant Both search. All cells share the latest common start date required by the longest lookback, so they are directly comparable. It is a sensitivity diagnostic, not a second optimization target.
  11. Bootstrap weight intervals come from 400 deterministic five-day moving-block resamples of the latest estimation window. In historical-mean mode each draw re-estimates both μ and covariance; in linear-model mode the point forecast is held fixed so the intervals isolate covariance uncertainty. In Both mode the selected sign orthant is held fixed across draws so the range measures sizing uncertainty rather than repeating model selection. The 10–90% range is resampling uncertainty, not a confidence interval for future returns.
  12. Order-0 price levels are non-stationary; correlations of levels are mostly spurious trend. That is half the reason the toggle exists.
  13. The risk-free rate feeds the Sharpe numerator and alpha; idle cash is assumed zero (fully invested), so it does not compound. Short shared histories (recent listings) clamp the lookback so at least half the span remains to backtest.