Skip to content

MertonFirmMkt calibration changes when monetary inputs use different units #263

Description

@kadyrbekovhamit-cyber

Using FinancePy 1.1.2 and current master 2b9227fea9d832c4033421d6cd53a54316414fca, expressing the same equity value and debt face in different common monetary units changes the calibrated asset volatility and default probability.

from financepy.models.merton_firm_mkt import MertonFirmMkt

equity = 45.63363370957471
equity_vol = 0.7306450094667433
for unit in (1.0, 1e6):
    m = MertonFirmMkt(equity * unit, 100.0 * unit,
                      1.0, 0.05, 0.05, equity_vol)
    print(unit, m.asset_vol(), m.prob_default(), m.equity_vol())

Recorded with Python 3.12.14, NumPy 2.3.5 and SciPy 1.16.3:

Unit multiplier Asset volatility Default probability Reconstructed equity volatility
1 0.24999994 0.07767454 0.73064481
1e6 3.02700322 0.95494710 3.31127638

The market observations were independently generated from asset value 140, debt face 100, one year, rates/growth 5%, and asset volatility 25%. The monetary conversion should leave both volatilities and default probability unchanged. The large-unit fit nearly matches the equity price while missing the supplied equity volatility substantially.

_fobj combines squared money and volatility residuals, and _solve_for_asset_value_and_vol optimizes without monetary normalization. A local candidate first expresses equity/debt and the asset coordinate in debt-face units, then rescales the fitted asset value. It keeps the original objective, optimizer and tolerance otherwise unchanged.

On 120 scenarios (24 economic parameter sets × 5 monetary scales), current source, the released wheel and restoration of the original source each give 94 failed parameter/repricing round trips; the normalization candidate gives zero using the same declared tolerances. Scalar/batch controls agree. The existing Merton test passes with the candidate.

The candidate still reports 39 non-success optimizer statuses out of 120, despite passing all independent numerical checks on this grid. This is not a universal solver-convergence fix. All inputs are synthetic; no bank deployment or customer impact is claimed. AI-assisted preparation and actual public-code execution.

Report and candidate patch · Frozen source, wheel, complete outputs and reproduction scripts · Canonical GitHub report

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions