Neutryx Core - Project Overview¶
Vision¶
Neutryx Core is a next-generation quantitative finance platform built to meet the demands of modern investment banks, hedge funds, and quantitative researchers. It unifies derivatives pricing, risk management, and regulatory compliance into a single, high-performance, differentiable computing framework powered by JAX.
Our vision is to provide a complete derivatives lifecycle platform - from real-time market data ingestion to regulatory capital calculation - all within one continuous computational graph that is JIT-compiled, GPU-accelerated, and production-ready.
Current Status (November 2025)¶
Platform Maturity: Production-ready enterprise platform with 500+ comprehensive tests
Major Milestones Achieved: - β v0.1.0 (Jan 2025): Foundation release with multi-asset derivatives platform - β v0.2.0 (Q2-Q3 2025): Advanced calibration with Bayesian model averaging and joint calibration - β v0.4.0 (Q1 2026): Complete regulatory compliance (FRTB SA/IMA, DRC/RRAO, SA-CCR, SIMM) - β v1.0.0 (Q2 2026): Full enterprise platform with SSO/OAuth/MFA/LDAP, K8s deployment, AMR PDE solvers - π v1.x (2026-2027): 60% complete - Core backtesting and factor analysis delivered
Recently Added Features: - π RFQ (Request for Quote) workflow with multi-dealer auctions and best execution tracking - π Convention-based trade generation system for market-standard trades (USD, EUR, GBP, JPY, CHF) - π Confirmation matching and settlement instruction generation - π FRTB Internal Models Approach (IMA) with ES 97.5%, P&L attribution test, backtesting framework - π Default Risk Charge (DRC) and Residual Risk Add-On (RRAO) - π Comprehensive backtesting framework with transaction cost modeling - π Factor analysis toolkit (PCA, Barra-style factor models, style attribution, factor timing) - π Adaptive Mesh Refinement (AMR) for PDE solvers - π Enterprise authentication stack (SSO, OAuth 2.0, MFA, LDAP integration)
Core Philosophy¶
1. JAX-First Architecture¶
Everything in Neutryx Core is built with JAX at its foundation, enabling:
- Just-In-Time (JIT) Compilation: 10-100x performance improvements through XLA optimization
- Automatic Differentiation (AD): Accurate Greeks without finite differences
- Hardware Acceleration: Seamless GPU/TPU scaling with minimal code changes
- Functional Programming: Pure functions enabling reproducibility and parallelization
- Composability: Build complex workflows from simple, reusable components
2. Production-First Design¶
Neutryx Core is designed for production use from day one:
- Type Safety: Comprehensive type hints throughout the codebase
- Testing: 500+ tests covering unit, integration, regression, and performance scenarios
- Configuration: YAML-based configuration for reproducible workflows
- Observability: Built-in Prometheus metrics, Grafana dashboards, and distributed tracing with Jaeger
- APIs: REST and gRPC interfaces for enterprise integration
- Documentation: Extensive documentation with examples and tutorials
3. Enterprise-Grade Quality¶
Built for mission-critical financial systems:
- Security: Static analysis with bandit, dependency scanning with Dependabot, SSO/OAuth 2.0/MFA/LDAP
- Performance: Profiling, benchmarking, optimization tooling, AMR for PDEs
- Scalability: Distributed computing with multi-GPU/TPU, Kubernetes deployment support, auto-scaling
- Compliance: Audit logging, RBAC, multi-tenancy controls, FRTB/SA-CCR/SIMM regulatory reporting
- Monitoring: Real-time performance tracking, alerting, comprehensive observability stack
Architecture¶
High-Level Overview¶
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Client Layer β
β REST API β gRPC β Python SDK β CLI β Jupyter Notebooks β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Application Layer β
β ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββββ β
β β Pricing β β Risk β β XVA β β Calibr. β β
β β Services β β Services β β Services β β Services β β
β ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Domain Layer β
β βββββββββββ βββββββββββ βββββββββββ βββββββββββ β
β β Models β βProducts β βPortfolioβ β Market β β
β β(BS,Hest)β β(Options)β βAnalyticsβ β Data β β
β βββββββββββ βββββββββββ βββββββββββ βββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Computation Layer β
β ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββββ β
β β JAX β β PDE β β Monte β β FFT β β
β β Core β β Solvers β β Carlo β β Methods β β
β ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Infrastructure Layer β
β ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββββ β
β βObservab. β β Storage β β Security β β Config β β
β β(Prom/Jae)β β(TSDB/PG) β β(RBAC/Aud)β β Mgmt β β
β ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Key Components¶
1. Core Engine (neutryx.core)¶
The computational heart of Neutryx Core:
- Monte Carlo Engine: High-performance simulation with variance reduction
- PDE Solvers: Crank-Nicolson and finite difference methods
- Numerical Methods: FFT, COS method, tree methods
- Automatic Differentiation: Adjoint and pathwise Greeks
- Random Number Generation: Reproducible PRNG with seeding
Key Features: - JIT compilation for repeated calculations - Mixed-precision support (float32/float64) - Vectorized operations for batch pricing - GPU/TPU acceleration via pmap/pjit
2. Models (neutryx.models)¶
Comprehensive model library:
- Black-Scholes: Analytic pricing and Greeks
- Heston: Stochastic volatility with FFT/MC pricing
- SABR: Stochastic Alpha Beta Rho model
- Jump Diffusion: Merton, Kou, Variance Gamma
- Rough Volatility: rBergomi and rough Heston
- Local Volatility: Dupire PDE, Stochastic Local Volatility (SLV)
- Interest Rate Models: Hull-White (1F/2F), Black-Karasinski, Cheyette, LGM, LMM/BGM, HJM, CIR, Vasicek
- FX Models: Garman-Kohlhagen, FX Heston, FX SABR, FX Bates, two-factor FX
- Credit Models: Gaussian copula, Student-t copula, hazard rate (Jarrow-Turnbull, Duffie-Singleton), structural (Merton, Black-Cox)
Design Principles: - Unified interface for all models - Calibration-ready with differentiable pricing - Parameter validation and constraints - Model comparison and selection tools
3. Products (neutryx.products)¶
Multi-asset class product coverage:
Equity Derivatives: - Vanilla options (European, American) - Exotics (Asian, Barrier, Lookback) - Forwards, dividend swaps, variance swaps - Total return swaps, equity-linked notes
Fixed Income & Interest Rate Derivatives: - Bonds (zero-coupon, coupon, FRN, inflation-linked) - Interest rate swaps (IRS, OIS, cross-currency, basis swaps) - Caps, floors, collars, FRAs - Swaptions (European, American, Bermudan with LSM) - CMS products (caplets/floorlets, spread options with convexity adjustments) - Exotic IR: Range accruals, TARN, snowball notes, autocallable notes, ratchet caps/floors
Credit Derivatives: - Single-name: CDS (ISDA model), CDS options, CLNs, recovery locks/swaps - Portfolio: CDX/iTraxx indices, index tranches, bespoke CDOs, nth-to-default baskets - Structural models (Merton, Black-Cox) and reduced-form models
Commodities: - Forwards with storage and convenience yield - Options, swaps, spread options
Volatility Products: - VIX futures and options - Variance swaps, corridor swaps - Gamma swaps
Design Principles: - Consistent pricing interface - Full Greek calculation support - Lifecycle event handling - Corporate action support
4. Risk Management (neutryx.risk)¶
Comprehensive risk analytics:
VaR Methodologies: - Historical simulation VaR - Monte Carlo VaR - Parametric VaR with Cornish-Fisher - Expected Shortfall (ES/CVaR) - Incremental VaR (IVaR) - Component VaR
Position Limits: - Notional limits by product/desk - VaR limits with utilization tracking - Concentration limits (single-name, sector) - Issuer exposure limits with credit ratings
Pre-Trade Controls: - Real-time limit checking - What-if scenario analysis - Hierarchical breach thresholds (hard/soft/warning) - Approval workflows
Stress Testing: - 25+ historical scenario analysis (2008 GFC, COVID-19, etc.) - Hypothetical scenarios - Reverse stress testing - Concentration risk metrics
Greeks & P&L Attribution: - Full Greek suite: DV01, CS01, vega bucketing, FX delta/gamma - Higher-order Greeks: vanna, volga, charm, veta, speed, zomma, color - P&L attribution: Daily explain (carry, delta, gamma, vega, theta, rho) - Risk factor attribution and FRTB P&L test
5. XVA Framework (neutryx.valuations)¶
Enterprise XVA calculations:
- CVA: Credit Valuation Adjustment
- DVA: Debit Valuation Adjustment
- FVA: Funding Valuation Adjustment
- MVA: Margin Valuation Adjustment
- KVA: Capital Valuation Adjustment
Features: - Exposure profile calculation (EE, PFE, EPE) - Wrong-way risk (WWR) modeling - Collateral simulation and optimization - Multi-netting set aggregation - P&L attribution and XVA sensitivities - Collateral transformation strategies - SA-CCR and FRTB counterparty risk calculations
6. Market Data (neutryx.market)¶
Real-time market data infrastructure:
Vendor Integration: - Bloomberg Terminal/API - Refinitiv Data Platform (RDP) - Refinitiv Eikon Desktop
Storage Solutions: - PostgreSQL: Time-series optimized - MongoDB: Flexible document storage - TimescaleDB: Hypertables with 90% compression
Data Quality: - Price range validation - Spread validation - Volume spike detection - Time-series consistency checks - Real-time quality scoring
Feed Management: - Real-time orchestration - Automatic failover - Buffering and rate limiting - Subscription management
7. Calibration (neutryx.calibration)¶
Advanced calibration framework:
Methods: - Differentiable optimization (Adam, LBFGS, optax optimizers) - Joint calibration across instruments and asset classes - Regularization (Tikhonov, L1/L2, smoothness penalties) - Constraint handling (bounds, arbitrage-free, linear/nonlinear constraints) - Bayesian model averaging for robust predictions
Model Selection: - Information criteria (AIC, BIC, AICc, HQIC) - Cross-validation (k-fold, time-series) - Sensitivity analysis (local, global Sobol) - Identifiability analysis
Diagnostics: - Convergence monitoring - Parameter uncertainty - Residual analysis - Model comparison
8. Infrastructure (neutryx.infrastructure)¶
Enterprise infrastructure components:
Observability: - Prometheus: Custom business metrics - Grafana: Pre-built dashboards - OpenTelemetry: Distributed tracing with Jaeger - Profiling: Automatic performance profiling
Governance: - Multi-tenancy: Desk/entity isolation with data residency - RBAC: Fine-grained role-based access control - SSO/OAuth 2.0/MFA/LDAP: Enterprise authentication - Audit logging: Immutable audit trail with user action tracking - Compliance: Comprehensive regulatory reporting (FRTB, SA-CCR, SIMM, EMIR, MiFID II, Basel III/IV)
Workflows: - Task orchestration - Batch processing - Scheduled jobs - Event-driven workflows
Data Flow¶
Pricing Workflow¶
Market Data β Model Calibration β Product Pricing β Risk Calculation
β β β β
ββ Validation ββ Diagnostics ββ Greeks ββ VaR
ββ Storage ββ Selection ββ Scenarios ββ Limits
ββ Quality ββ Constraints ββ Attribution ββ Reporting
Real-Time Risk Workflow¶
Trade Request β Pre-Trade Check β Limit Validation β Risk Update
β β β β
ββ Pricing ββ VaR Impact ββ Hard Limits ββ Dashboard
ββ Greeks ββ Concentration ββ Soft Limits ββ Alerts
ββ Scenarios ββ Issuer Exp. ββ Approvals ββ Reports
Technology Stack¶
Core Technologies¶
- Language: Python 3.10+
- Computation: JAX 0.4.26+ (XLA, JIT, AD)
- Numerical: NumPy, SciPy
- Data: Pandas, Polars
- APIs: FastAPI, gRPC
- Configuration: YAML, Pydantic
Infrastructure¶
- Databases: PostgreSQL, MongoDB, TimescaleDB
- Caching: Redis (planned)
- Messaging: RabbitMQ (planned)
- Monitoring: Prometheus, Grafana, Jaeger
- Deployment: Docker, Kubernetes (planned)
Development Tools¶
- Testing: pytest, hypothesis
- Linting: ruff, mypy
- Security: bandit, pip-audit
- Documentation: MkDocs, Sphinx
- CI/CD: GitHub Actions
Performance Characteristics¶
Benchmarks¶
Black-Scholes Pricing (1M options): - NumPy: ~500ms - JAX (CPU): ~50ms (10x faster) - JAX (GPU): ~5ms (100x faster)
Monte Carlo Simulation (100K paths, 252 steps): - NumPy: ~2000ms - JAX (CPU): ~200ms (10x faster) - JAX (GPU): ~20ms (100x faster)
Heston Calibration (25 data points): - scipy.optimize: ~5000ms - JAX + Adam: ~500ms (10x faster)
Scalability¶
- Batch Pricing: Linear scaling up to GPU memory limits
- Distributed: Multi-GPU support via pmap/pjit
- Cloud: Auto-scaling for compute-intensive workloads
Use Cases¶
1. Front Office Trading¶
- Real-time option pricing and Greeks
- Scenario analysis and stress testing
- Pre-trade analytics and limit checking
- Structured product design
2. Risk Management¶
- Daily VaR calculation across books
- Position limit monitoring
- Stress testing and scenario analysis
- Regulatory risk reporting
3. Model Validation¶
- Model calibration and backtesting
- Parameter sensitivity analysis
- Model comparison and selection
- Identifiability testing
4. Regulatory Compliance¶
- FRTB Standardized Approach (SA): Delta, vega, curvature charges
- FRTB Internal Models Approach (IMA): ES 97.5%, P&L attribution, backtesting, NMRF
- FRTB Default Risk Charge (DRC) and Residual Risk Add-On (RRAO)
- SA-CCR: Replacement cost, PFE add-on, hedging set optimization
- ISDA SIMM 2.6: Initial margin calculation with concentration risk
- UMR: Uncleared margin rules compliance
- Regulatory reporting: EMIR, Dodd-Frank, MiFID II/MiFIR, Basel III/IV
- Accounting standards: IFRS 9/13 compliance
5. Research & Development¶
- New model development and testing
- Pricing methodology research
- Benchmark comparison
- Academic research
Extensibility¶
Custom Models¶
Extend the model framework:
from neutryx.models.base import Model
import jax.numpy as jnp
class MyCustomModel(Model):
def __init__(self, params):
self.params = params
def price(self, spot, strike, maturity):
# Custom pricing logic
return price
def calibrate(self, market_data):
# Custom calibration logic
return calibrated_params
Custom Products¶
Define new products:
from neutryx.products.base import Product
class MyExotic(Product):
def payoff(self, paths):
# Define exotic payoff
return payoff
def price(self, model, market):
# Pricing logic
return price
Plugin Architecture¶
Extend functionality with plugins:
# plugins/my_plugin.py
from neutryx.plugins import Plugin
class MyPlugin(Plugin):
def initialize(self):
# Setup logic
pass
def execute(self, context):
# Plugin logic
pass
Deployment Options¶
1. Standalone Python¶
pip install neutryx-core
python my_pricing_script.py
2. REST API¶
uvicorn neutryx.api.rest:app --host 0.0.0.0 --port 8000
3. gRPC Service¶
python -m neutryx.api.grpc.server
4. Docker Container¶
FROM python:3.10
COPY . /app
RUN pip install -e /app
CMD ["uvicorn", "neutryx.api.rest:app", "--host", "0.0.0.0"]
5. Kubernetes¶
apiVersion: apps/v1
kind: Deployment
metadata:
name: neutryx-api
spec:
replicas: 3
template:
spec:
containers:
- name: neutryx
image: neutryx/core:latest
ports:
- containerPort: 8000
Roadmap Summary¶
Completed: - β v0.1.0 (Jan 2025): Foundation with core pricing, multi-asset products, observability, 370+ tests - β v0.2.0 (Q2-Q3 2025): Advanced calibration (Bayesian averaging, joint calibration, regularization) - β v0.4.0 (Q1 2026): Full regulatory compliance (FRTB SA/IMA, DRC/RRAO, SA-CCR, SIMM 2.6, UMR, IFRS 9/13) - β v1.0.0 (Q2 2026): Production enterprise platform (SSO/OAuth/MFA/LDAP, Kubernetes, collateral management, AMR, 500+ tests) - β v1.0.1-v1.0.3 (Q3 2026): Backtesting framework, factor analysis, portfolio optimization (mean-variance, risk parity, CVaR)
In Progress: - π v0.3.0 (70% complete): Trading infrastructure (CCP integration, settlement systems) - π v1.x (60% complete): Advanced analytics (Black-Litterman, reinforcement learning for portfolio allocation)
See roadmap.md for detailed milestones.
Getting Started¶
Ready to start? Check out these resources:
- Getting Started Guide - Installation and first examples
- Tutorials - Hands-on learning
- API Reference - Complete API documentation
- Architecture Guide - Deep dive into system design
Community and Support¶
- Documentation: https://neutryx-lab.github.io/neutryx-core
- GitHub: https://github.com/neutryx-lab/neutryx-core
- Issues: https://github.com/neutryx-lab/neutryx-core/issues
- Discussions: GitHub Discussions
License¶
Neutryx Core is released under the MIT License. See LICENSE for details.