Learn · Guide

From plain English to a backtestable strategy

How Quantle turns a one-line market idea into a leverage-and-funding-aware walk-forward backtest and a $100k virtual trading desk.

Most traders have more ideas than they have time to vet. You notice that BTC tends to trend after a strong 30-day run, you want to express that on perps at 3x leverage, and you want to know whether history supports the thesis — before you risk anything real.

The gap is almost always the same: the idea is clear in your head, but turning it into a rigorous backtest that accounts for funding rate drag, mark-price liquidation, and out-of-sample validation requires either a lot of code or a lot of trust in someone else's number. Quantle is built to close that gap.

The workflow in four steps

1. Describe the strategy in plain English

You type something like:

"BTC 30-day momentum on perps at 3x leverage, long when the 30-day return is positive, flat otherwise, rebalance daily."

That is the entire input. Quantle's AI layer (Claude) reads the description and produces a strategy DSL — a typed, human-readable flow that spells out every assumption the engine will use.

2. Read and edit the DSL

The generated DSL is not a black box. It is a structured document you can inspect line by line. A typical output for the example above looks roughly like:

instrument:   BTC-USDT-PERP
signal:       return_30d > 0  ->  long 1 unit
              else            ->  flat
leverage:     3x  (isolated margin)
rebalance:    daily close
funding:      accrue at 8h intervals, long pays
liquidation:  mark-price breach of maintenance margin

If the engine misread your intent — wrong interval, wrong leverage mode, wrong signal direction — you correct it here before a single backtest runs. The DSL is the contract between your idea and the engine.

3. Run the walk-forward backtest

Once you confirm the DSL, the engine runs a walk-forward backtest across the full available history. Walk-forward means the data is divided into sequential train/test splits: the engine optimizes (if there are any tunable parameters) on each training window and then reports results only on the held-out test window that follows it. You never see one big in-sample curve that quietly overfits to every anomaly in the data.

For each split the engine models three things that a simple price-only backtest omits:

  • Leverage. Position sizing scales with the leverage you specified. A 3x long on a 5% adverse move costs 15% of margin, not 5%.
  • Funding accrual. The funding rate is applied at every 8-hour interval throughout the holding period. On a 3x position held for a week in a positive-funding environment, that carry can be a meaningful drag — or tail wind, if you are short.
  • Mark-price liquidation. If the mark price crosses the liquidation price for your position and margin, the engine closes the position at that point and records it as a liquidation event. This is not an abstraction — it uses the same maintenance-margin formula the exchange applies.

4. Read the results honestly

The results page returns metrics per walk-forward split, not just an aggregate:

  • Per-split Sharpe ratio: A strategy that looks good in aggregate but has three losing splits and one enormous winner is not the same risk profile as one that posts consistent, moderate Sharpe across every window.
  • Max drawdown: Shown both as a percentage of capital and in absolute terms given the position size, so you can calibrate whether you could actually hold through it.
  • Liquidation count: The number of times the mark-price liquidation threshold was breached across all splits. Even one liquidation in a short backtest window is a signal worth taking seriously.

A concrete example walked through

Take the BTC 30-day momentum strategy above. After the engine runs on four years of BTC-USDT-PERP data split into rolling 180-day train / 90-day test windows, a typical results table might show:

  • Split 1 (Q1-Q2 2022, the drawdown period): Sharpe -0.4, max drawdown 38%, 2 liquidations.
  • Split 2 (Q3-Q4 2022): Sharpe 0.3, max drawdown 22%, 0 liquidations.
  • Split 5 (bull run period): Sharpe 1.8, max drawdown 14%, 0 liquidations.

The strategy performs very differently across regimes. The split-by-split view makes that visible. An aggregate Sharpe of 0.9 would have hidden the regime dependence entirely.

This is the honest picture — which is the only kind worth building on.

Why "it backtests well" is not enough

A single in-sample backtest on four years of data can be fit to almost any result with enough parameter choices. The strategy is not validated; the parameters are just tuned to historical noise. This is overfitting, and it is the most common reason a strategy that looked good on paper has no edge in live trading.

Walk-forward testing is the standard answer. By requiring that results be reported only on data the optimizer never saw, it forces the strategy to demonstrate that its edge generalizes — not just that it can describe the past.

Quantle enforces this by default. You cannot toggle off the out-of-sample split. The aggregate in-sample curve is not shown as a headline metric. This is a deliberate product choice, not a limitation.

From backtest to virtual desk

A strategy that survives walk-forward review is a candidate for paper trading, not a guaranteed winner. Market conditions shift. Execution assumptions in a backtest are never perfect. A virtual desk lets you observe live behavior before the stakes are real.

Quantle's virtual desk allocates $100,000 in simulated capital to the strategy. It tracks the same metrics you saw in the backtest — Sharpe, drawdown, liquidation events — against the live mark price and real-time funding rate data. No funds are held, no trades are executed. The desk is purely observational: a structured way to watch whether the edge you measured in historical splits shows up in live price action.

The practical use is straightforward. Before you consider expressing a strategy with real capital through any venue, you run it on the virtual desk long enough to see at least one full rebalance cycle and at least one period of elevated funding. If the live metrics track the backtest metrics reasonably well, you have more evidence. If they diverge, you have a question worth investigating before you go further.

What Quantle is and is not

Quantle is a research and simulation workbench. It generates strategy DSL, runs backtests, and operates a virtual desk. It does not execute trades, does not connect to exchange accounts, and does not hold funds in any form. Every output is research output, not investment advice, and past backtest performance is not a guarantee of future results.

The value is in the loop: plain English to a readable DSL to an honest, leverage-aware, funding-aware, walk-forward backtest to a virtual desk where you watch the idea in real time. That loop used to take days of coding. Now it takes minutes — and the rigor is the same.