Markets as a SystemInitiation and builder edition, August 2026
PDF

FIELD MANUALBeginner to builder

Markets as a System

From first principles to a safe paper-trading platform

Learn the language, trace the transaction, challenge vague claims, and build a controlled paper-trading system without confusing a demo for production infrastructure.

Transaction lifecycle from goal to control
16
designed chapters
8
real system views
5
mastery levels

Honest promise

Become fluent in the basics, not falsely certain.

You should finish able to interpret common records, explain the lifecycle, ask precise follow-up questions, and specify a credible simulator. Production trading still requires qualified market, legal, accounting, compliance, security, venue, and operational expertise.

90 minFollow marked chapters for the mental model.
WeekendComplete examples, screens, and checks.
2 weeksUse read, inspect, calculate, explain, and build.

12questions that make market talk precise

Ask one level deeper.

  1. Which exact instrument and legal contract?
  2. In which currency, units, scale, and direction?
  3. What is the source and as-of time?
  4. Is the price reference, indicative, firm, or executable?
  5. Which venue or counterparty and for what size?
  6. Which order constraints and time-in-force rules apply?
  7. How much was accepted, filled, canceled, rejected, and left?
  8. Which spread, fees, impact, financing, tax, and FX costs apply?
  9. What is the trade date, value date, and settlement state?
  10. Which risk measure, scope, assumptions, and threshold?
  11. Which record is authoritative for this exact fact?
  12. What evidence, owner, and correction path resolve an exception?

00Orientation

90-minute path

See one transaction before learning the pieces

The full lifecycle is the map that stops finance from becoming a pile of disconnected terms.

In 30 seconds

A trading platform converts a human goal into controlled records. The useful sequence is goal, instrument, quote, order, execution, trade, settlement, custody, and reconciliation. Identity, permissions, risk, provenance, and audit surround every step.

Visual explanation for See one transaction before learning the pieces
Visual model. Follow the labels before reading the mechanism cards.

Intent

A goal and an order describe what someone wants. Intent can be valid, rejected, amended, canceled, or left unfilled.

Observation

A quote or chart is observed market information with a source, scope, timestamp, and freshness state.

Event

An execution is a fact reported by a venue or counterparty. It records what quantity matched at what price.

Obligation

A trade creates duties to deliver cash and an asset. Those duties can remain pending or fail.

Durable record

Settlement and custody update controlled books. Reconciliation compares those books with independent records.

Evidence

Audit history explains who acted, what inputs and policy were used, and which result followed.

Worked example

Classify the records

  1. A customer submits a limit order: intent.
  2. A venue reports a fill: event and matched fact.
  3. Operations creates cash and security delivery instructions: obligations.
  4. The custodian confirms settled holdings: durable external evidence.
  5. A reconciliation difference is assigned to an operator: controlled exception.

Builder lens

What the system must preserve

  • Give every stage its own identifier and status. Do not mutate one order row until it pretends to be the entire lifecycle.
  • Carry correlation and causation IDs so a reader can trace customer intent through risk, execution, settlement, and evidence.
  • Design unknown outcomes explicitly. A timeout says the system does not yet know, not that the venue rejected the order.

Talk like you understand it

I think of a trade as a distributed lifecycle: requested is not accepted, accepted is not filled, filled is not settled, and settled is not automatically reconciled.

Where the analogy breaks

A database transaction can make one service's writes atomic. It cannot make an external venue, bank, custodian, and clearing system one ACID transaction.

Ask one level deeper

  • Which record is intent and which is fact?
  • Where is the current obligation?
  • Which external record proves or challenges our view?

Do not say

  • A green filled badge means the whole transaction is complete.
  • The order table is the financial ledger.
  • One timestamp proves the exact causal sequence across systems.
Predict before revealA venue accepts an order but no quantity trades. What exists?

An accepted instruction exists. There is no execution, trade, settlement obligation, or new position yet.

01Financial foundations

90-minute path

What markets are for and who does what

Markets are networks of specialized institutions, not a single app or database.

In 30 seconds

Markets connect people who need capital or risk transfer with people willing to supply it. Primary markets create new claims and direct proceeds to issuers. Secondary markets transfer existing claims between holders and support liquidity and price discovery.

Visual explanation for What markets are for and who does what
Visual model. Follow the labels before reading the mechanism cards.

Issuer

Creates a security to raise financing. Governments issue bills and bonds; companies can issue debt or equity.

Investor

Supplies capital and accepts the contract's return and risk profile.

Broker

Acts as agent to handle customer orders, routing, and account services.

Dealer or market maker

Trades as principal and may quote prices from its own inventory and risk capacity.

Venue

Provides rules and mechanisms for matching or negotiating trading interest. Exchanges and OTC markets organize this differently.

Post-trade infrastructure

Clearing houses, central counterparties, depositories, custodians, and banks manage obligations and records after execution.

Worked example

Primary versus secondary

  1. The Central Bank of The Gambia auctions a new Treasury bill. Investor cash finances the government: primary market.
  2. A holder later sells that bill to another participant. Cash goes to the seller, not the original issuer: secondary market.
  3. The second transaction can still affect observed yield and price, even though it raises no new issuer capital.

Builder lens

What the system must preserve

  • Model legal role and capacity. An agency order and a principal trade can create different economics, disclosures, and controls.
  • Treat venue and counterparty as first-class data. A symbol without market scope is ambiguous.
  • Expect several independently controlled systems. Use explicit messages, acknowledgements, reconciliation, and recovery.

Talk like you understand it

The primary market creates the claim and funds the issuer; the secondary market transfers the existing claim and supports liquidity and price discovery.

Where the analogy breaks

A microservice map can resemble the participant network, but a company cannot retry or roll back another legal entity's system at will.

Ask one level deeper

  • Is this primary issuance or secondary trading?
  • Who acts as agent and who takes principal risk?
  • Which venue, custodian, and settlement infrastructure are involved?

Do not say

  • The broker, exchange, clearing house, and custodian are the same function.
  • Every trade on an exchange finances the issuer.
  • OTC means unregulated or informal.
Predict before revealWhen you buy an existing share from another investor, who receives your cash?

The selling holder receives the proceeds through the market and post-trade chain. The issuer generally does not receive those secondary-market proceeds.

02Financial foundations

90-minute path

Money, time, return, and purchasing power

A return number is incomplete until you know the time, cash flows, costs, currency, and inflation context.

In 30 seconds

Return measures how value changed relative to capital committed. Compounding lets earlier gains earn later gains. Real return asks whether purchasing power grew after inflation. Liquidity and time horizon determine whether the reader can wait for a risky or illiquid outcome.

Visual explanation for Money, time, return, and purchasing power
Visual model. Follow the labels before reading the mechanism cards.

Principal

The capital initially committed to an investment or loan.

Cash flow

Money paid in or out over time, such as contributions, dividends, coupons, fees, and withdrawals.

Simple return

For one period with no intermediate cash flows: (ending value - starting value) / starting value.

Compounding

A recursive process in which gains remain invested and can produce additional gains.

Nominal versus real

Nominal return describes money units. Real return adjusts for inflation and better reflects purchasing power.

Liquidity need

A near deadline can make a volatile or hard-to-sell asset unsuitable even when its expected long-term return is attractive.

Worked example

GMD 100,000 after one year

  1. Ending value is GMD 108,000, so the nominal gain is GMD 8,000 and the simple return is 8 percent.
  2. If fees total GMD 1,000, the after-fee ending value is GMD 107,000 and the after-fee return is 7 percent.
  3. If inflation is 5 percent, a useful exact real-return calculation is 1.07 / 1.05 - 1, or about 1.90 percent.
  4. The example is arithmetic, not an expected investment outcome. Taxes and timing can change the result further.

Builder lens

What the system must preserve

  • Store monetary amount, currency, and scale together. Never accept a naked number named amount.
  • Represent available, reserved, unsettled, and invested value separately. They have different permissions and timing.
  • Use decimal or fixed-point arithmetic and version the rounding policy. Binary floating point is not authoritative money math.
Tong Shang system screen connected to Money, time, return, and purchasing power
See it in Tong ShangMoney, time, return, and purchasing powerSystem values and workflows are simulated unless a panel explicitly identifies dated reference data.

Talk like you understand it

I would not discuss return without the measurement period, cash flows, fees, currency, and whether the number is nominal or real.

Where the analogy breaks

A recursive function is a useful compounding analogy, but markets do not return a deterministic constant rate and losses compound too.

Ask one level deeper

  • What period and cash-flow assumptions does this return use?
  • Is this before or after fees and inflation?
  • Which part of the value is actually available now?

Do not say

  • All cash shown on an account is spendable.
  • An annualized rate is the realized return.
  • A positive nominal return always increases purchasing power.
Predict before revealAn account grows 7 percent after fees while inflation is 5 percent. Is the exact real return 2 percent?

Not exactly. The precise one-period result is 1.07 / 1.05 - 1, about 1.90 percent. Subtracting is a close approximation for small rates.

03Financial foundations

90-minute path

Instruments are contracts, not ticker symbols

Start with rights, obligations, cash flows, currency, dates, and failure modes. The chart comes later.

In 30 seconds

An instrument defines an economic and often legal relationship. Equity is residual ownership. A bond is a debt promise. FX exchanges currency units. A fund is a wrapper around underlying assets. Derivatives define future or conditional payments whose value depends on another variable.

Visual explanation for Instruments are contracts, not ticker symbols
Visual model. Follow the labels before reading the mechanism cards.

Cash and deposits

A claim denominated in one currency. Key risks include inflation, institution credit, access, and currency loss.

Treasury bill or bond

A government debt contract with maturity and repayment terms. Price, discount, coupon, and yield describe different things.

Equity

A residual claim on a company. Returns can come from distributions and price changes, with no promised maturity payment.

Fund or ETF

A pooled vehicle. The wrapper affects pricing and trading, while the underlying holdings determine much of the economic exposure.

Foreign exchange

A directional conversion between two currency units. The pair, side, settlement date, and rate source matter.

Derivative

A future, option, forward, or swap creates conditional or future obligations. These require deeper treatment than a cash instrument.

Worked example

A discounted Treasury bill

  1. Suppose GMD 96,500 is paid today for a maturity payment of GMD 100,000.
  2. The cash gain at maturity is GMD 3,500 if the issuer pays as promised and the bill is held to maturity.
  3. The holding-period return is 3,500 / 96,500, or about 3.63 percent.
  4. An annualized yield depends on tenor, day count, price basis, and market convention. It is not automatically the customer's realized return.

Builder lens

What the system must preserve

  • Use a stable internal instrument ID. Symbols can be reused, venue-specific, or changed by corporate actions.
  • Version identifiers, tick size, lot size, price scale, multiplier, calendar, settlement convention, and status.
  • Model cash-flow rules and product-specific validation instead of forcing every instrument through an equity-shaped schema.
Tong Shang system screen connected to Instruments are contracts, not ticker symbols
See it in Tong ShangInstruments are contracts, not ticker symbolsSystem values and workflows are simulated unless a panel explicitly identifies dated reference data.

Talk like you understand it

Before discussing an instrument, I want to know who owes what, in which currency, on what dates, under which conditions, and what can fail.

Where the analogy breaks

A programming type is a strong analogy for an instrument contract, but legal rights cannot be inferred from fields alone. Jurisdiction and governing documents matter.

Ask one level deeper

  • Is this ownership, debt, pooled ownership, currency, or a derivative claim?
  • What are the cash flows and maturity rules?
  • Which issuer, currency, seniority, and liquidity risks apply?

Do not say

  • A ticker uniquely identifies an instrument forever.
  • Yield is a promised return.
  • An ETF is automatically diversified or low risk.
Predict before revealWhy can two bonds with the same issuer still behave differently?

They can differ by currency, maturity, coupon, seniority, security, liquidity, call terms, issue size, and settlement or tax treatment.

04Price and execution

90-minute path

Quotes are numbers plus provenance

A market number is not meaningful until direction, source, time, size, and executability are known.

In 30 seconds

The bid is the highest displayed price at which a buyer is currently willing to buy a stated quantity. The ask is the lowest displayed selling price. Their difference is the spread. The midpoint is a calculation. The last trade is history. None is a universal current price without context.

Visual explanation for Quotes are numbers plus provenance
Visual model. Follow the labels before reading the mechanism cards.

Base and quote

USD/GMD states GMD per one USD. USD is the base currency and GMD is the quote currency.

Bid and ask

A simplified dealer convention shows the price at which the dealer buys the base currency and the price at which it sells it.

Mid and spread

Mid = (bid + ask) / 2. Spread = ask - bid. Spread in basis points divides the spread by the midpoint and multiplies by 10,000.

Reference versus executable

A central-bank or benchmark rate may support valuation or explanation. It does not prove a counterparty will transact at that number.

Last trade and candle

A last trade is a completed event. A candle summarizes open, high, low, and close over an interval. Neither predicts the next execution.

Scope and freshness

Venue, side, size, timestamp, expiry, delayed status, trading condition, and source determine what a quote can support.

Worked example

USD/GMD at 71.95 / 72.05

  1. The midpoint is 72.00 GMD per USD and the displayed spread is 0.10 GMD.
  2. The spread is about 13.89 basis points: 0.10 / 72.00 x 10,000.
  3. In a simplified two-way dealer quote, a customer buying USD faces the ask, while a customer selling USD faces the bid.
  4. Fees, customer tier, size, market movement, and settlement terms can add costs beyond the displayed spread.

Builder lens

What the system must preserve

  • A normalized quote needs instrument, venue, bid, ask, sizes, source-event time, receive time, sequence, condition, and provenance.
  • Never label delayed, cached, fallback, or reference data as live executable market data.
  • Store FX direction explicitly. An unlabeled fx_rate invites inverse-rate errors and broken P&L.
Tong Shang system screen connected to Quotes are numbers plus provenance
See it in Tong ShangQuotes are numbers plus provenanceSystem values and workflows are simulated unless a panel explicitly identifies dated reference data.

Talk like you understand it

The displayed USD/GMD number is only useful after I know the direction, side, source, timestamp, size, and whether it is reference, indicative, firm, or executable.

Where the analogy breaks

A quote resembles an observation in a telemetry stream, but the observation can itself change behavior as participants react and liquidity moves.

Ask one level deeper

  • Which way is the pair quoted?
  • Is that bid, ask, mid, last, reference, or executable?
  • For which size, venue, source, and as-of time?

Do not say

  • The midpoint is a price I can trade.
  • The last trade is the next available price.
  • A reference FX rate is a dealer commitment.
Predict before revealAt USD/GMD 72.00, do you multiply or divide to convert USD 100 to GMD?

Multiply: USD 100 x 72 GMD per USD = GMD 7,200. Converting GMD back to USD uses division, subject to the applicable side and costs.

05Price and execution

Liquidity lives in a changing queue

The top quote is only the first available layer. Size, depth, queue position, and recovery determine what can actually trade.

In 30 seconds

An order book arranges buying and selling interest by price and often time priority. A marketable order consumes displayed liquidity. If its quantity exceeds the best level, it walks the book and receives several fills. Liquidity therefore includes spread, depth, immediacy, and resiliency, not volume alone.

Visual explanation for Liquidity lives in a changing queue
Visual model. Follow the labels before reading the mechanism cards.

Level

One price and its displayed aggregate quantity. Some feeds expose individual orders; others expose price levels.

Priority

Many venues use price-time priority, but allocation models vary. Reaching a limit price does not guarantee a fill if earlier quantity remains.

Depth

Quantity available across prices before the expected execution price changes materially.

Immediacy

How quickly a desired quantity can be completed under current market conditions.

Resiliency

How quickly liquidity returns after a large order or shock removes it.

Slippage and impact

The average execution can differ from the arrival quote because the order consumes levels and the market changes.

Worked example

Buying 150 units through two offers

  1. The book offers 50 units at 100.00 and 100 units at 100.05.
  2. A market buy of 150 receives two fills: 50 x 100.00 and 100 x 100.05.
  3. The volume-weighted average price is (5,000 + 10,005) / 150 = 100.0333.
  4. Buyer slippage versus the first ask is 0.0333 per unit before fees. The first ask was true but incomplete for this size.

Builder lens

What the system must preserve

  • A feed handler must detect sequence gaps, mark books stale, obtain a recovery snapshot, and replay only valid later incrementals.
  • Store fixed-point price and quantity scales from the instrument or feed specification.
  • A simulation should model at least partial fills, changing depth, queue assumptions, rejects, halts, fees, and deterministic replay.
Tong Shang system screen connected to Liquidity lives in a changing queue
See it in Tong ShangLiquidity lives in a changing queueSystem values and workflows are simulated unless a panel explicitly identifies dated reference data.

Talk like you understand it

Volume tells me activity; liquidity asks what size can trade, how quickly, at what total cost, and how the market recovers afterward.

Where the analogy breaks

A queue data structure is useful, but real priority can include hidden liquidity, special order types, auctions, venue rules, and participant access differences.

Ask one level deeper

  • How much size is displayed at and beyond the best price?
  • What priority and hidden-liquidity rules apply?
  • What was the arrival price and volume-weighted fill price?

Do not say

  • High daily volume guarantees easy execution now.
  • Touching my limit price guarantees my order fills.
  • The best ask is enough to price any buy quantity.
Predict before revealWhy can a 100.00 limit buy remain unfilled after trades print at 100.00?

Earlier orders may have priority, printed trades may occur on another venue or under different conditions, and the displayed quantity at that price may be insufficient.

06Price and execution

90-minute path

An order is intent; a fill is a fact

Order types choose which uncertainty you accept: price, completion, or time.

In 30 seconds

A market order prioritizes prompt execution but not price. A limit order sets a worst acceptable price but can remain unfilled. A stop can activate another order after a trigger, but the trigger price is not a guaranteed fill. Time in force controls duration and partial-fill behavior.

Visual explanation for An order is intent; a fill is a fact
Visual model. Follow the labels before reading the mechanism cards.

Market

Useful when immediacy dominates, but exposed to depth, gaps, halts, and fast price movement.

Limit

A buy limit caps price and a sell limit sets a floor. Execution probability becomes uncertain.

Stop and stop-limit

A trigger controls activation. A triggered market order can slip; a triggered limit order can fail to fill.

Time in force

Day, good-till-canceled, immediate-or-cancel, and fill-or-kill answer how long and how partially the order may work.

Partial fill

One order can produce many executions. Cumulative quantity and remaining quantity must be updated exactly once.

Cancel and replace race

A request to cancel or amend can cross a fill already in flight. Pending cancel is not canceled.

Worked example

One order, three executions, one late cancel

  1. Buy 1,000 units. First fill: 300, so cumulative quantity is 300 and leaves quantity is 700.
  2. Second fill: 500, so cumulative quantity is 800 and leaves quantity is 200.
  3. A cancel request is sent. Before the venue accepts it, the final 200 fills.
  4. The order is filled. A later cancel rejection is an expected race outcome, not permission to reverse the executions.

Builder lens

What the system must preserve

  • Persist order intent, venue messages, normalized events, and current projections separately.
  • Use client order IDs, venue order IDs, execution IDs, sequence, and idempotency keys. Each solves a different identity problem.
  • Corrections and broken trades require compensating events and financial reversals, not silent edits.
Tong Shang system screen connected to An order is intent; a fill is a fact
See it in Tong ShangAn order is intent; a fill is a factSystem values and workflows are simulated unless a panel explicitly identifies dated reference data.

Talk like you understand it

A market order accepts price uncertainty for immediacy, while a limit order accepts execution uncertainty for a price boundary.

Where the analogy breaks

A command/event analogy is strong, but venue protocols include negotiated semantics and state precedence that a generic event bus does not define.

Ask one level deeper

  • Which failure is worse here: a worse price or no fill?
  • How much is filled and how much remains?
  • Is cancel confirmed, merely requested, or already too late?

Do not say

  • Market means guaranteed execution.
  • Limit means guaranteed good outcome.
  • Sending cancel means the order is canceled.
Predict before revealA 1,000-unit order is 800 filled when cancellation is requested, then 200 fills. What is the final state?

Filled. The last execution completed the order before cancellation became effective. The cancel response may reject the request as too late.

07Risk and post-trade

Positions, valuation, and profit and loss

Quantity, cash, cost, value, and P&L are related projections, not one balance.

In 30 seconds

A position records economic quantity in an instrument. Valuation applies a sourced price. Unrealized P&L measures change on still-open quantity, while realized P&L records results on closed quantity under an explicit cost-basis policy. Fees, financing, corporate actions, and FX translation also matter.

Visual explanation for Positions, valuation, and profit and loss
Visual model. Follow the labels before reading the mechanism cards.

Long, flat, short

Positive quantity is long, zero is flat, and negative quantity is short under the chosen sign convention.

Average cost and lots

Cost basis can use average cost, FIFO, specific lots, or jurisdiction-specific rules. The policy must be explicit.

Mark to market

A valuation source and timestamp convert quantity into a current estimate. Stale or indicative marks need a visible status.

Realized P&L

The result associated with quantity that has been closed, after the selected cost-basis policy and included costs.

Unrealized P&L

The modeled gain or loss on quantity still open. It can change before the position is sold.

Gross and net exposure

Gross sums absolute exposures; net offsets signed exposures. Netting can hide large opposing positions and funding needs.

Worked example

Buy 100, sell 40

  1. Buy 100 shares at 10.00 plus a 5.00 fee. A simplified total cost is 1,005.00.
  2. Sell 40 at 12.00 with a 2.00 fee. Under simplified pro-rata average cost, released cost is 402.00.
  3. Net proceeds are 478.00, so realized P&L is 76.00 on the closed 40 shares.
  4. The remaining 60 shares still have unrealized P&L that depends on the current sourced mark. Settlement status and taxes are separate questions.

Builder lens

What the system must preserve

  • Treat positions and balances as rebuildable projections from immutable accepted economic events.
  • Keep trade-date and settlement-date views separate. A filled trade can create pending quantity and payable cash before final settlement.
  • Store valuation price, source, timestamp, currency, FX source, and policy alongside each P&L snapshot.
Tong Shang system screen connected to Positions, valuation, and profit and loss
See it in Tong ShangPositions, valuation, and profit and lossSystem values and workflows are simulated unless a panel explicitly identifies dated reference data.

Talk like you understand it

A position is quantity and state; value requires a sourced mark, and P&L requires cost-basis, fee, currency, timing, and settlement assumptions.

Where the analogy breaks

A materialized view is a useful analogy for positions, but accounting and legal books can have controlled posting and correction requirements beyond a technical projection.

Ask one level deeper

  • Is this trade-date or settlement-date position?
  • Which mark and FX source produced the value?
  • Which costs and cost-basis policy are in P&L?

Do not say

  • A position is the same as cash balance.
  • Unrealized profit is guaranteed cash.
  • Net exposure alone describes risk.
Predict before revealCan two systems show the same position quantity but different P&L without either being broken?

Yes. They may use different marks, as-of times, FX rates, fee treatment, corporate-action state, or cost-basis policy. Reconciliation must define the compared field and policy.

08Risk and post-trade

90-minute path

Leverage magnifies paths, not just outcomes

Risk is a collection of failure modes and dependencies. Leverage makes less room for delay and error.

In 30 seconds

Leverage creates economic exposure larger than account equity. It magnifies gains and losses, accelerates maintenance breaches, and can cause forced liquidation. Risk must also be separated into market, credit, liquidity, concentration, currency, settlement, operational, model, legal, and conduct dimensions.

Visual explanation for Leverage magnifies paths, not just outcomes
Visual model. Follow the labels before reading the mechanism cards.

Market risk

Prices or risk factors move against the position.

Credit and counterparty

An issuer or trading counterparty fails to meet an obligation.

Liquidity and funding

A position cannot be exited or funded promptly near the expected cost.

Concentration

Too much depends on one issuer, sector, currency, maturity, venue, model, or counterparty.

Operational and technology

People, data, processes, software, infrastructure, or external services fail.

Model and legal

Assumptions are wrong or misused, or the contract and process do not have the expected legal effect.

Worked example

Three times gross leverage

  1. Account equity is 100. Gross exposure is 300, so gross leverage is 3.0x.
  2. A 5 percent adverse move on the exposure creates a 15 loss before financing and fees, or 15 percent of initial equity.
  3. A 5 percent favorable move similarly creates a 15 gain before costs. Leverage does not improve the underlying prediction.
  4. Maintenance rules, price gaps, liquidity, collateral haircuts, and broker house requirements can force action before a planned exit.

Builder lens

What the system must preserve

  • Pre-trade controls should evaluate entitlement, instrument state, tick and lot size, stale data, price collars, notional, exposure, cash or margin, restrictions, and kill switches.
  • Persist each risk decision with inputs, policy version, result, reason codes, scope, approver, and expiration for any override.
  • Risk controls must work across venues and strategies. Per-order checks alone miss aggregated exposure and message-rate failure.
Tong Shang system screen connected to Leverage magnifies paths, not just outcomes
See it in Tong ShangLeverage magnifies paths, not just outcomesSystem values and workflows are simulated unless a panel explicitly identifies dated reference data.

Talk like you understand it

Risk is not one score. I want to name the failure mode, exposure, time horizon, assumptions, limit, and action if the limit is breached.

Where the analogy breaks

A circuit breaker is a good analogy for stopping propagation, but financial controls also need legal ownership, approved policy, human escalation, and evidence.

Ask one level deeper

  • What exact exposure can produce loss?
  • Which dependency or concentration dominates?
  • What control prevents, detects, contains, and evidences the failure?

Do not say

  • Leverage only increases purchasing power.
  • Volatility is the complete definition of risk.
  • Diversification eliminates loss.
Predict before revealIf a hedged portfolio has near-zero net exposure, can its gross risk still be large?

Yes. Large offsetting positions can create basis, liquidity, funding, counterparty, and timing risks even when a simple net measure is close to zero.

09Risk and post-trade

90-minute path

After the click: clearing, settlement, and custody

Execution creates obligations. Ownership and finality require a different chain of systems and controls.

In 30 seconds

Trade capture records the matched economics. Clearing calculates and may net obligations, and a central counterparty can become buyer to every seller and seller to every buyer under its rules. Settlement transfers assets and funds with legal finality. Custody safeguards and administers the resulting holdings.

Visual explanation for After the click: clearing, settlement, and custody
Visual model. Follow the labels before reading the mechanism cards.

Allocation and confirmation

Institutional trades may need quantities assigned to accounts and details matched or affirmed before settlement.

Clearing and netting

Many trades can be transformed into fewer net obligations. Netting reduces flows but creates dependency on rules and infrastructure.

Central counterparty

A CCP can substitute its counterparty exposure for bilateral exposure and manage collateral and default resources. Risk is transformed, not erased.

Delivery versus payment

DvP links the securities leg to the cash leg so one should not become final without the corresponding payment under the model.

Custody

Safekeeping and record administration continue after settlement, including entitlements, restrictions, maturity, and corporate actions.

Settlement convention

T+1, T+2, same day, and other cycles are product, market, jurisdiction, holiday, and contract specific.

Worked example

A two-leg delivery

  1. A buy execution creates a cash payable and a security receivable. Neither is the final settled position yet.
  2. Settlement instructions specify accounts, parties, asset, quantity, cash amount, currency, value date, and market infrastructure.
  3. DvP coordinates the two obligations. If the conditions are satisfied, cash and securities become final according to the relevant rules.
  4. Custody records the settled holding. Reconciliation then compares internal records with the custodian, depository, clearing source, and bank as applicable.

Builder lens

What the system must preserve

  • Generate settlement obligations from immutable trades, not from the latest mutable order status.
  • Use calendars and product conventions as versioned reference data. Never hardcode one universal settlement day.
  • Model pending, instructed, matched, partially settled, settled, failed, canceled, and corrected states with owned exception paths.
Tong Shang system screen connected to After the click: clearing, settlement, and custody
See it in Tong ShangAfter the click: clearing, settlement, and custodySystem values and workflows are simulated unless a panel explicitly identifies dated reference data.

Talk like you understand it

A fill creates the trade; clearing transforms obligations; settlement moves value with finality; custody administers the resulting holding.

Where the analogy breaks

A two-phase commit resembles DvP, but legal finality, central-bank money, depository rules, cutoffs, and insolvency law cannot be reduced to one database protocol.

Ask one level deeper

  • Which obligations exist and in which units?
  • What settlement model and value date apply?
  • Which bank, custodian, depository, or CCP record proves the result?

Do not say

  • Filled means owned and spendable.
  • All securities settle on the same cycle.
  • A CCP removes counterparty and operational risk.
Predict before revealA trade is filled on Tuesday under a market-specific T+1 convention. When is the intended settlement date?

Normally the next business day, subject to the product, market calendar, holidays, and transaction rules. T+1 is an example, not a universal constant.

10Risk and post-trade

Reconciliation proves scoped agreement, not universal truth

A match is useful evidence. A break is a controlled investigation, not an embarrassing row to hide.

In 30 seconds

Reconciliation compares a defined internal population with an independent or controlled record under explicit keys, dates, tolerances, and policies. A match means those fields agree within scope. It does not prove correct valuation, profitability, legal ownership, or the absence of missing records outside the population.

Visual explanation for Reconciliation proves scoped agreement, not universal truth
Visual model. Follow the labels before reading the mechanism cards.

Population

Define which accounts, instruments, dates, currencies, statuses, and sources are in the comparison.

Match key

Identifiers and economic fields determine which records should correspond. Weak keys create false matches or false breaks.

Tolerance

Some comparisons permit explained timing or rounding differences. Tolerance must be policy, not an ad hoc excuse.

Break

A difference needs type, amount or quantity, severity, age, owner, evidence, and resolution state.

Correction

Fixing economic history normally requires a compensating or reversing record that preserves the original evidence.

Control ownership

The team that produces a record should not be the only team or process that certifies it.

Worked example

Internal 1,000 versus custodian 950

  1. The internal custody projection shows 1,000 units; the custodian statement shows 950 for the same account and instrument.
  2. The 50-unit break may be timing, failed settlement, incorrect account mapping, duplicate posting, missing corporate action, or an external error.
  3. The correct response is not to force either value. Freeze the scope, preserve both inputs, assign an owner, inspect linked trade and settlement evidence, and post a controlled correction if justified.
  4. After resolution, retain the before state, decision, evidence, approver, and resulting posting.

Builder lens

What the system must preserve

  • Reconcile orders to venue acknowledgements, fills to drop copy, trades to clearing, cash to bank, positions to custodian, and subledgers to the general ledger.
  • Design reruns and late data deliberately. The same batch should not create duplicate breaks or erase prior ownership history.
  • Track break counts by cause, severity, and age. A low break count can still hide a critical high-value difference.
Tong Shang system screen connected to Reconciliation proves scoped agreement, not universal truth
See it in Tong ShangReconciliation proves scoped agreement, not universal truthSystem values and workflows are simulated unless a panel explicitly identifies dated reference data.

Talk like you understand it

Reconciliation tells me whether defined records agree under defined rules. It does not by itself prove that the records are economically or legally correct.

Where the analogy breaks

A checksum analogy communicates comparison, but financial reconciliation includes semantic scope, timing, tolerance, legal records, and human investigation.

Ask one level deeper

  • What population and as-of time are compared?
  • Which fields and tolerances define a match?
  • Who owns the break and what evidence will close it?

Do not say

  • Two matching systems prove truth.
  • Every difference is a system defect.
  • Correcting a break means editing the old row.
Predict before revealInternal and external records match exactly. Can valuation still be wrong?

Yes. Both systems can use the same stale price, wrong instrument mapping, or incorrect quantity. The match proves scoped agreement, not universal correctness.

11Risk and post-trade

Eligibility, suitability, surveillance, and human accountability

Availability is not appropriateness, a signal is not a verdict, and an override is not a missing control.

In 30 seconds

Trading systems combine identity, account authority, product eligibility, permissions, restrictions, suitability or appropriateness processes, surveillance, and accountable human review. Exact obligations depend on jurisdiction, firm role, product, customer, and activity, so universal thresholds are dangerous.

Visual explanation for Eligibility, suitability, surveillance, and human accountability
Visual model. Follow the labels before reading the mechanism cards.

Identity and authority

Know which customer and actor are involved, which account they may use, and which actions their role permits.

Product eligibility

