Skip to content
These docs describe Tradr v0.17.0. Running an older release? Check the release notes for what changed.

Methodology

Every number in Tradr is derived from your fills. Nothing is stored as a running total, so correcting a fill corrects every figure that depends on it.

This page gives the exact definition of each one, including the parts that are easy to assume wrongly.

The quantity-weighted average price across the fills of that type.

Two entries — 100 at 190.00 and 50 at 195.00 — average to 191.6667, not 192.50. The larger fill counts for more.

(average exit − average entry) × quantity exited × direction × contract size

Direction is +1 for a long and −1 for a short. Contract size is 100 for an option and 1 for a stock. Fees are not included.

Gross P&L, minus the fees attributable to the quantity exited. This is the figure that reaches your account balance.

Not simply “the fees on the exit”. Each exit carries:

  • its own fee, plus
  • a proportional share of the entry fees, for the quantity being closed.

Close 60 of 150 units and 60/150 of the entry fees come with it. Close the remaining 90 and the rest follows. This keeps a partial exit from either escaping its share of the entry cost or paying all of it up front.

The displayed fee figure is derived as gross minus net, so gross − fees = net holds exactly rather than to within a rounding error.

net P&L ÷ (average entry × quantity exited × contract size + allocated entry fees) × 100

The denominator is what the closed portion cost you. For a short position it is the proceeds of the sale, not the margin you posted — margin varies by broker and Tradr does not know yours.

|target price − average entry| ÷ |average entry − stop loss|

Planned reward per unit of risk, from the trade plan you recorded.

It moves when you scale in. Both distances are measured from the average entry, so a second fill at a worse price re-bases the ratio even though your target and stop have not moved.

Null when there is no target, no stop, or when the stop equals the average entry — the risk per unit would be zero.

(average exit − average entry) × direction ÷ |average entry − stop loss|

What you actually got, in the same units as the plan. Signed — negative when the trade went against you, so a −1.0 means you lost exactly the risk you planned.

These appear on the performance page, one currency at a time. Every figure below counts closed positions only. The exception is Total net P&L: it follows your fills, so a partial exit counts before its position is flat. The dashboard’s Statistics summary widget shows several of these same figures.

Every flat position the range brings into view, counted once, one currency at a time. A position comes into view once it has gone flat, meaning it reached zero open quantity. That includes a position that went flat inside the range, and one that had a fill inside the range but went flat outside it. When none are in range the count reads 0, never blank.

A strategy group counts as one position. The group goes flat when its last open leg goes flat. A leg of a group never counts on its own.

The sum of the realised net P&L of every fill in the range, one currency at a time. It comes straight from the fills, so a partial exit counts before its position is flat. That makes it equal the last point of the equity curve. Its population is every fill in range, wider than the count above: a position can add to this total before it is counted. With no fills in range it reads 0, never blank.

A position is classified by its net P&L rounded to the currency’s smallest unit. Exactly zero after rounding is a breakeven, not a win and not a loss. A position that made half a cent is a breakeven in USD.

wins ÷ (wins + losses) × 100

Breakevens are excluded from the denominator, not counted as losses. A record of 6 wins, 3 losses and 1 breakeven gives a 66.7% win rate, not 60%.

That choice makes the figure comparable between a strategy that scratches trades and one that does not. Breakevens are reported separately as the breakeven rate, which does divide by the total.

Null when nothing has been decided — no wins and no losses in range.

breakevens ÷ total positions × 100

Unlike win rate, this one uses every closed position as its denominator.

The mean net P&L of winning and of losing positions respectively. Average loss is negative. Breakevens are in neither.

sum of winning net P&L ÷ |sum of losing net P&L|

Above 1.0 means the wins outweigh the losses. Null when there are no wins or no losses — not infinity, and not zero. With no losses there is no meaningful ratio, and reporting one would flatter a two-trade record.

The single best and single worst net P&L in range.

sum of net P&L over closed positions ÷ total positions

The average net P&L a position returns. Unlike win rate, the denominator is the total, not the decided trades — so every breakeven is counted, each one pulling the figure toward zero.

