23a28c67763bfacb1995fc7d72c7adbf2a9ae1f9
Some checks failed
C++ CI / build (push) Has been cancelled
Track the top-level __init__.py so local package imports remain consistent with the current project layout. Made-with: Cursor
option_pricing
C++/Python quantitative finance engine for option pricing, implied-volatility analysis, and market-data ingestion.
What is included
cpp/: core C++ pricing library (Monte Carlo + Black-Scholes closed form), DB ingestion hooks, and pybind bindings.qengine/: Python package exposing the native extension (import qengine).src/ImpliedVolatility/: SVI calibration and implied-volatility tooling.src/data/: data ingestion, SQL schema, and analytics helpers.tests/: C++ unit tests (GoogleTest).scripts/: operational scripts, including PostgreSQL setup.docs/: Doxygen configuration and generated API docs (ignored in git for publication).
Quickstart
1) Clone and create a Python environment
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -e .
pip install pandas yfinance sqlalchemy psycopg2-binary matplotlib scipy
2) Configure environment variables
cp .env.example .env
Then edit .env with your local database credentials.
3) Create database and schema
Use the idempotent setup script:
source .env
python scripts/setup_postgres.py
This script creates/updates:
- database role (
DB_USER) - database (
DB_NAME) - tables/indexes from
src/data/sql/schema.sql
4) Build C++ extension and run tests
cmake -S . -B build
cmake --build build -j
ctest --test-dir build --output-on-failure
5) Run Yahoo options ingestion
source .env
python src/data/ingestion/ingest_yahoo_options.py
PIPELINE_SYMBOLS in .env controls which symbols are ingested (comma-separated, e.g. SPY,AAPL,QQQ).
Security and publication notes
- No credentials are stored in source code.
.envfiles are git-ignored; only.env.exampleis committed.- Before publishing, rotate any credentials that were ever committed in the past.
- Prefer least-privilege DB users for runtime ingestion jobs.
Generating C++ API docs
cmake --build build --target docs
Generated output goes to docs/html/ and is ignored in version control.
Languages
Python
67.8%
C++
28.9%
CMake
3.3%