Production-grade pricer for Autocallable structured products with Monte Carlo simulation, Brownian bridge barrier monitoring, and comprehensive Greeks calculation.
- Multi-Asset Pricing: Worst-of autocalls with correlated underlyings
- Advanced Barriers: Continuous knock-in monitoring via Brownian bridge
- Comprehensive Greeks: Delta, Vega, Rho with Common Random Numbers
- Flexible Vol Models: Flat, piecewise constant, and local stochastic volatility
- Production Ready: Type-safe, tested, and optimized for performance
- Python 3.11+
- Node.js 18+ (for UI)
# 1. Install Python dependencies
pip install -r requirements.txt
pip install -e ./backend
# 2. Install UI dependencies
cd ui && npm install# Terminal 1: Start API server (from repo root)
uvicorn api.main:app --reload --port 8000
# Terminal 2: Start UI
cd ui && npm run devThen open:
- UI: http://localhost:3000
- API Docs: http://localhost:8000/docs
- Development Setup - Detailed installation and configuration
- Architecture Overview - System design and components
- API Documentation - Endpoint reference
- All Documentation - Complete documentation index
cd backend
pytest tests/ -v --cov=pricerpricer/
├── backend/ # Python pricing library
│ ├── src/pricer/ # Core modules (engines, pricers, risk)
│ ├── tests/ # Test suite
│ └── examples/ # CLI examples
├── api/ # FastAPI REST API
│ └── main.py # API endpoints
├── ui/ # Next.js web interface
│ └── src/ # React components
└── docs/ # Documentation
# Run tests
make test
# Type checking
make lint
# Format code
make formatSee Development Setup for detailed instructions.
| Method | Endpoint | Description |
|---|---|---|
| GET | /health |
Health check |
| GET | /schema |
Example term sheet |
| POST | /price |
Price a product |
| POST | /risk |
Risk analysis with Greeks |
| POST | /vanilla/price |
Price vanilla options |
| POST | /vanilla/implied-vol |
Implied volatility |
| GET | /market-data |
Fetch market data |
- API: Google Cloud Run (
us-central1). Deploy with:gcloud run deploy pricer-api \ --source . \ --dockerfile api/Dockerfile \ --region us-central1 \ --allow-unauthenticated - UI: Vercel (auto-deploys on push to
main, root directory set toui) - Production: https://pricer-six.vercel.app
MIT
Contributions welcome! Please see Development Setup for getting started.