Backtests
A backtest runs your strategy over past prices and shows the trades it would have made.
Where a backtest belongs
Inside a walk-forward, on a fold's in-sample months. There you run as many as you need: to fix the strategy, change it, tune its parameters. Plan the walk-forward first, then backtest.
A backtest outside a plan is exploratory. It is fine for checking that the strategy runs and trades at all, on the first months of the history. Over the whole history it shows you the months a walk-forward wants unseen: each fold it saw is marked "seen by exploratory BTs" in the Walk-Forward panel, and that fold's verdict is weakened.
When you ask for a backtest and the strategy has no plan, the AI proposes the plan first. If you still want the backtest, it runs it on the first months only.
How one starts
- The AI starts it from the chat, after asking you.
- Or you start it from Backtest → Run Backtest: Data Broker, Start date, End date, Initial Capital, and the strategy's parameters.
Each backtest of a strategy has a number (#1, #2, …).
Where the prices come from
Only from the data broker you pick. Orders are simulated: your trading account is never contacted. Luxis's built-in data broker is for backtests only. When the AI starts a backtest it uses the broker you name; if you name none, the one of the strategy's last backtest; if there is none, your default; otherwise it asks.
What you see
- Totals: Initial Capital; Realized P&L, what the closed trades made after commissions; Open at End, what the positions still held when the window ended were up or down, each at its last close; Equity and Total Return, capital plus both: what the account was worth at the end.
- Open at end: the positions still held, with when each was opened, its average price, its last close and its unrealized P&L. Not a trade: no exit, no fee, and in no statistic of the trades.
- The Equity Curve, the drawdown, Sharpe and the other risk figures; win rate, profit factor and the other statistics of the trades.
- Run Configuration & Parameters: exactly what this run used.
- Data: every trade, on the price chart and as a list.
Each figure, what it measures and how it is computed, is in The numbers in Luxis.
How the numbers are measured
The Equity Curve, the drawdown, Monthly Returns, Sharpe, Sortino, volatility, CAGR, Calmar and every figure built on daily returns are measured on the account's value at each session close: cash plus every position at the close of its last bar, as a broker's statement measures it. A position held for weeks counts on every day it is held, and one still held at the end counts too. The statistics of the trades are measured on the closed trades: win rate, profit factor, average, best and worst trade, streaks, Rolling Sharpe, Monte Carlo and Sharpe ex Top-5.
A card measured on the account says so under its number: "account at each close". Lives, and backtests made before the account's daily values were recorded, measure all of it on the closed trades, each trade's P&L on the day it closed, and their cards don't say it. Run such a backtest again to measure it on the account. In a walk-forward begun before, folds measured the two ways compare two different measures.
A session the run did not record keeps the value before it: 0% that day. A position with no price in the week before is valued at its cost, and the run's log says so.
In a run's results the AI reads, total_pnl and ending_equity are the account's at the end, positions still held included; the Realized P&L card is the closed trades' alone. open_at_end lists the positions still held, and close_equity is the account's value at each session close.
What a backtest does not tell you
A backtest's numbers are always optimistic. The strategy and its parameters were chosen while looking at this same past, so they fit it better than they will fit what comes next. That is why a backtest is a tool for tuning, and the verdict comes from the months it never saw: the out-of-sample side of a walk-forward.
Check the costs too. Unless the strategy says otherwise, a backtest assumes no slippage and no stock commission. A strategy that trades often can look good only because of that. Ask the AI to add realistic costs.
Limits and hours
Backtests use your plan's backtest hours. Settings → Plan shows how many can run at once, how many can wait, and the hours left this period. When the queue is full, the next one waits.