A product can be unavailable because of account type, jurisdiction, agreement, knowledge, risk classification, or restriction.

Suitability and appropriateness

Different regimes use different tests. The system must store inputs, policy, outcome, limitations, and responsible decision.

Surveillance

Rules and models generate signals about patterns such as manipulation or misuse. A signal starts investigation; it is not a finding.

Case and decision

Human review needs evidence, reason, policy version, scope, timestamp, approver, and follow-up action.

Entitlement

Permissions must be enforced server-side and scoped to function, account, product, environment, and time.

Worked example

Signal to restriction

  1. A surveillance rule detects repeated order entry and cancellation near the best price.
  2. The system creates a signal with source events, rule version, threshold, and confidence context.
  3. An analyst reviews intent, market context, related accounts, fills, and alternative explanations. The signal may be closed, escalated to a case, or linked to other evidence.
  4. Any restriction is a separate accountable decision with explicit scope and reason. The raw signal remains unchanged.

Builder lens

What the system must preserve

  • Represent policy decisions as durable records, not booleans sprinkled through UI code.
  • Separate alert, investigation, finding, restriction, and override states. Each has different authority and evidence.
  • Use least privilege, dual control for sensitive actions, versioned policy, expiring overrides, and regular access review.
Tong Shang system screen connected to Eligibility, suitability, surveillance, and human accountability
See it in Tong ShangEligibility, suitability, surveillance, and human accountabilitySystem values and workflows are simulated unless a panel explicitly identifies dated reference data.

Talk like you understand it

A product can be technically available yet unsuitable or restricted. I would ask which customer facts, policy version, jurisdiction, evidence, and human authority produced the decision.

Where the analogy breaks

Authorization resembles access-control middleware, but customer protection also depends on facts, product documents, human judgment, changing law, and accountable governance.

Ask one level deeper

  • Is this an eligibility check, a suitability assessment, or a trading restriction?
  • Which policy and customer facts were used?
  • Is this a signal, a finding, or a final decision?

Do not say

  • If the UI shows the product, the customer may trade it.
  • A surveillance signal proves misconduct.
  • An admin role should bypass controls without additional evidence.
Predict before revealWhy should an override have an expiry and scope?

Because a permanent broad bypass silently replaces policy. Scope, reason, approver, evidence, and expiration make exceptional authority reviewable and contain its risk.

12Building the system

90-minute path

Model the domain before choosing the services

The safest first build is often a modular monolith with clear records, not a fleet of premature microservices.

In 30 seconds

The domain model must keep customer, account, instrument, quote, order, execution, trade, cash movement, position, settlement obligation, custody record, reconciliation result, risk decision, case, and audit event distinct. These records answer different questions and change under different authority.

Visual explanation for Model the domain before choosing the services
Visual model. Follow the labels before reading the mechanism cards.

Command

A request to perform an action, such as submit, cancel, allocate, settle, or approve.

Business event

An accepted fact such as order accepted, execution received, cash reserved, or settlement failed.

Projection

A query-friendly current view derived from controlled events, such as open orders or available cash.

System of record

The authoritative record for a defined fact. Authority can differ for venue execution, internal ledger, bank cash, and custodian position.

Correlation

A stable thread across customer request, risk decision, venue messages, executions, trade, settlement, and audit.

Boundary

One module owns each invariant. Cross-module effects use explicit contracts and recovery instead of shared mutable tables.

Worked example

One trade, several truths

  1. The order stores the customer's instruction and lifecycle. The venue execution stores matched price and quantity.
  2. The trade record stores the economic agreement and parties. The ledger stores monetary effects under accounting policy.
  3. Settlement stores delivery obligations and finality. Custody stores the resulting controlled holding.
  4. Reconciliation stores comparison evidence. Audit stores attributable action and reason. None should silently impersonate the others.

Builder lens

What the system must preserve

  • Begin with modules for identity/accounts, instrument data, market data, OMS, risk, execution adapter, ledger/positions, post-trade, reconciliation, and audit.
  • Use database constraints for identity and referential integrity, plus domain invariants and transactional outbox for atomic local effects.
  • Split services only when ownership, scaling, resilience, security, or deployment needs justify the operational cost.

Talk like you understand it

I would separate intent, market events, financial postings, settlement obligations, and evidence, then define which module and external source owns each fact.

Where the analogy breaks

A domain entity resembles a software object, but records may be governed by external law, accounting policy, venue rules, and evidentiary retention requirements.

Ask one level deeper

  • Which entity owns this invariant?
  • Is this immutable evidence or a rebuildable projection?
  • Which identifier traces the record across boundaries?

Do not say

  • Microservices make a trading system safer by default.
  • One mutable order row can represent every stage.
  • The most recent database value is always the authoritative truth.
Predict before revealShould the current position be stored or calculated?

It can be stored as a controlled projection for performance, but it should be reproducible from authoritative economic events and checked against independent records.

13Building the system

Build the data and order paths for ambiguity

Sequence gaps, stale quotes, duplicate submits, timeouts, and cancel-fill races are ordinary design cases.

In 30 seconds

Market-data and order paths are coupled but not identical. The data path must normalize, sequence, timestamp, recover, and expose provenance. The order path must validate, authorize, apply risk controls, reserve resources, route, consume reports, and preserve unknown outcomes without duplicating economic effects.

Visual explanation for Build the data and order paths for ambiguity
Visual model. Follow the labels before reading the mechanism cards.

Three clocks

Store source-event, receive, and processing or commit times. Use monotonic clocks for duration and synchronized wall clocks for evidence.

Sequence recovery

A gap makes the affected book suspect. Recovery joins a snapshot boundary with queued later updates before returning to live.

Idempotent submit

The same key and same payload returns the existing result. Reusing the key with a different payload is rejected.

Unknown outcome

A timeout after send is neither acceptance nor rejection. Recover session state, query, use execution reports or drop copy, and reconcile.

Reservation

Cash or inventory reservation prevents simultaneous accepted orders from spending the same capacity.

OMS versus EMS

OMS manages intent, controls, accounts, and lifecycle. EMS focuses on routing, child orders, venue connectivity, and execution behavior.

Worked example

The duplicate-submit trap

  1. Client POSTs an order with idempotency key K. The server commits the order but the response times out.
  2. The client retries K with the same body. A unique key and request hash return the original order rather than creating another one.
  3. If the second body differs, the server rejects it. Reusing identity for new intent is unsafe.
  4. Order, audit record, reservation, and outbox event commit in one local transaction. Consumers also deduplicate immutable event IDs.

Builder lens

