# Trend Following / Donchian Breakout (JP All Stocks)

- **Slug**: `trend-following-jp-all`
- **Verdict**: rejected (regime_dependent)
- **Asset class**: equity
- **Categories**: breakout, momentum, trend-following
- **Source**: qbuntu-analysis (computed asof 2026-07-28T01:10:02)
- **Reproducibility**: analysis-engine@bfafe7d, backtest-lib@711b855, grid tier=shallow (python 3.10.11, numpy 2.2.6, pandas 2.3.3)
- **HTML**: https://qbuntu.ai/strategies/trend-following-jp-all
- **JSON**: https://qbuntu.ai/v1/strategies/trend-following-jp-all
- **License**: CC-BY-4.0

## Hypothesis

Donchian channel breakout: stocks breaking above N-day highs continue trending. Testing on the full Japanese stock universe.

## Why it didn't work

Across 384 grid combinations, median Sharpe=0.13, best=0.82. Primary failure mode: regime_dependent.

## Performance summary

Headline figures are the **median across the parameter grid**, not the best run.

| Metric | Value |
|---|---|
| Sharpe (median) | 0.1329 |
| Max drawdown | -22.1% |
| p-value | 0.64 |
| Backtest period | 2022-02-01 to 2026-02-02 |

Sharpe distribution across 384 grid runs: median 0.13, best 0.82 (best-case — not representative), worst -0.5, p25 -0.04, p75 0.28.

## Methodology

- Notes: {"walk_forward_definition": {"type": "single_pass", "description": "Full period backtest without walk-forward split", "verdict_basis": "full_period"}}
- Slippage model: open-on-open + variable bps fixed
- Position sizing: equal_weight
- Regime definition: N225 SMA20/SMA60 three-class
- Transaction cost bps: 5

## Target universe

Tokyo Stock Exchange all listed (Prime/Standard/Growth), ~3747 stocks

## Runs (30)

| run_id | params | sharpe | UP | FLAT | DOWN |
|---|---|---:|---:|---:|---:|
| `r-trend-following-jp-all-0000` | cost_bps=5, n_stocks=5, exit_method="hold", regime_gate=false | 0.18 | 0.96 | -0.05 | 1.75 |
| `r-trend-following-jp-all-0001` | cost_bps=5, n_stocks=5, exit_method="hold", regime_gate=true | 0.08 | 0.29 | -0.05 | 1.75 |
| `r-trend-following-jp-all-0002` | cost_bps=10, n_stocks=5, exit_method="hold", regime_gate=false | 0.03 | 0.76 | -0.19 | 1.5 |
| `r-trend-following-jp-all-0003` | cost_bps=10, n_stocks=5, exit_method="hold", regime_gate=true | -0.06 | 0.2 | -0.19 | 1.5 |
| `r-trend-following-jp-all-0004` | cost_bps=5, n_stocks=5, exit_method="channel_exit", regime_gate=false | 0.18 | 0.96 | -0.05 | 1.75 |
| `r-trend-following-jp-all-0008` | cost_bps=5, n_stocks=5, exit_method="trailing_mid", regime_gate=false | 0.18 | 0.96 | -0.05 | 1.75 |
| `r-trend-following-jp-all-0012` | cost_bps=5, n_stocks=10, exit_method="hold", regime_gate=false | 0.52 | 1.01 | 0.35 | 0.1 |
| `r-trend-following-jp-all-0048` | cost_bps=5, n_stocks=5, exit_method="hold", regime_gate=false | 0.35 | 1.88 | 0.04 | 1.21 |
| `r-trend-following-jp-all-0066` | cost_bps=10, n_stocks=10, exit_method="channel_exit", regime_gate=false | 0.43 | 1.07 | 0.33 | -0.13 |
| `r-trend-following-jp-all-0108` | cost_bps=5, n_stocks=10, exit_method="hold", regime_gate=false | 0.01 | 1.8 | -0.62 | 0.56 |
| `r-trend-following-jp-all-0144` | cost_bps=5, n_stocks=5, exit_method="hold", regime_gate=false | 0.3 | 1.49 | -0.22 | 5.07 |
| `r-trend-following-jp-all-0151` | cost_bps=10, n_stocks=5, exit_method="channel_exit", regime_gate=true | 0.19 | 1.12 | -0.25 | 5.03 |
| `r-trend-following-jp-all-0193` | cost_bps=5, n_stocks=5, exit_method="hold", regime_gate=true | 0.21 | 0.24 | 0.19 | 0.4 |
| `r-trend-following-jp-all-0211` | cost_bps=10, n_stocks=10, exit_method="channel_exit", regime_gate=true | 0.33 | 0.54 | 0.17 | 0.89 |
| `r-trend-following-jp-all-0253` | cost_bps=5, n_stocks=10, exit_method="hold", regime_gate=true | 0.45 | 0.65 | 0.29 | 1.28 |
| `r-trend-following-jp-all-0295` | cost_bps=10, n_stocks=5, exit_method="channel_exit", regime_gate=true | -0.07 | 1.35 | -0.54 | 1.89 |
| `r-trend-following-jp-all-0337` | cost_bps=5, n_stocks=5, exit_method="hold", regime_gate=true | 0.15 | 0.83 | -0.07 | 1.15 |
| `r-trend-following-jp-all-0355` | cost_bps=10, n_stocks=10, exit_method="channel_exit", regime_gate=true | 0.12 | 0.6 | -0.05 | 0.72 |
| `r-trend-following-jp-all-0397` | cost_bps=5, n_stocks=10, exit_method="hold", regime_gate=true | 0.82 | 0.94 | 0.78 | 0.48 |
| `r-trend-following-jp-all-0398` | cost_bps=10, n_stocks=10, exit_method="hold", regime_gate=false | 0.35 | -0.26 | 0.62 | 0.34 |
| `r-trend-following-jp-all-0440` | cost_bps=5, n_stocks=5, exit_method="trailing_mid", regime_gate=false | 0.3 | 0.37 | 0.16 | 1.44 |
| `r-trend-following-jp-all-0482` | cost_bps=10, n_stocks=5, exit_method="hold", regime_gate=false | 0.08 | 1.39 | -0.46 | 4.56 |
| `r-trend-following-jp-all-0500` | cost_bps=5, n_stocks=10, exit_method="trailing_mid", regime_gate=false | 0.39 | 1.46 | -0.13 | 2.7 |
| `r-trend-following-jp-all-0542` | cost_bps=10, n_stocks=10, exit_method="hold", regime_gate=false | 0.08 | 0.65 | -0.05 | -0.03 |
| `r-trend-following-jp-all-0576` | cost_bps=5, n_stocks=5, exit_method="hold", regime_gate=false | -0.19 | -0.97 | 0.02 | -0.15 |
| `r-trend-following-jp-all-0585` | cost_bps=5, n_stocks=5, exit_method="trailing_mid", regime_gate=true | -0.06 | -0.33 | 0.02 | -0.15 |
| `r-trend-following-jp-all-0590` | cost_bps=10, n_stocks=10, exit_method="hold", regime_gate=false | -0.5 | -1.95 | 0.11 | -1.05 |
| `r-trend-following-jp-all-0628` | cost_bps=5, n_stocks=5, exit_method="channel_exit", regime_gate=false | -0.04 | -0.48 | -0.07 | 1.49 |
| `r-trend-following-jp-all-0646` | cost_bps=10, n_stocks=10, exit_method="trailing_mid", regime_gate=false | -0.34 | -1.18 | -0.16 | 1.49 |
| `r-trend-following-jp-all-0688` | cost_bps=5, n_stocks=10, exit_method="channel_exit", regime_gate=false | -0.09 | -0.02 | -0.33 | 3.04 |

