Skip to content

MarketContext: coherent numeraire, day-count and calendar conventions #30

Description

@marwinsteiner

Context

The surface stores a flat r and per-slice forwards independently, and maturity is a bare float. Nothing enforces that F(T), D(T) and T come from one coherent convention, and T=0.5 does not say ACT/365F vs business/252. This is deeper than issue #13 (accepting curves): the invariant is that every price produced by a surface is consistent with one internally coherent discounting/forward/day-count convention.

Proposal

  • MarketContext(discount_factor, forward, spot, dividend, day_count, calendar, valuation_time) as the single source of numeraire truth a surface is built against
  • Date-aware API alongside year-fraction floats: expiry timestamps + day-count convention resolve to T internally
  • Issue Term-structure rates and dividends for forward computation #13 (curves) should be designed as the first step toward this object rather than a standalone r-curve kwarg

Acceptance criteria

  • A surface built from a MarketContext prices consistently (parity holds against the context discount factors by construction)
  • Mixed-convention construction is impossible or loudly rejected
  • Day-count choice demonstrably changes T, iv and theta in tests

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions