An institutional-grade quantitative finance, equity valuation, macroeconomic regime modeling, and private wealth management suite grounded strictly in the official CFA Institute Level I, II, and III Curriculum.
cfa_knowledge_base/
├── cfa_quant/ # Core Quantitative Domain Package (cfa-quant-suite)
│ ├── models.py # Typed dataclass data contracts & schemas
│ ├── capital_market_expectations.py # Grinold-Kroner & Singer-Terhaar CME models
│ ├── portfolio_execution_feedback.py # Black-Litterman optimizer & Brinson-Fachler attribution
│ ├── ips_generator.py # CFA Level III Institutional IPS Generator
│ ├── tax_legal_engine.py # Tax-Alpha Asset Placement & State Arbitrage
│ ├── opportunity_cost.py # ROIC-WACC EVA Spread & Next-Best Alternative Screener
│ ├── stochastic_sim.py # Markov Regime-Switching & Merton Jump Diffusion 10k Monte Carlo
│ ├── options_engine.py # Vectorized Black-Scholes Greeks (Delta, Gamma, Vega, Vanna, Volga)
│ ├── charting.py # Interactive Candlestick & Volume surface with Box Zoom
│ ├── fred_inventory.py # Master catalog of 30+ core macroeconomic series
│ └── duckdb_macro_store.py # Columnar time-series warehouse (FRED direct ingestion)
│
├── pipeline/ # Fundamental Equity Research Pipeline
│ ├── sec_edgar_client.py # Point-in-time SEC 10-K & 10-Q XBRL duration-validated parser
│ ├── cfa_valuation_engine.py # 3-Stage DCF (FCFF), Dynamic WACC & Residual Income Model
│ ├── forensic_accounting.py # Piotroski F-Score (0-9), Beneish M-Score & Sloan Accruals
│ ├── industry_benchmarks.py # DuPont 5-Way decomposition & Competitor Peer Medians
│ ├── capm_sml_model.py # Security Market Line (SML) & Jensen's Alpha
│ ├── run_valuation.py # Single-stock valuation research memo CLI
│ └── screener.py # Multi-stock fundamental screener & Margin of Safety ranker
│
├── .agents/skills/ # Autonomous CFA Agent Skills Suite
│ ├── cfa-wealth-advisor/ # CFA Level III Private Wealth & IPS compiler
│ ├── cfa-portfolio-engine/ # SAA/TAA, Black-Litterman & Rebalancing Corridors
│ ├── cfa-kb-search/ # FTS5 full-text curriculum search tool
│ └── skill-creator/ # Antigravity skill structure validator
│
├── data/
│ ├── cfa_knowledge_base.sqlite # 3,871 indexed curriculum notes, mock exams & research papers
│ ├── financial_formulas.json # 30+ fundamental CFA formulas with LaTeX definitions
│ ├── gaap_ifrs_standards.json # US GAAP vs. IFRS analytical reconciliation dictionary
│ └── jurisdiction_tax_rules.json # 50-State & Global Wealth Tax Policy dictionary
│
└── app.py # Multi-Tab Interactive Streamlit Dashboard
# Clone the repository
git clone https://github.com/cbwinslow/cfa-knowledge-base.git
cd cfa-knowledge-base
# Create & activate virtual environment
python3 -m venv venv
source venv/bin/activate
# Install package in editable development mode
pip install -e .
pip install -r requirements.txtstreamlit run app.pyThe interactive dashboard provides 8 comprehensive financial workspaces:
- 🏛️ Valuation & SML: DCF intrinsic value, Dynamic WACC, Residual Income (EVA), and Security Market Line.
- 📈 Price Action & Zoom: High-definition candlestick chart with interactive range buttons, slider, and click-and-drag box zoom.
- 🎯 Opportunity Cost & EVA: Live FCF yield vs. 10-Yr Treasury spread, hurdle rate audit, and next-best competitor warning.
- 👥 Peer Comps & DuPont 5-Way: DuPont decomposition (Tax/Interest Burden, Margin, Asset Turnover, Leverage) vs. industry medians.
- 📝 IPS Generator (L3): Client intake form compiling institutional Investment Policy Statements.
- ⚖️ Tax & Legal Wealth Alpha: Asset location optimizer (Taxable vs. Traditional 401k vs. Roth) & State Tax Relocation Arbitrage.
- 🌐 Macro & Yield Curve: Live US Treasury curve, SOFR benchmark, breakeven inflation, and recession spread signals.
- 📚 CFA Knowledge Base: Instant full-text search across 3,871 indexed curriculum pages and mock exams.
python3 pipeline/run_valuation.py MSFTpython3 pipeline/screener.py AAPL MSFT GOOGL NVDA AMZNpython3 scripts/query_cfa_kb.py "Black-Litterman asset allocation"python3 .agents/skills/cfa-wealth-advisor/scripts/compile_ips.py .agents/skills/cfa-wealth-advisor/examples/client_case_entrepreneur.jsonAll models and skills are grounded in:
- CFA Institute Code of Ethics and Standards of Professional Conduct
- CFA Level I, II, and III Curriculum (2024–2026 Editions)
- GIPS (Global Investment Performance Standards)
- C.B. Winslow (Passed all three CFA exams in 2014, Active CFA Institute Member)