Skip to content

About

๐Ÿ›๏ธ Investment Masters Roundtable 37 AI-Powered Investment Masters โ€ข 3-Stage Debate System

Topics

Resources

Contributing

Stars

1 star

Watchers

1 watching

Forks

Latest commit

ย 

History

6 Commits

Folders and files

Repository files navigation

Investment Masters Roundtable โ€” AI-Powered Multi-Stage Investment Analysis System

๐Ÿ›๏ธ Investment Masters Roundtable

37 AI-Powered Investment Masters โ€ข 3-Stage Debate System

14 Value Investors ร— 12 Technical Analysts ร— 11 Quantitative Signal Masters

Three-stage analysis with real-time market data โ†’ Roundtable debate minutes + Technical charts + Investment recommendations


Python 3.9+ License: MIT LLM: OpenAI Compatible Data: Multi-Market Stars


Quick Start ยท Architecture ยท 37 Masters ยท ไธญๆ–‡ๆ–‡ๆกฃ



โœจ What Makes This Special

Imagine Warren Buffett, George Soros, and 35 other legendary investors sitting around a table, debating whether you should buy a stock โ€” backed by real market data and powered by LLM reasoning.

Feature Description
๐Ÿ›๏ธ Three-Stage Architecture Fundamental debate โ†’ Technical trend analysis โ†’ Quantitative signal voting
โš”๏ธ Real Adversarial Debate Bull vs. Bear champions engage in multi-round LLM-driven debate โ€” not just summaries
โš ๏ธ Cross-Stage Conflict Detection Flags when fundamentals and technicals disagree: "You are trading against Graham"
๐Ÿ“Š Signal Matrix Voting 11 quantitative masters independently generate signals โ†’ weighted vote โ†’ net direction
๐Ÿ“ˆ One-Click Visualization Candlestick chart with MA/Bollinger/RSI/MACD overlays + support/resistance annotations
๐ŸŒ Multi-Market Support US stocks, Chinese A-shares, Hong Kong stocks โ€” via yfinance + akshare
๐Ÿ”Œ Any LLM Backend Works with GPT-4o, DeepSeek, Qwen, or any OpenAI-compatible API

๐Ÿ—๏ธ Architecture

flowchart TB
    subgraph INPUT["๐Ÿ“ฅ Input"]
        USER["User: Stock Symbol + Market"]
    end

    subgraph DATA["โš™๏ธ Data Engine"]
        direction LR
        OHLCV["OHLCV\nyfinance + akshare"]
        FUND["Fundamentals\nPE/PB/ROE/Revenue"]
        TECH["20+ Indicators\nMA/MACD/RSI/KDJ/BB/..."]
    end

    subgraph STAGE1["๐Ÿ›๏ธ Stage 1: Fundamental Debate (Weight: 60%)"]
        S1M["14 Investment Masters\nBuffett ยท Munger ยท Graham ยท Lynch\nMarks ยท Wood ยท Soros ยท Dalio\nDuan ยท Zhang ยท Li ยท Feng ยท Qiu ยท Lin"]
        S1P["7-Step Process\nIndependent โ†’ Camps โ†’ 2-Round Debate โ†’ Vote"]
    end

    subgraph STAGE2["๐Ÿ“ˆ Stage 2: Technical Analysis (Weight: 20%)"]
        S2M["12 Technical Masters\nDow ยท Wyckoff ยท Elliott ยท Nison\nWilder ยท Appel ยท Granville ยท DeMark\nLane ยท Williams ยท Elder ยท ARBR"]
        S2P["Parallel Analysis\nTrend / Pattern / Volume-Price"]
    end

    subgraph STAGE3["โšก Stage 3: Signal Voting (Weight: 20%)"]
        S3M["11 Signal Masters\nMACD ยท Bollinger ยท MA+OBV\nIchimoku ยท RSI/ADX ยท KDJ ยท CCI\nW%R ยท CMF ยท Triple Screen ยท Chaos"]
        S3P["Signal Matrix โ†’ Conflict Debate โ†’ Weighted Vote"]
    end

    subgraph OUTPUT["๐Ÿ“Š Output"]
        MD["๐Ÿ“ Markdown Report"]
        HTML["๐ŸŒ HTML Report"]
        CHART["๐Ÿ“ˆ Technical Chart"]
    end

    USER --> DATA
    DATA --> STAGE1
    STAGE1 -->|"consensus + dissent"| STAGE2
    STAGE2 -->|"trend confirmation"| STAGE3
    STAGE3 --> CROSS["โš ๏ธ Cross-Stage\nConflict Detection"]
    CROSS --> AGG["๐ŸŽฏ 60/20/20\nWeighted Aggregation"]
    AGG --> OUTPUT

    style INPUT fill:#1e293b,stroke:#3b82f6,color:#e2e8f0
    style DATA fill:#1e293b,stroke:#f97316,color:#e2e8f0
    style STAGE1 fill:#1e293b,stroke:#22c55e,color:#e2e8f0
    style STAGE2 fill:#1e293b,stroke:#eab308,color:#e2e8f0
    style STAGE3 fill:#1e293b,stroke:#ef4444,color:#e2e8f0
    style OUTPUT fill:#1e293b,stroke:#8b5cf6,color:#e2e8f0
