LibraryWorkspaceDataHub

© 2026 QCA · by Lime Fintech · About QCA · Market data from Massive

PrivacyTermsCookiesDisclaimer
HomeLibrary
DataHub
  1. Library
  2. Report

Optimal credit portfolio and consumption with regime switching and default contagion

Open repository
Sep 21, 2026
Mathematical Finance

Verdict: Partially Reproduced

OverviewExperiments

Executive Summary

Status
Partially Reproduced
Confidence
High

Executive Summary

  • Status: PARTIALLY REPRODUCED
  • Confidence: HIGH
  • Key Insight: The repository reproduces nearly all benchmark point values and qualitative comparative statics from the paper essentially exactly for the selected experiments. The main caveat is Exp 4, where the reported summary says regime-gap compression is “False” despite the tabulated results showing the benchmark endpoint reductions and generally monotone compression in absolute gaps with faster switching.

Results Comparison

MetricPaperReproducedDiffStatus
Exp 1 R1, h=(0,0), t=0.3, pi10.30560.30560.0000Match
Exp 1 R1, h=(0,0), t=0.3, pi20.13150.13150.0000Match
Exp 1 R1, h=(0,0), t=0.3, c*0.39660.39660.0000Match
Exp 1 R2, h=(0,0), t=0.3, pi1
0.1676
0.1676
0.0000
Match
Exp 1 R2, h=(0,0), t=0.3, pi20.05330.05330.0000Match
Exp 1 R2, h=(0,0), t=0.3, c*0.37420.37420.0000Match
Exp 4 h=(0,0), t=0, gap s=1~0.40190.4019 (abs.)0.0000Match
Exp 4 h=(0,0), t=0, gap s=4~0.17460.1746 (abs.)0.0000Match
Exp 4 h=(1,1), t=0, gap s=1~0.09830.0983 (abs.)0.0000Match
Exp 4 h=(1,1), t=0, gap s=4~0.03660.0366 (abs.)0.0000Match
Exp 5 eta sweep c* range~0.1722 to 0.64940.1722 to 0.6494~0.0000Match
Exp 5 eta sweep pi1 range~0.3061 to 0.30420.3061 to 0.3042~0.0000Match
Exp 5 gamma sweep pi1 range~0.5771 to 0.15840.5771 to 0.1584~0.0000Match
Exp 5 gamma sweep c* range~0.3213 to 0.43000.3213 to 0.4300~0.0000Match
Exp 6A no-contagion R1 pi_total~0.44080.4407-0.0001Match
Exp 6A contagion R1 pi_total~0.43710.43710.0000Match
Exp 6A no-contagion R1 c*0.39810.3981~0.0000Match
Exp 6A contagion R1 c*0.39660.3966~0.0000Match
Exp 6B regime 1 R1 benchmark(0.3056, 0.1315), 0.3966exact0.0000Match
Exp 6B regime 2 benchmark(0.1676, 0.0533), 0.3742exact0.0000Match
Exp 6C terminal-only R1 pi1~0.29720.29720.0000Match
Exp 6C terminal-only R1 pi2~0.12870.12870.0000Match
Exp 6C terminal-only R2 pi1~0.16320.16320.0000Match
Exp 6C terminal-only R2 pi2~0.05230.05230.0000Match
Exp 7 asset 1 default, pi_surv before~0.13150.13150.0000Match
Exp 7 asset 1 default, pi_surv after~0.12480.12480.0000Match
Exp 7 asset 1 default, c_before~0.39660.39660.0000Match
Exp 7 asset 1 default, c_after~0.36700.36700.0000Match
Exp 7 asset 1 default expenditure drop~35.8%35.75%-0.05 ppMatch

Summary

The reproduction is quantitatively very strong. For all point benchmarks explicitly quoted in the experiment descriptions and paper-facing summaries, the repository matches to 4 decimal places or better. The only material issue is not numerical mismatch but an internal inconsistency in Exp 4 interpretation, where the summary flag says monotone compression is false even though the CSV supports the intended headline result and benchmark values.


Experiment-by-Experiment Analysis

Exp 1 — Core deterministic replication of recursive HJB and benchmark controls

The benchmark table in results/exp1_controls_table.csv strongly supports a successful core replication:

  • Terminal consistency holds: phi(T,i,h)=1 for all regimes and default states.
  • Positivity holds throughout all reported states/times.
  • Benchmark point at t=0.3, regime 1, h=(0,0):
    • pi1=0.3056069461
    • pi2=0.1315266637
    • c*=0.3966316474
  • Benchmark point at t=0.3, regime 2, h=(0,0):
    • pi1=0.1675747442
    • pi2=0.0533261256
    • c*=0.3742065027