What the system must preserve

  • Normalize money as fixed-point or decimal with explicit scale; retain the raw protocol message for investigation.
  • Persist risk inputs and decision before routing. Fail closed when a mandatory control or authoritative input is unavailable.
  • Fence active gateways and test disconnect semantics so two leaders cannot send the same order.
Tong Shang system screen connected to Build the data and order paths for ambiguity
See it in Tong ShangBuild the data and order paths for ambiguitySystem values and workflows are simulated unless a panel explicitly identifies dated reference data.

Talk like you understand it

A timeout creates an unknown outcome. I would recover and reconcile the original identity before deciding whether any new order is safe.

Where the analogy breaks

Exactly-once is a useful product requirement but a misleading transport promise. Effective-once behavior comes from durable identity, atomic local writes, deduplication, and reconciliation.

Ask one level deeper

  • What sequence or freshness state supports this book?
  • What business identity makes retry safe?
  • What happens if a fill crosses a pending cancel or the gateway disconnects?

Do not say

  • A timeout is a rejection.
  • Transport sequencing prevents duplicate business effects.
  • A FIX version guarantees identical counterparty behavior.
Predict before revealWhy is a new client order ID dangerous after a submission timeout?

The original order may already exist at the venue. A new identity can create a second valid order. First recover the original outcome using its durable identifiers.

14Building the system

Ledgers, evidence, observability, and failure recovery

Correctness must survive retry, reordering, correction, restart, stale data, and operator error.

In 30 seconds

An append-only journal records accepted financial effects. Balanced entries, explicit units, unique business-event IDs, and reversals make corrections reconstructable. Business audit history preserves attributable actions. Operational telemetry explains system health. Backups, replay, reconciliation, and tested recovery make the design operable.

Visual explanation for Ledgers, evidence, observability, and failure recovery
Visual model. Follow the labels before reading the mechanism cards.

Journal and entry

One business event produces a journal with linked debit and credit entries under a documented accounting policy.

Reservation versus posting

Available, reserved, pending, and settled cash or assets are different states. Rejection and cancellation must release unused reservation.

Reversal

A correction references and offsets an earlier journal. It preserves history instead of rewriting it.

Business audit

Actor, action, reason, policy, correlation, prior state, new state, and timestamps support reconstruction.

Telemetry

Metrics reveal rates and saturation, traces connect distributed work, and logs explain events. None replaces business identity or accounting records.

Recovery

Define RTO and RPO, test restore and replay, fence leaders, bound retries, apply backpressure, and keep reconciliation available during order-entry shutdown.

Worked example

Reserve, fill, settle, reverse

  1. A buy order reserves GMD 10,000. Available cash falls while total cash ownership has not yet changed.
  2. A partial fill consumes GMD 6,000 of reservation and creates pending asset and cash obligations. The remaining GMD 4,000 stays reserved while the order works.
  3. Cancellation releases unused reservation. Settlement moves pending balances into settled cash and custody under policy.
  4. A busted execution creates linked reversals. Replaying accepted events must reproduce the same controlled projections without duplicate effects.

Builder lens

What the system must preserve

  • Enforce unique external execution IDs and balanced journal invariants in the database and application layer.
  • Track market-data age, sequence gaps, order acknowledgement latency, rejects, unknown outcomes, duplicate events, settlement failures, break age, and ledger imbalance count.
  • Exclude passwords, tokens, keys, and unnecessary sensitive data from logs. Separate PII and use least privilege and tamper-resistant retention.
Tong Shang system screen connected to Ledgers, evidence, observability, and failure recovery
See it in Tong ShangLedgers, evidence, observability, and failure recoverySystem values and workflows are simulated unless a panel explicitly identifies dated reference data.

Talk like you understand it

I separate business events, financial journals, current projections, audit evidence, and operational telemetry because each answers a different question.

Where the analogy breaks

An event log can rebuild projections, but it is not automatically an accounting policy, compliant recordkeeping system, backup, or independent reconciliation source.

Ask one level deeper

  • Which invariant makes duplicate processing harmless?
  • How is a correction reversed and evidenced?
  • Can operators restore, replay, reconcile, and disable trading without guessing?

Do not say

  • Append-only means correct and compliant.
  • Logs are an audit trail even if they leak secrets or can be altered.
  • A successful backup job proves recovery.
Predict before revealWhat should happen if the same fill event is delivered twice?

The second delivery should be recognized by immutable identity and produce no second economic posting. The duplicate can be measured and evidenced without changing the position or ledger twice.

15Build and practice

90-minute path

From replay to a safe paper-trading capstone

The goal is not to predict markets. It is to prove that the system remains controlled when its assumptions and dependencies fail.

In 30 seconds

Build one asset class, venue model, account model, and currency first. Progress through deterministic replay, a simulated venue, protocol certification, shadow comparison, paper trading, and only then a separately authorized tiny pilot. Each stage needs explicit risk limits, observation, approval, and rollback.

Visual explanation for From replay to a safe paper-trading capstone
Visual model. Follow the labels before reading the mechanism cards.

Unit and property tests

Prove arithmetic, scale, state transitions, and invariants over many generated cases.

Golden protocol tests

Parse and serialize known venue messages exactly, including rejects, partial fills, gaps, and corrections.

Replay

The same captured inputs and configuration should reproduce the same normalized book, orders, executions, and projections.

Fault injection

Inject duplicates, reorderings, timeouts, disconnects, stale data, leader overlap, database contention, disk pressure, and failed settlement.

Paper-trading gap

Paper fills omit some queue position, market impact, real latency, rejects, fees, borrow, halts, corporate actions, and operational failures.

Model risk

Backtests require lineage, out-of-sample design, fees, slippage, capacity, bias controls, validation, monitoring, challenge, and a disable path.

Worked example

The capstone trace

  1. Load a versioned instrument and a sourced timestamped quote. Make the quote stale and show the order control reacting by policy.
  2. Accept one idempotent limit order, reserve resources, and simulate two partial fills plus a cancel-fill race.
  3. Post balanced pending effects exactly once, generate cash and asset settlement obligations, and deliberately fail one leg.
  4. Create a reconciliation break, assign it, resolve it with evidence and a correcting journal, then replay the whole trace deterministically.

Builder lens

What the system must preserve

  • Deliver an architecture diagram, domain model, API schema, event catalog, state machines, invariant suite, end-to-end trace, failure report, and teach-back presentation.
  • Keep a global kill path, but also support account, strategy, instrument, and venue scopes. Test every switch.
  • Do not connect live funds without qualified legal, compliance, accounting, security, venue, operational, and financial review.

Talk like you understand it

A credible trading-system demo is not the one that always fills. It is the one that explains, contains, and recovers from stale, duplicate, delayed, rejected, partial, and failed outcomes.

