Skip to content

Add one-month Ibor futures and settlement helpers#243

Open
mpwaser wants to merge 1 commit into
domokane:masterfrom
mpwaser:feature/ibor-future-1m-settlement
Open

Add one-month Ibor futures and settlement helpers#243
mpwaser wants to merge 1 commit into
domokane:masterfrom
mpwaser:feature/ibor-future-1m-settlement

Conversation

@mpwaser

@mpwaser mpwaser commented Jul 9, 2026

Copy link
Copy Markdown

Proposal

This addresses the explicit TODOs in financepy/products/rates/ibor_future.py around settlement functionality, tests, and 1-month futures support:

https://github.com/domokane/FinancePy/blob/master/financepy/products/rates/ibor_future.py#L7-L10

The current constructor exposes future_tenor="3M" but rejects all non-3M tenors. This PR keeps the existing 3M quarterly IMM behavior unchanged and adds explicit 1M monthly IMM futures support.

Changes

This PR:

  • accepts future_tenor="1M" / "1m" in IborFuture
  • keeps the existing default future_tenor="3M" behavior unchanged
  • adds monthly IMM delivery-date generation using the third Wednesday of each month
  • continues to use Date.next_imm_date() for 3M quarterly IMM futures
  • adds accrual_factor(), basis_point_value(), and settlement_amount() helpers
  • extends the existing unit_tests/test_FinIborFuture.py test file instead of adding a new test structure

Behavior and scope

Existing calls such as:

IborFuture(value_dt, 1)

still create 3M quarterly IMM futures.

For 1M futures, delivery dates advance by monthly IMM dates, i.e. the third Wednesday of each month. The end of the interest period is the next monthly IMM date.

The new settlement_amount() helper returns the cash settlement amount for a quoted futures price move from the perspective of a long position:

num_contracts * contract_size * accrual_factor * (settlement_price - futures_price) / 100

A short position can be represented by passing a negative num_contracts.

I intentionally left 2M futures unsupported. The current TODO and constructor gap specifically call out 1M futures, and adding 2M support would require additional convention choices and tests beyond this focused change.

Tests

The existing Ibor future unit test was extended to cover:

  • current 3M IMM delivery dates and FRA conversion behavior
  • 1M monthly IMM delivery dates
  • settlement cash amount and basis point value
  • invalid future numbers and unsupported tenors

Local validation was run in a Python 3.13 uv environment:

unit_tests/test_FinIborFuture.py
unit_tests/test_FinIborSingleCurve.py
unit_tests/test_FinIborDualCurve.py
unit_tests/test_FinOISCurve.py

Result:

17 passed

Notes

I did not change the existing FRA conversion logic except that it now uses the delivery and end-of-interest-period dates generated for the selected futures tenor.

This keeps the existing curve-building callers that rely on default 3M futures behavior intact while adding the requested 1M futures path and settlement helpers.

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