Skip to panels
DashboardF1
MarketsF2
EquityF3
WatchlistF4
PortfolioF5
NewsF6
EconomicsF7
CryptoF8
ScreenerF9
AI ChatF10
Quant
Backtest
Education
Profile
APEXTERMINAL
API · Loading…Delayed data--:--:--WIB

Backtest

No engine yet

There is no backtest engine, and there is no fake one here either. This is the plan: what will be built, which parts are already standing, which are missing by name, and the four honesty rules the results will be held to — rendered as working components below, so they exist in code before the first backtest runs.

What it will be

One metered server engine, one result contract.

IDXUSSEACrypto

A backtest is a job, not a request: it reads years of bars, simulates fills and can run for minutes. So it submits and polls, matching the job pattern the research pipeline already runs.

  • POST /quant/backtestTakes the strategy, the universe, the date range and the execution settings; returns a run id. Credit-metered, with the cost previewed before you press it.
  • GET /quant/backtest/{runId}Status, progress and — when it finishes — the full result. One shape for every command.
  • backtest_run · backtest_tradeTwo tables: the run with its parameters and summary metrics, the trades with entry, exit, side, size, P&L and commission. Saved runs are what makes comparing two backtests possible, which their screen cannot do at all.
  • DELETE /quant/backtest/{runId}Their build has no cancel anywhere. On metered server compute, an uncancellable job the user stopped caring about is money burning.
  • GET /quant/backtestYour own runs, so a parameter change can be compared against the run before it rather than remembered.

One engine, not six. Their build ships six interchangeable Python libraries and its own code documents the cost: two providers error until you install something, and a third has commands disabled because the result renderer cannot read its output shape.

Shipping order

  • Run a backtestThe core: rules over daily bars, with costs, producing an equity curve and a trade list.Wave 1
  • Random-entry baselineQuietly the most educational feature in their screen. Run random entries with your sizing and your costs; if your strategy does not beat that by more than its own noise, you have not found anything.Wave 1
  • Returns analysisStatistics, drawdowns and rolling windows over the result — mostly already built, on the Quant screen.Wave 1
  • Parameter optimisationNeeds the runner first, then a sweep orchestrator. A ten-thousand-iteration grid is not free, so it is credit-gated and previewed.Wave 2
  • Walk-forwardIn-sample and out-of-sample, repeatedly, because a single train-test split is not enough.Wave 2
  • Indicator signal generatorsCrossover, threshold, breakout, mean-reversion and filter modes over the indicators we already compute.Wave 2
  • ML label generatorsPure computation over our bars, and low product value for a retail Indonesian user. Deferred deliberately.Wave 3
  • Cross-validation splittersDeferred as UI. Purged k-fold is the one piece of genuine anti-leakage rigour in their tree and belongs in the education content even if not in a form.Wave 3
  • Indicator sweepA parameter sweep over one indicator. Cheap once the optimiser exists, pointless before it.Wave 3

What it needs, and what is already standing

6 ready · 2 partial · 5 missing

IDXUSSEACrypto
  • Daily price barsThe series everything is simulated over. IDX is covered; US coverage is thinner, and there is no crypto OHLC route at all./assets/{symbol}/ohlcPARTIAL
  • Quant metricsSharpe, Sortino, VaR, CVaR, drawdown episodes, correlation and basket risk. The result renderer needs none of this rebuilt — it can call these./quant/summary/{symbol}/quant/risk/{symbol}/quant/rolling/{symbol}/quant/drawdown/{symbol}/quant/correlation/quant/portfolio/riskREADY
  • Transaction ledgerPosition history with dated entries and exits, which is the shape a simulated trade list has to match if the two are ever to be compared./me/portfolios/{id}/transactions/me/portfolios/{id}/transactions/{transactionId}READY
  • NAV snapshotsDated portfolio values with a rebuild path. This is what an equity curve is; the backtest produces a synthetic one and the comparison against a real one is the interesting part./me/portfolios/{id}/history/me/portfolios/{id}/performance/me/portfolios/{id}/snapshots/rebuildREADY
  • Benchmark seriesIHSG and the index family, with history. “I beat the market” needs a period and a benchmark attached to mean anything./macro/indices/macro/historyREADY
  • Credits and meteringBalance, ledger and packs, plus the per-call charge machinery. A backtest is a metered job the moment it exists./credits/wallet/credits/ledger/credits/packsREADY
  • A job pattern to copyThe research pipeline already runs as submitted jobs with a run list and per-run detail. The backtest runner should be the same shape rather than a new one./admin/ai-research/runs/admin/ai-research/run/{runId}READY
  • Strategy libraryThese exist as editorial content — a description and a rationale — not as executable rules. Reading one tells you what the idea is; nothing can run it./strategies/strategies/{slug}/ai-research/strategiesnot for this marketPARTIAL
  • The runner itselfThe simulation loop: signal evaluation, position sizing with lot rounding, fills with commission and slippage, and the equity curve. This is the largest single piece and none of it exists.no route yetMISSING
  • Run and trade tablesWithout stored runs there is no history, no comparison and no reproducibility — and comparing two backtests is the whole point of the exercise.no route yetMISSING
  • Executable strategy registryEach strategy needs a parameter schema — name, label, default, min, max, step — so the form can be generated from the server rather than hardcoded per strategy in the client.no route yetMISSING
  • Intraday barsOur pipeline is daily-first. A daily strategy backtested on daily bars ignores the intraday path that would have stopped you out — and on IDX, intraday history is a licensing question before it is a code one.no route yetMISSING
  • Crypto price historyThere is no crypto OHLC route. Crypto intraday data is free and easy to obtain, which makes it the sensible market to build the intraday path in first.no route yetnot for this marketMISSING

The honesty layer

Four rules, built before the engine, so the result renderer inherits them.

IDXUSSEACrypto

These are the part of the reference build worth copying exactly, and they are the difference between a backtest tool and a backtest toy. Each one below is the real component, rendered with the input that triggers it.

Always, under the headline numbers — Gross returns are not achievable. A 55%-win-rate strategy is a losing one at 0.5% round-trip, and the banner is what makes that visible instead of assumed.

No costs modelled

Commission and slippage are both zero. These returns are gross and are not achievable by anyone. Re-run at twice your assumed cost and see whether the edge survives.

When the run made no trades — A run that never traded reports 0% drawdown and 0 volatility, which reads like a flawless strategy on the summary cards. It is a bug report, and it should look like one.

Zero trades

This strategy produced ZERO trades over the selected range. Every performance figure is meaningless — widen the date range, loosen the entry rules, or check the symbol and the interval.

When any price was generated rather than fetched — Their own tree records a module deleted for returning indicators over synthetic prices with no indication they were synthetic. Ours must never silently substitute.

Synthetic price data

Part of this run used generated prices, because the price source was unreachable for part of the range. The results do not reflect real markets and must not be read as though they do.

When the trade table is capped — A table that quietly shows the first two hundred of four thousand rows invites conclusions about a sample the reader does not know they are looking at.

Table truncated

Showing the first 200 of 4,213 rows. Export the run for the complete set.

Round-trip cost calculator

The arithmetic that decides whether an edge survives. No engine needed — this is real and it works now.

USFree

Percent.

Percent.

Applied to both legs.

Percent.

Percent.

Percent.

Costs applied

Commission 0.04% per trade, slippage 0.03% per fill.

Round-trip cost
0.10%

buy + sell + slippage on both legs

Gross per trade
0.48%
Net per trade
0.38%

The edge survives its costs.

Break-even win rate
46.7%

at this payoff ratio

Total cost
5%

$ 5,000,000

Total net
18.8%

$ 18,750,000

Lot size
1

shares per lot — rounding matters on a small account

Short selling
Allowed
Benchmark ^GSPCRisk-free 4.25%The risk-free rate moves your Sharpe, so the choice is not neutral — for Indonesia it is the BI 7-day reverse repo, not a US Treasury yield.

Broker-typical numbers, not a quote from your broker. Replace them with your own — the whole point of this panel is that your costs, not average costs, are what your strategy has to beat.

What to use in the meantime

IDXUSSEACrypto

Most of what people want a backtest for — how volatile was it, how deep did it fall, how long did recovery take, how correlated are these — is already computable over real history and does not need a simulation.

Open QuantOpen Portfolio
v—Session00:00:00MarketUS0 panelsFeeds—Latency—Ready