Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/docs-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ jobs:
run: |
mkdir -p docs/html/artifacts
cp -R docs/artifacts/. docs/html/artifacts/
mkdir -p docs/html/docs/images
cp -R docs/images/. docs/html/docs/images/
- name: Create friendly doc aliases
run: |
declare -A alias_sources=(
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## v0.4.0

- feat(portfolio,risk): add a public C++ vectorized vanilla portfolio engine and installed Python `bs_portfolio_risk` API with quantity-weighted price, value, delta, gamma, vega, theta, and rho surfaces.
- feat(stress): add `bs_portfolio_scenarios` for deterministic multi-factor exact repricing with spot, volatility, rate, dividend, and elapsed-time shocks; aggregate-only mode avoids the potentially large scenario-by-position allocation.
- perf(portfolio): fuse shared Black-Scholes analytic terms across price and six Greeks; the final installed-wheel Apple M3 Pro/Python 3.12 benchmark measures 20.18x risk-batch and 27.92x aggregate scenario speedups versus existing scalar binding orchestration.
- test(portfolio): add native validation/identity coverage plus independent QuantLib 1.42.1 parity across mixed call/put, carry, moneyness, volatility, maturity, long/short, and scenario cases, with deterministic concurrent replay.
- build(release): prepare the 0.4.0 wheel/source distribution and retain the installed-wheel contract, release tag gates, source distribution checks, deterministic manifest, and explicit rule that PyPI and TestPyPI availability are not asserted.
- docs(release): make portfolio risk and exact stress the README and Pages lead, publish the frozen evidence hub and benchmark visualization, and retain the broader v0.3.7 numerical and packaging story.

## Unreleased

## v0.3.7
Expand Down
10 changes: 9 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.16)
project(quant_pricer_cpp VERSION 0.3.7 LANGUAGES CXX)
project(quant_pricer_cpp VERSION 0.4.0 LANGUAGES CXX)

set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_CXX_STANDARD 20)
Expand Down Expand Up @@ -108,6 +108,7 @@ add_library(quant_pricer
src/lookback.cpp
src/heston.cpp
src/risk.cpp
src/portfolio.cpp
src/multi.cpp
)

Expand Down Expand Up @@ -150,6 +151,7 @@ add_executable(unit_tests
tests/test_multi.cpp
tests/test_barrier_mc_regression.cpp
tests/test_risk.cpp
tests/test_portfolio.cpp
tests/test_heston.cpp
tests/test_rng_repro.cpp)
target_sources(unit_tests PRIVATE tests/test_lookback.cpp)
Expand Down Expand Up @@ -306,6 +308,12 @@ endif()

if(QUANT_ENABLE_PYBIND)
add_subdirectory(python)
add_test(
NAME python_portfolio_risk_fast
COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tests/test_python_portfolio_risk_fast.py
--module-dir $<TARGET_FILE_DIR:pyquant_pricer>
)
set_tests_properties(python_portfolio_risk_fast PROPERTIES LABELS "FAST")
endif()

# Install/export package metadata
Expand Down
3 changes: 2 additions & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ OUTPUT_DIRECTORY = docs
GENERATE_HTML = YES
GENERATE_LATEX = NO
RECURSIVE = YES
INPUT = include src README.md docs/api docs/Results.md docs/WRDS_Results.md
INPUT = include src README.md docs/api docs/product docs/releases docs/Results.md docs/WRDS_Results.md
IMAGE_PATH = docs/images
FILE_PATTERNS = *.hpp *.cpp *.md
EXTRACT_ALL = YES
QUIET = YES
Expand Down
16 changes: 16 additions & 0 deletions PROGRESS.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,19 @@ Added explicit `results_commit_sha` + `manifest_git_sha` fields to `project_stat

### Done
- Ticket-99: rebuilt the public README around the supported C++20/Python pricing surface, install/use examples, architecture, frozen validation snapshot, reproducibility, and explicit release limitations. Added a bounded evidence note for the verified Heston calibration-grid candidate without advertising it as v0.3.2 or PyPI availability. Run log: `docs/agent_runs/20260714_220933_ticket-99_portfolio-presentation/`.

## 2026-07-15 Vectorized Portfolio Risk and Stress v0.4.0

Selected the largest disjoint product gap after reviewing the consumed-model
ledger: cross-position risk rather than another SSVI/Heston/PDE/MC experiment.
Added public C++ portfolio types and installed Python `bs_portfolio_risk` and
`bs_portfolio_scenarios` APIs, exact five-factor repricing, aggregate-only
memory control, native and independent QuantLib tests, examples, v0.4.0 release
surfaces, and deterministic performance/resource receipts. The first unfused
risk batch missed its frozen 10x gate at 9.94x; fused shared analytic terms
passed without relaxing the gate. Final installed-wheel evidence: 20.18x risk,
27.92x scenario, 20.25M positions/s, 32.13M cells/s; worst independent price,
Greek, and portfolio-scenario errors were 3.91e-14, 3.40e-12, and 2.66e-13.
ASan/UBSan and installed-wheel checks passed. Full FAST: 89 passed, one existing
skip, and only the two pre-existing locked SSVI hedge failures caused by their
intentional CMake hash boundary. Implementation commit: `60c4e9da`.
Loading
Loading