← Back to Projects

Adaptive Portfolio Strategies: Sequential Allocation Methods

Comprehensive analysis of 14 sequential portfolio allocation strategies on a diversified ETF portfolio with theoretical foundations and transaction cost analysis.

Overview

This project provides a comprehensive analysis of adaptive portfolio allocation strategies, combining rigorous theoretical foundations with empirical testing. These methods address the challenge of sequentially distributing capital among assets to maximize cumulative wealth. Unlike traditional portfolio optimization, adaptive strategies make sequential decisions without requiring specific return distribution assumptions, making them particularly relevant for algorithmic trading and dynamic portfolio management.

The Sequential Allocation Problem

Consider an investor who must distribute capital across m assets over n time periods. At each period t, the investor observes historical price movements, decides on a portfolio allocation \(\mathbf{w}_t = (w_{t,1}, \ldots, w_{t,m})\), and experiences returns based on market price changes \(\mathbf{r}_t = (r_{t,1}, \ldots, r_{t,m})\).

Constraints: Portfolio weights must be non-negative (\(w_{t,i} \geq 0\)), sum to unity (\(\sum w_{t,i} = 1\)), and decisions are sequential (\(\mathbf{w}_t\) depends only on past observations). The objective is to maximize terminal wealth \(V_n = \prod_{t=1}^n V_t\), where \(V_t = \mathbf{w}_t \cdot \mathbf{r}_t\) is the portfolio return at time t.

This framework relaxes traditional assumptions by making no distributional assumptions, operating in a sequential adaptive framework, and focusing on cumulative wealth maximization rather than single-period optimization.

Fundamental Concepts

Return Factors: The return factor \(r_{t,i} = p_{t,i} / p_{t-1,i}\) represents the gross return of asset i, where values > 1 indicate appreciation and < 1 indicate depreciation.

Wealth Accumulation: Starting with initial wealth \(V_0 = 1\), wealth evolves as \(V_n = \prod_{t=1}^n \left(\sum_{i=1}^m w_{t,i} \times r_{t,i}\right)\). Working in log space simplifies analysis: \(\log V_n = \sum_{t=1}^n \log P_t\).

The Rebalancing Effect: A key insight is that constant rebalancing can outperform static hold in volatile markets through 'volatility harvesting.' For example, with two assets alternating between $1 and $2, static hold ends at starting wealth while a 50/50 rebalanced portfolio grows exponentially.

Baseline Approaches

Static Hold (SH): Passive investment with no rebalancing. Initial allocation drifts with market movements, resulting in zero transaction costs but momentum-following behavior that converges to single-asset portfolio in trending markets.

Fixed Rebalancing (FR): Maintains constant allocation through periodic rebalancing. Exploits mean reversion and benefits from volatility but incurs transaction costs. Research shows that for any market sequence, there exists a fixed allocation that outperforms the best single asset.

Optimal Fixed Allocation (OFA): Best constant allocation determined retrospectively by solving \(\mathbf{w}^* = \arg\max_{\mathbf{w}} \prod_{t=1}^n (\mathbf{w} \cdot \mathbf{r}_t)\). Provides performance upper bound and is used for strategy evaluation, though unachievable in practice as it requires future knowledge.

Momentum-Based Strategies

Core Principle: Increase allocation to recently successful assets, based on the observation that momentum exists in financial markets.

Ensemble Portfolio (EP): Maintains a weighted ensemble of all possible fixed allocation strategies. It samples N constant portfolios uniformly from the allocation space, tracks each portfolio's cumulative wealth, and weights next allocation by relative performance. Achieves wealth within a polynomial factor of the optimal fixed allocation: \(W_n(\text{EP}) \geq W_n(\text{OFA}) / (n+1)^m\), making it asymptotically optimal without distributional assumptions.

Multiplicative Weights (MW): Applies multiplicative weight updates from online learning with the rule \(w_{t+1,i} \propto w_{t,i} \times \exp(\eta \times r_{t,i})\), where \(\eta\) is the learning rate. Exponentially increases weights on winners and decreases on losers, achieving \(O(\sqrt{n \log m})\) regret relative to optimal fixed allocation.

Second-Order Update (SOU): Uses second-order information (Hessian) for faster convergence. Maintains Hessian approximation \(H_t\) and updates using Newton-like steps projected back to simplex. Offers better convergence rate than first-order methods but with higher computational cost per iteration.

Reversion-Based Strategies

Core Principle: Exploit mean reversion by increasing allocation to recent underperformers, assuming prices tend to revert to historical averages.

Aggressive Reversion (AR): Uses online convex optimization with reversion constraint. Solves \(\min \|\mathbf{w}_{t+1} - \mathbf{w}_t\|^2\) subject to \(\mathbf{w}_{t+1} \cdot \bar{\mathbf{r}}_t \geq \epsilon\), where \(\bar{\mathbf{r}}_t\) is the mean return. The closed-form solution moves away from recent winners and toward recent losers, with magnitude proportional to deviation from mean. Parameters: \(\epsilon\) (sensitivity threshold) and C (aggressiveness cap).

Confidence-Weighted Reversion (CWR): Maintains probability distribution \(\mathcal{N}(\boldsymbol{\mu}_t, \boldsymbol{\Sigma}_t)\) over portfolio weights. High confidence leads to small updates while low confidence leads to large updates, adapting to market uncertainty. More robust in noisy markets.

Moving Average Reversion (MAR): Predicts next returns using moving average \(\hat{\mathbf{r}}_{t+1} = \text{MA}_w(\mathbf{r}_{1:t}) / \mathbf{r}_t\), then moves portfolio toward predicted winners. If \(r_t > \text{MA}\), price is above average and expected to revert down; if \(r_t < \text{MA}\), price is below average and expected to revert up. Simple to understand and effective in mean-reverting markets.

Correlation Shift (CS): Exploits negative correlations between consecutive periods. Divides history into two windows, computes cross-correlations, and transfers weight from positively to negatively correlated pairs. Captures short-term reversals common in market microstructure.

Robust Median Reversion (RMR): Replaces mean with median for robustness to outliers. Predicts using \(\hat{\mathbf{r}}_{t+1} = \text{median}_w(\mathbf{r}_{1:t}) / \mathbf{r}_t\), providing more stable performance in markets with extreme price movements.

Pattern-Learning Strategies

Core Principle: Learn from historical patterns to predict future returns, assuming markets exhibit recurring behaviors.

Growth-Optimal Allocation (GOA): Information-theoretic approach maximizing expected logarithmic growth: \(\max_{\mathbf{w}} \mathbb{E}[\log(\mathbf{w} \cdot \mathbf{r})]\). For small returns, the solution is \(\mathbf{w}^* = \boldsymbol{\Sigma}^{-1}\boldsymbol{\mu}\) where \(\boldsymbol{\mu}\) is expected returns and \(\boldsymbol{\Sigma}\) is covariance matrix. Estimates are computed from historical data and recomputed periodically. Maximizes long-run growth rate.

Similarity-Based Prediction (SBP): Finds similar historical patterns and predicts based on what followed. Algorithm: (1) Define current pattern as last w returns, (2) Find k most similar patterns in history by Euclidean distance, (3) Average the returns that followed those patterns, (4) Allocate proportionally to predicted returns. Makes no parametric assumptions and adapts to regime changes but is computationally intensive.

Correlation-Weighted Learning (CWL): Refinement that weights neighbors by correlation strength. Finds patterns with correlation > \(\rho\), weights predictions by correlation magnitude, and allocates based on weighted prediction. More selective (only uses correlated patterns) and more robust to noise.

Strategies Tested (14 Total)

Baselines (3): SH (Static Hold), FR (Fixed Rebalancing), OFA (Optimal Fixed Allocation - retrospective optimal)

Momentum-Based (3): EP (Ensemble Portfolio), MW (Multiplicative Weights), SOU (Second-Order Update)

Reversion-Based (5): AR (Aggressive Reversion), CWR (Confidence-Weighted Reversion), MAR (Moving Average Reversion), CS (Correlation Shift), RMR (Robust Median Reversion)

Pattern-Learning (3): GOA (Growth-Optimal Allocation), SBP (Similarity-Based Prediction), CWL (Correlation-Weighted Learning)

Methodology & Data

ETF Universe: 6 ETFs selected for broad diversification across asset classes: VTI (US Total Stock Market), EFA (EAFE - Developed markets ex-US), EEM (Emerging Markets), TLT (20+ Year Treasury - Long-term US bonds), TIP (TIPS - Inflation-protected securities), VNQ (Real Estate - US REIT exposure).

Time Periods: Training period 2015-2022 (8 years) for parameter selection, Testing period 2023-2024 (2 years) for out-of-sample evaluation. All strategies evaluated on test data only.

Benchmarks: SPY (S&P 500) and UFR (Uniform Fixed Rebalancing - equal weight rebalanced) for comparison.

Implementation: All 14 strategies implemented from scratch using only numpy, pandas, and scipy. No external libraries required, ensuring transparency and customizability.

Performance Analysis Framework

Performance Gap Framework: Performance gap measures the difference relative to OFA: \(\text{Gap}_n = \log V_n(\text{OFA}) - \log V_n(\text{Strategy})\). Theoretical bounds: EP has \(O(m \log n)\) gap, MW has \(O(\sqrt{n \log m})\) gap, SOU has \(O(m \log n)\) gap.

Return Metrics: Total Return \(((V_n - 1) \times 100\%)\), Annualized Return \(((V_n^{252/n} - 1) \times 100\%)\), Excess Return (Return - Benchmark Return)

Risk Metrics: Volatility \((\sigma = \text{std}(\text{returns}) \times \sqrt{252})\), Sharpe Ratio \(((\text{Return} - R_f) / \text{Volatility})\), Maximum Drawdown \((\max_t [(\max_{s \leq t} V_s - V_t) / \max_{s \leq t} V_s])\)

