Ruby
Flagship
Regime-aware US equities quant trend system
Ruby is Vectopian’s flagship quantitative trading algorithm for US-based equities, expressed primarily through liquid levered, non-levered, and inverse products, with a small set of companion bond sleeves when the regime calls for them. Leverage and short exposure are implemented via products like TQQQ and SQQQ rather than margin or direct shorting, which helps reduce the risk of account overruns. It is live now, running in a fully automated manner with a small capital allocation, which we plan to ratchet up once we fully understand its live behaviour.
At its core, Ruby is a regime-aware trend system — not a pure mean-reversion bot, and not a static buy-and-hold of leveraged Nasdaq. Each day it classifies the broad market backdrop (risk-on versus risk-off), then tilts the book toward the posture that historically earned its keep in that backdrop: participate when the tape supports trend, step down or hedge when it does not. Momentum and trend filters do most of the directional work; shorter-horizon exhaustion signals act as a tactical overlay — for example pulling risk when an up-move looks stretched, rather than fading every dip as a classic mean-reversion strategy would.
What Ruby tries to capture is straightforward to state and hard to harvest cleanly: the Nasdaq equity risk premium when conditions favor it, without accepting the full drawdown profile of sitting permanently in 3× leverage. Volatility targeting caps how hard the book leans into any single sleeve. A separate intraday execution layer refines when inside the session to trade, without changing the daily mandate of what to hold. Occasional discount tilts lean a little more aggressively when the index itself is cheap relative to its own recent range — still inside the same regime framework, not a separate strategy.
The pages that follow are the locked research configuration we call V11: walk-forward backtest first, then Monte Carlo, then parameter sensitivity. Formulae and branch logic stay off-page; the numbers are after costs unless noted.
1. Backtest results
Results below cover 7 September 2012 through 24 July 2026, starting from $100,000. The window does not begin earlier because several ETFs the live book needs — especially the levered and inverse Nasdaq products — did not exist before then; a tradable backtest cannot invent fills in instruments the market had not yet listed. Separately, we have stress-tested the signal logic on synthetic series back to 1986, constructed as if those products had existed, so we can see how the decision rules behave through earlier bull and bear regimes. Those long-history runs validate signal robustness; they are not a claim that the modern ETFs could have been traded in the 1980s, and the figures on this page remain the live-instrument sample from 2012 onward.
Indicators warm up on 300 completed daily bars before the first live rebalance, so early session noise does not enter the equity curve. Price series for performance testing are split-adjusted; we ignore dividends — signals and P&L are driven by price moves alone, not total-return reinvestment. Execution costs follow an Interactive Brokers–style schedule: $0.005 per share (minimum $1, capped at 1% of trade value), plus two basis points of slippage on each side of a fill. All headline figures are after those costs.
Growth of $100,000 — vs buy & hold
Same start date. Ruby after strategy costs; buy-and-hold paths are uncosted buy-and-hold references on their tickers.
| Series | Final value | CAGR | Max drawdown |
|---|---|---|---|
| Ruby | $32,316,339 | 51.89% | −31.97% |
| TQQQ buy & hold | $9,760,671 | 39.31% | −81.75% |
| QQQ buy & hold | $977,992 | 17.97% | −35.62% |
| SPY buy & hold | $508,074 | 12.52% | −34.10% |
Ruby finishes well ahead of holding TQQQ outright, with less than half the max drawdown.
Full-sample path
| Metric | Value |
|---|---|
| CAGR | 51.81% |
| Sharpe | 1.494 |
| Sortino | 1.434 |
| Max drawdown | −31.97% |
| Annualised volatility | 31.30% |
| Win rate | 64.59% |
| Loss rate | 35.41% |
| Profit factor | 2.342 |
| Expectancy (per closed trade) | $27,145.56 |
| Average win | $73,338.41 |
| Average loss | −$57,100.43 |
| Closed trades (round trips) | 1,282 |
| Average hold (days) | 31.4 |
| Total fills | 2,542 |
| Final equity | $32,316,338.55 |
| Total return | 32,216.34% |
| Total fees | $348,943.59 |
| Total slippage (est.) | $507,591.94 |
| Profit siphons | 0 |
| Ending cash vault | $0.00 |
Drawdown episodes (peak-to-recovery)
Ruby is not unique in suffering deep loss of peak equity. Passive buy-and-hold of the same broad market — SPY, QQQ, and especially leveraged Nasdaq via TQQQ — is also prone to severe drawdowns and long recoveries. Levered products amplify both the climb and the crash; sitting through them is not a gentler alternative to an active risk mandate.
Notes for the tables below:
- An episode counts at a threshold if its trough reaches that depth.
- Recovery min / median / max are recovery times in calendar days — from the trough of the drawdown back to the prior equity peak (recovered episodes only).
- Same calendar window as the full sample (2012-09 → 2026-07).
Ruby
| Threshold | Episodes | Recovered | Unrecovered | Recovery min (days) | Recovery median (days) | Recovery max (days) |
|---|---|---|---|---|---|---|
| ≥ 5% | 49 | 48 | 1 | 2 | 14 | 246 |
| ≥ 10% | 21 | 20 | 1 | 8 | 64 | 246 |
| ≥ 15% | 16 | 16 | 0 | 21 | 70 | 246 |
| ≥ 20% | 11 | 11 | 0 | 21 | 81 | 246 |
| ≥ 25% | 6 | 6 | 0 | 80 | 110 | 246 |
| ≥ 30% | 1 | 1 | 0 | 134 | 134 | 134 |
QQQ buy & hold (max drawdown −35.62%)
| Threshold | Episodes | Recovered | Unrecovered | Recovery min (days) | Recovery median (days) | Recovery max (days) |
|---|---|---|---|---|---|---|
| ≥ 5% | 26 | 25 | 1 | 8 | 35 | 352 |
| ≥ 10% | 14 | 14 | 0 | 16 | 73 | 352 |
| ≥ 20% | 4 | 4 | 0 | 77 | 98 | 352 |
| ≥ 30% | 1 | 1 | 0 | 352 | 352 | 352 |
TQQQ buy & hold (max drawdown −81.75%)
| Threshold | Episodes | Recovered | Unrecovered | Recovery min (days) | Recovery median (days) | Recovery max (days) |
|---|---|---|---|---|---|---|
| ≥ 5% | 54 | 53 | 1 | 1 | 11 | 714 |
| ≥ 10% | 30 | 29 | 1 | 6 | 29 | 714 |
| ≥ 20% | 16 | 15 | 1 | 15 | 73 | 714 |
| ≥ 30% | 9 | 9 | 0 | 25 | 126 | 714 |
SPY buy & hold (max drawdown −34.10%)
| Threshold | Episodes | Recovered | Unrecovered | Recovery min (days) | Recovery median (days) | Recovery max (days) |
|---|---|---|---|---|---|---|
| ≥ 5% | 18 | 18 | 0 | 16 | 48 | 464 |
| ≥ 10% | 6 | 6 | 0 | 80 | 146 | 464 |
| ≥ 20% | 3 | 3 | 0 | 126 | 148 | 464 |
| ≥ 30% | 1 | 1 | 0 | 148 | 148 | 148 |
TQQQ alone logged nine separate ≥30% episodes in this window, with a longest recovery of 714 calendar days — almost two years underwater for a “set and forget” leveraged holder. SPY and QQQ each saw a ≥30% scar whose recovery stretched for many months. Passive for a passive investor is not the absence of drawdowns; it is choosing to hold through them without a mandate that can step down risk.
Walk-forward (rolling 3y in-sample / 1y out-of-sample)
A single full-sample backtest can flatter a rule that only worked because it peeked at the whole tape. Walk-forward is how we refuse that: on each fold we fit (or lock thresholds) using only the prior three years, then trade the next calendar year as if that year were live — without revising the settings after seeing it. Rolling the window forward year by year forces the same mandate through bull months, crash months, and quiet months. Twelve annual hold-outs below (2026 partial through the study cut-off). OOS end equity is fold-local (each fold restarts at $100,000). The stitched curve in the next section is those hold-outs joined with capital carried across — the continuous book we treat as the headline out-of-sample result.
| Fold | IS CAGR | IS Sharpe | IS MDD | OOS CAGR | OOS Sharpe | OOS MDD | OOS end equity |
|---|---|---|---|---|---|---|---|
| Y2015 | 27.7% | 1.02 | −27.9% | 18.0% | 0.72 | −18.3% | $118,013 |
| Y2016 | 34.6% | 1.21 | −18.5% | 16.0% | 0.64 | −18.1% | $115,971 |
| Y2017 | 14.4% | 0.61 | −27.2% | 82.0% | 3.14 | −7.8% | $181,543 |
| Y2018 | 34.4% | 1.21 | −27.2% | −3.9% | 0.02 | −30.5% | $96,086 |
| Y2019 | 35.9% | 1.22 | −28.2% | 65.9% | 1.85 | −21.9% | $165,935 |
| Y2020 | 52.2% | 1.65 | −29.1% | 164.5% | 3.48 | −25.4% | $265,486 |
| Y2021 | 66.5% | 1.83 | −30.5% | 62.2% | 1.73 | −18.3% | $162,173 |
| Y2022 | 97.5% | 2.34 | −25.6% | 11.8% | 0.48 | −30.2% | $111,725 |
| Y2023 | 68.3% | 1.72 | −30.5% | 123.4% | 2.81 | −20.5% | $222,013 |
| Y2024 | 59.5% | 1.57 | −31.7% | 49.3% | 1.41 | −23.0% | $149,286 |
| Y2025 | 53.4% | 1.42 | −31.5% | 41.6% | 1.39 | −22.7% | $141,175 |
| Y2026 | 66.7% | 1.80 | −26.0% | 24.7% | 0.89 | −11.6% | $113,044 |
Stitched out-of-sample equity
Hold-out years joined with capital carried across folds — the continuous book we treat as the headline OOS result.
| Metric | Value |
|---|---|
| CAGR | 55.28% |
| Sharpe | 1.553 |
| Sortino | 1.485 |
| Max drawdown | −31.96% |
| Annualised volatility | 31.61% |
| Win rate | 65.68% |
| Loss rate | 34.32% |
| Profit factor | 2.339 |
| Expectancy (per closed trade) | $15,377.74 |
| Average win | $40,904.26 |
| Average loss | −$33,475.89 |
| Closed trades | 1,116 |
| Average hold (days) | 30.7 |
| Final equity | $15,987,254.22 |
| Total return | 15,887.25% |
| Profit siphons | 0 |
Stitched OOS drawdown episodes
| Threshold | Episodes | Recovered | Unrecovered | Recovery min (days) | Recovery median (days) | Recovery max (days) |
|---|---|---|---|---|---|---|
| ≥ 5% | 44 | 43 | 1 | 2 | 14 | 246 |
| ≥ 10% | 17 | 16 | 1 | 8 | 67 | 246 |
| ≥ 15% | 14 | 14 | 0 | 21 | 68 | 246 |
| ≥ 20% | 10 | 10 | 0 | 21 | 80 | 246 |
| ≥ 25% | 5 | 5 | 0 | 80 | 88 | 246 |
| ≥ 30% | 1 | 1 | 0 | 134 | 134 | 134 |
2. Monte Carlo simulation
A walk-forward equity curve is one ordering of history. Monte Carlo asks a colder question: if the same observed daily returns had arrived in many other sequences, how often does the edge survive, and how ugly do the drawdowns get?
We ran 10,000 simulations on the stitched out-of-sample daily return stream of the locked settings (2,906 sessions; fixed seed). No method invents returns outside that observed pool. What changes is only the sampling dependence between days — three different lenses on the same tape.
Method A — IID reshuffle
Concept. Treat every session as an independent draw from the historical return distribution. Tomorrow’s return does not “know” whether today was calm or violent.
Sampling. Shuffle (or sample with replacement from) the observed daily returns independently for each day of the 2,906-day horizon. Serial correlation and volatility clustering are destroyed.
What it is good for. A pure ordering stress: does the edge survive when path dependence is erased? It is the optimistic drawdown lens for strategies that live in clustered risk — calm and storm days are mixed too evenly, so deep drawdowns are often understated.
Method B — Volatility regime
Concept. Real markets alternate between quiet and violent stretches. Days should be more likely to follow days like themselves.
Sampling. Classify each historical day into a small number of volatility states (calm / normal / storm). Resample returns conditional on state, advancing the state with the empirical transition matrix estimated from the sample.
What it is good for. The realistic statistical lens: it restores clustering without inventing new economics. Edge confidence intervals on this page are quoted primarily from Method B. Limitation: it can only replay transition frequencies that appear in this sample.
Volatility transition metrics
Persistence on the diagonal is what IID destroys and Method B restores:
| From → To | Calm | Normal | Stressed |
|---|---|---|---|
| Calm | 90.9% | 3.3% | 5.8% |
| Normal | 3.4% | 96.6% | 0.0% |
| Stressed | 5.7% | 0.1% | 94.2% |
| Regime | Days | Share | Mean / day | Vol / day | Contribution |
|---|---|---|---|---|---|
| Calm | 968 | 33.3% | 0.149% | 2.04% | 24.5% |
| Normal | 969 | 33.3% | 0.199% | 2.16% | 33.6% |
| Stressed | 969 | 33.3% | 0.235% | 1.76% | 41.9% |
Method C — Macro regime
Concept. Boom and bust are not just higher variance — they have multi-week economic shape. Shuffling day-by-day can still shred that structure.
Sampling. Draw blocks of days from similar macro eras in the sample (and, in scenario variants, eras labelled as analogues of older crises). In-sample variants stay inside periods the strategy actually traded; scenario variants can inject harsher historical analogues and are never the headline edge verdict.
What it is good for. Preserving economic structure by era. It often produces a fatter drawdown left tail than A or B — useful as a stress, not as a claim that history will literally repeat those blocks.
| Macro era | Days | Mean / day | Vol / day | Era MDD | Contribution |
|---|---|---|---|---|---|
| ZIRP grind-up bull | 146 | 0.099% | 1.77% | −9.5% | 2.5% |
| Oil crash & global growth scare | 134 | −0.081% | 2.31% | −27.2% | −1.9% |
| Reflation / late-cycle melt-up | 493 | 0.232% | 1.54% | −18.2% | 20.2% |
| Fed-tightening vol regime | 229 | −0.010% | 2.10% | −28.7% | −0.4% |
| Fed-pivot late-cycle bull | 289 | 0.374% | 1.98% | −22.9% | 19.1% |
| COVID crash | 23 | −1.174% | 2.37% | −25.7% | −4.8% |
| Stimulus / ZIRP mega-bull | 445 | 0.378% | 2.00% | −18.6% | 29.8% |
| Inflation & rate-hike bear | 200 | 0.111% | 2.45% | −30.3% | 3.9% |
| Disinflation / AI megacap bull | 577 | 0.224% | 2.08% | −23.3% | 22.8% |
| Recent / policy-uncertainty | 370 | 0.134% | 1.93% | −23.1% | 8.7% |
Results across all three
Shared setup: 10,000 paths each, starting equity $100,000, horizon matching the OOS stitch. Realized path: terminal ~$16.0M, CAGR 55.3%, max drawdown −32.0%, Sharpe 1.55.
| Method | Median terminal | Median CAGR | Median MDD | P5 MDD | P(profit) | 90% CI on mean daily return | Edge ≠ 0? |
|---|---|---|---|---|---|---|---|
| A · IID reshuffle | $16,086,341 | 55.4% | −37.2% | −52.4% | 100% | 0.136% … 0.255% | Yes |
| B · Volatility regime | $16,001,181 | 55.3% | −37.3% | −53.0% | 100% | 0.134% … 0.255% | Yes |
| C · Macro regime | $18,357,762 | 57.1% | −41.5% | −57.2% | 100% | 0.141% … 0.257% | Yes |
All three clear zero on the 90% confidence interval for mean daily return. Every simulated path finished profitable on this horizon. Method C’s median is a little richer and its drawdown left tail a little worse — exactly the pattern you expect when macro blocks keep storms bunched together.
We do not tune the model to these Monte Carlo figures. They are a post-walk-forward stress on a frozen return stream: useful for sizing honesty, useless as a fitting target.
3. Parameter sensitivity analysis
The locked V11 line has eight hyperparameters — thresholds and lengths that shape the daily mandate. We do not name them here. Locking any such set is only defensible if the neighborhood around it is a plateau, not a single lucky spike.
How we test sensitivity. Around the locked point we build a local grid that nudges each dial across nearby values (one combination of all eight at a time). That produces 22,500 neighbor configurations. Every neighbor is re-run on the same walk-forward stitch used for the headline OOS book (rolling 3y in-sample / 1y out-of-sample), so we compare apples to apples — not in-sample fantasy. We then look at the cloud of stitched Sharpe and CAGR: where the lock sits in that distribution, how wide the P5–P95 band is, and (anonymized) which dials move the result most when varied alone.
Stitched OOS Sharpe across that neighborhood: about 1.01 at P5, 1.21 at the median, 1.41 at P95. The selected settings land at ~1.56 — the right tail, not an island with empty bins beside it.
What we want from that picture: evidence that performance is not a one-point miracle, that several nearby books still clear a useful floor, and that we know which dials are worth watching — without publishing the dial labels. The median neighbor is closer to Sharpe ~1.2 and CAGR near 40% — still a serious book, and a healthier number to carry when the lock has a good month.
4. Research history — from V1 to V11
In early 2026 we shipped a first durable version of Ruby we still call V1: already a complete daily decision system with honest costs and a walk-forward calendar we were willing to trust. Full-sample it printed roughly 34% CAGR and a Sharpe near 1.1, with a deepest drawdown around −35%. That was good enough to keep — and good enough to beat up on.
What followed was not a straight climb. We used AI to generate large volumes of candidate ideas — regime overlays, risk haircuts, defensive gates, timing twists, portfolio tilts — constrained to our style of trading and risk tolerance, not random alpha soup. Each idea was fed into our specialized backtest engine and scored on the same walk-forward metrics we trust for promotion. The loop was fully automated: propose, backtest, validate metrics, keep or reject. We ran thousands of ideas that way. Most looked clever in-sample and failed out of sample. Some never beat V1 in more than one walk-forward year. A few were simply broken. We kept the register of rejects on purpose — so the same idea does not quietly come back dressed as something new.
Two families of work did survive. One sits inside the day: treating execution as its own research layer rather than a fixed clock fill — sizing a perfect-timing ceiling, then closing a modest slice with a session VWAP posture (Intraday fills and VWAP). The other sits on the book: modest portfolio tilts that earn their keep when glued to a robust daily engine rather than a fragile one.
By mid-year those pieces had recombined into a cleaner architecture (V8 in the research line): stronger than V1 on return and risk-adjusted return, still honest about drawdown. V11 is not a new mechanism. It is that architecture with thresholds locked from a careful walk-forward sweep — the settings stressed in the sections above.
V11 is a frozen snapshot of the best-understood lock we have today — earned from V1 in early 2026 through a long automated stack of rejected ideas, a surviving architecture, and a neighborhood that does not fall apart when you nudge it. If there is one thing we are proud of in this journey, it is not a single version number — it is the dark factory behind them: the system that generates candidate algorithms and signals, runs them through the specialized backtest engine, and validates every keep-or-reject decision on walk-forward metrics with essentially no hand-holding. Research does not end when capital goes live; the next section is that frontier.
5. Going live
Backtests, walk-forwards, and Monte Carlo answer questions about expected behaviour. Live markets answer the only question that ultimately matters: does the system do what it claims when money is on the line? There is no better test than running with live capital.
We first put V1 into production in the early part of 2026. Over roughly two months it returned about 10%, then we paused deployment — not because the signal thesis failed, but because execution needed harder work: fill quality, edge cases in the session, and plumbing we would rather fix with small mistakes than large ones.
On 3 August 2026 we brought Ruby (the locked V11 line) live again — this time with small capital on purpose. Position size will ratchet up only as we identify, measure, and close execution risks. That is a feature of the plan, not a lack of conviction.
Live trading exposes a different stack than research. The fill algorithm is complex: timing inside the day, partial fills, fallbacks when the preferred print never appears, and the obligation to still land the day’s target weights. Around that we are building guardrails so the book does what the mandate says — kill-switches, exposure caps, sanity checks on quotes and sizes, and failure modes that degrade safely rather than inventing unintended risk.
The toughest failures are not a single missed indicator. They are market-structure shocks — flash crashes, broken liquidity, exchange glitches — and political or geopolitical turmoil such as wars that move risk assets faster than any daily decision loop was calibrated for. No historical sample owns those events completely. Guardrails and conservative sizing are how we refuse to pretend otherwise.
Ruby will keep evolving in research. In production it will grow only as fast as its execution discipline earns. That is the deal we make with live money.