Welcome

Multi-Simulator Platform

Welcome! Select a simulator from the sidebar to get started. Some features require you to sign in.

Credit Market Demand Simulator

Single-supplier lending simulation with stochastic demand and deterministic approval rules

1 Economic Conditions market rate, GDP, unemployment
2 Expected Demand elasticity + random shock
3 Generate Applicants credit score, income, DTI, amount
4 Approval Rules deterministic checks
5 Funding capital pool & results

1. Economic Conditions

The simulation starts with a macroeconomic environment that drives credit demand and applicant behaviour.

EconomicConditions { market_interest_rate, gdp_growth, unemployment_rate, credit_demand_index }
  • market_interest_rate — benchmark rate (e.g. central bank). Applicants compare this to the supplier's offered rate.
  • gdp_growth — higher growth increases demand for credit (more investment, consumption).
  • unemployment_rate — higher unemployment suppresses demand and worsens applicant credit profiles.
  • credit_demand_index — overall market multiplier (1.0 = normal conditions).

2. Expected Demand

The number of applicants each period is computed using elasticities relative to baseline economic conditions, plus a random shock.

rate_effect = exp(rate_elasticity × |supplier_rate − market_rate|)
gdp_effect = exp(gdp_elasticity × (gdp_growth − 0.025))
unemp_effect = exp(unemp_elasticity × (unemployment − 0.04))
expected = base_applicants × demand_index × rate_effect × gdp_effect × unemp_effect × shock
shock ~ Normal(1.0, demand_shock_std)
  • interest_rate_elasticity (−2.0) — negative because higher supplier rates relative to market reduce demand.
  • gdp_elasticity (1.5) — positive: growing economy → more loan applications.
  • unemployment_elasticity (−0.8) — negative: higher unemployment reduces demand.
  • demand_shock_std (0.15) — stochastic shock captures unpredictable market fluctuations.

3. Applicant Generation

Each applicant is an independent random draw from probability distributions calibrated to realistic credit market profiles.

credit_score ~ Normal(700, 60), clipped to [300, 850]
income ~ LogNormal(μ=10.8, σ=0.5)  → median ~$50K
debt_to_income ~ Beta(α=2, β=5) × 0.5  → typical range 0.05–0.35
requested_amount ~ LogNormal(μ=10.0, σ=0.8), capped at $500K
proposed_rate = market_rate + Normal(2%, 1%)
  • Credit score follows a normal distribution centred at 700 (good credit), truncated to the 300–850 range.
  • Income uses a lognormal distribution to model the typical right-skewed income distribution.
  • Debt-to-income ratio follows a Beta(2,5) distribution, concentrated in 0.1–0.3.
  • Each applicant is assigned a risk grade (AAA through C) based on their credit score.

4. Approval Rules

Approval is a purely deterministic pipeline: each applicant either passes all checks or is rejected.

approve = (credit_score ≥ min_credit_score)
&& (min_loan_amount ≤ requested ≤ max_loan_amount)
&& (supplier.can_fund(requested))
&& (debt_to_income ≤ 0.43)
&& (proposed_rate ≥ supplier_rate − 2%)
  • Credit score floor — e.g. 660; applicants below this are rejected.
  • Amount bounds — loan must be within the supplier's min/max range.
  • Capital check — enough remaining capital must exist.
  • DTI limit — hard cap of 43% (standard lending guideline).
  • Rate premium — applicant's proposed rate cannot be more than 2% below the supplier's rate.

5. Funding & Results

Approved loans are funded from the supplier's capital pool. The simulation runs period by period until capital is exhausted or all periods are completed.

remaining_capital = total_capital − sum(funded_amounts)
is_exhausted = remaining_capital < min_loan_amount
capital_utilization = 1 − (remaining_capital / total_capital)
  • Each period generates a record: applicant count, approvals, funded volume, remaining capital.
  • The simulation stops early if capital is exhausted (remaining less than minimum loan).
  • NumPy's seeded PRNG (numpy.random.default_rng) makes results reproducible for any given seed.
  • The default config uses seed=42 and runs 12 periods with $10M capital.

Parameters

set same seed for reproducible results
% annual
USD
USD
% annual
%
%