Loading

๐Ÿš€ Quick Start

# 1. Clone
git clone https://github.com/LucasYanzy/investment-masters-roundtable.git
cd investment-masters-roundtable

# 2. Install dependencies
pip install -r requirements.txt

# 3. Configure API key
cp .env.example .env
# Edit .env โ†’ set LLM_API_KEY (supports OpenAI / DeepSeek / Qwen)

# 4. Analyze any stock
python run.py --symbol AAPL --market US       # Apple (US)
python run.py --symbol 000001 --market CN     # Ping An Bank (China A-share)
python run.py --symbol 0700.HK --market HK    # Tencent (Hong Kong)

# 5. Launch Web UI
python run.py --web

๐Ÿ“‹ Output

Each analysis produces:

  • ๐Ÿ“ {symbol}_report.md โ€” Full roundtable debate minutes
  • ๐ŸŒ {symbol}_report.html โ€” Dark-themed interactive HTML report
  • ๐Ÿ“ˆ {symbol}_chart.png โ€” Candlestick + indicators chart

๐Ÿค– 37 Masters Across 3 Stages

๐Ÿ›๏ธ Stage 1: 14 Investment Masters (Qualitative Debate)
# Master School Core Framework
1 Warren Buffett Value Investing Moat, margin of safety, long-term holding
2 Charlie Munger Value Investing Mental models, inversion thinking
3 Benjamin Graham Value Investing Intrinsic value, Mr. Market, safety margin
4 Peter Lynch Growth Investing PEG valuation, invest in what you know
5 Howard Marks Contrarian Second-level thinking, cycle positioning
6 Cathie Wood Disruptive Innovation ARK innovation framework
7 George Soros Macro Hedge Reflexivity theory, trend trading
8 Ray Dalio Macro Hedge Economic machine, debt cycles, All Weather
9 Duan Yongping ๆฎตๆฐธๅนณ Pragmatist Business model first, "ben fen" philosophy
10 Zhang Lei ๅผ ็ฃŠ Growth Investing Structural value, dynamic moats
11 Li Lu ๆŽๅฝ• Value Investing Circle of competence, Civilization 3.0
12 Feng Liu ๅ†ฏๆŸณ Contrarian Weak-form system, odds thinking
13 Qiu Guolu ้‚ฑๅ›ฝ้นญ Value Investing "Count moons, not stars"
14 Lin Yuan ๆž—ๅ›ญ Consumer Investing Monopoly brands, "mouth stocks"
๐Ÿ“ˆ Stage 2: 12 Technical Analysis Masters (Trend / Pattern / Volume)
# Master Core Theory Focus Area
1 Charles Dow Dow Theory Primary / secondary / minor trends
2 Richard Wyckoff Wyckoff Method Volume-price, accumulation/distribution
3 Ralph Elliott Wave Theory Wave counting, Fibonacci
4 Steve Nison Japanese Candlesticks Candlestick pattern recognition
5 J. Welles Wilder RSI/DMI/ADX/ATR Trend strength, volatility
6 Gerald Appel MACD Moving average convergence divergence
7 Joseph Granville Volume 8 Rules OBV volume-price validation
8 Thomas DeMark TD Sequential Precise buy/sell points
9 George Lane Stochastic/KDJ Overbought/oversold zones
10 Larry Williams Williams %R Extreme price levels
11 Alexander Elder Triple Screen Multi-timeframe analysis
12 ARBR Team Sentiment Indicators Market sentiment gauges
โšก Stage 3: 11 Quantitative Signal Masters (Pure Numerical Signals + Debate)
# Master Indicators Signal Output
1 Gerald Appel MACD Golden/death cross + target levels
2 John Bollinger Bollinger Bands Band breakout/reversion
3 Joseph Granville MA + OBV Moving average cross + volume validation
4 Goichi Hosoda Ichimoku Cloud Cloud support/resistance
5 J. Welles Wilder RSI/ADX/ATR/PSAR Overbought/oversold + trend strength
6 George Lane KDJ %K/%D crossover
7 Donald Lambert CCI Channel breakout
8 Larry Williams W%R Overbought/oversold / divergence
9 Marc Chaikin CMF Money flow direction
10 Alexander Elder Triple Screen Multi-timeframe signals
11 Bill Williams Chaos Trading Alligator/Fractal/AO/AC

๐Ÿ“ Project Structure

