Output and Reporting
Output modes
Specify one or more output modes with --output-mode:
| Mode | Description |
|---|---|
summary | Performance statistics |
trades | Detailed trade list |
graph | ASCII equity curve (for futures contracts, margin requirements are overlaid on the same graph) |
returns | Monthly/yearly return matrix |
config | Parsed configuration display |
all | All modes combined |
silent | No output |
Combine modes with commas: --output-mode summary,graph,returns
Reading the summary report
The summary report includes these key metrics:
| Metric | Description |
|---|---|
| Net Profit | Total realised profit after costs |
| Total Trades | Number of completed round-trip trades |
| Win % | Percentage of profitable trades |
| Profit Factor | Gross profit / gross loss |
| Avg Trade | Average profit per trade |
| Max Drawdown | Largest peak-to-trough equity decline |
| Sharpe | Annualised risk-adjusted return (Sharpe ratio) |
| Sortino | Like Sharpe, but only penalises downside volatility |
| NP/DD | Net Profit divided by Max Drawdown |
| R-Squared | Linearity of the equity curve (1.0 = perfectly linear) |
The trades list
The trades output mode shows every individual trade with:
- Entry date, time, and price
- Exit date, time, and price
- Direction (Long/Short)
- Quantity
- Profit/Loss in currency and points
- MFE (Maximum Favourable Excursion) – the best the trade achieved
- MAE (Maximum Adverse Excursion) – the worst the trade experienced
- Bars held
Fills that occurred on shadow bars (out-of-session) are annotated with *.
The returns matrix
The returns output mode shows a year-by-month matrix of returns, making it easy to identify seasonal patterns, drawdown periods, and consistency across time.
Exporting trades
Export the trade list to a JSON file for external analysis or portfolio construction:
algo run --strategy kbt --symbols @ES --export trades.jsonThe exported JSON file can be used with the algo portfolio command to generate HTML reports.