Pre-release edition. While real exchange-key connections remain closed, public pages show demonstration data that is labelled as such.
This document describes the calculation contract in force. If a rule changes, the contract version changes with it, and so does this page.
What this document covers
This page explains how TradeStat turns the trade history of a connected exchange into published figures. The calculation contract version is pnl-v1, and it is recorded with every result so old and new calculations cannot be confused.
The calculation is deterministic: the same inputs always produce the same result, and a SHA-256 fingerprint is computed over it. The fingerprint confirms that the figures shown belong to that exact data slice.
Data sources
The only source is a direct, read-only connection to a supported exchange. CSV, XLSX, broker statements, and manual entry are not used, so published figures cannot be hand-edited.
One confirmed source is synchronized centrally and pages share the normalized data. More pages do not mean more exchange requests, and a public view never triggers a request to the exchange: it renders stored state.
Currency and conversion
Every calculation has a base currency. Each trade's profit and fee are converted into it using stored rates as of the calculation.
If an amount cannot be converted, the trade is excluded and the result is marked partial. An approximate rate is never substituted.
Realized PnL
Realized PnL is the sum of net results of closed trades. For each trade the gross result is taken and the fee subtracted: net result = gross PnL − fee.
Trades are ordered by close time and then by a stable identifier. Identifiers must be unique, so the same trade cannot enter a calculation twice.
Fees and funding
A fee reduces the result of its trade and is never presented as a separate before-costs return.
If a fee is missing or cannot be converted, it contributes zero to the sum but the whole result is marked partial. This is a deliberate trade-off: the figure is not silently understated, it is labelled incomplete.
What the calculation does not do
Deposits, withdrawals, and transfers between accounts are not trading profit and never enter PnL.
Some histories — spot and certain CEX venues — carry no exchange-side realized PnL. Those fills are not re-derived with an in-house FIFO ledger: they are excluded and the result is marked partial. A clean zero is never shown in place of missing data.
When a fill's position side is ambiguous, the row is not discarded to produce a tidier picture; the result is marked partial instead.
Unrealized and total PnL
Unrealized PnL is taken from open positions as a separate slice and depends on whether position collection is enabled for the source.
Total PnL is realized plus unrealized, and it is shown only when the unrealized part is known. If it is unavailable, the total is withheld entirely rather than set equal to realized.
Drawdown
Drawdown is measured on the equity curve. Where equity snapshots exist for the source they are used; otherwise the curve is starting equity plus cumulative realized PnL.
Absolute drawdown is the largest fall from the running peak. Percentage drawdown is that fall divided by the peak, and it is shown only with a confirmed base: either equity snapshots exist or a positive starting equity was provided. Without a base the percentage is withheld.
Derived metrics
Percentage return is measured against starting equity and is shown only when that value is present and positive.
Profit factor is gross profit divided by the absolute value of gross loss. With no losing trades the metric is withheld, because infinity is not a meaningful value. With neither profit nor loss it is zero.
Win rate is the share of trades with a positive net result. Trades that close at exactly zero count in the denominator but not as wins.
Time, freshness, and completeness
All timestamps are normalized to UTC. A page shows the latest confirmed calculation, never an intermediate state.
The calculation state is stated explicitly: the first calculation has not completed, the result is current, the refresh is delayed, or the source did not confirm a data freshness timestamp.
- freshness timestamp is not confirmed
- unrealized PnL is unavailable
- return is unavailable without a confirmed base
- drawdown percentage is unavailable
- profit factor is unavailable
- win rate is unavailable
The governing principle
A missing value is never replaced with zero. When the data is insufficient the metric is withheld and the reason is stated beside it.
Demonstration and real data are separated and labelled on the page. Demonstration figures are never presented as real trading.