These are effectively exact matches to the paper targets.

Additional reproduced structural patterns:

  • Favorable regime 1 has higher risky allocations and higher consumption than adverse regime 2.
  • After default, allocations are lower than in the all-alive state.
  • In state (1,1), risky weights are zero identically, consistent with theory.
  • phi declines toward maturity while c* rises toward maturity, which is internally coherent given the control formula.

Assessment: Core numerical engine appears fully implemented and benchmarked correctly.

Exp 1 benchmark controls

Exp 1 benchmark consumption


Exp 2 — After-default comparative statics: own intensity and volatility

The CSV sweeps show the expected monotone behavior in post-default single-survivor states.

Own default intensity effect

From exp2_intensity_sweep.csv:

For state (0,1), regime 1 at t=0.3, as survivor intensity rises from 0.3 to 2.0:

  • pi_surv falls from 0.3700 to 0.1483
  • c* falls from 0.4023 to 0.3708

For state (0,1), regime 2:

  • pi_surv falls from 0.2347 to 0.1018
  • c* falls from 0.3805 to 0.3629

For state (1,0), regime 1 (visible rows):

  • pi_surv declines from 0.1885 downward as intensity increases
  • c* also declines mildly

This matches the paper’s qualitative claim:

  • risky weight response is strong and monotone negative
  • consumption response is negative but much milder

Own volatility effect

From exp2_volatility_sweep.csv:

For (0,1), regime 1, as sigma_1 rises from 0.3 to 2.5:

  • pi_surv falls from 0.2974 to 0.0724
  • c* falls from 0.3905 to 0.3677

For (0,1), regime 2:

  • pi_surv falls from 0.2014 to 0.0501
  • c* falls from 0.3736 to 0.3610

For (1,0), regime 1 and 2, same pattern holds:

  • allocations decrease materially with volatility
  • consumption decreases slightly

Assessment: This experiment is qualitatively reproduced well. The repository summary also states monotone decrease is true. The only limitation is that the CSV snippet read is truncated before the very end for (1,0) intensity/volatility, but the observed rows and repository summary are fully consistent with expected outcomes.

Exp 2 intensity sweep

Exp 2 volatility sweep


Exp 3 — Before-default direct and indirect default-intensity effects

This experiment studies both direct own-intensity effects and indirect substitution effects in the all-alive state.

Scenario A: vary asset 2 intensity in regime 1

From exp3_scenario_a.csv, regime 1 at t=0.3:

  • As lambda_2^(0,0)(1) rises from 0.2 to above 2.2:
    • pi_2 falls sharply from 0.2069 to 0.0694
    • pi_1 rises from 0.3011 to 0.3101
    • total risky share falls from 0.5080 to 0.3795
    • c* declines mildly from 0.4012 to 0.3921

This is exactly the paper’s predicted pattern:

  • own weight decreases
  • other asset weight increases slightly
  • total risky allocation declines

In regime 2 under scenario A, the effect is much smaller, which is plausible since the shock is to regime-1 intensity only.

Scenario B: vary asset 1 intensity in regime 2

From exp3_scenario_b.csv, regime 2 at t=0.3:

  • pi_1 falls from 0.2653 to 0.0892 over the visible range
  • pi_2 rises from 0.0492 to 0.0572
  • total risky share falls from 0.3145 to 0.1464
  • c* decreases from 0.3804 to 0.3684

Again, this matches the direct/indirect effect hypothesis very well.

Assessment: Exp 3 is convincingly reproduced both qualitatively and economically. The substitution effect is present but smaller than the direct own-intensity effect, exactly as expected.

Exp 3 before-default intensity effects


Exp 4 — Regime-switching frequency effect on regime-specific value multipliers

This is the one experiment with a noticeable reporting inconsistency.

From exp4_regime_gap.csv:

Benchmark endpoint matches

At t=0, state (0,0):

  • s=1: gap = -0.401927
  • s=4: gap = -0.174619

At t=0, state (1,1):

  • s=1: gap = -0.098315
  • s=4: gap = -0.036590

These match the paper’s quoted benchmark magnitudes essentially exactly in absolute value.

Compression pattern

Across all states and reported times, the absolute value of the regime gap decreases as s increases from 1 to 4. For example:

State (0,0), t=0.3:

  • |gap|: 0.2704 → 0.2000 → 0.1563 → 0.1274

State (0,1), t=0.0:

  • |gap|: 0.3081 → 0.2163 → 0.1649 → 0.1328

State (1,0), t=0.5:

  • |gap|: 0.0687 → 0.0529 → 0.0422 → 0.0347

So the headline finding is reproduced.

But repository summary says:

  • “Gap compression monotone in s: False”

This likely reflects:

  1. a strict check on signed gaps rather than absolute gaps,
  2. a coding bug in the monotonicity diagnostic,
  3. or a more granular time/state criterion not evident from the CSV.

Given the actual reported values, the experiment should be judged as substantively reproduced, but with a diagnostic/reporting inconsistency.

Exp 4 regime gap


Exp 5 — Preference-parameter sweeps: eta and gamma

Eta sweep

From exp5_eta_sweep.csv:

  • eta=0.2: c*=0.172155, pi1=0.306089
  • eta=1.0: c*=0.649399, pi1=0.304239

So:

  • consumption rises strongly with eta
  • risky allocation declines only slightly

This matches the paper’s cited values almost exactly.

Gamma sweep

From exp5_gamma_sweep.csv:

  • gamma=1.2: pi1=0.577096, c*=0.321330
  • gamma=5.0: pi1=0.158443, c*=0.430012

Thus:

  • risky holdings fall strongly with risk aversion
  • consumption rises with gamma

Again, benchmark values are essentially exact.

Economic significance:

  • Eta has a very large effect on consumption but negligible effect on portfolio share.
  • Gamma has a very large effect on risky allocation and a moderate positive effect on consumption.
  • These are strong, clean comparative statics, not numerical noise.

Exp 5 preference parameter sweeps


Exp 6 — Model comparisons

Module A: contagion vs no-contagion

From exp6_module_a.csv, regime 1:

  • contagion: pi_total=0.437134, c*=0.396632
  • no contagion: pi_total=0.440708, c*=0.398053

Differences:

  • total risky share lower by 0.00357
  • consumption lower by 0.00142

So contagion slightly reduces risk-taking and consumption, matching the paper.

Module B: favorable vs adverse regime

From exp6_module_b.csv:

  • regime 1: pi_total=0.437134, c*=0.396632
  • regime 2: pi_total=0.220901, c*=0.374207

This is a large economic difference:

  • risky allocation nearly halves in the adverse regime
  • consumption rate is also lower

This is a very meaningful reproduction of regime dependence.

Module C: full utility vs terminal-only

From exp6_module_c.csv:

  • full utility, regime 1: (0.305607, 0.131527)

  • terminal-only, regime 1: (0.297198, 0.128745)

  • full utility, regime 2: (0.167575, 0.053326)

  • terminal-only, regime 2: (0.163247, 0.052270)

Differences are modest but systematic:

  • including intermediate consumption increases risky holdings somewhat
  • terminal-only sets c*=0 by construction, as intended

Assessment: Exp 6 is strongly reproduced, with both point-value and directional agreement.

Exp 6 model comparisons


Exp 7 — Before-vs-after default comparison and expenditure drop

From exp7_before_after.csv, asset 1 default at t=0.3, regime 1:

  • pi_surv_before=0.1315267
  • pi_surv_after=0.1248484
  • c_before=0.3966316
  • c_after=0.3669814
  • X_after = 1 - pi_defaulted_before = 0.6943931
  • expenditure before = 0.3966316
  • expenditure after = 0.2548294
  • expenditure drop = 35.7516%

This is nearly an exact replication of the paper’s ~35.8% figure.

Important economic point:

  • the consumption rate falls only moderately
  • but realized consumption expenditure falls sharply because of the wealth jump at default

That is exactly the intended interpretation of the paper’s figure.

The CSV also includes symmetric comparisons for default of asset 2 and regime 2, which look internally coherent.

Exp 7 before vs after default


Statistical & Economic Significance

This repository is primarily a deterministic numerical replication, not an empirical asset-pricing backtest. So classical metrics like:

  • returns,
  • Sharpe ratio,
  • alpha,
  • drawdown,
  • t-stats,
  • p-values

are not applicable to these experiments.

What matters instead is:

  1. numerical agreement with paper benchmarks
  2. stability/positivity/terminal consistency
  3. economic plausibility of comparative statics

On those dimensions:

  • Quantitative accuracy: extremely strong for quoted benchmark values; differences are far below tolerance.
  • Economic significance: strong. Changes in regime, contagion, default intensity, volatility, eta, and gamma all produce meaningful and theoretically sensible control shifts.
  • Practical numerical significance: the outputs are smooth and coherent across grids; no evidence of unstable or nonsensical controls in the reported tables.

So while there are no inferential statistics, the reproduction is economically meaningful and numerically precise.