Risk-Adjusted Metrics: Profit Factor \((\sum(\text{gains}) / \sum(|\text{losses}|))\), Winning Percentage (% of positive return periods), Calmar Ratio (Return / Max Drawdown), Sortino Ratio (uses downside deviation instead of total volatility)

Transaction Cost Analysis

Reality Check: Rebalancing incurs costs that significantly impact performance. We use a proportional cost model: \(\text{Cost}_t = \gamma \times \sum_i |b_{t,i} - b_{t-1,i}^+|\), where \(\gamma = 0.1\%\) (realistic for retail investors) and \(b_{t-1,i}^+\) is the weight after price change but before rebalancing.

Net Return: \(S_t^{\text{net}} = S_t \times (1 - \text{Cost}_t)\). Aggressive rebalancing strategies suffer more from costs.

Fee Impact: We compare results with and without transaction fees to identify which strategies remain viable after accounting for real-world trading costs. Algorithms that rebalance frequently (e.g., Follow-the-Winner strategies) are more sensitive to fees.

Test Results

Results are computed on the latest test period (2023-2024) and displayed in the interactive visualization below. The comparison includes all 14 algorithms with detailed performance metrics, equity curves, and drawdown analysis.

Key Metrics: Each algorithm is evaluated on Sharpe ratio, Sortino ratio, Calmar ratio, maximum drawdown, annualized return, volatility, profit factor, and winning percentage.

Fee Impact: Results are shown both with and without 0.1% transaction costs to demonstrate the real-world impact of trading fees on algorithm performance.

Practical Considerations

Market Regime Dependence: Trending markets favor momentum-based strategies and SH; Mean-reverting markets favor reversion-based strategies and FR; Volatile markets benefit FR through rebalancing.

Parameter Selection: Use training period for grid search over parameter space, select parameters maximizing Sharpe ratio or return, evaluate on out-of-sample test data. Use walk-forward analysis for robustness. More parameters increase overfitting risk.

Computational Complexity (per period): SH/FR: \(O(m)\), AR/MAR/RMR: \(O(m^2)\), EP: \(O(m \times N_{\text{samples}})\), SBP/CWL: \(O(n \times m)\), SOU: \(O(m^3)\) due to matrix inversion. Scalability important for high-frequency or large-universe applications.

Implementation Challenges: Use log-space for wealth calculations, add regularization to covariance matrices, bound weights away from 0 and 1, ensure simplex projection maintains valid weights, handle missing data and corporate actions.

Theoretical Insights

No Universal Winner: No strategy dominates all others across all market conditions. Strategy selection depends on market characteristics, investment horizon, risk tolerance, and transaction costs.

Diversification Benefits: Diversified strategies (EP, FR) provide robustness. Averaging over multiple strategies reduces variance.

Information-Theoretic View: Sequential allocation relates to universal data compression. Portfolio selection is analogous to sequential prediction.

Convergence: Most adaptive strategies converge to OFA asymptotically: \(\lim_{n \to \infty} V_n(\text{Strategy}) / V_n(\text{OFA}) = 1\).

Conclusion & Key Takeaways

Adaptive portfolio strategies provide a rigorous framework for sequential investment decisions, synthesizing insights from information theory, online learning, financial mathematics, and statistical learning.

Key Takeaways: (1) No single strategy dominates all market conditions, (2) Rebalancing can enhance returns in volatile markets, (3) Transaction costs significantly impact practical performance, (4) Theoretical guarantees provide confidence in strategy behavior, (5) Empirical testing on diverse market conditions is essential.

Practical Wisdom: Start with simple strategies (FR, AR), understand market regime before selecting strategy, account for transaction costs in backtesting, use walk-forward analysis for parameter selection, combine multiple strategies for robustness.

Implementation: All strategies implemented from scratch (~800 lines of code) using only numpy, pandas, and scipy. No external libraries required, ensuring transparency, customizability, and compatibility.

References

Cover, T. M. (1991). Universal Portfolios. Mathematical Finance, 1(1), 1-29.

Li, B., & Hoi, S. C. H. (2012). Online Portfolio Selection: A Survey. ACM Computing Surveys, 46(3).

Helmbold, D. P., et al. (1998). On-Line Portfolio Selection Using Multiplicative Updates. Mathematical Finance, 8(4), 325-347.

Li, B., et al. (2012). PAMR: Passive Aggressive Mean Reversion Strategy for Portfolio Selection. Machine Learning, 87(2), 221-258.

Li, B., et al. (2013). Confidence Weighted Mean Reversion Strategy for Online Portfolio Selection. JMLR, 15.

Borodin, A., et al. (2005). Can We Learn to Beat the Best Stock. Journal of Artificial Intelligence Research, 21, 579-594.

Györfi, L., et al. (2006). Nonparametric Kernel-Based Sequential Investment Strategies. Mathematical Finance, 16(2), 337-357.

Results

Loading OLPS comparison results…