Where the analogy breaks

A test pyramid conveys layers, but market systems also need protocol certification, deterministic replay, reconciliation, operational drills, and ongoing control validation.

Ask one level deeper

  • Which invariant would catch the worst silent error?
  • What real behavior does the simulator omit?
  • What evidence is required before advancing to the next environment?

Do not say

  • Paper profitability proves live profitability.
  • Passing unit tests makes venue behavior safe.
  • Low latency is more important than correctness and control.
Predict before revealWhat is the most important first build boundary?

Define what the system will and will not do: user, jurisdiction, asset class, venue, simulated/live boundary, data rights, custody assumptions, failure limits, and who can authorize change.

GReference

Connected glossary

Search for the relationship, not an isolated buzzword.

Agency
Acting on behalf of a customer rather than trading for the firm's own account.
Ask
The lowest displayed price at which a seller currently offers a stated quantity.
Basis point
One hundredth of one percent, or 0.0001 in decimal form.
Bid
The highest displayed price a buyer currently offers for a stated quantity.
Broker
A firm or person that handles transactions for customers, subject to its legal role and jurisdiction.
Central counterparty
An infrastructure that interposes itself between counterparties under defined clearing and risk rules.
Clearing
The process of matching, calculating, netting, and managing obligations before settlement.
Custody
Safekeeping and administration of assets and ownership records after settlement.
Depth
Displayed or available quantity across price levels before expected execution cost changes materially.
Execution
A matched fact recording quantity and price that traded.
Exposure
The amount and direction through which a risk factor can affect value or obligations.
Fill
One execution against an order. One order can have zero, one, or many fills.
FIX
A family of financial messaging standards. Connection behavior still depends on negotiated profiles and rules.
Gross leverage
Total absolute economic exposure divided by account equity under a defined policy.
Idempotency
The property that safe retries do not create duplicate business effects.
Instrument
A specific financial contract with identifiers, terms, cash flows, units, and rules.
Limit order
An order with a worst acceptable execution price, but no guarantee of execution.
Liquidity
The ability to transact a desired size promptly near the expected total cost, plus the market's capacity to recover.
Market order
An order that prioritizes prompt execution while accepting price uncertainty.
Mark to market
Valuing a position using a specified current price source and as-of time.
Midpoint
The arithmetic average of bid and ask. It is a reference calculation, not normally an executable price.
Notional
A contract or exposure amount used for sizing and risk. Its calculation is product specific.
Order
A typed instruction containing instrument, side, quantity, price controls, duration, and account context.
Position
Economic quantity held or owed in an instrument, with availability and settlement state.
Primary market
The market in which newly issued claims are sold and proceeds reach the issuer.
Reconciliation
A controlled comparison of defined records under explicit keys, scope, time, and tolerance.
Reference rate
A sourced rate intended for valuation or information, not necessarily a transaction commitment.
Secondary market
Trading of existing claims among holders after issuance.
Settlement
The final exchange and posting of cash and asset obligations under the applicable rules.
Slippage
The difference between a benchmark such as arrival price and the actual average execution price under a defined sign convention.
Spread
Ask minus bid for the same scoped quote.
Stop order
An order that activates after a trigger. The trigger price is not a guaranteed execution price.
Trade
The economic agreement created by one or more executions, before post-trade completion.
Unrealized P&L
Modeled gain or loss on quantity that remains open under stated valuation and cost assumptions.
Yield
An annualized comparison measure based on defined price, cash flow, tenor, and market conventions.

SPrimary reading

Source library

Rules and conventions change. Revisit the primary source before relying on a dated statement.

10 minInvestor.gov: Introduction to InvestingGoals, compounding, asset allocation, and risk.8 minInvestor.gov: Investment ProductsAuthoritative starting point for common product types.8 minInvestor.gov: StocksOwnership rights, returns, and risks.10 minInvestor.gov: BondsDebt-contract language, maturity, and credit risk.10 minInvestor.gov: Mutual FundsPooled ownership, NAV, fees, and diversification.3 minInvestor.gov: Bid Price and Ask PriceThe official plain-language definition of bid, ask, and spread.8 minFINRA: Order TypesMarket, limit, stop, and stop-limit tradeoffs.8 minInvestor.gov: Executing an OrderRouting, execution, and why a screen is not the whole market.12 minSEC: Disclosure of Order Execution and Routing PracticesExecution quality includes price, likelihood, speed, and reliability.8 minSEC: Margin and Its RisksWhy leverage can create forced sales and losses beyond initial cash.10 minSEC: Regulation SHO OverviewBorrowing, delivery, and short-sale mechanics.7 minFINRA: Understanding Settlement CyclesTrade date versus settlement date and the US T+1 example.10 minDTCC: Accelerated SettlementOperational context for matching, affirmation, and settlement.20 minBIS and CPMI-IOSCO: Principles for Financial Market InfrastructuresInternational principles for clearing, settlement, custody, and operational resilience.20 minFIX Trading Community: Order State ChangesThe real complexity of partial fills, cancels, replaces, and corrections.10 minFIX Trading Community: ExecutionReportWhy an event reason and current order state are separate fields.12 minSEC: Market Access Risk ControlsPre-trade limits, erroneous-order controls, restrictions, and authorized access.12 minFINRA: Algorithmic TradingTesting, supervision, monitoring, governance, and change control.8 minCentral Bank of The Gambia: Open Market OperationsRegional government-securities and primary-dealer context.5 minCentral Bank of The Gambia: Auction ResultsCurrent dated auction results for local context.7 minGhana Stock Exchange: OverviewA regional view of exchange, fixed-income, depository, and settlement infrastructure.30 minNasdaq: TotalView ITCH 5.0Concrete feed messages, sequence, scales, and instrument-location semantics.30 minNasdaq: OUCH 5.0 Order EntryConcrete order-entry, execution, cancel, and broken-trade messages.15 minPostgreSQL: Transaction IsolationConcurrency behavior and why transactions do not replace domain invariants.12 minPostgreSQL: ConstraintsUnique identity, referential integrity, and defensive data rules.12 minIETF HTTPAPI: Idempotency-Key DraftRecognizing safe retries of non-idempotent requests.10 minOpenTelemetry: Observability PrimerTraces, metrics, logs, and questions about unknown failures.15 minOWASP: Logging Cheat SheetUseful evidence without leaking secrets or sensitive data.20 minNIST: Secure Software Development FrameworkPrepare, protect, produce, and respond as a secure build discipline.20 minFederal Reserve: SR 26-2 Model Risk ManagementCurrent purpose, materiality, validation, challenge, and monitoring principles.