quantflow 0.8.0__tar.gz → 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {quantflow-0.8.0 → quantflow-1.0.0}/.dockerignore +2 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/.github/copilot-instructions.md +38 -13
- quantflow-1.0.0/.github/instructions/bibliography.instructions.md +16 -0
- quantflow-1.0.0/.github/instructions/observable.instructions.md +49 -0
- quantflow-1.0.0/.github/instructions/release.instructions.md +48 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/.github/workflows/build.yml +8 -22
- {quantflow-0.8.0 → quantflow-1.0.0}/.github/workflows/docker-multiarch.yml +17 -0
- quantflow-1.0.0/.github/workflows/examples.yml +37 -0
- quantflow-1.0.0/.github/workflows/main.yml +27 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/.github/workflows/release.yml +10 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/.gitignore +5 -0
- quantflow-1.0.0/CLAUDE.md +7 -0
- quantflow-1.0.0/CODE_OF_CONDUCT.md +85 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/Makefile +16 -7
- quantflow-1.0.0/PKG-INFO +84 -0
- quantflow-1.0.0/app/__main__.py +88 -0
- quantflow-1.0.0/app/api/cointegration.py +78 -0
- quantflow-1.0.0/app/api/deps.py +116 -0
- quantflow-1.0.0/app/api/docs/__init__.py +7 -0
- quantflow-1.0.0/app/api/docs/cointegration.md +9 -0
- quantflow-1.0.0/app/api/docs/double_exponential_sampling.md +11 -0
- quantflow-1.0.0/app/api/docs/gaussian_sampling.md +12 -0
- quantflow-1.0.0/app/api/docs/heston_vol_surface.md +15 -0
- quantflow-1.0.0/app/api/docs/hurst_vasicek.md +9 -0
- quantflow-1.0.0/app/api/docs/hurst_wiener.md +15 -0
- quantflow-1.0.0/app/api/docs/poisson_sampling.md +10 -0
- quantflow-1.0.0/app/api/docs/supersmoother.md +12 -0
- quantflow-1.0.0/app/api/docs/volatility_surface.md +21 -0
- quantflow-1.0.0/app/api/docs/yield_curve.md +21 -0
- quantflow-1.0.0/app/api/heston.py +85 -0
- quantflow-1.0.0/app/api/hurst.py +176 -0
- quantflow-1.0.0/app/api/rates.py +65 -0
- quantflow-1.0.0/app/api/sampling.py +132 -0
- quantflow-1.0.0/app/api/smoother.py +54 -0
- quantflow-1.0.0/app/api/status.py +13 -0
- quantflow-1.0.0/app/api/volatility.py +138 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/app/scripts/heston_divfm_fit.py +3 -3
- {quantflow-0.8.0 → quantflow-1.0.0}/app/utils/paths.py +2 -1
- quantflow-1.0.0/app/utils/static.py +15 -0
- quantflow-1.0.0/dev/api-serve +15 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/dev/blocks/quantflow.yaml +1 -0
- quantflow-1.0.0/dev/docs-serve +16 -0
- quantflow-1.0.0/dev/frontend-serve +8 -0
- quantflow-1.0.0/dev/install +3 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/dev/lint +1 -1
- quantflow-1.0.0/dev/mkdocs-serve +12 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/dev/quantflow.dockerfile +10 -5
- quantflow-1.0.0/dev/serve-info +10 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/api/data/index.md +1 -0
- quantflow-1.0.0/docs/api/data/yahoo.md +21 -0
- quantflow-1.0.0/docs/api/dists/distributions.md +9 -0
- quantflow-1.0.0/docs/api/dists/distributions1d.md +9 -0
- quantflow-1.0.0/docs/api/dists/index.md +9 -0
- quantflow-1.0.0/docs/api/dists/marginal1d.md +9 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/api/index.md +23 -3
- quantflow-1.0.0/docs/api/options/black.md +24 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/api/options/calibration.md +2 -0
- quantflow-1.0.0/docs/api/options/moneyness.md +10 -0
- quantflow-1.0.0/docs/api/options/parity.md +6 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/api/options/vol_surface.md +6 -6
- quantflow-1.0.0/docs/api/rates/calibration.md +5 -0
- quantflow-1.0.0/docs/api/rates/cir.md +5 -0
- quantflow-1.0.0/docs/api/rates/index.md +23 -0
- quantflow-1.0.0/docs/api/rates/interpolated.md +17 -0
- quantflow-1.0.0/docs/api/rates/nelson_siegel.md +5 -0
- quantflow-1.0.0/docs/api/rates/vasicek.md +10 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/api/rates/yield_curve.md +2 -1
- quantflow-1.0.0/docs/api/ta/ewma.md +4 -0
- quantflow-1.0.0/docs/api/ta/index.md +3 -0
- quantflow-1.0.0/docs/api/ta/kalman.md +24 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/api/ta/supersmoother.md +1 -1
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/api/utils/index.md +0 -2
- quantflow-1.0.0/docs/api/utils/price.md +5 -0
- quantflow-1.0.0/docs/assets/logos/png/quantflow-github-social-1280x640.png +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/bib2md.py +7 -1
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/bibliography.md +12 -0
- quantflow-1.0.0/docs/contributing.md +48 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/examples/_utils.py +38 -0
- quantflow-0.8.0/docs/examples/volsurface.json → quantflow-1.0.0/docs/examples/fixtures/volsurface_btc.json +2654 -2851
- quantflow-1.0.0/docs/examples/fixtures/volsurface_eth.json +3916 -0
- quantflow-1.0.0/docs/examples/fixtures/yahoo_spx.json.gz +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/examples/heston_volatility_pricer.py +2 -2
- quantflow-1.0.0/docs/examples/index.md +32 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/examples/pricing_method_comparison.py +13 -13
- quantflow-1.0.0/docs/examples/rates_kalman.py +82 -0
- quantflow-1.0.0/docs/examples/spx_vol_surface.py +25 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/examples/vol_surface_bns2_calibration.py +9 -6
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/examples/vol_surface_bns_calibration.py +4 -3
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/examples/vol_surface_heston_calibration.py +3 -2
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/examples/vol_surface_hestonj_calibration.py +8 -5
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/examples/vol_surface_inputs.py +2 -1
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/examples/wiener_volatility_pricer.py +1 -1
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/glossary.md +127 -4
- quantflow-1.0.0/docs/index.md +47 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/references.bib +30 -0
- quantflow-1.0.0/docs/release-notes.md +235 -0
- quantflow-1.0.0/docs/theory/forwards.md +68 -0
- quantflow-1.0.0/docs/theory/kalman.md +329 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/theory/option_pricing.md +13 -6
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/tutorials/cir.md +1 -1
- quantflow-0.8.0/docs/tutorials/volatility_surface.md → quantflow-1.0.0/docs/tutorials/heston_calibration.md +4 -103
- quantflow-1.0.0/docs/tutorials/index.md +12 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/tutorials/option_pricing.md +1 -1
- quantflow-1.0.0/docs/tutorials/rates_kalman.md +111 -0
- quantflow-1.0.0/docs/tutorials/spx_vol_surface.md +31 -0
- quantflow-1.0.0/docs/tutorials/volatility_surface.md +131 -0
- quantflow-1.0.0/frontend/observablehq.config.js +51 -0
- quantflow-1.0.0/frontend/package-lock.json +5062 -0
- quantflow-1.0.0/frontend/package.json +18 -0
- quantflow-1.0.0/frontend/src/cointegration.md +82 -0
- quantflow-1.0.0/frontend/src/heston-vol-surface.md +102 -0
- quantflow-1.0.0/frontend/src/hurst.md +111 -0
- quantflow-1.0.0/frontend/src/index.md +18 -0
- quantflow-1.0.0/frontend/src/lib/api.ts +15 -0
- quantflow-1.0.0/frontend/src/lib/palette.ts +101 -0
- quantflow-1.0.0/frontend/src/sampling.md +158 -0
- quantflow-1.0.0/frontend/src/style.css +114 -0
- quantflow-1.0.0/frontend/src/supersmoother.md +81 -0
- quantflow-1.0.0/frontend/src/volatility-surface.md +212 -0
- quantflow-1.0.0/frontend/src/yield-curve.md +169 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/mkdocs.yml +23 -12
- {quantflow-0.8.0/app → quantflow-1.0.0/notebooks}/heston_divfm_fit.py +6 -6
- {quantflow-0.8.0 → quantflow-1.0.0}/pyproject.toml +60 -36
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/data/deribit.py +20 -29
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/data/fed.py +42 -30
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/data/fmp.py +22 -12
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/data/fred.py +7 -7
- quantflow-1.0.0/quantflow/data/yahoo.py +298 -0
- quantflow-1.0.0/quantflow/dists/__init__.py +24 -0
- quantflow-1.0.0/quantflow/dists/base.py +33 -0
- quantflow-0.8.0/quantflow/utils/distributions.py → quantflow-1.0.0/quantflow/dists/distributions1d.py +51 -26
- quantflow-0.8.0/quantflow/utils/marginal.py → quantflow-1.0.0/quantflow/dists/marginal1d.py +221 -52
- quantflow-1.0.0/quantflow/dists/mv_normal.py +32 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/options/bs.py +5 -4
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/options/calibration/base.py +106 -36
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/options/calibration/bns.py +2 -2
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/options/calibration/heston.py +4 -4
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/options/divfm/pricer.py +51 -36
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/options/divfm/trainer.py +2 -2
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/options/inputs.py +59 -43
- quantflow-1.0.0/quantflow/options/moneyness.py +84 -0
- quantflow-1.0.0/quantflow/options/parity.py +167 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/options/pricer.py +123 -142
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/options/strategies/__init__.py +2 -1
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/options/strategies/base.py +15 -29
- quantflow-1.0.0/quantflow/options/strategies/butterfly.py +87 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/options/strategies/calendar_spread.py +28 -21
- quantflow-1.0.0/quantflow/options/strategies/spread.py +92 -0
- quantflow-1.0.0/quantflow/options/strategies/straddle.py +46 -0
- quantflow-1.0.0/quantflow/options/strategies/strangle.py +55 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/options/surface.py +531 -497
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/options/svi.py +1 -1
- quantflow-1.0.0/quantflow/rates/__init__.py +51 -0
- quantflow-1.0.0/quantflow/rates/calibration.py +257 -0
- quantflow-1.0.0/quantflow/rates/cir.py +461 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/rates/interest_rate.py +9 -0
- quantflow-1.0.0/quantflow/rates/interpolated.py +214 -0
- quantflow-1.0.0/quantflow/rates/nelson_siegel.py +191 -0
- quantflow-1.0.0/quantflow/rates/no_discount.py +55 -0
- quantflow-1.0.0/quantflow/rates/options.py +179 -0
- quantflow-1.0.0/quantflow/rates/vasicek.py +349 -0
- quantflow-1.0.0/quantflow/rates/yield_curve.py +177 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/sp/base.py +16 -7
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/sp/bns.py +34 -14
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/sp/cir.py +49 -14
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/sp/heston.py +28 -15
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/sp/jump_diffusion.py +23 -6
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/sp/ou.py +27 -5
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/sp/poisson.py +3 -3
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/sp/wiener.py +17 -2
- quantflow-1.0.0/quantflow/ta/base.py +5 -0
- quantflow-1.0.0/quantflow/ta/estimator.py +35 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/ta/ewma.py +65 -33
- quantflow-1.0.0/quantflow/ta/kalman.py +588 -0
- quantflow-1.0.0/quantflow/ta/ohlc.py +119 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/ta/supersmoother.py +11 -11
- quantflow-1.0.0/quantflow/utils/__init__.py +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/utils/numbers.py +2 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/utils/plot.py +31 -5
- quantflow-1.0.0/quantflow/utils/price.py +46 -0
- quantflow-1.0.0/quantflow/utils/text.py +23 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/utils/types.py +6 -1
- quantflow-1.0.0/quantflow_tests/__init__.py +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow_tests/conftest.py +1 -1
- quantflow-1.0.0/quantflow_tests/test_app.py +270 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow_tests/test_cir.py +10 -0
- quantflow-1.0.0/quantflow_tests/test_cir_curve.py +171 -0
- quantflow-1.0.0/quantflow_tests/test_data.py +100 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow_tests/test_data_deribit.py +7 -14
- quantflow-1.0.0/quantflow_tests/test_data_yahoo.py +82 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow_tests/test_disable_outliers.py +10 -8
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow_tests/test_distributions.py +1 -1
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow_tests/test_divfm.py +95 -27
- quantflow-1.0.0/quantflow_tests/test_fmp_unit.py +75 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow_tests/test_heston.py +1 -1
- quantflow-1.0.0/quantflow_tests/test_heston_calibration.py +95 -0
- quantflow-1.0.0/quantflow_tests/test_interpolated_curve.py +262 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow_tests/test_jump_diffusion.py +1 -1
- quantflow-1.0.0/quantflow_tests/test_nelson_siegel.py +190 -0
- quantflow-1.0.0/quantflow_tests/test_non_inverse_surface.py +101 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow_tests/test_ohlc.py +4 -4
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow_tests/test_options.py +43 -15
- quantflow-1.0.0/quantflow_tests/test_options_pricer.py +118 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow_tests/test_ou.py +1 -1
- quantflow-1.0.0/quantflow_tests/test_parity.py +83 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow_tests/test_poisson.py +1 -1
- quantflow-1.0.0/quantflow_tests/test_rates.py +89 -0
- quantflow-1.0.0/quantflow_tests/test_rates_options.py +97 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow_tests/test_strategies.py +6 -4
- quantflow-1.0.0/quantflow_tests/test_surface_calibration.py +130 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow_tests/test_surface_methods.py +1 -1
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow_tests/test_svi.py +15 -15
- quantflow-1.0.0/quantflow_tests/test_ta_filters.py +68 -0
- quantflow-1.0.0/quantflow_tests/test_ta_kalman.py +262 -0
- quantflow-1.0.0/quantflow_tests/test_utils_dates_bins.py +53 -0
- quantflow-1.0.0/quantflow_tests/test_vasicek_curve.py +144 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow_tests/test_wiener.py +10 -0
- quantflow-1.0.0/quantflow_tests/test_yield_curve_fit.py +67 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow_tests/utils.py +5 -4
- quantflow-1.0.0/readme.md +47 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/taplo.toml +10 -5
- quantflow-1.0.0/uv.lock +3536 -0
- quantflow-0.8.0/.coveragerc +0 -18
- quantflow-0.8.0/CLAUDE.md +0 -4
- quantflow-0.8.0/PKG-INFO +0 -120
- quantflow-0.8.0/app/__main__.py +0 -45
- quantflow-0.8.0/app/cointegration.py +0 -164
- quantflow-0.8.0/app/double_exponential_sampling.py +0 -81
- quantflow-0.8.0/app/gaussian_sampling.py +0 -91
- quantflow-0.8.0/app/heston_vol_surface.py +0 -165
- quantflow-0.8.0/app/hurst.py +0 -327
- quantflow-0.8.0/app/poisson_sampling.py +0 -72
- quantflow-0.8.0/app/supersmoother.py +0 -110
- quantflow-0.8.0/app/utils/__init__.py +0 -12
- quantflow-0.8.0/app/volatility_surface.py +0 -118
- quantflow-0.8.0/dev/install +0 -3
- quantflow-0.8.0/docs/api/options/black.md +0 -25
- quantflow-0.8.0/docs/api/rates/index.md +0 -1
- quantflow-0.8.0/docs/api/ta/ewma.md +0 -4
- quantflow-0.8.0/docs/api/ta/index.md +0 -1
- quantflow-0.8.0/docs/api/ta/kalman.md +0 -3
- quantflow-0.8.0/docs/api/utils/distributions.md +0 -9
- quantflow-0.8.0/docs/api/utils/marginal1d.md +0 -9
- quantflow-0.8.0/docs/contributing.md +0 -24
- quantflow-0.8.0/docs/index.md +0 -49
- quantflow-0.8.0/docs/mcp.md +0 -63
- quantflow-0.8.0/docs/release-notes.md +0 -68
- quantflow-0.8.0/docs/tutorials/index.md +0 -9
- quantflow-0.8.0/notebooks/applications/calibration.md +0 -204
- quantflow-0.8.0/notebooks/applications/calibration.py +0 -189
- quantflow-0.8.0/notebooks/applications/volatility_surface.md +0 -144
- quantflow-0.8.0/notebooks/data/fed.md +0 -40
- quantflow-0.8.0/notebooks/data/fiscal_data.md +0 -31
- quantflow-0.8.0/notebooks/data/fmp.md +0 -80
- quantflow-0.8.0/notebooks/data/timeseries.md +0 -39
- quantflow-0.8.0/notebooks/models/bns.md +0 -111
- quantflow-0.8.0/notebooks/models/cir.md +0 -186
- quantflow-0.8.0/notebooks/models/gousv.md +0 -48
- quantflow-0.8.0/notebooks/models/heston.md +0 -133
- quantflow-0.8.0/notebooks/models/heston_jumps.md +0 -78
- quantflow-0.8.0/notebooks/models/jump_diffusion.md +0 -101
- quantflow-0.8.0/notebooks/models/ou.md +0 -203
- quantflow-0.8.0/notebooks/models/overview.md +0 -19
- quantflow-0.8.0/notebooks/models/poisson.md +0 -269
- quantflow-0.8.0/notebooks/models/wiener.md +0 -73
- quantflow-0.8.0/quantflow/ai/__init__.py +0 -1
- quantflow-0.8.0/quantflow/ai/server.py +0 -27
- quantflow-0.8.0/quantflow/ai/tools/base.py +0 -33
- quantflow-0.8.0/quantflow/ai/tools/charts.py +0 -40
- quantflow-0.8.0/quantflow/ai/tools/crypto.py +0 -105
- quantflow-0.8.0/quantflow/ai/tools/fred.py +0 -82
- quantflow-0.8.0/quantflow/ai/tools/stocks.py +0 -99
- quantflow-0.8.0/quantflow/ai/tools/vault.py +0 -35
- quantflow-0.8.0/quantflow/options/strategies/butterfly.py +0 -100
- quantflow-0.8.0/quantflow/options/strategies/spread.py +0 -73
- quantflow-0.8.0/quantflow/options/strategies/straddle.py +0 -39
- quantflow-0.8.0/quantflow/options/strategies/strangle.py +0 -68
- quantflow-0.8.0/quantflow/rates/nelson_siegel.py +0 -123
- quantflow-0.8.0/quantflow/rates/yield_curve.py +0 -37
- quantflow-0.8.0/quantflow/ta/__init__.py +0 -5
- quantflow-0.8.0/quantflow/ta/base.py +0 -14
- quantflow-0.8.0/quantflow/ta/kalman.py +0 -72
- quantflow-0.8.0/quantflow/ta/ohlc.py +0 -109
- quantflow-0.8.0/quantflow_tests/fixtures/volsurface.json +0 -4359
- quantflow-0.8.0/quantflow_tests/test_ai.py +0 -461
- quantflow-0.8.0/quantflow_tests/test_data.py +0 -61
- quantflow-0.8.0/quantflow_tests/test_implied_fwd.py +0 -175
- quantflow-0.8.0/quantflow_tests/test_options_pricer.py +0 -53
- quantflow-0.8.0/quantflow_tests/test_rates.py +0 -220
- quantflow-0.8.0/readme.md +0 -49
- quantflow-0.8.0/uv.lock +0 -4568
- {quantflow-0.8.0 → quantflow-1.0.0}/.github/instructions/makefile.instructions.md +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/.github/instructions/tutorial.instructions.md +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/.github/workflows/deploy.yml +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/.vscode/launch.json +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/.vscode/settings.json +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/.vscode/tasks.json +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/CITATION.cff +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/LICENSE +0 -0
- {quantflow-0.8.0/app/scripts → quantflow-1.0.0/app}/__init__.py +0 -0
- {quantflow-0.8.0/docs → quantflow-1.0.0/app/api}/__init__.py +0 -0
- {quantflow-0.8.0/docs/examples → quantflow-1.0.0/app/scripts}/__init__.py +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/app/scripts/test_comparison.py +0 -0
- {quantflow-0.8.0/quantflow/ai/tools → quantflow-1.0.0/app/utils}/__init__.py +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/dev/build-examples +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/dev/charts.yaml +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/dev/helm/.helmignore +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/dev/helm/Chart.yaml +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/dev/helm/templates/_helpers.tpl +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/dev/helm/templates/_service.tpl +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/dev/helm/templates/app.yaml +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/dev/helm/templates/configmap.yaml +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/dev/helm/templates/secret.yaml +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/dev/helm/values.yaml +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/dev/marimo +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/dev/test +0 -0
- {quantflow-0.8.0/quantflow/data → quantflow-1.0.0/docs}/__init__.py +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/api/data/deribit.md +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/api/data/fed.md +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/api/data/fmp.md +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/api/data/fred.md +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/api/options/divfm.md +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/api/options/index.md +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/api/options/pricer.md +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/api/options/svi.md +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/api/rates/interest_rate.md +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/api/sp/bns.md +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/api/sp/cir.md +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/api/sp/compound_poisson.md +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/api/sp/copula.md +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/api/sp/dsp.md +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/api/sp/heston.md +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/api/sp/index.md +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/api/sp/jump_diffusion.md +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/api/sp/ou.md +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/api/sp/poisson.md +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/api/sp/wiener.md +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/api/ta/ohlc.md +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/api/ta/paths.md +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/api/utils/bins.md +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/api/utils/numbers.md +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/api/utils/types.md +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/assets/heston.gif +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/assets/logos/README.md +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/assets/logos/favicon.ico +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/assets/logos/head-snippet.html +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/assets/logos/manifest.json +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/assets/logos/png/quantflow-app-icon-1024.png +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/assets/logos/png/quantflow-app-icon-128.png +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/assets/logos/png/quantflow-app-icon-256.png +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/assets/logos/png/quantflow-app-icon-512.png +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/assets/logos/png/quantflow-linkedin-banner.png +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/assets/logos/png/quantflow-lockup-1200.png +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/assets/logos/png/quantflow-lockup-dark-1200.png +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/assets/logos/png/quantflow-lockup-dark-2400.png +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/assets/logos/png/quantflow-lockup-tagline-dark-1600.png +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/assets/logos/png/quantflow-lockup-tagline-light-1600.png +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/assets/logos/png/quantflow-mark-1024.png +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/assets/logos/png/quantflow-mark-128.png +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/assets/logos/png/quantflow-mark-16.png +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/assets/logos/png/quantflow-mark-256.png +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/assets/logos/png/quantflow-mark-32.png +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/assets/logos/png/quantflow-mark-48.png +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/assets/logos/png/quantflow-mark-512.png +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/assets/logos/png/quantflow-mark-64.png +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/assets/logos/png/quantflow-mark-dark-1024.png +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/assets/logos/png/quantflow-mark-dark-128.png +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/assets/logos/png/quantflow-mark-dark-16.png +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/assets/logos/png/quantflow-mark-dark-256.png +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/assets/logos/png/quantflow-mark-dark-32.png +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/assets/logos/png/quantflow-mark-dark-48.png +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/assets/logos/png/quantflow-mark-dark-512.png +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/assets/logos/png/quantflow-mark-dark-64.png +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/assets/logos/quantflow-app-icon.svg +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/assets/logos/quantflow-favicon.svg +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/assets/logos/quantflow-linkedin-banner.svg +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/assets/logos/quantflow-lockup-dark.svg +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/assets/logos/quantflow-lockup-tagline-dark.svg +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/assets/logos/quantflow-lockup-tagline-light.svg +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/assets/logos/quantflow-lockup.svg +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/assets/logos/quantflow-mark-dark.svg +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/assets/logos/quantflow-mark.svg +0 -0
- {quantflow-0.8.0/quantflow/options → quantflow-1.0.0/docs/examples}/__init__.py +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/examples/cir_pdf_comparison.py +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/examples/fft.py +0 -0
- {quantflow-0.8.0/quantflow_tests → quantflow-1.0.0/docs/examples}/fixtures/deribit_futures.json +0 -0
- {quantflow-0.8.0/quantflow_tests → quantflow-1.0.0/docs/examples}/fixtures/deribit_instruments.json +0 -0
- {quantflow-0.8.0/quantflow_tests → quantflow-1.0.0/docs/examples}/fixtures/deribit_options.json +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/favicon.ico +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/javascripts/mathjax.js +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/robots.txt +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/theory/characteristic.md +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/theory/convexity_correction.md +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/theory/index.md +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/theory/inversion.md +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/theory/levy.md +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/tutorials/bns_calibration.md +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/docs/tutorials/pricing_method_comparison.md +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/__init__.py +0 -0
- {quantflow-0.8.0/quantflow/rates → quantflow-1.0.0/quantflow/data}/__init__.py +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/data/fiscal_data.py +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/data/vault.py +0 -0
- {quantflow-0.8.0/quantflow/sp → quantflow-1.0.0/quantflow/options}/__init__.py +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/options/calibration/__init__.py +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/options/divfm/__init__.py +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/options/divfm/network.py +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/options/divfm/weights.py +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/options/docs/butterfly.md +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/options/docs/calendar_spread.md +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/options/docs/spread.md +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/options/docs/straddle.md +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/options/docs/strangle.md +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/options/docs/terminology.md +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/py.typed +0 -0
- {quantflow-0.8.0/quantflow/utils → quantflow-1.0.0/quantflow/sp}/__init__.py +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/sp/copula.py +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/sp/dsp.py +0 -0
- {quantflow-0.8.0/quantflow_tests → quantflow-1.0.0/quantflow/ta}/__init__.py +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/ta/paths.py +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/utils/bins.py +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/utils/dates.py +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/utils/functions.py +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow/utils/transforms.py +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow_tests/test_bns.py +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow_tests/test_copula.py +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow_tests/test_frft.py +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow_tests/test_utils.py +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/quantflow_tests/test_vault.py +0 -0
- {quantflow-0.8.0 → quantflow-1.0.0}/rops.toml +0 -0
|
@@ -12,7 +12,19 @@ applyTo: '/**'
|
|
|
12
12
|
|
|
13
13
|
* Always run `make lint` after code changes — runs taplo, isort, black, ruff, and mypy
|
|
14
14
|
* Never edit `readme.md` directly — it is generated from `docs/index.md` via `make docs`
|
|
15
|
-
* To install all dependencies (including all optional extras) run `make install-dev`
|
|
15
|
+
* To install all dependencies (including all optional extras) run `make install-dev`
|
|
16
|
+
* Do not modify code unless the developer explicitly asks for a code change.
|
|
17
|
+
* Never run `git commit` (or `git push`) unless the developer explicitly asks for it.
|
|
18
|
+
Preparing changes in the working tree is the deliverable; committing is the developer's action.
|
|
19
|
+
* Never change code that works unless you have been asked by the developer to do so,
|
|
20
|
+
or you have a good reason to believe the code is wrong.
|
|
21
|
+
* Concentrate on fixing the problem, not on making the code look nice unless you are
|
|
22
|
+
extremely confident that your code style is better than the original and that the original code style
|
|
23
|
+
is not serving a purpose (e.g. readability, consistency with other code, etc.).
|
|
24
|
+
If you are unsure, ask the developer or leave the code style as it is.
|
|
25
|
+
|
|
26
|
+
## Run Tests
|
|
27
|
+
|
|
16
28
|
* To run all tests use `make test` — runs all tests in the `tests/` directory using pytest
|
|
17
29
|
* To run a specific test file, use `uv run pytest tests/path/to/test_file.py`
|
|
18
30
|
|
|
@@ -29,31 +41,44 @@ applyTo: '/**'
|
|
|
29
41
|
* Documentation is built using [mkdocs](https://www.mkdocs.org/) and stored in the `docs/` directory. The documentation source files are written in markdown format.
|
|
30
42
|
* Split prose into short paragraphs (one idea per paragraph) separated by blank lines. Never write a wall-of-text paragraph that strings together mechanism, rationale, caveats and usage advice. This applies to mkdocs tutorials, theory pages and long docstrings.
|
|
31
43
|
* Do not use dashes (em dashes, en dashes, or hyphens used as dashes) in documentation files or docstrings. Use colons, parentheses, or restructure the sentence instead.
|
|
44
|
+
* Always use `Annotated(..., Doc("..."))` for docstrings in code, never use triple-quoted strings below the definition of a function or class. For example:
|
|
45
|
+
```python
|
|
46
|
+
from typing_extensions import Annotated, Doc
|
|
47
|
+
|
|
48
|
+
def foo(x: Annotated[int, Doc("This is the docstring for x")]) -> float:
|
|
49
|
+
"""This is the docstring for foo"""
|
|
50
|
+
return float(x)
|
|
51
|
+
```
|
|
52
|
+
* Do not use Docstrings with markdown text that may generate headings (e.g. `# Heading`, `## Heading`, etc.)
|
|
32
53
|
* Math in documentation and docstrings: always use `\begin{equation}...\end{equation}` for any formula or equation. Use `$...$` only for brief inline references to variables (e.g. $F$, $K$). Do not use `$$...$$`, `` `...` ``, or RST syntax (`.. math::`, `:math:`).
|
|
33
54
|
* Math notation convention: use $\Phi$ for the characteristic function and $\phi$ for the characteristic exponent, where $\Phi = e^{-\phi}$.
|
|
34
55
|
* Glossary entries in `docs/glossary.md` must be kept in alphabetical order.
|
|
35
|
-
* Do not repeat concept definitions inline in tutorials or docstrings
|
|
56
|
+
* Do not repeat concept definitions inline in tutorials or docstrings, link to the glossary instead using a relative markdown link (e.g. `[moneyness](../glossary.md#moneyness)`).
|
|
57
|
+
* Use relative links for all mkdocs page links (e.g. `[Option Pricing](../theory/option_pricing.md)`) — prefer relative over absolute URLs to keep links shorter and portable.
|
|
58
|
+
* Prefer mkdocstrings relative cross-references whenever the target is visible from the current scope: write `[label][.member]` (same class) or `[label][..Sibling]` (same module) instead of repeating the fully-qualified path. Use the full path only when the target lives in a different module than the current docstring.
|
|
36
59
|
* To rebuild doc examples run `uv run ./dev/build-examples` — runs all scripts in `docs/examples/` and writes their output to `docs/examples_output/`
|
|
37
60
|
|
|
38
61
|
## Pydantic models
|
|
39
62
|
|
|
40
|
-
* Always document Pydantic fields with `Field(description=...)
|
|
63
|
+
* Always document Pydantic fields with `Field(description=...)`, never use a docstring below a field assignment
|
|
41
64
|
* Split long description strings across lines using implicit string concatenation rather than shortening the text
|
|
42
65
|
* When a docstring line exceeds the line length limit, split it across multiple lines rather than shortening the text
|
|
66
|
+
* Put Pydantic config options directly in the class definition, not as a `model_config = ConfigDict(...)` class variable:
|
|
67
|
+
```python
|
|
68
|
+
# correct
|
|
69
|
+
class Foo(BaseModel, arbitrary_types_allowed=True): ...
|
|
70
|
+
|
|
71
|
+
# wrong
|
|
72
|
+
class Foo(BaseModel):
|
|
73
|
+
model_config = ConfigDict(arbitrary_types_allowed=True)
|
|
74
|
+
```
|
|
43
75
|
|
|
44
76
|
## Package structure
|
|
45
77
|
|
|
46
78
|
* Strategy runtime markdown descriptions (read by `load_description()` at runtime) live inside the package at `quantflow/options/strategies/docs/` — they must be inside the package to be accessible when the library is installed
|
|
47
79
|
* mkdocs documentation pages live in `docs/api/options/` — do not mix these two locations
|
|
48
80
|
|
|
49
|
-
##
|
|
50
|
-
|
|
51
|
-
The release procedure is fully driven by `make release` and the `release.yml` workflow:
|
|
52
|
-
|
|
53
|
-
1. Bump `version` in `pyproject.toml` to the new release version.
|
|
54
|
-
2. Add a `## vX.Y.Z` section to `docs/release-notes.md` with the notes for the release. The header text is matched verbatim by the workflow's `awk` extractor, so it must be `## vX.Y.Z` exactly (no trailing dash, no title after the version).
|
|
55
|
-
3. Commit and merge to `main`.
|
|
56
|
-
4. From `main`, run `make release` — it reads the version from `pyproject.toml`, prompts for confirmation, then creates an annotated `vX.Y.Z` tag and pushes it.
|
|
57
|
-
5. The tag push triggers `.github/workflows/release.yml`, which runs lint and tests, publishes the package to PyPI (`make publish`), and posts the extracted `## vX.Y.Z` section as the GitHub Release body.
|
|
81
|
+
## Code Conventions
|
|
58
82
|
|
|
59
|
-
|
|
83
|
+
* Always use `utcnow` from `quantflow.utils.dates` for getting the current UTC datetime, never use `datetime.utcnow()` or `datetime.now()`
|
|
84
|
+
* Never import inside functions unless explicitly discussed; all imports should be at the top of the module
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: quantflow-bibliography-instructions
|
|
3
|
+
description: 'Instructions for bibliography in quantflow'
|
|
4
|
+
applyTo: '/**'
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Instructions for updating the bibliography for quantflow:
|
|
8
|
+
|
|
9
|
+
* The bibliography for quantflow is maintained in `docs/references.bib`
|
|
10
|
+
* Each entry must be added in alphabetical order of the label (the part after the first `{` in the bib entry).
|
|
11
|
+
* Regenerate the markdown file `docs/bibliography.md` from the `bib` file using the
|
|
12
|
+
```bash
|
|
13
|
+
make docs-bib
|
|
14
|
+
```
|
|
15
|
+
* Run this command every time you update the `bib` file to keep the markdown file in sync
|
|
16
|
+
* Do not edit `docs/bibliography.md` directly as it is generated from `docs/references.bib`.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: quantflow-observable-instructions
|
|
3
|
+
description: 'Instructions for Observable Framework pages in quantflow'
|
|
4
|
+
applyTo: '/frontend/src/**'
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
# Observable Framework Instructions
|
|
9
|
+
|
|
10
|
+
These instructions apply to markdown files in `frontend/src/`, which are rendered by Observable Framework.
|
|
11
|
+
|
|
12
|
+
## Math
|
|
13
|
+
|
|
14
|
+
Observable Framework uses KaTeX for math rendering. The syntax is different from standard markdown math (no `$...$` or `$$...$$`).
|
|
15
|
+
|
|
16
|
+
- **Display math** (block, centered): use a `tex` fenced code block:
|
|
17
|
+
|
|
18
|
+
````
|
|
19
|
+
```tex
|
|
20
|
+
E = mc^2
|
|
21
|
+
```
|
|
22
|
+
````
|
|
23
|
+
|
|
24
|
+
- **Inline math**: use the `tex` tagged template literal inside an inline expression:
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
The smoothing factor ${tex`\alpha`} controls decay.
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
- Do not use `$...$` or `$$...$$` for math in Observable Framework pages.
|
|
31
|
+
- Do not use `\begin{equation}...\end{equation}` (that convention applies only to mkdocs pages in `docs/`).
|
|
32
|
+
|
|
33
|
+
## Downloads
|
|
34
|
+
|
|
35
|
+
Always render download actions as a `<button>` element (not an `<a>` link). Use the pattern:
|
|
36
|
+
|
|
37
|
+
```js
|
|
38
|
+
const downloadData = () => {
|
|
39
|
+
const blob = new Blob([JSON.stringify(data, null, 2)], {type: "application/json"});
|
|
40
|
+
const url = URL.createObjectURL(blob);
|
|
41
|
+
const a = document.createElement("a");
|
|
42
|
+
a.href = url;
|
|
43
|
+
a.download = "filename.json";
|
|
44
|
+
a.click();
|
|
45
|
+
URL.revokeObjectURL(url);
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
display(html`<button onclick=${downloadData} style="cursor: pointer; background: var(--qf-primary); color: #fff; border: none; padding: 0.5em 1em; border-radius: 4px;">Download (JSON)</button>`);
|
|
49
|
+
```
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Release Instructions
|
|
2
|
+
|
|
3
|
+
Releases are driven by `v*` git tags. Pushing a tag triggers
|
|
4
|
+
`.github/workflows/release.yml`, which runs lint and the test suite, publishes
|
|
5
|
+
the package to PyPI (`make publish`), then extracts the matching `## vX.Y.Z`
|
|
6
|
+
section from `docs/release-notes.md` and publishes it as the GitHub Release
|
|
7
|
+
body.
|
|
8
|
+
|
|
9
|
+
## Cutting a release
|
|
10
|
+
|
|
11
|
+
1. Bump `version` in `pyproject.toml` to the new release version.
|
|
12
|
+
2. Add a `## vX.Y.Z` section at the top of `docs/release-notes.md` with the
|
|
13
|
+
notes for the release. The header text is matched verbatim by the
|
|
14
|
+
workflow's `awk` extractor, so it must be `## vX.Y.Z` exactly (no trailing
|
|
15
|
+
dash, no title after the version). The release workflow fails if this
|
|
16
|
+
section is missing.
|
|
17
|
+
3. Commit and merge to `main`; let the `build` workflow pass.
|
|
18
|
+
4. From `main`, run `make release` — it reads the version from
|
|
19
|
+
`pyproject.toml`, asks for confirmation, then creates an annotated `vX.Y.Z`
|
|
20
|
+
tag and pushes it. The `release` workflow takes it from there.
|
|
21
|
+
|
|
22
|
+
Do not publish to PyPI manually, and do not revive the old
|
|
23
|
+
`head_commit.message == 'release'` flow — the tag-triggered workflow is the
|
|
24
|
+
only supported path.
|
|
25
|
+
|
|
26
|
+
## Release-notes conventions
|
|
27
|
+
|
|
28
|
+
The `## vX.Y.Z` section in `docs/release-notes.md` is rendered both on the
|
|
29
|
+
docs site and as the GitHub Release body, so it must follow these conventions:
|
|
30
|
+
|
|
31
|
+
- Open with a one-paragraph summary describing the theme of the release. If
|
|
32
|
+
the release contains breaking changes, point readers to the **Breaking
|
|
33
|
+
changes** section in that paragraph.
|
|
34
|
+
- Group entries under H3 subsections in this order: `### Breaking changes`,
|
|
35
|
+
`### New features`, `### Improvements and fixes`,
|
|
36
|
+
`### Documentation and assets`. Omit any subsection that has no entries.
|
|
37
|
+
- Every PR reference must be a markdown link of the form
|
|
38
|
+
`[#NN](https://github.com/quantmind/quantflow/pull/NN)` — never a bare
|
|
39
|
+
`(#NN)`. GitHub's auto-linking only works in some contexts, and the explicit
|
|
40
|
+
URL works everywhere. When one entry references multiple PRs, list them
|
|
41
|
+
comma-separated inside one set of parentheses, each as its own link.
|
|
42
|
+
- Build the PR list by running `git log vPREV..HEAD --oneline` against the
|
|
43
|
+
previous release tag and following each squashed-merge commit back to its
|
|
44
|
+
PR. Cross-check with `gh pr list --state merged --base main` for any PRs
|
|
45
|
+
merged since the previous tag.
|
|
46
|
+
- End the section with a
|
|
47
|
+
`[Full changelog](https://github.com/quantmind/quantflow/compare/vPREV...vX.Y.Z)`
|
|
48
|
+
link comparing the new tag against the previous one.
|
|
@@ -3,7 +3,7 @@ name: build
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
5
5
|
branches-ignore:
|
|
6
|
-
-
|
|
6
|
+
- main
|
|
7
7
|
tags-ignore:
|
|
8
8
|
- v*
|
|
9
9
|
|
|
@@ -31,6 +31,10 @@ jobs:
|
|
|
31
31
|
uses: actions/setup-python@v5
|
|
32
32
|
with:
|
|
33
33
|
python-version: ${{ matrix.python-version }}
|
|
34
|
+
- name: Start Redis
|
|
35
|
+
uses: supercharge/redis-github-action@1.8.1
|
|
36
|
+
with:
|
|
37
|
+
redis-version: 7
|
|
34
38
|
- name: Install uv
|
|
35
39
|
run: pip install -U pip uv
|
|
36
40
|
- name: Install dependencies
|
|
@@ -50,25 +54,7 @@ jobs:
|
|
|
50
54
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
51
55
|
files: ./build/coverage.xml
|
|
52
56
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
uses: ./.github/workflows/docker-multiarch.yml
|
|
56
|
-
needs: build
|
|
57
|
+
examples:
|
|
58
|
+
uses: ./.github/workflows/examples.yml
|
|
57
59
|
with:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
deploy:
|
|
61
|
-
name: Create Deployment
|
|
62
|
-
if: github.ref == 'refs/heads/main'
|
|
63
|
-
runs-on: ubuntu-latest
|
|
64
|
-
permissions:
|
|
65
|
-
deployments: write
|
|
66
|
-
needs: image
|
|
67
|
-
steps:
|
|
68
|
-
- uses: chrnorm/deployment-action@v2
|
|
69
|
-
name: Create GitHub deployment
|
|
70
|
-
id: deployment
|
|
71
|
-
with:
|
|
72
|
-
token: "${{ secrets.TOKEN_DEPLOYMENT }}"
|
|
73
|
-
environment: prod
|
|
74
|
-
payload: '{"tag": "main-${{ github.sha }}"}'
|
|
60
|
+
upload: false
|
|
@@ -8,13 +8,24 @@ on:
|
|
|
8
8
|
type: string
|
|
9
9
|
|
|
10
10
|
jobs:
|
|
11
|
+
build-examples:
|
|
12
|
+
uses: ./.github/workflows/examples.yml
|
|
13
|
+
with:
|
|
14
|
+
upload: true
|
|
15
|
+
|
|
11
16
|
build-amd64:
|
|
17
|
+
needs: build-examples
|
|
12
18
|
runs-on: ubuntu-latest
|
|
13
19
|
env:
|
|
14
20
|
GITHUB_TOKEN: ${{ github.token }}
|
|
15
21
|
|
|
16
22
|
steps:
|
|
17
23
|
- uses: actions/checkout@v4
|
|
24
|
+
- name: download examples output
|
|
25
|
+
uses: actions/download-artifact@v4
|
|
26
|
+
with:
|
|
27
|
+
name: examples-output
|
|
28
|
+
path: docs
|
|
18
29
|
- name: Login to GitHub Container Registry
|
|
19
30
|
uses: docker/login-action@v3
|
|
20
31
|
with:
|
|
@@ -31,6 +42,7 @@ jobs:
|
|
|
31
42
|
run: rops docker push ${{ inputs.image-name }} --arch
|
|
32
43
|
|
|
33
44
|
build-arm64:
|
|
45
|
+
needs: build-examples
|
|
34
46
|
runs-on: ubuntu-24.04-arm
|
|
35
47
|
env:
|
|
36
48
|
GITHUB_TOKEN: ${{ github.token }}
|
|
@@ -38,6 +50,11 @@ jobs:
|
|
|
38
50
|
|
|
39
51
|
steps:
|
|
40
52
|
- uses: actions/checkout@v4
|
|
53
|
+
- name: download examples output
|
|
54
|
+
uses: actions/download-artifact@v4
|
|
55
|
+
with:
|
|
56
|
+
name: examples-output
|
|
57
|
+
path: docs
|
|
41
58
|
- name: Login to GitHub Container Registry
|
|
42
59
|
uses: docker/login-action@v3
|
|
43
60
|
with:
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: examples
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_call:
|
|
5
|
+
inputs:
|
|
6
|
+
upload:
|
|
7
|
+
description: Upload the generated outputs as an artifact
|
|
8
|
+
type: boolean
|
|
9
|
+
default: true
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
build-examples:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
env:
|
|
15
|
+
GITHUB_TOKEN: ${{ github.token }}
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
- name: Set up Python
|
|
20
|
+
uses: actions/setup-python@v5
|
|
21
|
+
with:
|
|
22
|
+
python-version: "3.14"
|
|
23
|
+
- name: Install uv
|
|
24
|
+
run: pip install -U pip uv
|
|
25
|
+
- name: Install dependencies
|
|
26
|
+
run: uv sync --frozen --no-install-project --group docs --extra data
|
|
27
|
+
- name: build examples
|
|
28
|
+
run: uv run ./dev/build-examples
|
|
29
|
+
- name: upload examples output
|
|
30
|
+
if: inputs.upload
|
|
31
|
+
uses: actions/upload-artifact@v4
|
|
32
|
+
with:
|
|
33
|
+
name: examples-output
|
|
34
|
+
path: |
|
|
35
|
+
docs/assets/examples/
|
|
36
|
+
docs/examples/output/
|
|
37
|
+
if-no-files-found: error
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: main
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
image:
|
|
10
|
+
uses: ./.github/workflows/docker-multiarch.yml
|
|
11
|
+
with:
|
|
12
|
+
image-name: quantflow
|
|
13
|
+
|
|
14
|
+
deploy:
|
|
15
|
+
name: Create Deployment
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
permissions:
|
|
18
|
+
deployments: write
|
|
19
|
+
needs: image
|
|
20
|
+
steps:
|
|
21
|
+
- uses: chrnorm/deployment-action@v2
|
|
22
|
+
name: Create GitHub deployment
|
|
23
|
+
id: deployment
|
|
24
|
+
with:
|
|
25
|
+
token: "${{ secrets.TOKEN_DEPLOYMENT }}"
|
|
26
|
+
environment: prod
|
|
27
|
+
payload: '{"tag": "main-${{ github.sha }}"}'
|
|
@@ -16,6 +16,16 @@ permissions:
|
|
|
16
16
|
jobs:
|
|
17
17
|
release:
|
|
18
18
|
runs-on: ubuntu-latest
|
|
19
|
+
services:
|
|
20
|
+
redis:
|
|
21
|
+
image: redis:7
|
|
22
|
+
ports:
|
|
23
|
+
- 6379:6379
|
|
24
|
+
options: >-
|
|
25
|
+
--health-cmd "redis-cli ping"
|
|
26
|
+
--health-interval 10s
|
|
27
|
+
--health-timeout 5s
|
|
28
|
+
--health-retries 5
|
|
19
29
|
env:
|
|
20
30
|
PYTHON_ENV: ci
|
|
21
31
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
@readme.md
|
|
2
|
+
@.github/copilot-instructions.md
|
|
3
|
+
@.github/instructions/bibliography.instructions.md
|
|
4
|
+
@.github/instructions/makefile.instructions.md
|
|
5
|
+
@.github/instructions/observable.instructions.md
|
|
6
|
+
@.github/instructions/release.instructions.md
|
|
7
|
+
@.github/instructions/tutorial.instructions.md
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
|
|
2
|
+
# Contributor Covenant Code of Conduct
|
|
3
|
+
|
|
4
|
+
## Our Pledge
|
|
5
|
+
|
|
6
|
+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
|
|
7
|
+
|
|
8
|
+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
|
|
9
|
+
|
|
10
|
+
## Our Standards
|
|
11
|
+
|
|
12
|
+
Examples of behavior that contributes to a positive environment for our community include:
|
|
13
|
+
|
|
14
|
+
* Demonstrating empathy and kindness toward other people
|
|
15
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
|
16
|
+
* Giving and gracefully accepting constructive feedback
|
|
17
|
+
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
|
|
18
|
+
* Focusing on what is best not just for us as individuals, but for the overall community
|
|
19
|
+
|
|
20
|
+
Examples of unacceptable behavior include:
|
|
21
|
+
|
|
22
|
+
* The use of sexualized language or imagery, and sexual attention or advances of any kind
|
|
23
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
24
|
+
* Public or private harassment
|
|
25
|
+
* Publishing others' private information, such as a physical or email address, without their explicit permission
|
|
26
|
+
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
|
27
|
+
|
|
28
|
+
## Enforcement Responsibilities
|
|
29
|
+
|
|
30
|
+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
|
|
31
|
+
|
|
32
|
+
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
|
|
33
|
+
|
|
34
|
+
## Scope
|
|
35
|
+
|
|
36
|
+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
|
37
|
+
|
|
38
|
+
## Enforcement
|
|
39
|
+
|
|
40
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at luca@quantmind.com. All complaints will be reviewed and investigated promptly and fairly.
|
|
41
|
+
|
|
42
|
+
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
|
|
43
|
+
|
|
44
|
+
## Enforcement Guidelines
|
|
45
|
+
|
|
46
|
+
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
|
|
47
|
+
|
|
48
|
+
### 1. Correction
|
|
49
|
+
|
|
50
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
|
|
51
|
+
|
|
52
|
+
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
|
|
53
|
+
|
|
54
|
+
### 2. Warning
|
|
55
|
+
|
|
56
|
+
**Community Impact**: A violation through a single incident or series of actions.
|
|
57
|
+
|
|
58
|
+
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
|
|
59
|
+
|
|
60
|
+
### 3. Temporary Ban
|
|
61
|
+
|
|
62
|
+
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
|
|
63
|
+
|
|
64
|
+
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
|
|
65
|
+
|
|
66
|
+
### 4. Permanent Ban
|
|
67
|
+
|
|
68
|
+
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
|
|
69
|
+
|
|
70
|
+
**Consequence**: A permanent ban from any sort of public interaction within the community.
|
|
71
|
+
|
|
72
|
+
## Attribution
|
|
73
|
+
|
|
74
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
|
75
|
+
|
|
76
|
+
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
|
77
|
+
|
|
78
|
+
For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at [https://www.contributor-covenant.org/translations][translations].
|
|
79
|
+
|
|
80
|
+
[homepage]: https://www.contributor-covenant.org
|
|
81
|
+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
|
82
|
+
[Mozilla CoC]: https://github.com/mozilla/diversity
|
|
83
|
+
[FAQ]: https://www.contributor-covenant.org/faq
|
|
84
|
+
[translations]: https://www.contributor-covenant.org/translations
|
|
85
|
+
|
|
@@ -5,11 +5,15 @@ help:
|
|
|
5
5
|
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
|
|
6
6
|
@echo ================================================================================
|
|
7
7
|
|
|
8
|
+
.PHONY: app-serve
|
|
9
|
+
app-serve: ## serve app
|
|
10
|
+
@MICRO_SERVICE_HOST=127.0.0.1 uv run python -m app
|
|
11
|
+
|
|
8
12
|
.PHONY: docs
|
|
9
13
|
docs: ## build documentation
|
|
10
14
|
@cp docs/index.md readme.md
|
|
11
15
|
@uv run ./dev/build-examples
|
|
12
|
-
@uv run mkdocs build
|
|
16
|
+
@uv run mkdocs build --strict
|
|
13
17
|
|
|
14
18
|
.PHONY: docs-bib
|
|
15
19
|
docs-bib: ## Regenerate docs bibliography
|
|
@@ -20,8 +24,17 @@ docs-examples: ## Regenerate docs examples
|
|
|
20
24
|
@uv run ./dev/build-examples
|
|
21
25
|
|
|
22
26
|
.PHONY: docs-serve
|
|
23
|
-
docs-serve: ## serve
|
|
24
|
-
@
|
|
27
|
+
docs-serve: ## serve docs, examples, and API with auto-reload
|
|
28
|
+
@bash ./dev/docs-serve
|
|
29
|
+
|
|
30
|
+
.PHONY: frontend-build
|
|
31
|
+
frontend-build: ## build Observable frontend examples
|
|
32
|
+
@rm -rf app/examples
|
|
33
|
+
@npm --prefix frontend run build
|
|
34
|
+
|
|
35
|
+
.PHONY: frontend-serve
|
|
36
|
+
frontend-serve: ## serve Observable frontend with auto-reload
|
|
37
|
+
@bash ./dev/frontend-serve
|
|
25
38
|
|
|
26
39
|
.PHONY: install-dev
|
|
27
40
|
install-dev: ## Install development dependencies
|
|
@@ -35,10 +48,6 @@ lint: ## Lint and fix
|
|
|
35
48
|
lint-check: ## Lint check only
|
|
36
49
|
@uv run ./dev/lint
|
|
37
50
|
|
|
38
|
-
.PHONY: marimo
|
|
39
|
-
marimo: ## Run marimo for editing notebooks
|
|
40
|
-
@./dev/marimo edit
|
|
41
|
-
|
|
42
51
|
.PHONY: outdated
|
|
43
52
|
outdated: ## Show outdated packages
|
|
44
53
|
uv tree --outdated
|
quantflow-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: quantflow
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: quantitative analysis
|
|
5
|
+
Project-URL: Homepage, https://github.com/quantmind/quantflow
|
|
6
|
+
Project-URL: Repository, https://github.com/quantmind/quantflow
|
|
7
|
+
Project-URL: Documentation, https://quantflow.quantmind.com
|
|
8
|
+
Project-URL: Issues, https://github.com/quantmind/quantflow/issues
|
|
9
|
+
Author-email: Luca Sbardella <luca@quantmind.com>
|
|
10
|
+
License-Expression: BSD-3-Clause
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: finance,options,pricing,quantitative,stochastic,volatility
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Intended Audience :: Financial and Insurance Industry
|
|
15
|
+
Classifier: Intended Audience :: Science/Research
|
|
16
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
23
|
+
Classifier: Topic :: Office/Business :: Financial
|
|
24
|
+
Classifier: Topic :: Scientific/Engineering :: Mathematics
|
|
25
|
+
Classifier: Typing :: Typed
|
|
26
|
+
Requires-Python: <3.15,>=3.11
|
|
27
|
+
Requires-Dist: ccy>=2.0.0
|
|
28
|
+
Requires-Dist: pandas>=2.0.0
|
|
29
|
+
Requires-Dist: pydantic>=2.0.2
|
|
30
|
+
Requires-Dist: scipy>=1.14.1
|
|
31
|
+
Requires-Dist: statsmodels<0.15.0,>=0.14.6
|
|
32
|
+
Provides-Extra: data
|
|
33
|
+
Requires-Dist: aio-fluid[http]>=2.4.0; extra == 'data'
|
|
34
|
+
Provides-Extra: ml
|
|
35
|
+
Requires-Dist: torch>=2.12.0; extra == 'ml'
|
|
36
|
+
Description-Content-Type: text/markdown
|
|
37
|
+
|
|
38
|
+
# <a href="https://quantmind.github.io/quantflow"><img src="https://raw.githubusercontent.com/quantmind/quantflow/main/docs/assets/logos/quantflow-lockup.svg" width=300 /></a>
|
|
39
|
+
|
|
40
|
+
[](https://badge.fury.io/py/quantflow)
|
|
41
|
+
[](https://pypi.org/project/quantflow)
|
|
42
|
+
[](https://pepy.tech/project/quantflow)
|
|
43
|
+
[](https://github.com/quantmind/quantflow/actions/workflows/build.yml)
|
|
44
|
+
[](https://codecov.io/gh/quantmind/quantflow)
|
|
45
|
+
|
|
46
|
+
Quantitative analysis and pricing tools.
|
|
47
|
+
|
|
48
|
+

|
|
49
|
+
|
|
50
|
+
## Installation
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
pip install quantflow
|
|
54
|
+
```
|
|
55
|
+
### Optional dependencies
|
|
56
|
+
|
|
57
|
+
* `data` — data retrieval: `pip install quantflow[data]`
|
|
58
|
+
* `ml` — training the Deep Implied Volatility model: `pip install quantflow[ml]`
|
|
59
|
+
|
|
60
|
+
## Features
|
|
61
|
+
|
|
62
|
+
* **Stochastic Processes**: a library of continuous-time models including Wiener processes, Poisson jumps, CIR mean-reverting dynamics, Heston stochastic volatility, jump-diffusion models, and the Barndorff-Nielsen & Shephard (BNS) model. Each process exposes its [characteristic function](https://quantflow.quantmind.com/theory/characteristic/) for analytical pricing.
|
|
63
|
+
|
|
64
|
+
* **Option Pricing and Calibration**: Black-Scholes pricing, implied volatility surfaces, SVI parameterisation, put/call parity, and model calibration (Heston, Double Heston). Includes support for both inverse (crypto) and standard (equity) quoting conventions.
|
|
65
|
+
|
|
66
|
+
* **Interest Rates**: yield curve construction via Nelson-Siegel and Vasicek models, discount factor calculation, and rate interpolation.
|
|
67
|
+
|
|
68
|
+
* **Market Data**: connectors for [Deribit](https://www.deribit.com), [Yahoo Finance](https://finance.yahoo.com), [Financial Modeling Prep](https://financialmodelingprep.com) (FMP), [FRED](https://fred.stlouisfed.org), the [Federal Reserve](https://www.federalreserve.gov), and [US Fiscal Data](https://fiscaldata.treasury.gov) APIs.
|
|
69
|
+
|
|
70
|
+
* **Time Series Analysis**: exponentially weighted moving averages (EWMA), Kalman filtering, super-smoothers, and OHLC bar utilities.
|
|
71
|
+
|
|
72
|
+
* **JSON Serializable**: all models and pricers are built on [Pydantic](https://docs.pydantic.dev), making them fully serializable to and from JSON.
|
|
73
|
+
|
|
74
|
+
## Contributing
|
|
75
|
+
|
|
76
|
+
Contributions are welcome! See the [contributing guide](https://quantflow.quantmind.com/contributing/) for how to get started, including documentation contributions, which are a great entry point.
|
|
77
|
+
|
|
78
|
+
## Citation
|
|
79
|
+
|
|
80
|
+
If you use Quantflow in your research, please cite it using the metadata in [CITATION.cff](https://github.com/quantmind/quantflow/blob/main/CITATION.cff).
|
|
81
|
+
|
|
82
|
+
## License
|
|
83
|
+
|
|
84
|
+
Released under the [BSD 3-Clause License](https://github.com/quantmind/quantflow/blob/main/LICENSE).
|