Examples¶
The examples/ directory is the executable tutorial layer. Most
examples are deterministic and offline so they can be used as smoke
tests and learning material.
Run all deterministic examples¶
PYTHONPATH=src python examples/run_all_deterministic_examples.py
Run visualization examples¶
PYTHONPATH=src python examples/run_all_visual_examples.py
Visualization examples save files under:
examples/generated_figures/
Report examples save files under:
examples/generated_reports/
Example map¶
File |
Topic |
|---|---|
`` 00_import_all_public_modules.py`` |
Imports public modules and catches namespace regressions. |
|
Vanilla options, Greeks, trees, forwards, strategies, and exotics. |
|
Time value, rates, annuities, bonds, DCF, loans, portfolio math, VaR. |
|
BSM, CRR, Bachelier, Heston, Merton, NIG, SABR, Variance-Gamma. |
|
Credit proxy metrics, transition matrices, CDS, CDO, copula, VaR. |
|
Allocation families, frontier, Monte Carlo portfolios, stress tests. |
|
Deterministic ticker and universe workflows. |
|
Optional live/cached market-data workflow. |
|
Root namespace and facade imports. |
|
General visualization smoke test. |
|
Matplotlib/Plotly theme configuration. |
` 11_visualize_method_gallery.py` |
Object |
|
Option model charts and reports. |
|
Portfolio-credit visual dashboard. |
|
Cross-domain scenario analysis. |
|
SEC-style facts to statements to credit inputs. |
|
Manual and optional live FRED rate curves. |
|
IV smile, IV surface, skew, term structure, rich/cheap, open interest. |
|
Composable option strategies and payoff diagnostics. |
|
Rebalanced portfolio backtesting and reporting. |
|
Integrated portfolio and credit risk dashboard. |
|
Markdown, HTML, and PDF report export. |
|
BSM, SABR, and Heston calibration diagnostics. |
|
Provenance across rates, derivatives, portfolios, credit, dashboards, and reports. |
Learning path¶
Run
01_derivatives.py,02_financial_math.py, and05_portfolio_optimization.pyfirst.Run
06_marketdata_offline.pyto understand ticker and universe facades without live data.Run
17_option_chain_analytics.py,18_option_strategy_builder.py, and22_derivative_calibration.pyfor derivatives workflows.Run
19_portfolio_backtesting.pyand20_risk_dashboard.pyfor portfolio-risk workflows.Run
21_exportable_reports.pyand23_data_provenance.pyto understand deliverables and audit metadata.
Determinism policy¶
Examples should prefer deterministic fixtures over live providers. If an example can make a network request, it should say so in the file and remain skippable or optional.