Discrepancies

  • Exp 4 diagnostic inconsistency: The summary states “Gap compression monotone in s: False,” but the CSV shows the benchmark compression in absolute regime gaps exactly as expected across reported states/times. This appears to be a reporting or diagnostic-definition issue rather than a real failure of replication.
  • Lack of reported HJB residuals / optimizer curvature diagnostics in result files: The experiment descriptions mention residuals, admissibility, and uniqueness/convexity checks, but the results files mostly report final controls and monotonicity summaries rather than numerical residual magnitudes. This is a documentation limitation, not evidence of failure.

Methodology Issues

Only minor concerns are visible from results artifacts:

  • The recursive solver ordering appears to have been followed correctly, since all dependent-state results are coherent.
  • Terminal condition and positivity are explicitly reported as satisfied.
  • The main methodological gap is insufficient diagnostic detail in the exported results:
    • no HJB residual table,
    • no optimizer Hessian/convexity evidence,
    • no explicit tolerance/error summaries.

This does not undermine the benchmark matches, but it slightly lowers transparency.


Reliability

Strengths

  • Exact or near-exact recovery of all major benchmark point values.
  • Smooth monotone comparative statics in Exp 2, 3, and 5.
  • Correct cross-state economic behavior in Exp 6 and 7.
  • Terminal consistency and positivity hold globally per summary and visible tables.

Red flags

  • Exp 4 summary flag conflicts with actual tabulated evidence.
  • Diagnostic outputs are thinner than the methodology notes suggest.

Overall confidence

High. The numerical outputs are too consistent across many independent experiments to look accidental. The repository appears to have successfully implemented the intended recursive HJB framework.


Verdict

Final Decision: PARTIALLY REPRODUCED

Why:

The repository reproduces almost all core numerical findings and benchmark point values essentially exactly, including Exp 1, 5, 6, and 7, and it strongly supports the comparative statics in Exp 2 and 3. However, there is a material reporting inconsistency in Exp 4 and somewhat limited visibility into residual/optimizer diagnostics. Because the substantive results are overwhelmingly correct but one experiment’s summary check is internally inconsistent, the fairest label is PARTIALLY REPRODUCED rather than fully reproduced.

Experiments

Core deterministic replication of the recursive HJB system and benchmark optimal controls

Implement the paper’s core numerical engine for a two-asset, two-regime, default-contagion portfolio/consumption model and reproduce the benchmark value-function multipliers, optimal portfolio weights, and optimal consumption rates under the full utility criterion. This experiment is the foundational deterministic replication of the model-implied controls and validates the recursive default-state solution method.

After-default comparative statics: surviving asset own default intensity and own volatility effects

Replicate the paper’s after-default sensitivity experiments in which only one risky asset survives, and test how the surviving asset’s optimal portfolio weight and consumption respond to changes in its own default intensity and its own diffusion volatility. This corresponds to the numerical logic behind Figures 1 and 2 and isolates post-default controls in single-survivor states.

Before-default direct and indirect default-intensity effects with both risky assets alive

Replicate the comparative-statics experiments in the all-alive state h=(0,0) that examine how changing one asset’s current default intensity affects both its own optimal portfolio weight, the other asset’s portfolio weight, and total risky allocation. This corresponds to the direct and indirect intensity effects shown in Figures 3 and 4.

Regime-switching frequency effect on regime-specific value multipliers

Replicate the experiment that studies how the speed of regime switching affects the difference between regime-specific value multipliers. The goal is to verify that faster switching compresses the gap between varphi(t,1,h) and varphi(t,2,h) across default states, corresponding to Figure 5.

Preference-parameter sweeps: Cobb-Douglas weight eta and risk aversion gamma

Replicate the sensitivity analysis of optimal controls with respect to the consumption preference weight eta and risk aversion gamma. This reproduces Figures 6 and 7 and studies how preferences affect consumption rates and risky allocations in the benchmark all-alive state.

Model comparisons: contagion vs no contagion, favorable vs adverse regime, and full utility vs terminal-wealth-only

Replicate the paper’s structured model-comparison experiments that contrast contagion and no-contagion specifications, favorable and adverse regimes, and the full utility criterion versus a terminal-wealth-only criterion. These comparisons correspond to Figures 8, 9, and 10 and quantify how modeling assumptions alter optimal controls.

Before-vs-after default comparison and post-default consumption expenditure drop

Replicate the comparison of optimal controls immediately before and after a default event, including both the surviving risky asset’s weight and the consumption rate, and compute the actual consumption expenditure drop due to the simultaneous wealth jump at default. This corresponds to Figure 11.

Original paperRun QCA on your paper