investment-masters-roundtable/
โ”œโ”€โ”€ run.py                        # CLI entry + Web launcher
โ”œโ”€โ”€ config.py                     # Global config (env-driven)
โ”‚
โ”œโ”€โ”€ data_engine/                  # Data layer
โ”‚   โ”œโ”€โ”€ fetcher.py                #   OHLCV (yfinance + akshare)
โ”‚   โ”œโ”€โ”€ fundamental_data.py       #   Fundamentals (valuation/financials)
โ”‚   โ”œโ”€โ”€ technical_indicators.py   #   20+ technical indicators
โ”‚   โ”œโ”€โ”€ cache.py                  #   2-level cache (LRU + file)
โ”‚   โ””โ”€โ”€ schema.py                 #   Unified data structures
โ”‚
โ”œโ”€โ”€ masters/                      # 37 masters analysis layer
โ”‚   โ”œโ”€โ”€ base_master.py            #   Base class + LLM call + MasterOpinion
โ”‚   โ”œโ”€โ”€ registry.py               #   37-master registry
โ”‚   โ”œโ”€โ”€ investment_master.py      #   Stage 1: 14 investment masters
โ”‚   โ”œโ”€โ”€ technical_master.py       #   Stage 2: 12 technical masters
โ”‚   โ”œโ”€โ”€ signal_master.py          #   Stage 3: 11 signal masters
โ”‚   โ””โ”€โ”€ skill_references/         #   Master frameworks (.md)
โ”‚       โ”œโ”€โ”€ investment_masters/   #     14 value/growth frameworks
โ”‚       โ”œโ”€โ”€ technical_masters/    #     12 technical analysis frameworks
โ”‚       โ””โ”€โ”€ signal_masters/       #     11 quantitative signal frameworks
โ”‚
โ”œโ”€โ”€ debate_orchestrator/          # Debate coordination layer
โ”‚   โ”œโ”€โ”€ orchestrator.py           #   Main orchestrator (3-stage)
โ”‚   โ”œโ”€โ”€ stage1_debate.py          #   Stage 1: 7-step debate
โ”‚   โ”œโ”€โ”€ stage2_analysis.py        #   Stage 2: parallel analysis
โ”‚   โ”œโ”€โ”€ stage3_signals.py         #   Stage 3: signal matrix + debate
โ”‚   โ”œโ”€โ”€ cross_stage_conflict.py   #   Cross-stage conflict detection
โ”‚   โ””โ”€โ”€ aggregator.py             #   60/20/20 weighted aggregation
โ”‚
โ”œโ”€โ”€ report_generator/             # Report generation layer
โ”‚   โ”œโ”€โ”€ markdown_report.py        #   Markdown roundtable minutes
โ”‚   โ”œโ”€โ”€ html_report.py            #   Dark-themed HTML report
โ”‚   โ””โ”€โ”€ chart_renderer.py         #   mplfinance technical charts
โ”‚
โ”œโ”€โ”€ web_app/                      # Web interface (Flask)
โ”‚   โ”œโ”€โ”€ app.py                    #   Flask application
โ”‚   โ””โ”€โ”€ templates/index.html      #   Dark-themed SPA
โ”‚
โ”œโ”€โ”€ tests/                        # Tests
โ”‚   โ””โ”€โ”€ test_smoke.py             #   Smoke tests
โ”‚
โ”œโ”€โ”€ docs/                         # Documentation
โ”‚   โ””โ”€โ”€ architecture.md           #   System architecture
โ”‚
โ””โ”€โ”€ examples/                     # Sample outputs

๐Ÿ”ง Tech Stack

Layer Technology
Data Fetching yfinance (US/HK) + akshare (China A-shares)
Technical Indicators pandas-ta + pure pandas/numpy fallback
LLM Integration OpenAI-compatible API (GPT-4o / DeepSeek / Qwen)
Concurrency asyncio (parallel within stage, serial between stages)
Visualization mplfinance + matplotlib
Web Interface Flask + dark-themed SPA
Logging Python logging with --verbose mode

โš™๏ธ Configuration

Copy .env.example โ†’ .env:

# LLM (any OpenAI-compatible API)
LLM_API_BASE=https://api.openai.com/v1
LLM_API_KEY=sk-xxx
LLM_MODEL=gpt-4o

# Data
DEFAULT_PERIOD=2y          # Historical data length
FMP_API_KEY=               # Optional: financialmodelingprep

# Stage Weights (must sum to 1.0)
STAGE1_WEIGHT=0.6          # Fundamentals
STAGE2_WEIGHT=0.2          # Technical confirmation
STAGE3_WEIGHT=0.2          # Signal timing

๐Ÿ“ˆ Performance

Metric Value
LLM Calls 37 base + up to 6 debate rounds โ‰ˆ ~43 calls
Analysis Time 30โ€“120 seconds (depends on LLM response speed)
Concurrency All masters parallel within each stage (14 / 12 / 11)
Cache TTL Technical data: 1h, Fundamentals: 24h

๐Ÿค Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'feat: add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ“„ License

MIT ยฉ 2026 Lucas Yan


โญ If this project helps you, please give it a Star!

ไธญๆ–‡ๆ–‡ๆกฃ โ†’

About

๐Ÿ›๏ธ Investment Masters Roundtable 37 AI-Powered Investment Masters โ€ข 3-Stage Debate System

Topics

Resources

Contributing

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages