A high-performance, GPU-accelaerated fixed-income simulation framework.
Project description
Rate-Engine: High-Performance Fixed Income & Yield Framework
The "So What?"
In multi-asset portfolios, the ability to rapidly stress-test interest rate sensitivity (Greeks) is often limited by the computational cost of path-dependent simulation. Rate-Engine solves this by leveraging a hardware-aware (MPS/CUDA) stochastic framework that handles 1,000,000+ paths in under 500ms. This enables real-time yield curve calibration and risk-neutral pricing for complex fixed-income derivatives that were previously computationally prohibitive.
Core Features
- Vectorized Nucleus: Built on PyTorch for native GPU acceleration on Apple Silicon (MPS).
- Mean-Reversion Solvers: Optimized Vasicek and Cox-Ingersoll-Ross (CIR) implementations for short-rate modeling.
- Numerical Rigor: Integrated Martingale consistency checks and $1/\sqrt{N}$ convergence validation to ensure unbiased pricing.
- Path-Integral Logic: Vectorized Trapezoidal integration for accurate Zero-Coupon Bond (ZCB) and Discount Factor calculation.
Mathematical Foundation
The framework solves the Ornstein-Uhlenbeck process for the short rate $r_t$: $$dr_t = a(b - r_t)dt + \sigma dW_t$$
And computes the bond price $P(0, T)$ via the expectation of the stochastic integral: $$P(0, T) = \mathbb{E}\left[ \exp\left( -\int_0^T r_s ds \right) \right]$$
Quick Start
from rate_engine.nucleus.sde import Vasicek
from rate_engine.pricing.bonds import BondPricer
from rate_engine.utils.device import get_device
# Initialize Model & Accelerator
device = get_device()
model = Vasicek(a=0.5, b=0.05, sigma=0.02)
pricer = BondPricer(model, device)
# Price 1M paths for a 1-year Bond
price, std_err = pricer.price_zcb(r0=0.03, T=1.0, steps=252, n_paths=1_000_000)
print(f"Fair Value: {price:.6f} +/- {std_err:.6f}")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file quant_rate_engine-0.1.1.tar.gz.
File metadata
- Download URL: quant_rate_engine-0.1.1.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2008b62905f6f8bbcc6fbed444776a780710b28fb126ad0a7f9f62cec1fac953
|
|
| MD5 |
2aa37f2a6c01878d3cfa438b35aa0100
|
|
| BLAKE2b-256 |
902d51c9b3cd646c7be25fe573fadd936bbe40b3b54cd49ad0df420994361e10
|
File details
Details for the file quant_rate_engine-0.1.1-py3-none-any.whl.
File metadata
- Download URL: quant_rate_engine-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86ea90ef178b7d24296912f26b29ffab65082c229875b0e08773caa21befd530
|
|
| MD5 |
3bf175ca953dc5d89b00ca156e5eb7d1
|
|
| BLAKE2b-256 |
bd0a60ae553c7826672aaf5154c25de8872c52a31e630d5c072872a09a92173f
|