## Facts (7)

Each fact has a permanent citation URL. AI agents quoting qbuntu should use these.

- **Average monthly return correlation with other strategies in DOWN regime: -0.17**
  - Value: -0.1721 correlation
  - Context: Pairwise Pearson correlation of monthly returns across 42 strategies, filtered to DOWN regime months (N=3, N225 < SMA20 < SMA60)
  - Supports verdict: `rejected`
  - Cite: https://qbuntu.ai/cite/trend-following-jp-all-fact-avg-corr-down

- **Average monthly return correlation with other strategies (full period): 0.02**
  - Value: 0.0235 correlation
  - Context: Pairwise Pearson correlation of monthly returns across 42 strategies, full backtest period
  - Supports verdict: `rejected`
  - Cite: https://qbuntu.ai/cite/trend-following-jp-all-fact-avg-corr-full

- **Best grid Sharpe ratio is 0.82 (p=0.1).**
  - Value: 0.82 sharpe_ratio
  - Context: period 2022-02-01–2026-02-02; cost=5bps
  - Supports verdict: `rejected`
  - Cite: https://qbuntu.ai/cite/trend-following-jp-all-fact-best-sharpe

- **Median Sharpe across 384 grid runs is 0.13.**
  - Value: 0.13 sharpe_ratio
  - Context: Full grid of 384 parameter combinations.
  - Supports verdict: `rejected`
  - Cite: https://qbuntu.ai/cite/trend-following-jp-all-fact-median-sharpe

- **Median Sharpe in DOWN regime is 1.20 across 384 runs.**
  - Value: 1.2 sharpe_ratio
  - Context: Regime=DOWN, N225 SMA20/SMA60 classification.
  - Supports verdict: `rejected`
  - Cite: https://qbuntu.ai/cite/trend-following-jp-all-fact-regime-down

- **Median Sharpe in FLAT regime is -0.05 across 384 runs.**
  - Value: -0.05 sharpe_ratio
  - Context: Regime=FLAT, N225 SMA20/SMA60 classification.
  - Supports verdict: `rejected`
  - Cite: https://qbuntu.ai/cite/trend-following-jp-all-fact-regime-flat

- **Median Sharpe in UP regime is 0.63 across 384 runs.**
  - Value: 0.63 sharpe_ratio
  - Context: Regime=UP, N225 SMA20/SMA60 classification.
  - Supports verdict: `rejected`
  - Cite: https://qbuntu.ai/cite/trend-following-jp-all-fact-regime-up

## Related strategies

- same_strategy: [trend-following-jp-growth](https://qbuntu.ai/strategies/trend-following-jp-growth)

---

Cite as: qbuntu (2026). Trend Following / Donchian Breakout (JP All Stocks). https://qbuntu.ai/strategies/trend-following-jp-all

Visit qbuntu.ai — the honest scorecard for quant strategies (live, promising, marginal, rejected).
