Skip to main content

BacktestSeries

A run's time series (#4779). Bound to internal/backtest.BacktestSeries.

type BacktestSeries {
balance: [BacktestBalancePoint!]!
hold: [BacktestHoldPoint!]
holdUnavailableReason: String
holdMissingPairs: [String!]
}

Fields​

BacktestSeries.balance ● [BacktestBalancePoint!]! non-null object​

One point per UTC day, from the window's first day (the starting balance) to the first midnight after the last close (the final balance). A run with no closed trades has the single starting point.

BacktestSeries.hold ● [BacktestHoldPoint!] list object​

The buy-and-hold line (#4780): the equal-weight mean, over the run's pairs, of close / start - 1, where a pair's start is the close of its first candle at the run's timeframe in the window and its end is the close of its last. Dated like balance: the first point is the window's first day at 0, an intermediate point at midnight M uses each pair's last close known at M, and the last point (the first midnight after the last candle closed) equals summary.marketChange within 0.05 percentage points.

Null when there is no line; holdUnavailableReason then says why.

BacktestSeries.holdUnavailableReason ● String scalar​

Why hold is null, as a code (never prose). Set whenever hold is null on a completed run:

  • notRecorded: the run predates the line (no backfill), or it has not been recorded yet;
  • noMarketData: candles were missing for some pairs (holdMissingPairs names them), or the result has no market change to check the line against;
  • mismatch: the line's end differed from summary.marketChange by more than 0.05 percentage points, so it is not drawn.

BacktestSeries.holdMissingPairs ● [String!] list scalar​

The pairs that had no candle at the start or end of the window, or whose candles could not be read, when holdUnavailableReason is noMarketData. Null otherwise.

Member Of​

Backtest object