Kodeus
Warren

Building & Backtesting Strategies

Author strategies in plain English or code, then test them honestly: per regime and full-period, head-to-head, auto-tuned with an overfit guard, and diagnosed when they fail.

A strategy in Warren is a first-class artifact: it can be found or authored, backtested, tuned, versioned, deployed, and published, and every result it produces is tied to the exact code that produced it. This page covers the two halves of that work, authoring a strategy and then testing it honestly.

Where strategies come from

Strategies come from three places:

  • A curated preset library, where each preset ships with per-regime, per-token performance history.
  • Your own saved strategies, everything you have authored, cloned, or tuned.
  • The community marketplace, published work with verified track records (Marketplace).

Warren ranks candidates by fit to the current regime and can explain any strategy's rules back to you in plain language.

Build one two ways

You author new strategies in one of two ways, and both converge on the same artifact:

  • Plain English (declarative). Describe the rules, an indicator set plus boolean entry and exit conditions, and Warren compiles them into a complete, runnable strategy. No code seen.
  • Full source code. Supply a full strategy class for arbitrary logic when a declarative rule set is not enough.

Both paths are validated before saving (structure, indicator parameters, risk attributes), and both produce a strategy categorized into a taxonomy, momentum, trend-following, breakout, volatility, scalping, grid, or mean-reversion, which is exactly what the regime-fit prior in Why regime-based backtesting keys on. Either way the result is a first-class strategy: it can be backtested, optimized, deployed, versioned, and published like any preset.

Strategy lifecycle
Describe rules in plain Englishindicators + entry/exit conditions
Supply full strategy codearbitrary logic
validated · categorized
A strategy in your librarycontent-addressed: every version hashed, last 25 kept, rollback anytime
Backtest ⇄ tune ⇄ diagnoseresults keyed to the exact code version
Deploy as a botpaper first
Publish to the marketplacewith its verified record

Content-addressed versioning. Every strategy version is stored under a hash of its code, with a bounded history of snapshots retained. Editing, cloning, renaming, and rolling back to any earlier version are built in, and because results are keyed to the code hash, any backtest result can always be traced to the exact code that produced it.

Backtest honestly

A strategy running with its record

Backtests and optimizations are long-running asynchronous jobs: Warren submits them and polls the results for you, routed to right-sized compute (see System architecture). Every result arrives with its validity verdict attached, and the option to deploy appears only once a result has earned it.

Backtest job flow
Backtest request
weight = pairs × days × candle density
Compute router
light
Serverless functionreturns in seconds
heavy · all tuning
Container taskmore CPU / memory
results to object storage
Poll returns results + verdictsrisk-adjusted stats computed at read time · dead compute reconciled to failed

A single continuous backtest averages bull, bear, and ranging behavior into one number that hides both when a strategy works and when it quietly gives everything back. Warren tests in two complementary modes instead:

  • Regime mode tests over a window that represents a single, coherent market condition, answering under what conditions does this strategy have an edge, and how bad is its worst regime?
  • Full-period mode tests over a long window spanning many conditions, answering what would running it blindly through regime changes actually feel like?

The full mechanics, and why one continuous number misleads, are in Why regime-based backtesting. The verdicts that arrive with every result are computed by the validity layer, so a number is never read without its caveats.

The toolset

CapabilityWhat it does
Run a backtestRegime or full-period mode, with rich per-run overrides (stake sizing, leverage, stop-loss interpretation, profit targets, fees), all without touching the strategy's code.
Plan windowsThe window planner proposes the best clean single-regime window per regime, or standard full-period durations, with quality warnings attached.
Compare head-to-headSeveral strategies over the same pairs and window, for an apples-to-apples ranking.
Grade robustnessPer-regime grades rolled into a consistency score, with hard disqualification on catastrophic single-regime drawdown.
Auto-tuneA hyperparameter search whose trial count feeds the overfitting correction in the validity layer, so a tuned result is discounted for how hard it was searched. Winning parameters can be promoted in one step.
DiagnoseTrade-level analysis of a losing or zero-trade backtest, with concrete, plain-language improvement suggestions.

Robustness over a headline number

The most important habit Warren encourages is judging a strategy on its worst regime, not its favorite. The all-regimes robustness sweep runs the same strategy across the best clean window for each of bullish, bearish, and ranging, then rolls the results into a per-regime grade and a consistency score. Catastrophic drawdown in any single regime disqualifies the strategy outright, a great average cannot buy an A.

Auto-tune carries its own honesty guard: the harder a search is (the more trials it runs), the more its winning result is discounted, so a lucky over-searched configuration cannot masquerade as a real edge. See the validity layer for how that correction is computed. When a backtest loses or produces zero trades, diagnose reads the trades and returns plain-language reasons and fixes rather than a bare failure.

Deep mechanics

Next

On this page