IIM-A Project for Structured Products Pricing
QuantX is a comprehensive pricing engine for structured financial products, featuring:
- Advanced Monte Carlo simulation pricing
- Black-Scholes model implementation
- Interactive React-based UI
- Real-time pricing calculations
Automatically callable notes that redeem early if the underlying asset price exceeds a barrier on observation dates. Investors receive principal plus accrued coupon upon early redemption.
High-coupon products that expose investors to downside risk. If the barrier is breached, investors receive physical delivery of the underlying asset instead of principal.
Path-dependent options that are activated (knock-in) or deactivated (knock-out) when the underlying price crosses a barrier level.
- Framework: FastAPI for high-performance API endpoints
- Pricing Engine: Monte Carlo simulation with Black-Scholes models
- Libraries: NumPy for numerical computations, SciPy for statistical functions
- Framework: React with TypeScript
- Charts: Recharts for payoff diagrams
- API Client: Axios for backend communication
cd backend
# Create virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Run the server
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reloadOr use the provided script:
cd backend
chmod +x run.sh
./run.shThe API will be available at http://localhost:8000
- API Documentation:
http://localhost:8000/docs - OpenAPI Spec:
http://localhost:8000/openapi.json
cd frontend
# Install dependencies
npm install
# Start the development server
npm startThe UI will be available at http://localhost:3000
Price an autocallable note
Request Body:
{
"spot_price": 100,
"strike_price": 100,
"barrier_level": 100,
"downside_barrier": 70,
"coupon_rate": 10,
"observation_dates": [0.5, 1.0, 1.5, 2.0],
"maturity": 2.0,
"risk_free_rate": 5,
"volatility": 25,
"simulations": 10000
}Price a reverse convertible note
Request Body:
{
"spot_price": 100,
"strike_price": 100,
"barrier_level": 70,
"coupon_rate": 15,
"maturity": 1.0,
"risk_free_rate": 5,
"volatility": 25,
"simulations": 10000
}Price a barrier option
Request Body:
{
"spot_price": 100,
"strike_price": 100,
"barrier_level": 110,
"barrier_type": "up_and_out",
"option_type": "call",
"maturity": 1.0,
"risk_free_rate": 5,
"volatility": 25,
"dividend_yield": 0,
"simulations": 10000
}- Monte Carlo Simulation: High-accuracy pricing using configurable number of simulations
- Confidence Intervals: 95% confidence intervals for all pricing results
- Payoff Diagrams: Visual representation of product payoffs
- Interactive UI: User-friendly forms with real-time validation
- Responsive Design: Works on desktop and mobile devices
Backend:
- Python 3.8+
- FastAPI
- NumPy
- SciPy
- Pydantic
Frontend:
- React 18
- TypeScript
- Recharts
- Axios
# Backend tests (if available)
cd backend
pytest
# Frontend tests
cd frontend
npm testBackend:
cd backend
pip install -r requirements.txt
uvicorn app.main:app --host 0.0.0.0 --port 8000Frontend:
cd frontend
npm run build
# Serve the build folder with any static file serverIIM-A Academic Project
IIM-A Students - Structured Products Pricing Team