Verdict
Promising but unproven: hold-out showed no difference
The one-time check on 2025-10 to 2026-10 (run 2026-10-20 under pre-registered rules) found no reliable difference between the machine-learning blend and the plain rule: +5.4% against +5.3% at standard costs (+0.8% against +0.5% at 2x costs plus the 4% allowance), with the index at -3.3%. The development advantage (30.8% against 22.1% a year) is intact but not reinforced. The forward paper run continues.
- Question asked: is a TensorTrade-inspired approach worth building? Answer: not the library (single-asset crypto focus, last PyPI release in 2021, its own README says commissions exceed predicted profits), but its ideas, in a small, time-boxed experiment on Nifty 500 weekly data only, with stop rules fixed in advance. Options (about 22 months of Nifty weekly-option data, no CRUDEOILM option data) were not attempted: too little data for learning models.
- Phase 1. 31 point-in-time features (momentum, volatility, distance from highs and lows, moving-average ratios, ATR, liquidity, volume, RSI, beta, market breadth and volatility). Label: the stock is in the top 20% of 4-week forward returns. Walk-forward: retrain every 26 weeks on data up to 5 weeks earlier (embargo), predictions from 2018-01 to 2025-09. Ridge, LightGBM regression and a LightGBM classifier, alone and blended 50/50 with the rule, at 10/15/20 names with and without the market filter (72 combinations, 36 distinct).
- Result: only the classifier family beat the rule. Classifier + rule blend, 8-seed ensemble: 30.8% a year, worst fall 19.8%, Sharpe 1.51 (rule 22.1%, 22.0%, 1.25; Nifty 500 11.8%, 34.4%). Ridge (11.5%) and LightGBM regression (16.3%) were worse than the rule. 33% of combinations beat the rule; the median combination lost 4.1% a year to it. White reality check p = 0.072: borderline.
- Stability. 8 random seeds: advantage over the rule +4.9% to +8.6% a year, positive in all 8. Nine threshold and retrain-frequency cells: +6.3% to +10.3%. Better than the rule in 7 of 8 calendar years (2021 +170% and 2023 +71% do much of the work, as for the rule). Rule blended with random numbers: 15.0% a year, so the machine-learning part adds the return. Under 3x costs plus an 8% haircut: 24.2% with a 25.8% worst fall (rule 15.8%, 25.5%): the 20% drawdown limit does not survive harsher stress.
- Phase 2. A tabular Q-learning agent chose 0%, 50% or 100% exposure each week (reward after costs, variance penalty), trained walk-forward, 20 seeds, 2020 to 2025-09. It made 16.7% with a 28.1% worst fall, behind the plain Nifty 500 above 26-week average filter (39.1%, 19.4%) in every seed. Random exposure: 2.4%. Stopped: no reinforcement learning is used.
- Phase 3. The blend is frozen and runs as a forward paper run from 2026-10-19 (₹20 lakh notional, no orders), alongside Longbow Weekly as an A/B test. The 2025-10 to 2026-10 period (Longbow's spent hold-out) was not used for evaluation, only as training data.
- Decision rules, fixed in advance: judge at 26 and 52 weeks. Pass (permission to consider a pilot) only if the paper worst fall is under 20%, the return is at least 5 points above cash, and it is at least 3 points a year ahead of Longbow Weekly with the lead visible in 7 of 12 months. Anything smaller is hold. Stop if it is more than 3 points behind Longbow Weekly after 52 weeks or its worst fall exceeds 25%.
- ONE-TIME CHECK (2025-10-01 to 2026-10-16, 55 weeks, run on 2026-10-20 after the rules were committed to GitHub): standard costs ML blend +5.4% (worst fall 10.1%) versus the rule +5.3% (8.0%); at 2x costs plus the 4% allowance +0.8% (12.3%) versus +0.5% (10.5%); Nifty 500 -3.3% (13.1%); rule blended with random numbers -1.5%. Pre-registered verdict: NO RELIABLE DIFFERENCE (within 3 points). Shifting the four-week rebalance cycle by one to three weeks gave ML totals of -2.6% to +5.4% and rule totals of -1.4% to +5.3%, so about 7 points of this year's result is rebalance-calendar luck; in the 2018 to 2025-09 development window the ML blend led the rule in all four phases. Reading: no evidence for or against the learning layer from this year.
- Full documentation (features, training protocol, every table, risks, routine): /docs/longbow-learned.html.
Promotion gates
30.8% vs 22.1% a year; 7 of 8 years; all 8 seeds.
19.8% (borderline; 23.6% at 3x costs, 25.8% at 3x plus an 8% haircut).
Reality check p = 0.072 across the combinations tried.
Nine threshold and retrain cells all +6.3% to +10.3% over the rule.
16.7% vs 39.1% for the plain filter; stopped.
+0.3 points versus the rule at 2x + 4%: no reliable difference; both positive while the index fell 3.3%.
Paper run started 2026-10-19; first decision 2026-10-23.
Explain the strategy
We taught a computer model to guess which stocks are likely to be among next month's best performers, using the same kind of price patterns a person might study. We then mixed its guess half and half with our simple rule. Looking back, honestly tested so that the model only ever saw past data, the mix did better than the rule by about 7% a year. We still treat it as unproven and are running it on paper for a year.
Report
Rankers tested (N=15, market filter on, 2018 to 2025-09, 2x costs and 4% haircut)
| model | CAGR | worst fall | Sharpe | turnover a year |
|---|---|---|---|---|
| Longbow rule (baseline) | 22.1% | 22.0% | 1.25 | 3.9x |
| Ridge regression | 11.5% | 23.1% | 0.98 | 5.1x |
| LightGBM regression | 16.3% | 27.7% | 1.06 | 5.5x |
| LightGBM top-quintile classifier | 31.6% | 34.6% | 1.45 | 4.2x |
| Ridge + rule blend | 17.4% | 21.0% | 1.19 | 4.9x |
| LightGBM regression + rule blend | 19.7% | 24.7% | 1.21 | 4.6x |
| LightGBM classifier + rule blend (single seed) | 31.4% | 20.7% | 1.56 | 3.8x |
| CHOSEN: classifier + rule blend, 8-seed ensemble | 30.8% | 19.8% | 1.51 | n/a |
| Reinforcement-learning exposure agent (mean of 20 seeds, 2020-2025, vs plain filter 39.1% / 19.4%) | 16.7% | 28.1% | 1.11 | n/a |
Rules and parameters
Rules
- Features (31): stock returns, volatility, distance from highs and lows, moving-average ratios, ATR, liquidity, volume, RSI, beta, residual volatility (cross-sectional ranks), plus market return, volatility, breadth and filter state.
- Label: stock is in the top 20% of eligible stocks by return from next open to close four weeks later.
- Model: LightGBM classifier (250 trees, 8 leaves, learning rate 0.03), 8 seeds averaged, retrained every 26 weeks on data up to 5 weeks before the block.
- Score: 0.5 x rank(model probability) + 0.5 x rank(risk-adjusted 39-week momentum, skip 4).
- Portfolio: top 15 at equal weight, monthly rebalance, keep while rank is within 22, cash when the Nifty 500 is below its 26-week average, trades at the next open, delivery costs plus 0.2% slippage a side (stress 2x and 3x, haircut 4%).
Parameters
- capital
- ₹20,00,000
- window
- predictions 2018-01 to 2025-09
- retrain
- every 26 weeks, 5-week embargo
- seeds
- 8
- paper start
- 2026-10-19
- documentation
- https://strategyreview.tradetechanalytics.com/docs/longbow-learned.html
- code
- research/ml/
- one-time check
- 2025-10 to 2026-10, run 2026-10-20: no reliable difference
Instrument
Nifty 500 stocks (point-in-time membership, liquid names) · capital ₹2,000,000
Known limitations
- Survivorship hurts a learning model more than a fixed rule: it learns from survivors, and about a third of past index members have no price history.
- The chosen blend was the best of 36 distinct combinations; reality-check p = 0.072.
- Only price and volume data are available: no fundamentals, earnings or news.
- The paper run uses the same fill and cost model as the back-test; real fills for small caps can be worse.
- The Longbow Weekly hold-out (2025-10 to 2026-10) did not confirm that rule's profit; this strategy shares its stock selection logic and its market filter.
Logs and raw data
Downloads appear once a data window is loaded.
Files are plain CSV so results can be re-computed independently. Trade dates are IST sessions; returns are net of modelled costs and slippage.