Installation¶
merton supports Python 3.11 — 3.14 on macOS (Intel + Apple Silicon), Linux
(x86_64 + aarch64), and Windows.
Minimum (CPU NumPy)¶
uv pip install merton # or: pip install merton
This installs the core dependencies (NumPy, SciPy, pandas, Numba, structlog, Pydantic, joblib, Typer) and gives you single-firm fitting + the vectorized math primitives.
Optional extras¶
Goal |
Install |
|---|---|
GPU (CUDA 12) |
|
JAX autodiff calibration |
|
Apple Silicon GPU |
|
Excel integration |
|
Plotting (matplotlib + plotly) |
|
Bayesian MCMC calibration |
|
OpenTelemetry tracing |
|
Market-data adapters (yfinance, FRED) |
|
Everything |
|
Verifying the install¶
python -c "import merton; print(merton.__version__)"
You should see a version string. Then trigger a small fit:
from merton import Firm, fit
firm = Firm(equity=100, debt_short=20, debt_long=30, equity_vol=0.30)
print(fit(firm).summary())