Skip to content

fix(cftc): leave a print out of its own FX curve when it is alone at its tenor - #7832

Closed
dlee-bq wants to merge 1 commit into
developfrom
fix/cftc-fx-own-print-exclusion
Closed

dlee-bq wants to merge 1 commit into
developfrom
fix/cftc-fx-own-print-exclusion

Conversation

@dlee-bq

@dlee-bq dlee-bq commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Description

  • Follow-up to #7750.
  • perf(cftc): build each FX pair's forward curve once per day, shared with the vol surface #7750 values each print against a curve that includes the print. With MIN_FORWARD_NODES = 2, a thin pair's own print could supply a node, forcing flat extrapolation and a mark near zero.
  • A print that is the only observation at its tenor is now left out of the curve it is valued against. A print that shares its tenor uses the pair's shared curve.
  • fx-pair and fx-df memo keys carry the curve date, like fx-curve, fx-market and fx-options.
  • observation_curve builds the curve from extracted observations; ndf_forward_curve delegates to it, so the vol surface is unchanged.
  • Observations carry dissemination_identifier, which identifies a print's own observation.

Not in this PR

  • One market builder shared by fx_implied_vol and fx_market (notional floor, min_trades, forward-aware discounting, spot rule, days > 2 / days <= 9 cut-offs).
  • The valued option reading its vol the way the surface does.

Known limit

  • A print that shares its tenor still counts toward that tenor's median. Leaving it out would move the median by at most one rank, and would need a curve per print.

How has this been tested?

  • tests/test_fx_valuation.py: 98 passed. Added tests for a print alone at its tenor, a print sharing its tenor, no leak to the pair's other prints, an empty identifier, and date-carrying memo keys.
  • CFTC suite: 1,227 passed, excluding tests/test_search_http.py (needs vcr, not installed locally).
  • With the exclusion disabled, the alone-at-its-tenor and no-leak tests fail.
  • Synthetic timing, not DTCC data: 12,231 USDKRW prints with 243 own-print curves build every market in 0.6 s.
  • Not run: the 2026-10-08 DTCC forex file end to end.

…its tenor

- A print that is the only observation at its tenor no longer supplies its own node, so it cannot force flat extrapolation or a zero mark
- A print that shares its tenor keeps the pair's shared curve
- Observations carry the dissemination identifier
- observation_curve builds the curve from extracted observations; ndf_forward_curve delegates to it
- fx-pair and fx-df memo keys carry the curve date

Signed-off-by: dlee-bq <325002271+dlee-bq@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

Invalid branch name for a Pull Request to be merged to branch. Branches must follow the GitFlow naming convention. Please review our branch naming guidelines.

@dlee-bq

dlee-bq commented Nov 11, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #7833: branch name did not match the GitFlow check.

@dlee-bq dlee-bq closed this Nov 11, 2026
@dlee-bq
dlee-bq deleted the fix/cftc-fx-own-print-exclusion branch November 11, 2026 05:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant