Skip to content

Default to single sector and enable heterogeneous CES epsilon#65

Closed
vahid-ahmadi wants to merge 2 commits intoPSLmodels:mainfrom
vahid-ahmadi:feature/single-sector-default-and-het-epsilon
Closed

Default to single sector and enable heterogeneous CES epsilon#65
vahid-ahmadi wants to merge 2 commits intoPSLmodels:mainfrom
vahid-ahmadi:feature/single-sector-default-and-het-epsilon

Conversation

@vahid-ahmadi
Copy link
Copy Markdown
Collaborator

Summary

  • Default to M=1 (single sector): The 8-sector industry calibration is now opt-in via multi_sector=True on solve_steady_state() / run_transition_path(), or multi-sector CLI flag. This makes the default run faster and matches OG-Core's built-in M=1 defaults.
  • Enable heterogeneous CES epsilon in multi-sector mode: Uses calibrated literature values (Chirinko 2008, Knoblach et al. 2020) ranging from 0.40 (Real Estate) to 1.30 (Business Services), instead of forcing all sectors to Cobb-Douglas (ε=1.0).
  • Recalibrate TFP (Z) for CES: Solow residuals now use the CES production function when ε≠1, ensuring Z values are consistent with the production technology.

Usage

# Single sector (default, fast)
uv run python examples/run_oguk.py ss pooled
uv run python examples/run_oguk.py tpi

# 8-sector with heterogeneous CES
uv run python examples/run_oguk.py ss pooled multi-sector
uv run python examples/run_oguk.py tpi multi-sector

Dependencies

Requires PSLmodels/OG-Core#1096 (numerical guards for CES production functions) to prevent NaN when ε<1 and inputs are near zero.

Test plan

  • 8-sector SS with heterogeneous epsilon converges (resource constraint ~1e-6)
  • Single-sector SS/TPI produces same results as before this PR
  • 8-sector TPI with heterogeneous epsilon converges (requires OG-Core#1096)

🤖 Generated with Claude Code

vahid-ahmadi and others added 2 commits March 31, 2026 13:37
Two changes:

1. Make single-sector (M=1) the default run mode. The 8-sector industry
   calibration is now opt-in via `multi_sector=True` parameter on
   solve_steady_state() and run_transition_path(), or via the
   `multi-sector` CLI flag:
     uv run python examples/run_oguk.py ss pooled              # M=1
     uv run python examples/run_oguk.py ss pooled multi-sector # M=8

2. Enable calibrated heterogeneous CES elasticities (epsilon) in the
   8-sector mode. Previously forced to 1.0 (Cobb-Douglas) for all
   sectors due to solver NaN issues — now uses literature values from
   Chirinko (2008) and Knoblach et al. (2020):
     Energy=0.50, Construction=0.70, Trade & Transport=1.00,
     Info & Finance=1.20, Real Estate=0.40, Business Services=1.30,
     Public & Other=0.90, Manufacturing=0.80

   Supporting changes:
   - Recalibrate TFP (Z) using CES Solow residuals instead of
     Cobb-Douglas residuals when epsilon != 1
   - Use hybr root-finder (Powell hybrid) instead of LM for
     multi-sector SS — LM gets stuck at ~1e-5 residuals
   - Relax mindist_SS and RC_SS to 1e-4 for multi-sector

   Requires OG-Core PR PSLmodels/OG-Core#1096 (numerical guards for
   CES production functions).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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