Trade Lifecycle
Table of Contents
1. Overview
A trade's operational state follows a finite state machine. This document describes that machine: the states a trade can be in, the events that cause transitions between them, and the taxonomy of activity types used for P&L attribution and reporting.
Trade status FSM implementation covers how the machine is held in the database.
2. Trade Status
The trade status is the operational state of a trade at a given moment. It answers the question: what state is this trade in right now?
Status drives whether a trade is included in risk and P&L (only live
trades), what operations are permissible on it, and how it is filtered
for reporting and reconciliation.
It is one of three things a lifecycle discussion routinely conflates. Trade activity covers the second, an event that happened to a trade, and trade classification covers the third, what the trade is.
3. The Trade Lifecycle
| State | Description | Initial |
|---|---|---|
draft |
Recorded, but no agreement has been struck. | Yes |
live |
The agreement stands. | Yes |
expired |
Contract ceased naturally: expired, matured, exercised. | No |
cancelled |
Removed from the book. | No |
There are two ways in. A trade booked against an agreement already
struck enters at live. One recorded before any agreement exists —
a requirement taken down over the phone, a quote being explored —
enters at draft.
No state is terminal. A trade may end in expired or cancelled, but
both are reversible, because either may have been recorded in error.
The diagram shows live as a composite state containing
unauthorised and authorised, because that is where the distinction
sits and a reader looking for it will look there. Those substates are
not states of this machine, and the next section says what they are
instead.
| From | To | Event | Notes |
|---|---|---|---|
| (initial) | draft |
Capture | Recorded before any agreement exists. |
| (initial) | live |
New | Booked against an agreement already struck. |
draft |
live |
Execute | The agreement is struck. |
draft |
cancelled |
Discard | The draft comes to nothing. |
draft |
draft |
Amend | The draft is refined. |
live |
expired |
Expire | The contract ceases naturally. |
live |
cancelled |
Cancel | The trade is removed from the book. |
expired |
live |
Unexpire | The expiry was recorded in error. |
cancelled |
live |
Uncancel | The cancellation was recorded in error. |
expired, cancelled |
unchanged | Amend | The record is corrected without being revived. |
Within live, amendment interacts with the authorisation flag rather
than with the state:
| From | To | Event | Notes |
|---|---|---|---|
unauthorised |
authorised |
Authorise | Operations releases the trade. |
authorised |
unauthorised |
Un-authorise | The release is withdrawn, with a reason. |
authorised |
unauthorised |
Amend | The released terms no longer stand. |
unauthorised |
unauthorised |
Amend | Nothing to withdraw; only the version moves. |
Three states, and a trade is in the first of them from the moment it is booked. There is no state between booking and liveness, because the agreement exists as soon as it is struck.
3.1. A draft is not yet a trade
The distinction between draft and live is whether an agreement
exists, and it is not the same as the distinction between
unauthorised and authorised.
An unauthorised trade is an agreement that Operations has not yet released. A draft is not an agreement at all. Neither contributes to risk and P&L, but they fail to for different reasons, and only one of them is something a counterparty could hold the firm to.
A draft therefore carries no authorisation status. There is nothing to
release until the agreement exists, which is why the composite in the
diagram sits inside live and not around both.
3.1.1. What blocks a draft
A draft carries a reason saying why it is not live, and the reason names who is responsible for unblocking it: waiting for allocation to a business, waiting for counterparty details, waiting for input from the requestor.
Recording the responsible party rather than only the cause is what makes a trade exceptions report actionable. The report lists what is in a provisional state, how long it has been there, and who is looking at it.
3.1.2. The provisional family
Several situations look alike and are not, and reporting depends on telling them apart.
| Situation | What it is | Contributes |
|---|---|---|
| Draft or RFQ | Being explored; no agreement | No |
| Pre-live or incomplete | An agreement exists but details are missing | No |
| Pending | An agreement exists; the client will replace it with allocations | To risk only |
| Hypothetical | A question, never intended to become a trade | No |
The first two are both draft here, distinguished by their reason.
The third is live: a pending trade flows to the trader's book so
risk is managed from the start, while sending no confirmations and not
settling, which is a matter for its confirmation status rather than
its state.
The fourth is not a state at all. A hypothetical is classified rather
than staged, and trade classification covers it: it is a trade whose
booking nature is hypothetical, and it never becomes anything else.
3.2. Amendment never moves the state
Amend leaves draft, expired and cancelled unchanged. A draft
being refined is still a draft; a trade that has ceased can still have
its record corrected, and correcting it does not revive it. Reviving one is a different event, and the next section
covers it.
Within live, amendment moves the authorisation flag rather than the
state. An amendment to an authorised trade returns it to
unauthorised, because the terms Operations released are no longer
the terms on the book and the decision has to be taken again. An
amendment to an unauthorised trade changes nothing but the version,
since there is no release to withdraw.
The confirmation lifecycle behaves the same way, and for the same
reason: a confirmable amendment returns a confirmed trade to
unconfirmed. Both are agreements about terms that an amendment
invalidates. Confirmations covers that side.
What an amendment produces is a version. Trade versioning covers what a version is and how the internal and external versions move, and trade activity classifies which amendments are economic, which are confirmable, and which are real.
A change that cannot be made in place is not an amendment. Cancelling and rebooking produces two trades, each with its own lifecycle.
3.3. Expire and cancel are reversible
Neither is terminal, because either may have been recorded in error: a cancellation booked against the wrong trade, an expiry driven by a fixing later corrected.
Unexpire and uncancel correct the record rather than revive an
agreement, and a trade returning to live arrives unauthorised. The
release it previously carried was a decision about a trade that was
then taken off the book, so it does not survive the return.
3.4. Why fixings and coupon payments are not events here
A contractual event such as a fixing or a coupon payment produces a
new version of the trade, and so appears in the
reason for update enumeration, but it is not an event in this
machine. The test is whether the event changes which state the trade
is in. A fixing sets a rate on a trade that was live and remains
live; a coupon payment discharges an obligation on a trade that
stays live until its last one.
Expiry passes that test and they do not. A contract that has expired
no longer accrues, no longer resets, and no longer contributes, so
live can no longer describe it.
So the two vocabularies are different by construction. The lifecycle enumerates the transitions between states; the reason for update enumerates the causes of versions, of which state transitions are only one family. Trade activity holds the full taxonomy of causes.
3.5. The substates of live are a flag
An operational authorisation decision is metadata, so it is held as a flag on the trade rather than as a state in this machine. A version produced by authorising would itself require authorisation, without end, so authorising states something about a trade rather than changing it.
The composite in the diagram places the distinction without modelling it. Two substates are drawn because two are what a reader needs in order to see where contribution comes from; the flag itself carries four values, whose transitions are set out in the operational authorisation queue.
Drawing it inside live is deliberate. The flag is meaningful only
while a trade is live: a cancelled trade's authorisation history
remains on the record, but there is nothing left for it to release.
3.6. A trade carries three statuses
This lifecycle is one of three, and the other two are not states of the trade but decisions and agreements about it.
| Status | Question | Values |
|---|---|---|
trade_status |
Where has this trade got to? | live, expired, cancelled |
operational_authorisation_status |
Has Operations released it? | unseen, held_over, authorised, denied |
confirmation_status |
What have we and the counterparty agreed? | not_required, unconfirmed, queried, affirmed, confirmed |
Neither of the other two is a transition here. Operational authorisation is metadata: a version produced by authorising would itself require authorisation, without end, so authorising states something about a trade rather than changing it. Confirmation is an agreement with a counterparty, which confirmations covers, and trade classification decides whether a trade has one at all.
Contribution follows from the combination rather than from any one of
them. A trade contributes to risk and P&L when it is live and its
operational authorisation flag reads authorised; an unauthorised
live trade exists and contributes to nothing. That is why contribution is a derived predicate and not a
state, a point trade classification makes at length.
| Trade | trade_status |
authorisation | confirmation |
|---|---|---|---|
| Client swap, just booked | live |
unseen |
unconfirmed |
| Client swap, Ops released it, paperwork outstanding | live |
authorised |
unconfirmed |
| Client swap, fully papered | live |
authorised |
confirmed |
| Client swap, held pending a query | live |
held_over |
unconfirmed |
| Desk transfer between our own books | live |
authorised |
not_required |
| Matured client swap | expired |
authorised |
confirmed |
4. See also
- Trade — the structure note that orders this cluster, and where to read this page in it.
- Operational Authorisation — the control that releases a trade into the book.
- Operational Authorisation Queue — the screen a trade waits on.
- Trade Activity — the events that create, change or end a trade.
- Trade Versioning — what an amendment produces.
- Confirmations — the second status a trade carries.
- Trade Classification — the two dimensions that decide where confirmation starts.
- Trade Status FSM Implementation — how the lifecycle is held in the database.
- Trade modeling — the entities a trade is built from.
- Knowledge — the hub of all knowledge notes.