Task: Author the outperformance fact table
Table of Contents
This page documents a task in the Rework the equity instruments to the instrument table rule story. It captures the goal, current status, acceptance, and any notes or results.
1. Goal
An outperformance option's own terms have a table, and neither underlying has to be squeezed into a single-underlying shape.
2. Status
| Field | Value |
|---|---|
| State | DONE |
| Parent story | Rework the equity instruments to the instrument table rule |
| Now | Nothing. |
| Waiting on | Nothing. |
| Next | Nothing. |
| Last touched | 2026-10-18 |
3. Acceptance
4. Plan
(Implementation strategy. Written when work starts; key decisions
are distilled into the parent story's * Decisions at close, but the
plan itself stays — it is the historical record of what we did.)
5. Measurements
Every number this task claims about a tree, with the command that produced it
and the commit it was measured at. A number without both is not a measurement,
because a clean-up record describes a tree and trunk moves under a branch: a
consumer count, a gate's component count and a suite's size all change with no
code changing, and the reader of a bare number cannot tell which tree it came
from. Where the raw output matters, put it in an evidence/ file beside the
task and name that file in the Command column.
| What | Value | Command | Commit |
|---|---|---|---|
6. Notes
7. Test Scenarios
Manual QA scenarios (scaffolded via compass add test_scenario)
that verify this task. Link
new ones here as they're created; the scenario doc itself links back
via its "Verifies task" field.
| Scenario | State | Notes |
|---|---|---|
8. PRs
| PR | Title |
|---|---|
| #3498 | [trading] Author the outperformance fact table |
9. Review
| Comment summary | File | Decision | Notes |
|---|---|---|---|
10. Result
The outperformance option has its own fact table, authored from the ORE binding. The pair is the subject matter, so both names have a column and neither is squeezed into the single-underlying shape of equity_option_instruments.
Every level and rate is an exact decimal: the notional, the two initial prices, the strike return and the two knock prices. The strike return is a proportion that multiplies money, and this family holds a rate as an exact decimal. The knock prices are nullable because the document may omit them.
The two underlyings must differ, and the check says so: an option on an equity against itself has no relative return.
The table is named equity_outperformance_options rather than equity_outperformance_option_instruments. The derived name is one character over the limit the generator allows once the trigger and policy suffixes are counted, and PostgreSQL truncated it mid-word to …_instrumen.
Verification. Full build clean, the database recreated, and the whole suite passes 96 of 96. ores.trading.core.tests passes 1196 assertions in 178 cases. The table is present in the database after the recreate.
Not done, and named: no mapper writes this table, and EquityOutperformanceOption still routes to equity_option_instruments. Both move with the mapper migration.