Journey 08 — SolvLRDE-Pricing
License token: pricing · Product name: SolvLRDE-Pricing (resonix-pricing)
See also: Vertical SKUs overview · Licensing
What this SKU is for
SolvLRDE-Pricing is the licensed vertical for quantitative finance and risk infrastructure — G-SIB pricing engines, xVA and FRTB IMA stacks, ALM and treasury systems that spend most of their CPU on repeated linear propagations across scenarios and maturities.
The engineering problem
Many pricing kernels reduce to propagating a state under a fixed linear operator for horizon T_i:
- Hull-White / Vasicek-style OU:
dr = -kappa * r dt→A = [[-kappa]]. - Implicit PDE spatial step: discretize
du/dt = L u; holdLfixed per scenario → semidiscreteA. - Mean-reverting multi-factor blocks inside larger Monte Carlo or nested simulation.
Traditional stacks time-step from 0 to each maturity. Wall time scales with the maturity ladder — long-dated xVA (30Y+) multiplies inner-loop cost. You often need y(T_i) at many T_i, not a dense time history.
Why Pricing exists (and why LRDE fits)
When A is constant for a scenario, each maturity is one resolvent evaluation: y(T_i) = exp(A * T_i) * y0. SolvLRDE computes that with cost independent of T_i. Pricing at 30 years costs the same contour work as pricing at 1 year. Your outer loop keeps nonlinear payoffs, calibration, correlation breaks, and scenario logic; LRDE replaces only the inner linear propagate step.
Who should buy Pricing (not another SKU)
| Choose Pricing when… | Choose something else when… |
|---|---|
A is a rates/OU or pricing-PDE spatial operator | EMTP companion segments → Grid |
| You loop maturities or term-structure pillars | Generic CTMC / reliability → Specialty |
| Nonlinear payoff stays outside LRDE | Fully nonlinear dynamics → SolvSRK |
Typical production integration
- Operator: build
Aonce per scenario from your discretized model. - Loop:
for T in maturities: y_T = solve(A, y0, T=T)["y"]. - Assembly: curves, cube faces, or sensitivity vectors from terminal states — not from intermediate timesteps.
- License gate:
solvlrde.license_has_sku("pricing")on quant/risk code paths.
This walkthrough
Prerequisites: Core journeys 01–06 complete.
Scenario: xVA, FRTB IMA, and ALM stacks spend most of their wall clock on repeated linear PDE / OU propagations. When the spatial operator is fixed for a scenario, each maturity is a resolvent solve y(T).
Key APIs
solvlrde.solve()maturity loop pattern
Concepts to internalize
- SolvLRDE-Pricing — resonix-pricing SKU.
- T-independent term structure — pricing at 30Y costs the same as 1Y.
- Outer nonlinear loop stays yours — LRDE replaces inner linear propagate.
Important code
The guided tour script wraps this pattern. Copy the production shape into your pipeline:
kappa = 0.05
A = np.array([[-kappa]])
for T in maturities:
r_T = lrde.solve(A, [r0], T=T)['y'][0]Act-by-act walkthrough
Act 1 — Inner linear solve in pricing engines
xVA, FRTB IMA, and ALM stacks spend most of their wall clock on repeated linear PDE / OU propagations. When the spatial operator is fixed for a scenario, each maturity is a resolvent solve y(T).
Act 2 — Hull-White 1D OU
dr = -kappa * r dt linearizes to A = [[-kappa]]. Exact expectation E[r(T)] = r0 * exp(-kappa * T). SolvLRDE returns the same answer with cost independent of T — critical for long-dated xVA.
| Field | Value | Notes |
|---|---|---|
T | 1.0 | |
n_solves | 32 | |
survived | True | |
status | ok | |
y | [0.0285369] | |
n_talbot_used | 32 | |
n_solves | 32 | |
nu_used | 0.6 | |
contour_scale | 12.8 | |
wall_s | 0 | |
expected | [0.0285369] | |
max_abs_error | 2.184e-11 | |
T | 10.0 | |
n_solves | 32 | |
survived | True | |
status | ok | |
y | [0.0181959] | |
n_talbot_used | 32 | |
n_solves | 32 | |
nu_used | 0.6 | |
contour_scale | 1.28 | |
wall_s | 0 | |
expected | [0.0181959] | |
max_abs_error | 1.494e-11 | |
T | 30.0 | |
n_solves | 32 | |
survived | True | |
status | ok | |
y | [0.0066939] | |
n_talbot_used | 32 | |
n_solves | 32 | |
nu_used | 0.6 | |
contour_scale | 0.4267 | |
wall_s | 0 | |
expected | [0.0066939] | |
max_abs_error | 3.615e-12 |
Act 3 — Term-structure loop
In production you hold A from your discretized pricing PDE or OU model, loop maturities T_i, and assemble the curve. Nonlinear payoffs stay in your outer loop; LRDE replaces the inner linear propagate step.
Guided tour output
Verified console capture from sku_pricing.py:
-- Act 1 - Inner linear solve in pricing engines --
-> xVA, FRTB IMA, and ALM stacks spend most of their wall clock on repeated linear PDE / OU propagations. When the spatial operator is fixed for a scenario, each maturity is a resolvent solve y(T).
-- Act 2 - Hull-White 1D OU --
-> dr = -kappa * r dt linearizes to A = [[-kappa]]. Exact expectation E[r(T)] = r0 * exp(-kappa * T). SolvLRDE returns the same answer with cost independent of T — critical for long-dated xVA.
T: 1.0
n_solves: 32
survived: True
status: ok
y: [0.0285369]
n_talbot_used: 32
n_solves: 32
nu_used: 0.6
contour_scale: 12.8
wall_s: 0
expected: [0.0285369]
max_abs_error: 2.184e-11
T: 10.0
n_solves: 32
survived: True
status: ok
y: [0.0181959]
n_talbot_used: 32
n_solves: 32
nu_used: 0.6
contour_scale: 1.28
wall_s: 0
expected: [0.0181959]
max_abs_error: 1.494e-11
T: 30.0
n_solves: 32
survived: True
status: ok
y: [0.0066939]
n_talbot_used: 32
n_solves: 32
nu_used: 0.6
contour_scale: 0.4267
wall_s: 0
expected: [0.0066939]
max_abs_error: 3.615e-12
-- Act 3 - Term-structure loop --
-> In production you hold A from your discretized pricing PDE or OU model, loop maturities T_i, and assemble the curve. Nonlinear payoffs stay in your outer loop; LRDE replaces the inner linear propagate step.
-- Run complete --
next_journey: sku_control.py (Control SKU)Run it
cd python
# Guided tour — narrated scenario walkthrough (recommended first run):
python examples/skus/sku_pricing.py
# Production one-liner — same API call you ship:
python -c "import solvlrde,numpy as np;k=0.05;print(solvlrde.solve(np.array([[-k]]),[0.03],T=10.)['y'])"What comes next
SolvLRDE-Control for LTI step responses.
Navigation
← Journey 07 — SolvLRDE-Grid · Journey 09 — SolvLRDE-Control →