The same figure follows from the averages:

(wins ÷ total) × average win + (losses ÷ total) × average loss

The weights divide by the total, so a run of scratches lowers your expectancy even though a breakeven adds nothing to the numerator.

Null when nothing has closed in range.

Tradr does not report a Sharpe ratio.

A Sharpe ratio is built from a series of period returns measured against a capital base, and Tradr keeps neither. Return is measured per position, against what the closed portion cost — see Return % above — not against your account over time. Balances are current, not historical, so there is no record of what the account was worth period by period to take a mean and a standard deviation from.

Reporting one would first need a capital-base series — your account value over time — with deposits and withdrawals separated out, so that funding the account is not read as a gain.

The running total of net P&L, bucket by bucket, over the range you selected. It starts at zero rather than at your account balance: it shows what your trading did, not what your account is worth.

Bucket boundaries come from your reporting timezone, described below.

A breakdown groups your closed positions that went flat inside the range, one currency at a time, and reports the statistics above for each group.

The population is narrower than the statistics above. Only positions that went flat — reached zero open quantity — at an instant inside the selected range are grouped. A position that merely had a fill in the range, but went flat outside it, is left out. Each currency is grouped on its own.

One row per instrument. An option groups under its underlying, so every contract on the same stock shares one row; a stock groups under its own symbol.

Both read the moment the position went flat, expressed in your reporting timezone — the same instant that places the position on the calendar. A position that went flat late on a Friday evening is a Friday, and stays a Friday wherever you open Tradr.

By symbol, by weekday and by hour, each position lands in exactly one row, so the rows add up to the range total.

By tag they do not. A position is counted once under each of its tags, so a position with two tags appears in two rows and the rows can total more than the range. An Untagged row holds every position with no tag, so nothing is missing even though the rows no longer sum to the total.

Why the total can differ from the Statistics panel

Section titled “Why the total can differ from the Statistics panel”

A breakdown’s total is the closed-in-range total: only the positions that went flat inside the range. The Statistics panel is wider — it counts every flat position the range brings into view, including ones that had a fill inside the range but went flat outside it. So the breakdown’s total P&L, its position count and its rates can all read differently from the panel; they are answering different questions.

A position’s compliance score is the weighted share of your enabled trading rules that it passes. Each rule carries a weight — critical counts 3, important 2, nice-to-have 1 — and the score is

100 × (summed weight of the rules that pass)
÷ (summed weight of the rules that pass or breach)

rounded half up to a whole number from 0 to 100. Only a pass or a breach counts; a rule that does not apply, or that Tradr cannot evaluate, is left out of both sums. A position that no rule passes or breaches is unscored and has no score. See Trading rules for each rule and its outcomes.

The compliance rate is the share of your scored positions that are compliant: the compliant positions divided by the compliant plus non-compliant positions, times 100. Unscored positions are left out. When that sum is zero, the rate reads as an em dash rather than a figure.

This breakdown groups the population into exactly three rows — Compliant, Non-compliant and Unscored — in that order, one set per currency. A position is compliant when no enabled rule breaches it, non-compliant when at least one does, and unscored when no rule produced a pass or a breach. Each position lands in exactly one row, so the rows’ positions and P&L sum to the currency total. A reopened position sits in the row of its current, provisional status.

Each day cell carries two figures from two different events.

The P&L is the realised P&L of the fills that landed that day — the same rule as the daily series and the equity curve above. A partial exit counts on the day it filled, so a cell can show a P&L for a position that has not closed.

The position count is the number of positions that went flat that day. A position whose fills span more than one day adds its realised P&L to each of those days, but is counted once, on the day it went flat.

Days come from your reporting timezone, the same zone the rest of this page uses.

A week row’s total covers only the days of the shown month — the trailing and leading days that belong to a neighbouring month are not added in. The month total equals that month’s bucket on the performance chart: the same daily P&L, summed a different way.

These figures appear away from the performance and position views, on the account, calculator, fee, tax and options screens.

An account’s balance is its starting balance plus every ledger credit, minus every ledger debit. Only seven ledger entry types move it. They are realised position P&L and its reversal, balance adjustments, deposits and withdrawals, and the reversals of those deposits and withdrawals.

Nothing here reads a market quote, so the balance is a cash figure valued at cost. It divides into two halves. Cash is the free part. Position value is the capital tied up in open positions, at what you paid — or, for a short, what you received. Cash is the balance minus that position value, so the halves always sum back to the balance.

Position value counts open positions only; a closed one has returned its capital to cash. Both halves are in one currency, the account’s own.

The calculator turns a risk budget into a position size. Per-unit risk is the distance from entry to stop, |entry − stop|. Contract size is 100 for an options trade and 1 for a stock.

The risk-derived size is the risk budget divided by per-unit risk × contract size, floored to whole units. The budget is a dollar amount, or a percentage of your account balance. A buying-power cap can lower it: buying power divided by entry × contract size, floored. The smaller size wins.

From the final size come the dollar risk, per-unit risk × size × contract size, and the total position value, entry × size × contract size. Risk/reward is |target − entry| ÷ |entry − stop|, shown only when you set a target. Estimated fees and the breakeven price come from the journal’s own fee rules, through calculateFees.

Every figure stays in the currency of the prices you type; there is no conversion. When the calculator cannot size a trade it returns a status instead:

  • nothing-to-size-against — the balance is zero or negative, so a percentage of it risks nothing.
  • exceeds-maximum — the derived dollar risk is past the built-in ceiling.
  • buying-power-zero — the buying power will not fund a single unit.

The fee rollup totals the fees you paid over a year. Each account gets a stock-fee total and an options-fee total. The two add to that account’s overall total, in the account’s own currency.

Above the accounts, the totals are summed per currency. Those per-currency sums then convert once, at the year-end spot rate, into a single grand total in your display currency. A year with no fills reports empty totals and no grand total, never a zero.

The tax summary reports your realised P&L for the year, one figure per currency. What else it shows depends on your tax jurisdiction and your lot method, both set in your profile.

Account tax treatment. Every account has a tax treatment: taxable or registered. Set it when you create the account, or change it later from the account’s edit dialog. A registered account is a tax-sheltered account, such as a TFSA, RRSP or FHSA. Only the Canadian tax summary uses this setting.

Lots. Each fill that opens or adds to a position becomes one lot. A lot keeps its own price, fee and open date.

Lot method. Tradr builds the tax summary with one of three methods: FIFO, average cost, or — for a Canadian jurisdiction — a pooled adjusted cost base.

  • FIFO matches a sale against your oldest open lot first. It splits a sale across lots when one lot does not cover the whole sale. FIFO is the default method for a US jurisdiction, for jurisdiction “other”, and when no jurisdiction is stored.
  • Average cost pools every lot into one cost and one date per position. This is the same figure your journal, ledger and performance pages use.
  • Pooled adjusted cost base (ACB) is the method every Canadian tax summary uses, described below.

You can set your own method, FIFO or average cost, on the tax summary page. A Canadian jurisdiction always uses pooled ACB instead, whatever method you have stored. Your choice changes no fill, lot or ledger row; it only changes which method builds this page.

Pooled ACB. Tradr keeps one pool per security and side, long or short, across every taxable account. A sale in any of those accounts draws on that one pool, not on an account-by-account cost. An option pools by its own series, so a different strike or expiration starts a new pool. A registered account never joins the pool, so its trades never enter the Canadian tax summary.

A sale in another currency converts to Canadian dollars at the rate you entered for that trade’s own date. A sale can come back unpriced, with no dollar figures, for one of three reasons:

  • Missing rate — the sale itself has no CAD rate for its trade date.
  • Pool unpriced — an earlier purchase in the pool has no CAD rate, so the pool’s cost is unknown.
  • Exceeds pool — the sale’s quantity is larger than the pool currently holds.

Tradr does not fetch or guess a CAD rate for you. Enter the missing rate under Settings → Profile to price the affected rows the next time you open this page.

Specific identification. Under FIFO, you can pick which lots a sale closes instead of taking the oldest lots first. Pick lots in the fill dialog when you record or edit a sale. Clear your picks to match that sale by FIFO again.

The per-lot split. Under FIFO, each matched lot gets its own row, with its own gross, fees and net. For a US jurisdiction only, a row is short-term when its sale date falls 365 days or fewer after its lot’s open date, and long-term after that. Every other jurisdiction leaves the term empty on every row.

Under average cost, the tax summary keeps today’s figures: one realised P&L row per position, no lot rows, and the US split on the position’s own open and close dates.

Under pooled ACB, the tax summary shows one row per sale instead of one row per position: its trade date, quantity, CAD rate, proceeds, outlays, cost base and gain, or its unpriced reason.

In-kind transfer links. On a Canadian pooled ACB, moving a position from one account to another without a sale is an in-kind transfer. Link the exit fill in the old account to the entry fill in the new account from the fill dialog, on the exit fill’s own edit screen.

  • A transfer between two taxable accounts realises nothing: neither fill leaves or enters a pool.
  • A transfer with one taxable leg and one registered leg realises on the taxable leg only, at that fill’s own recorded price. The registered leg was never part of a pool, linked or not.
  • A transfer between two registered accounts realises nothing, because neither leg ever joins a pool.

Tradr blocks a quantity edit on a linked fill until you remove the link.

Losses can raise a flag. A US wash sale is flagged when a matching trade sits within 30 days either side of the loss. Under FIFO, the flag uses the matched lot’s own open and close dates; under average cost, it uses the position’s dates, as before.

A Canadian superficial loss flags the pool itself, not one lot or position. The flag fires when you buy the same security back, in any of your taxable accounts, even the one that sold at a loss, inside the 61-day window around the sale: 30 days before it, the sale’s own day, and 30 days after. You must also still hold that purchase 30 days after the sale, or no flag fires.

For an option, either flag matches on the underlying only. It does not compare strike or expiration, so a replacement option on the same underlying can still raise a flag even at a different strike or expiration. The flag is a note only. Tradr never adjusts your cost basis, and jurisdiction “other” raises no flags.

The journal keeps average cost. Your lot method changes only this page. Your journal, account balance and every performance figure always use average cost, even when your tax summary shows FIFO or pooled ACB.

The options tools include a Black-Scholes pricer. It takes six inputs: the spot price S, strike K, time to expiry in years T, and volatility σ. It also takes the risk-free rate r and an optional dividend yield q, for a call or a put.

It returns the option price and five Greeks. These are delta, gamma, theta per day, vega per 1%, and rho per 1%. Theta is scaled to one day, and vega and rho to a one-point move — a 1% change in volatility or in the rate.

The four inputs S, K, T and σ must each be positive. A zero or negative one stops the model, so no number comes back. When volatility and time are so small that σ × √T drops below a set threshold, the pricer returns the limit value: the discounted intrinsic payoff. There the standard formula would divide by that near-zero quantity, so the analytic limit is used instead. The price is in the currency of the spot and strike you enter.

Realized P&L does not wait for a close. A partial exit realizes its share immediately, so an open position can carry a realized P&L and contribute to your balance. The performance statistics above are a different question — they count positions that have gone flat, which is why a half-closed position appears in your balance but not yet in your win rate.

Day, week and month come from your reporting timezone. Tradr buckets P&L in the zone stored against your user, not the zone of the browser you are reading from. A fill late in the evening lands in the same bucket wherever you open Tradr. Set the zone under Settings → Profile.

That zone is not an account’s trading-day timezone, and neither is derived from the other. The trading-day timezone belongs to one account and decides whether a position can be re-entered the same day. The reporting timezone belongs to you and decides how these figures are cut.

Currencies are never mixed. Statistics are computed per currency. Positions in a currency Tradr has no rate for are excluded and reported as excluded rather than silently dropped.

A reopened position keeps its last flat figures until it goes flat again. Recomputing from the current fills would give a different number, because the fills have changed since — so the last completed result is held rather than recalculated.