Reference / Trade execution

The figures an outcome carries

An outcome is refused as it is made unless its figures hold together. Each rule blocks one way of reporting something that cannot have happened.

Contents

The amounts

A target amount, where one is given, must be an ordinary number above zero, not infinity. The amount filled cannot be below zero, and cannot be above that target.

The slices done cannot be below zero, the total must be above zero, and the slices done cannot exceed the total. The total cannot be zero.

The price and the value

An average price, where one is given, must be above zero. Nothing filled must carry no average price at all, so a price for a fill that never happened is refused.

The value is always a number, never left blank, and three rules hold it. It cannot be below zero. Nothing filled must leave it at exactly zero. Something filled must put it above zero.

Each rule looks at one number, or compares two. A good deal is left alone.

Source evidence
---
row: P2-40
baseline: 49aa659
created: 2026-09-26 20:21 UTC
modified: 2026-10-11 20:17 UTC
evidence:
  - claim: "A target amount given must be a finite figure above zero"
    source: "`praxis/core/domain/trade_outcome.py` 118-124"
  - claim: "The amount filled cannot be below zero"
    source: "`praxis/core/domain/trade_outcome.py` 126-128"
  - claim: "It cannot be above the target, where a target was given"
    source: "`praxis/core/domain/trade_outcome.py` 130-132"
  - claim: "An average price, where one is given, must be above zero"
    source: "`praxis/core/domain/trade_outcome.py` 134-136"
  - claim: "Nothing filled must carry no average price at all"
    source: "`praxis/core/domain/trade_outcome.py` 138-140"
  - claim: "A value below zero is refused"
    source: "`praxis/core/domain/trade_outcome.py` 154-156"
  - claim: "Nothing filled must carry a value of zero"
    source: "`praxis/core/domain/trade_outcome.py` 158-160"
  - claim: "Something filled is refused with a value of zero"
    source: "`praxis/core/domain/trade_outcome.py` 162-164"
  - claim: "The slices done cannot be below zero"
    source: "`praxis/core/domain/trade_outcome.py` 142-144"
  - claim: "The total must be above zero"
    source: "`praxis/core/domain/trade_outcome.py` 146-148"
  - claim: "The slices done cannot exceed the total"
    source: "`praxis/core/domain/trade_outcome.py` 150-152"
---

Edit this sourceCheckout revision · 7381aa49
Reference / keep your place
Find a passage