• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

wegamekinglc / Derivatives-Algorithms-Lib / 27506050320
80%
master: 79%

Build:
Build:
LAST BUILD BRANCH: copilot/override-function-gradient-calibration
DEFAULT BRANCH: master
Ran 14 Jun 2026 05:13PM UTC
Jobs 1
Files 201
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

14 Jun 2026 05:07PM UTC coverage: 79.771% (+0.6%) from 79.144%
27506050320

Pull #106

github

wegamekinglc
Add analytic chain-rule Jacobian for LOG_DISCOUNT curve calibration (CP1)

Factor the calibration Jacobian as J[i,j] = sum_t (dRate_i/dDF(t)) * DF(t) * b_j(t)
in plain double, avoiding templatization of the pricing path or use of the AAD
Number_ tape. The critic (B1) found the pricing stack hard-bound to double through
three abstract interfaces with no templated analogue, so the original Phase A was
dropped in favour of this Counter-Proposal CP1.

New surface:
- DiscountLogDF_::InterpBasisWeights(yf): sparse (free-node solver column, basis
  weight) pairs covering yf. Per scheme -- LOG_LINEAR returns 2 pairs, LOG_CUBIC_NATURAL
  up to 4, MIXED 2-or-4 across the cutoff. Storage node 0 (anchor) never appears.
- YCInstrument_::Rate_::DRateDDiscount(yc, target): default-empty virtual with analytic
  quotient-rule overrides on DepositRate_, ForwardRate_, SwapRate_, BasisSwapRate_.
  Empty return triggers a silent per-instrument DF-bump fallback.
- YieldCurveCalibrationFunc_::Gradient(x, f): sparse-Jacobian override, gated by
  CurveJacobianMode_::ANALYTIC_LOG_DISCOUNT AND parameterization_ == LOG_DISCOUNT.
  Non-LOG_DISCOUNT silently falls back to bumped with a NOTICE. Storage is dense
  (XCurveJacobian_ mirrors XJDense_); banded storage is a future optimization.
- CurveJacobianMode_ Machinist enum (BUMPED default, ANALYTIC_LOG_DISCOUNT opt-in)
  on CurveCalibrationSpec_, threaded through CalibrateYieldCurve.

Scope: LOG_DISCOUNT only. PWL_FWD / PWC_FWD retain the bumped path. The default
BUMPED selector keeps pre-CP1 behaviour byte-for-byte (the override returns nullptr).

Tests: 21 new tests across three files cover all three required categories --
analytic-vs-bumped agreement, solve equivalence (LOG_LINEAR / LOG_CUBIC_NATURAL /
MIXED), and structural-zero sparsity -- plus per-component coverage of the basis
weights and the per-instrument derivatives. Full suite 712 tests green.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Pull Request #106: feat: analytic LOG_DISCOUNT curve Jacobian (CP1)

330 of 359 new or added lines in 5 files covered. (91.92%)

25 existing lines in 5 files now uncovered.

5781 of 7247 relevant lines covered (79.77%)

3443380.34 hits per line

Uncovered Changes

Lines Coverage ∆ File
23
86.64
-5.21% dal-cpp/dal/curve/calibration.cpp
4
94.5
5.44% dal-cpp/dal/curve/yclogdf.cpp
1
50.0
-10.0% dal-cpp/dal/curve/ycinstrument.hpp
1
66.67
-33.33% dal-cpp/dal/curve/yclogdf.hpp

Coverage Regressions

Lines Coverage ∆ File
13
86.64
-5.21% dal-cpp/dal/curve/calibration.cpp
5
94.5
5.44% dal-cpp/dal/curve/yclogdf.cpp
4
98.81
0.77% dal-cpp/dal/curve/ycinstrument.cpp
2
50.0
-10.0% dal-cpp/dal/curve/ycinstrument.hpp
1
66.67
-33.33% dal-cpp/dal/curve/yclogdf.hpp
Jobs
ID Job ID Ran Files Coverage
1 27506050320.1 14 Jun 2026 05:13PM UTC 201
79.77
GitHub Action Run
Source Files on build 27506050320
  • Tree
  • List 201
  • Changed 6
  • Source Changed 6
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #27506050320
  • Pull Request #106
  • PR Base - master (#27500697938)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc