Add a spread margin¶
TI needs a margin for every spread it trades. Margins come from CME CORE reports, imported on TRADER-1 and shipped to TRADER-2 in the trading package.
Save the report to Inbox, not the Spread Margins folder
Only C:\Outlier Capital\Risk Data\Spread Margins\Inbox is watched. A report saved one folder up is never read and raises no alert. This cost five hours with Nafta on 2026-11-04.
Before you start¶
| Check | Where |
|---|---|
| The spread is defined | OC Dashboard → Spread Builder on TRADER-2 |
| TRADER-1 has the definition | C:\Outlier Capital\Config Files\Spread Definitions.csv (fetched hourly) |
| OC_Build_Listener is running | C:\Outlier Capital\Log Files\ → today's OC_Build_Listener log |
Define the spread first
A report for a spread that isn't in Spread Definitions is refused. Don't park reports for spreads you aren't trading in Inbox — they're refused and alerted again on every listener restart.
Steps¶
- Run the margin in CME CORE for the spread's legs and contract counts, then download the report as CSV.
-
Name the file after the spread. Any of these match
MES / MNQ:Form Example Name, /written-MES-MNQ.csvName and contract counts MES-MNQ 1x1.csvEither, with the date MES-MNQ 1x1 2026-11-03.csvSpacing and case are ignored. If CORE's Account ID already holds the spread name, the file name doesn't matter.
-
Save it to
Inbox:C:\Outlier Capital\Risk Data\Spread Margins\Inbox -
Wait about 10 seconds. The file disappears from
Inboxand is filed one folder up as{name} {business date}.csv. -
Get it onto TRADER-2. T2's hourly reference sync picks up the new package. To take it now, on TRADER-2, elevated PowerShell:
powershell -NoProfile -ExecutionPolicy Bypass -File 'C:\Outlier Capital\Scripts\Reference Sync TRADER-2.ps1' -
Check TI shows the margin on the spread.
What happens behind it¶
flowchart LR
subgraph T1[TRADER-1]
direction TB
A[CORE report<br/>saved to Inbox] --> B[OC_Build_Listener<br/>MarginInbox]
B --> C[Spread Margins.csv]
C --> D[Trading package]
end
subgraph T2[TRADER-2]
direction TB
E[Reference Sync] --> F[TI]
end
D -- R2 --> E
| Step | Detail |
|---|---|
| Read | The report's Portfolio row: Account ID, BusDate, Total Initial and Total Maintenance Requirement |
| Match | Account ID first, then file name, against Spread Definitions |
| Write | Spread Margins.csv row: legs as defined, measured_date = BusDate, source CME CORE |
| Publish | Spread Margins.csv to R2 for the dashboard; trading package rebuilt for TRADER-2 |
Confirm it worked¶
In today's OC_Build_Listener log on TRADER-1:
MARGINS_IMPORTED | MarginInbox | Nafta 2026-11-03 initial 5743.48
PACKAGE_PUBLISHED | PackageBuilder | Trading package 20261105-004227 published: ...
On TRADER-2, C:\Outlier Capital\Trading Package\Current\manifest.json names the same version.
If it didn't¶
| You see | Fix |
|---|---|
| Report still in the Spread Margins folder, no email | Saved to the wrong folder. Move it into Inbox. |
| Email: doesn't match a defined spread | Rename the file to the spread's name, or define the spread on TRADER-2 first. |
| Email: a second report for this spread | Two reports for one spread. Import one, then the other. |
| Email: isn't a CME CORE margin report | Wrong download. Re-download the report CSV from CORE. |
| Email: has no Portfolio row | Downloaded before the margin ran. Run it, then download. |
Log: PACKAGE_BUILT ... unchanged |
The package already had this margin. Nothing to do. |
| TI still shows no margin | TRADER-2 hasn't fetched the package. Run its reference sync (step 5). |
All margin emails have the subject [OC ACTION] TRADER-1 margin report not imported. Each refused file stays in Inbox.
Editing Spread Margins.csv by hand
A hand edit is picked up by the hourly catch-up, which pushes the file to R2 and requests a package build — so it reaches TRADER-2 within about an hour. The Inbox is faster and keeps the filed report as a record.