Skip to content

NatoDoyle/trading-scanner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Trading Pipeline Scanner

A systematic S&P 500 stock scanner with a Tkinter desktop GUI. It fetches daily OHLCV data, computes technical indicators, detects trade signals, and walks candidates through a multi-step pipeline from scan to backtest.

Quick Start

Requires Python 3.11+ and Tkinter (included with most Python installs).

# Create a virtual environment
python -m venv venv
source venv/bin/activate   # Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Launch the GUI
python app.py

Pipeline Steps

The scanner runs a six-step pipeline. Each step reads the previous step's output from outputs/.

Step Module Description
1. Scanner src/scanner.py Fetches OHLCV data, computes indicators, detects LONG/SHORT signals, outputs candidates.json
2. GPT Briefs src/gpt_briefs.py Generates a prompt for GPT-based fundamental analysis
3. Select Trades src/select_trades.py Filters candidates through hard rules and GPT scores
4. Prepare Orders src/prepare_manual_orders.py Computes entry ranges, stop distances, and position sizes
5. Backtest src/backtest.py Runs a historical backtest simulation
6. Analyze src/analyze_backtest.py Produces performance analytics and reporting

Project Structure

trading-scanner/
  app.py                  # GUI entry point
  config.yaml             # Strategy and risk parameters
  requirements.txt        # Python dependencies
  pyproject.toml          # Build metadata
  src/
    scanner.py            # Market scanner pipeline
    config.py             # YAML config loader
    indicators.py         # Technical indicator calculations
    signals.py            # Signal detection (pullback, breakout, short setups)
    filters.py            # Price, volume, and liquidity filters
    rank.py               # Candidate scoring
    regime.py             # Market regime classification (BULL/BEAR/etc.)
    risk.py               # Position sizing and regime risk multipliers
    data.py               # OHLCV data fetching via yfinance
    universe.py           # S&P 500 ticker list loader
    gui/
      app.py              # Tkinter bootstrap
      main_window.py      # Main window, menu bar, settings dialog
      pipeline_runner.py  # Step execution (subprocess or import mode)
      views/              # Tabbed views (candidates, orders, backtest, etc.)
  outputs/                # Pipeline artifacts (gitignored)
  data_cache/             # Ticker lists, earnings data, run history

Configuration

All strategy and risk parameters live in config.yaml. Key settings include account size, risk per trade, position limits, lookback period, and backtest date range. See the file for full documentation.

Headless Usage

To run the scanner without the GUI:

python -m src.scanner

To run the full nightly pipeline (scanner + GPT briefs + auto-select):

python -m src.nightly

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages