Skip to content

Add IborSingleCurve time day count regression test#242

Open
gyx09212214-prog wants to merge 1 commit into
domokane:masterfrom
gyx09212214-prog:codex/test-ibor-curve-time-day-count
Open

Add IborSingleCurve time day count regression test#242
gyx09212214-prog wants to merge 1 commit into
domokane:masterfrom
gyx09212214-prog:codex/test-ibor-curve-time-day-count

Conversation

@gyx09212214-prog

Copy link
Copy Markdown

Summary

  • add a regression test covering IborSingleCurve.df() date-to-time conversion
  • verify an IborSingleCurve configured with time_dc_type=ACT_360 uses that day count when inherited DiscountCurve.df() is called with dates
  • compare against ACT_365F time conversion to catch accidental fallback to a different curve time basis

Why

Issue #191 raised concern that inherited discount-curve date conversion could silently use a different day-count basis from the Ibor curve. The current implementation uses self.time_dc_type; this test locks that behavior down without changing pricing logic.

Validation

  • python -m pytest unit_tests/legacy/test_FinIborSingleCurve.py::test_df_uses_ibor_single_curve_time_day_count -q
  • python -m pytest unit_tests/legacy/test_FinIborSingleCurve.py -q

Both pytest commands passed in this Windows environment. Pytest also printed a post-run pyarrow access-violation stack trace while still exiting with status 0; the test assertions completed successfully.

@gyx09212214-prog gyx09212214-prog marked this pull request as ready for review June 11, 2026 10:25
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