Results and export
The equity curve, the summary statistics, the trade log and the CSV files behind them.
Run a backtest
- Open
Backtests. The strip at the top names the strategy and the loaded chain. - Press
Run backtest. The button readsRunning…until the result arrives.
With no chain loaded, the run uses a generated chain and the panel says so. Load real history under Data first (see Connect Databento or Connect ThetaData). If the run fails, the error appears under the strip and the previous result stays on screen. With no strategy selected the button is disabled.
A result has three parts. A row of summary statistics, one chart chosen from the View menu, and the trade log with its export buttons.
Summary statistics
Statistics cover closed trades and the equity curve. A run with no trades reports zero for everything except final equity, which equals starting capital, and peak margin. Profit factor, avg win and avg loss show a dash.
| Statistic | Definition |
|---|---|
| Total P&L | Final equity minus starting capital, the sum of every closed trade's P&L. The line under it is the same figure as a percentage of starting capital. |
| CAGR | Compound annual growth from starting capital to final equity, annualized over the span of the equity curve in 365-day years. The span is the data the backtest ran on, not the stretch where trades happened. A run that ends at or below zero equity shows -100%. |
| Max drawdown | The largest dollar fall from a running equity peak, read from the bar-by-bar curve and shown as a negative amount. The percentage under it is the deepest fall as a share of its running peak, the same figure as the lowest point of the Drawdown chart. The two can come from different falls, since an early dip in a small account can be deeper in percent than a later, larger loss in dollars. |
| Win rate | Winning trades over winning plus losing trades. A trade that closes at exactly zero P&L counts as neither. The line under it reads wins of total trades. |
| Profit factor | Gross profit divided by gross loss. With winning trades and no losing trade it shows a dash and the line no losses. With no trades, or none that won or lost, it shows a dash alone. |
| Avg win | Gross profit divided by the number of winning trades. A dash when nothing won. |
| Avg loss | Gross loss divided by the number of losing trades, shown as a negative amount like max drawdown. A dash when nothing lost. |
| Peak margin | The most margin held against open positions at one time. The line under it is that amount as a percentage of starting capital. |
Drawdown reads the curve rather than closed trades. The curve marks open positions to market on every bar, so a loss that recovered before the exit still counts. How fills, commission and margin feed these numbers is in Fills, costs and margin.
Charts
Pick a chart from the View menu above the plot. Each chart needs at least two equity points or one trade, otherwise it stays empty.
Equity curve. Account equity at every bar, with quarter labels on the time axis. Long runs are thinned for drawing by keeping the high and low of each slice, so a spike between samples is never dropped.Drawdown. Percentage below the running peak at every bar.Monthly returns. A calendar grid of month-over-month change in month-end equity. The first month compares against the curve's opening equity. Hover a cell for the exact percentage.P&L distribution. A 28-bin histogram of trade P&L, with a break even line when trades fall on both sides of zero.Exit reasons. Trade count and summed P&L per exit reason, most frequent first.
Trade log
The block titled Trades shows the trade count in its heading and one row per closed trade.
| Column | Content |
|---|---|
| # | Trade number in run order. |
| Entry | Entry date and bar time. |
| Exit | Exit time with seconds, preceded by the exit date when the trade closed on a later day than it opened. |
| Reason | Why the trade closed. |
| Credit | Net premium received at entry. A debit trade shows a negative amount. |
| Margin | What the account held against the position. |
| P&L | Trade P&L after commissions. |
The table shows the first 300 trades. Press Show all N trades for the rest, or export the full log. When the account could not carry a position the rules called for, a note under the table counts the skipped entries.
Export to CSV
The trade log header has three buttons. Export trades, Export equity and Export stats. Each opens the system save dialog with a suggested name of trades.csv, equity.csv or stats.csv. The file holds the run on screen, computed by the same engine that produced it.
- After a save, the row shows
Saved toand the path. - Cancelling the dialog writes nothing and shows nothing.
- A write failure, such as a folder you cannot write to, shows the error in place of the path.
- All export buttons are disabled while one save is in progress.
Money columns carry two decimals, prices and ratios four. Dates are YYYY-MM-DD and times are Eastern. Fields containing a comma, quote or line break are quoted.
trades.csv
One row per trade. Legs are flattened into numbered columns, leg1_ through legN_, in strategy order. A trade with fewer legs than the widest one gets blank cells, so every row has the same width. A run with no trades writes the header row only.
| Column | Content |
|---|---|
| entry_date, entry_time | Date (YYYY-MM-DD) and bar time (HH:MM, Eastern) of the entry. |
| exit_date, exit_time | Date and exit time as HH:MM:SS. The seconds are nonzero only for a level exit resolved inside a bar. |
| exit_reason | profit target, stop loss, time exit, DTE exit, max days, expiry or end of data. |
| entry_value | Net value at entry. Negative for a net credit, positive for a net debit. |
| exit_value | Net value at exit, same sign convention. |
| commissions | Commission charged on the trade. |
| pnl | The trade's P&L after commissions. |
| margin | What the account held against the position while it was open. |
| legN_type | call or put. |
| legN_side | long or short. |
| legN_quantity | Contracts on that leg. |
| legN_strike | Strike, written without decimals when it is a whole number. |
| legN_expiry | Expiry date. |
| legN_entry_price, legN_exit_price | Fill prices for that leg, four decimals. |
equity.csv
One row per bar with columns date, time and equity. This is the full curve, not the thinned one drawn on screen. A year of one-minute bars runs to roughly 98,000 rows.
stats.csv
Two columns, metric and value, with one row per statistic in this order.
| Metric | Value |
|---|---|
| trades, wins, losses | Counts. |
| win_rate_pct | Win rate as a percentage. |
| total_pnl, final_equity | Dollars. |
| avg_win, avg_loss | Dollars, both positive. The app shows avg loss negated. |
| profit_factor | Ratio. Empty when no trade lost. |
| max_drawdown, max_drawdown_pct | Largest dollar fall, and deepest fall as a percent of its peak. Both positive. |
| cagr_pct | Percent, so 12.5 means 12.5% a year. |
| max_margin_used, max_margin_pct | Peak margin in dollars and as a percent of starting capital. |
| skipped_entries | Entries the rules called for that the account could not carry. |
sweep.csv
A finished sweep has its own Export grid button. The file has one row per grid cell. The first columns are the sweep axes, labelled as in the app and holding the value that cell ran with. The remaining columns are the stats columns above, in the same order. See Run a sweep.
New to reading these numbers? The options backtesting guide covers what a trustworthy result looks like. What a window of history costs to pull is on data cost, and plans are on pricing.