Backtest a simple strategy on real history
qmax_backtestReplays a strategy over real hourly trade data with the venues' real fees and reports what it would have done: final value, return, buy-and-hold comparison, max drawdown, fees paid, trades. Decisions are made on an hour's close and filled at the next hour's open; hours with no trades cannot be traded.
Strategies: 'hold' (buy once, hold), 'dca' (spend amountQu every everyHours), 'bands' (buy fractionPct of the QU when the price is bandPct below its lookbackHours average, sell fractionPct of the holding when above, with a cooldown). READ 'warnings' in the result: there is no order book depth in the history, so large amounts are optimistic, and QSwap's flat 100,100 QU fee can swallow small trades. Past results do not predict future ones.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| asset | Yes | Asset symbol, for example CFB or QDOGE (case does not matter). Use qmax_list_assets to find one. | |
| range | No | 90d | |
| venue | No | Which market's prices: QX (order book), QSwap (pool), 'all' (treat both as one market), or 'auto' (the market the live price comes from). | auto |
| strategy | Yes | ||
| starting_qu | Yes | QU to start with, e.g. 10000000 |