Skip to content

ItoWindsor/DerivativesPricingEngine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

147 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Derivatives Pricing Engine

C++ Python Docker

Description

This is a toy but production-grade project designed to dive deep into modern C++ through the lens of quantitative finance.

The goal is to create a modular and extensible derivatives pricing library, with support for multiple instruments, models, and pricing engines using modern design patterns like Composition, Dependency Injection, and the Factory Pattern.

🧠 Goals

  • Learn C++ by building something non-trivial
  • Get comfortable with CMake, Conan, and numerical programming in C++
  • Have fun and build a small usable library!

🛠️ Project Structure

DerivativesPricingEngine/
├── backend/                                 # C++ backend for pricing engine
│   ├── build.sh                             # Build script
│   ├── CMakeLists.txt                       # CMake build configuration
│   ├── CMakeUserPresets.json                # CMake presets
│   ├── compile_commands.json -> build/debug/compile_commands.json
│   ├── conanfile.txt                        # Conan dependencies
│   ├── data/                                # Static data inputs
│   │   ├── equity/
│   │   └── interest_rate_curves/
│   ├── include/                             # C++ headers
│   │   ├── core/                            # Core abstractions and interfaces
│   │   ├── curves/                          # Interest rate curves
│   │   ├── engines/                         # Pricing engine implementations
│   │   ├── enums/                           # Enum definitions
│   │   ├── instruments/                     # Financial instruments
│   │   ├── models/                          # Underlying stochastic models
│   │   ├── rest_api/                        # REST API interface
│   │   ├── structs/                         # Shared data structures
│   │   └── utils/                           # Utility functions and helpers
│   ├── main.cpp                             
│   ├── server_main.cpp                      # REST API server (used for the backend) 
│   ├── src/                                 # Source code implementations
│   │   ├── core/
│   │   ├── curves/
│   │   ├── engines/
│   │   ├── instruments/
│   │   ├── models/
│   │   ├── rest_api/
│   │   ├── structs/
│   │   └── utils/
│   └── tests/                               # Unit and integration tests
│       ├── test_black_scholes.cpp
│       ├── test_black_scholes_analytical.cpp
│       ├── test_black_scholes_binomial_tree.cpp
│       ├── test_black_scholes_monte_carlo.cpp
│       ├── test_day_count_convention.cpp
│       ├── test_interest_rate_curve.cpp
│       ├── test_pricing_bond.cpp
│       └── test_simulation.cpp
├── docker/                                  # Docker configuration
│   ├── backend.Dockerfile
│   └── frontend.Dockerfile
├── docker-compose.yml                       # Docker orchestration
├── frontend/                                # Python Dash frontend
│   ├── app.py                               # Entry point for Dash app
│   ├── assets/                              # Static assets (e.g., favicon)
│   │   └── favicon.ico
│   ├── requirements.txt                     # Python dependencies
│   └── src/                                 # Frontend source modules
│       ├── __init__.py
│       ├── callbacks.py
│       ├── enums/
│       └── utils.py
└── ReadME.md                                # Project documentation

🚀 Getting Started

  1. Clone the repository:

    git clone https://github.com/ItoWindsor/DerivativesPricingEngine.git
    cd DerivativesPricingEngine
  2. Build the project:

    docker-compose --build
  3. Run the project:

    docker-compose up
  4. Access the dashboard:
    Open your browser and go to: http://localhost:8050


About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors