
Algorithmic Trading 101: Strategies, Backtesting & Risk Management
A practitioner-oriented course covering the core building blocks of systematic trading: how to backtest without fooling yourself, the statistics behind mean-reversion and momentum strategies, and how to size positions and manage risk so a good strategy doesn't blow up your account.
Course Syllabus
10 / 10Chapter 10: Putting It Together β Building a Strategy Portfolio
Chapter 10: Putting It Together β Building a Strategy Portfolio
We've come a long way. We started with the discipline of honest backtesting (Chapter 1) and statistical validation (Chapter 2). We chose the right infrastructure to avoid transcription errors (Chapter 3). We built a deep statistical understanding of mean reversion (Chapter 4) and turned it into practical, risk-bounded strategies (Chapter 5). We did the same for momentum (Chapter 6), grounding it in genuine market mechanisms rather than blind pattern-matching. We unpacked the mechanics of futures curves that quietly shape both strategy families (Chapter 7). And we closed with the two pillars of risk management: how much to bet (Chapter 8) and how to cap the worst-case outcome (Chapter 9).
This final chapter isn't about introducing new techniques. It's about synthesis β showing you how these pieces fit together into something more resilient than any single strategy could be on its own, and leaving you with a durable framework for how to think about algorithmic trading going forward.
Why this chapter matters: A single strategy, no matter how well-validated, will eventually go through a period where it simply doesn't work β not because it was flawed, but because markets move through different regimes, and no single strategy family thrives in every regime. The real, lasting edge in algorithmic trading often comes from thoughtfully combining strategies, not from finding one perfect one.
1. Two Philosophies, Diametrically Opposed
Let's start by explicitly restating the core tension that has run underneath this entire course, now that we can see it in full:
- Mean reversion (Chapters 4-5) bets that prices which have strayed from equilibrium will snap back. It thrives in calm, range-bound, stable-but-nonzero-volatility conditions, where deviations are genuine, temporary noise around a stable underlying relationship.
- Momentum (Chapter 6) bets that prices which have been moving in a direction will keep moving that way. It thrives during sustained trends and high-kurtosis, 'black swan' events β exactly the conditions where mean-reversion strategies tend to suffer their worst drawdowns.
This isn't a coincidence or a minor detail β it's a structural, near-mirror-image relationship. The market conditions that make one strategy family sing are frequently the same conditions that make the other struggle.
Classic Example: Consider two hypothetical periods in Indian equity markets. During an extended, range-bound, sideways-consolidation phase in Nifty 50 β the kind of market where the index oscillates within a defined band for months without a clear sustained direction β a well-constructed mean-reversion strategy on a cointegrated stock pair (like the HDFC BankβICICI Bank spread from Chapter 5) tends to generate frequent, profitable round-trip trades, since deviations from the pair's historical relationship keep reverting as expected. Now consider a sharp, sustained directional move β a multi-month rally driven by strong economic data and foreign institutional inflows, or conversely a sharp multi-week correction driven by an unexpected macro shock. In either directional scenario, the cross-sectional momentum strategy from Chapter 6 (long the strongest relative performers, short the weakest) tends to capture much of that sustained move, while the mean-reversion pair strategy may experience a period of underperformance, as the specific relationships it depends on can temporarily behave less predictably during periods of unusual market stress or dispersion.

2. Why Combining Strategies Beats Picking One
The Diversification Argument
This complementary relationship is precisely what makes combining mean-reversion and momentum strategies so valuable β not because doing so increases the average return of either strategy individually, but because it smooths the combined equity curve, reducing the depth and duration of drawdowns relative to running either strategy alone.
This is a direct, practical extension of the multi-strategy Kelly formula discussion from Chapter 8: recall that optimal leverage for a portfolio of strategies depends not just on each strategy's individual mean and variance, but on how correlated their returns are with each other. Because mean-reversion and momentum strategies tend to be negatively or weakly correlated β performing well in different regimes rather than the same ones β combining them can support a higher total leverage, and therefore a faster long-term compounded growth rate, than either strategy could safely support in isolation.
Classic Example: Suppose, individually, a half-Kelly-sized mean-reversion strategy on Indian bank stock pairs supports a leverage of 2.5x, and a separately half-Kelly-sized cross-sectional momentum strategy on the Nifty 500 universe supports a leverage of 2x. If these two strategies' returns are genuinely weakly correlated (verified, not assumed β recall Chapter 4's insistence on testing relationships statistically rather than taking them on faith), the combined portfolio may be able to support a meaningfully higher blended leverage than either strategy alone, precisely because the strategies' losing periods don't tend to coincide β one strategy's drawdown is often offset by the other strategy's simultaneous strength.
This Is Not 'Free Money' β It's Genuine Risk Reduction
Warning: Don't mistake this diversification benefit for a way to eliminate risk entirely, or as license to abandon the rigor from earlier chapters. Both strategies still need to individually pass the full validation gauntlet β honest backtesting (Chapter 1), statistical significance testing (Chapter 2), a plausible economic rationale (Chapters 4 and 6) β before they're worth including in a combined portfolio at all. Combining two poorly-validated, overfit strategies doesn't magically produce a robust portfolio; it just produces two unreliable return streams sitting side by side. Diversification amplifies the value of genuine edges β it does not manufacture edge out of noise.
3. A Practical Framework for Building Your Own Strategy Portfolio
Let's walk through how you might actually assemble a small, disciplined multi-strategy portfolio, applying everything from this course in sequence.
Step 1: Build and Validate Each Strategy Independently
Before even thinking about combination, each candidate strategy must clear the full bar established across Chapters 1-7:
- Honest backtesting (Chapter 1): no look-ahead bias, no survivorship bias, realistic fills, split/dividend-adjusted data.
- Statistical significance (Chapter 2): does the strategy clear a reasonable confidence threshold under hypothesis testing, Monte Carlo simulation, and trade-randomization tests? Does it avoid the red flags (too few trades, suspiciously high Sharpe with excessive parameters, wrong benchmark comparisons)?
- A plausible economic rationale (Chapters 4, 6, 7): can you articulate, in plain language, why this strategy should work β cointegration backed by genuine business logic, momentum backed by an understood driver like information diffusion or roll-return persistence β rather than relying on 'the backtest just looks good'?
- Disciplined, non-overfit construction (Chapter 5): does the strategy use as few free parameters as reasonably possible, with look-back windows and thresholds anchored to principled measures like half-life rather than brute-force optimization?
Note: This step alone will eliminate the majority of strategy ideas you generate. That's expected, and it's the system working correctly, not failing. A strategy portfolio built from three or four genuinely validated strategies is far more robust than one built from a dozen strategies that merely 'looked good' in a single backtest.
Step 2: Check Correlation and Regime Behavior Across Strategies
Once you have a shortlist of individually validated strategies, examine how they behave relative to each other:
- Do they tend to have losing periods at the same time, or at different times? A portfolio of five mean-reversion strategies on different but economically similar stock pairs (say, several pairs of PSU banks) may look diversified on the surface β 'five different strategies!' β but if they're all exposed to the same underlying macro driver (interest rate cycles affecting the entire banking sector), they may be far more correlated, and therefore far less genuinely diversifying, than they initially appear.
- Deliberately seek out strategies that draw on structurally different drivers β for instance, pairing a mean-reversion strategy grounded in sector-specific cointegration (Chapter 4) with a momentum strategy grounded in forced fund-flow dynamics (Chapter 6), since these two edges arise from genuinely unrelated market mechanisms and are less likely to fail simultaneously.
Step 3: Size Each Strategy Using the Multi-Strategy Kelly Framework
Apply Chapter 8's multi-strategy Kelly formula, incorporating the correlation structure identified in Step 2, to determine appropriate leverage for each strategy within the combined portfolio β then apply the same half-Kelly discipline as a safety margin against estimation error, exactly as you would for a single strategy.
Step 4: Layer On Drawdown Control at Both Levels
Apply Chapter 9's tools thoughtfully at two distinct levels:
- Trade level: wide, rarely-triggered stop losses for the mean-reversion components (protecting against structural relationship breakdown without dragging down validated backtest performance); tighter, logic-consistent stop losses for the momentum components (reinforcing rather than fighting the continuation thesis).
- Portfolio level: consider CPPI if you have a genuine, non-negotiable floor requirement for the combined account β recognizing that CPPI operates on your total combined equity, not on each individual strategy separately.
Step 5: Monitor for Regime Shifts and Re-Validate Continuously
Remember Chapter 1's warning about regime shifts β no backtest, however well-validated, guarantees future performance if the market's underlying structure changes. Build an ongoing discipline of:
- Comparing live performance against backtested expectations for each strategy individually (the walk-forward testing discipline from Chapter 1).
- Periodically re-checking whether the economic rationale behind each strategy still holds β has a cointegrated relationship broken down (Chapter 4)? Has a momentum driver like a specific fund-flow pattern become less relevant (Chapter 6)?
- Re-running your correlation analysis between strategies periodically, since correlation structures between strategies can themselves shift as market regimes change.

4. A Worked Illustration: A Simple Two-Strategy Portfolio
Let's make this concrete with a single, illustrative example that draws together concepts from across the entire course.
Strategy A β Mean Reversion: A Bollinger-band pairs strategy on a cointegrated spread between two large private-sector banks, with a look-back window anchored to a validated half-life of roughly 14 trading days (Chapters 4-5), a wide stop loss set beyond anything triggered in the validated backtest sample (Chapter 9), and individually half-Kelly-sized leverage (Chapter 8).
Strategy B β Momentum: A cross-sectional momentum strategy on the Nifty 500 universe, ranking stocks by trailing 12-month return, going long the top decile and short the bottom decile with monthly rebalancing (Chapter 6), using a tighter, thesis-consistent stop loss appropriate for momentum (Chapter 9), and its own independently half-Kelly-sized leverage.
Combining Them: After validating both strategies independently against the full checklist from Step 1 above, you check their historical correlation and find they are, as expected given their different underlying drivers (sector-specific cointegration versus broad market relative-strength momentum), only weakly correlated. Because of this low correlation, the multi-strategy Kelly framework suggests you can run both strategies simultaneously at a combined leverage higher than either strategy's standalone half-Kelly figure, while still maintaining the same overall portfolio-level risk profile β capturing the genuine diversification benefit described in Section 2.
The resulting combined equity curve, in a healthy scenario, should show a smoother path than either strategy alone: periods where the mean-reversion strategy struggles (a sustained directional market move) are partially offset by the momentum strategy performing well during that same stretch, and vice versa during range-bound, choppy periods.
Golden Rule: The value of this combination isn't that either individual strategy becomes 'better' β it's that the combined portfolio's risk-adjusted growth path becomes more resilient, precisely because the two strategies' weaknesses don't tend to show up at the same time.
5. Closing Thoughts: The Principles That Outlast Any Single Strategy
As this course closes, it's worth stepping back from the specific techniques and asking: what are the durable, transferable principles that will still matter years from now, long after any specific strategy parameter or platform choice has become outdated?
- Distrust your own backtest until you've earned the right to trust it. Every chapter in this course, in one way or another, has come back to this discipline β checking for look-ahead bias, data-snooping bias, survivorship bias, and unrealistic fills (Chapter 1); validating statistical significance rather than trusting a single impressive-looking number (Chapter 2); anchoring parameters to principled measures like half-life rather than brute-force optimization (Chapter 5).
- Understand why a strategy should work, not just that it backtested well. A cointegration relationship needs a plausible business rationale (Chapter 4). A momentum signal needs an understood driver β information diffusion, forced fund flows, or roll-return persistence (Chapters 6-7). Statistical patterns without economic grounding are the single most common source of strategies that work beautifully in a backtest and fail in live trading.
- Position sizing and drawdown control are not afterthoughts β they are as important as the strategy itself. A genuinely profitable strategy, oversized or left without appropriate drawdown protection, can still end in ruin (Chapter 8). The right amount of leverage, tempered with appropriate humility about estimation uncertainty (half-Kelly), and the right drawdown-control tool matched to the right strategy family (Chapter 9), are what separate a strategy that survives for years from one that blows up in its first bad month.
- No single strategy, however well-validated, works in every market regime. This final chapter's core lesson β that mean reversion and momentum tend to thrive in opposite conditions β is really a specific instance of a much broader truth: durable trading success tends to come from thoughtful diversification across genuinely different, validated edges, combined with disciplined risk management, rather than from finding one perfect strategy and betting everything on it.
A final note from TradeKaizen Academy: Algorithmic trading is not a destination you arrive at once and then coast β it's an ongoing discipline of hypothesis, validation, humility about uncertainty, and continuous re-evaluation as markets evolve. The specific strategies, platforms, and even statistical techniques covered in this course will continue to develop over time. But the underlying discipline β honest backtesting, statistical rigor, economically grounded reasoning, and thoughtful risk management β is what will continue to serve you, strategy after strategy, market regime after market regime.
6. Key Takeaways
- Mean reversion and momentum are near-mirror-image strategy philosophies that tend to thrive in opposite market regimes β calm, range-bound conditions favor mean reversion; sustained trends and high-kurtosis events favor momentum.
- Because these two strategy families tend to be weakly or negatively correlated, combining them (once each is individually validated) can smooth the combined equity curve and, per the multi-strategy Kelly framework from Chapter 8, potentially support a higher combined leverage than either strategy could safely carry alone.
- Diversification amplifies genuine, validated edges β it does not manufacture edge out of unvalidated or overfit strategies; every component strategy must still individually clear the full validation bar established across Chapters 1-7.
- A disciplined strategy-portfolio-building process involves: independently validating each strategy, checking genuine correlation and regime behavior between strategies, sizing with the multi-strategy Kelly framework, layering appropriate drawdown control at both the trade and portfolio level, and continuously monitoring live performance against backtested expectations.
- The lasting principles of this course β honest backtesting, statistical rigor, economically grounded strategy design, and disciplined risk management β are more durable and more valuable than any single strategy, platform, or parameter choice, and will continue to serve you as markets and tools evolve.
Course complete. You now have a structured framework spanning the full lifecycle of a systematic trading strategy β from honest backtesting and statistical validation, through strategy construction for both mean reversion and momentum, to disciplined position sizing and drawdown control, and finally to combining strategies into a more resilient portfolio. The next step is yours: apply this framework rigorously, stay skeptical of your own results, and let genuine, validated edges β not hope β guide your capital.