A production-grade financial intelligence system for IPO, M&A, and Sovereign Capital Markets research.
Built to mirror the analytical depth and output standards of Goldman Sachs GIR, J.P. Morgan Country Risk, D.E. Shaw Capital Markets Research, Deutsche Bank Ratings Advisory, and PwC Deals Strategy.
π Quick Start Β· π Architecture Β· π¬ Models Β· π¦ Outputs Β· ποΈ Data Sources Β· π€ Contributing Β· πΊοΈ Roadmap
This system ingests live market data, runs six proprietary quantitative models, and produces three independent professional output formats β all in a single automated Python pipeline.
Live APIs βββΆ Raw Data βββΆ Analytical Models βββΆ Dashboards β Excel β PDFs
| Vertical | Coverage | Key Output |
|---|---|---|
| ποΈ IPO Markets | 25 IPOs across 7 countries | Event study, abnormal returns, money-left-on-table |
| π€ M&A | 20 deals Β· $483.5B total value | Deal screening model, 20 case studies |
| π Sovereign Bonds | 31 issuances Β· 18 countries Β· $325.8B | Risk index (0β100), 60 stress test scenarios |
| π Macro / Cross-Asset | 501 trading days Β· 9 FX pairs Β· VIX, Gold, WTI | Regime detection, yield curve decomposition |
capital-markets-intelligence/
β
βββ π data/
β βββ raw/ # Live API + curated datasets
β β βββ ipo_data_raw.csv # 25 IPOs, 7 countries
β β βββ mna_data_raw.csv # 20 M&A deals ($483.5B)
β β βββ sovereign_issuance_raw.csv # 31 issuances, 18 countries
β β βββ yield_curve_history.csv # Treasury yields 3M/5Y/10Y/30Y (501 days)
β β βββ market_rates.csv # S&P500, VIX, Gold, WTI Oil
β β βββ fx_rates.csv # 9 EM/DM FX pairs + 30d rolling vol
β β βββ worldbank_indicators.csv # 15 indicators, 20 countries
β β βββ country_macro_panel.csv # Country-year panel dataset
β βββ processed/ # Model output CSVs
β βββ yield_curve_analysis.csv
β βββ sovereign_risk_index.csv
β βββ regime_indicators.csv
β βββ deal_screening_model.csv
β βββ ipo_event_study.csv
β βββ stress_test_results.csv
β βββ case_studies.csv
β
βββ π scripts/ # 13-script numbered pipeline
β βββ 01_fetch_ipo_data.py
β βββ 02_fetch_mna_data.py
β βββ 03_stress_test_model.py
β βββ 04_case_study_builder.py
β βββ 05_fetch_sovereign_data.py
β βββ 06_generate_visualizations.py
β βββ 07_generate_memos.py
β βββ 08_fetch_fred_data.py
β βββ 09_fetch_worldbank_data.py
β βββ 10_advanced_analysis.py
β βββ 11_generate_plotly_dashboards.py
β βββ 12_generate_excel_reports.py
β βββ 13_generate_pdf_reports.py
β
βββ π analysis/ # Jupyter Notebooks
β βββ market_sentiment.ipynb # GS-GIR style cross-asset analysis
β βββ country_risk_model.ipynb # JPM country risk stress model
β βββ deal_case_studies.ipynb # PwC/DB M&A deal analysis
β
βββ π docs/ # Guides and cookbooks
βββ π CONTRIBUTING.md # How to contribute
βββ π ROADMAP.md # What we're building next
βββ π output/
βββ dashboards/ # 5 interactive Plotly HTML dashboards
βββ excel/ # 4 formatted Excel workbooks
βββ pdf/ # 4 professional PDF research reports
βββ memos/ # 4 firm-style text research memos
Extracts level, slope, and curvature components from the US Treasury term structure (3Mβ30Y). Computes rolling z-scores, classifies the curve regime (Inverted / Flat / Normal / Steep), and generates slope momentum signals.
Aggregates 11 World Bank indicators across four dimensions β fiscal health, external vulnerability, growth stability, and reserves adequacy β into a z-score normalized composite. Risk tier classifications: Low / Moderate / Elevated / High / Critical.
A 6-signal framework reading VIX level, S&P 500 trend & momentum, gold safe-haven flow, yield curve slope, and EM FX volatility to produce daily Risk-On / Neutral / Risk-Off regime calls with signal decomposition.
Point-biserial correlation analysis of 9 deal features (size, cross-border flag, sector, premium, deal type, etc.) against completion outcome. Produces a ranked feature importance table and completion probability signals.
Measures abnormal returns relative to the S&P 500 benchmark across pre-IPO, listing day, +5d, +30d, and +90d windows. Quantifies money-left-on-table and classifies pricing as Underpriced / Fairly Priced / Overpriced.
Runs 12 sovereigns Γ 5 macro scenarios for 60 total stress paths: Base Case, Fed Hawkish Surprise, Global Recession, EM Currency Crisis, and Oil Price Shock. Outputs risk score deltas and tier migration analysis.
| Dashboard | Description |
|---|---|
yield_curve_dashboard.html |
Term structure animation + regime timeline |
sovereign_risk_dashboard.html |
Risk heatmap + macro indicator drill-down |
market_regime_dashboard.html |
Signal decomposition + regime history |
ipo_analysis_dashboard.html |
Performance scatter + event study metrics |
mna_screening_dashboard.html |
Screening matrix + feature importance waterfall |
| Workbook | Sheets |
|---|---|
ipo_analysis_workbook.xlsx |
Database, Event Study, Summary Stats, Underwriter League Table |
sovereign_risk_workbook.xlsx |
Risk Index, Macro Panel, Stress Tests, Issuance Tracker |
mna_analysis_workbook.xlsx |
Deal Database, Case Studies, Screening Model |
capital_markets_master.xlsx |
Executive overview across all verticals |
| Report | Style |
|---|---|
gs_gir_capital_markets_snapshot.pdf |
Goldman Sachs GIR β Weekly capital markets brief |
jpm_sovereign_risk_report.pdf |
J.P. Morgan β Sovereign risk & issuance model |
de_shaw_ipo_dashboard.pdf |
D.E. Shaw β Quantitative IPO performance dashboard |
pwc_db_mna_case_studies.pdf |
PwC / Deutsche Bank β M&A strategic case studies |
Firm-voice narrative research memos with executive summaries and key risk flags for GS, D.E. Shaw, JPM, and PwC/DB.
| Source | API Key | What It Provides |
|---|---|---|
| Yahoo Finance (yfinance) | β Not required | Treasury yields, S&P 500, VIX, Gold, WTI Oil, 9 FX pairs |
| World Bank Open Data | β Not required | 15 macro indicators across 20 countries |
| SEC EDGAR | β Not required | IPO filings (with curated dataset fallback) |
| Curated Databases | N/A | M&A deals, sovereign issuance (sourced from public filings) |
Zero API keys required. Clone, install, and run.
# 1. Clone the repository
git clone https://github.com/DogInfantry/capital-markets-intelligence.git
cd capital-markets-intelligence
# 2. Set up Python environment
python -m venv venv
source venv/bin/activate # Mac/Linux
# venv\Scripts\activate # Windows
pip install -r requirements.txt
# 3. Phase 1 β Data Collection
python scripts/01_fetch_ipo_data.py
python scripts/02_fetch_mna_data.py
python scripts/03_stress_test_model.py
python scripts/04_case_study_builder.py
python scripts/05_fetch_sovereign_data.py
# 4. Phase 2 β Live API Data
python scripts/08_fetch_fred_data.py
python scripts/09_fetch_worldbank_data.py
# 5. Phase 3 β Advanced Analysis
python scripts/10_advanced_analysis.py
# 6. Phase 4 β Generate All Outputs
python scripts/06_generate_visualizations.py
python scripts/07_generate_memos.py
python scripts/11_generate_plotly_dashboards.py
python scripts/12_generate_excel_reports.py
python scripts/13_generate_pdf_reports.pyData β pandas Β· numpy Β· requests Β· yfinance Β· World Bank API
Analysis β scipy (stats) Β· numpy (linear algebra) Β· Jupyter
Dashboards β Plotly (graph_objects Β· make_subplots)
Excel Reports β openpyxl (conditional formatting Β· styled workbooks)
PDF Reports β fpdf (professional formatted output)
Visualization β matplotlib (Agg backend) Β· seaborn
Runtime β Python 3.13
This platform is architected to demonstrate capabilities directly relevant to:
| Firm | Division | Relevant Module |
|---|---|---|
| Goldman Sachs | GIR, Executive Office | Cross-asset regime detection, weekly capital markets snapshot |
| D.E. Shaw | Capital Markets Research | Quantitative IPO event study, statistical feature analysis |
| J.P. Morgan | Country Risk | Sovereign risk index (0β100), stress testing model |
| Deutsche Bank | Ratings Advisory | Sovereign issuance analytics, macro indicator panel |
| PwC | Deals Strategy | M&A case studies, deal screening model |
Contributions are welcome! This platform is actively evolving β we're looking for collaborators with backgrounds in quant finance, Python engineering, data visualization, and financial research.
- Browse issues labeled
good first issueβ well-scoped tasks with clear acceptance criteria - Browse issues labeled
help wantedβ higher-impact work the maintainer wants community help on - Read CONTRIBUTING.md for dev setup, coding style, and PR process
- See ROADMAP.md for the full v1.1 β v1.2 β v1.3 plan
- π Quant finance: regime-switching models, advanced event-study statistics, factor models
- π Python engineering: packaging, CLI, CI/CD, type safety, testing
- π Visualization: Plotly dashboard polish, interactive filters, chart standardization
- π Documentation: worked-example notebooks, scenario cookbook, model explainers
Comment on an issue to claim it before starting work.
| Milestone | Focus | Status |
|---|---|---|
| v1.1 β Engineering Hardening | CLI, packaging, config, tests, CI, logging, Docker | π In Progress |
| v1.2 β Analytics Upgrades | IPO event study, M&A classifier, sovereign decomposition, regime Markov | π Planned |
| v1.3 β UX, Outputs & Docs | Dashboard filters, PDF/Excel polish, notebooks, cookbook | π Planned |
| v2.0 β Advanced Research Platform | Dynamic term structure, factor models, LLM memos, web UI | π‘ Future |
See ROADMAP.md for full details and open issues per milestone.
Distributed under the MIT License β see LICENSE for details.
Created: March 2026 Β Β·Β Status: π Active Development Β Β·Β Python: 3.13
Built to institutional research standards. No API keys required. Contributions welcome.