Skip to main content

Self-hosted AI trading strategy lab โ€” backtest, paper trade, run AI tournaments overnight.

Project description

๐ŸŽฏ TradeSight โ€” Self-Hosted AI Trading Strategy Lab

Python 3.11+ Flask License: MIT Tests: 169/169 Paper Trading Live P&L Portfolio

Build, test, and evolve trading strategies with AI โ€” entirely on your own machine. No cloud subscription. No data leaks. No monthly fees.

TradeSight is a self-hosted Python app that runs AI-powered strategy tournaments overnight, backtests technical indicators, and executes paper trades via Alpaca โ€” all from a local web dashboard.


๐Ÿค” Who Is This For?

  • Algorithmic trading hobbyists who want to test strategies without risking real money
  • Python developers exploring quantitative finance and AI-driven decision systems
  • Privacy-conscious traders who don't want their strategies on someone else's server
  • Makers building autonomous financial agents

โœจ Features

Feature Description
๐Ÿงฌ AI Strategy Tournaments Automated overnight evolution of trading strategies โ€” the best wins, rest are retired
๐Ÿ“Š 15+ Technical Indicators MACD, RSI, Bollinger Bands, EMA crossovers, ATR, volume analysis, and more
๐Ÿ’ธ Paper Trading Connect Alpaca paper account โ€” trade with fake money, track real P&L
๐Ÿ” Multi-Market Scanner Scan stocks + Polymarket prediction markets for signals simultaneously
๐ŸŒ Web Dashboard Real-time Flask interface โ€” positions, signals, tournament results, logs
โฐ Cron Automation Overnight strategy improvement runs automatically โ€” wake up to new results
๐Ÿ”’ 100% Local Runs on your machine. Your strategies stay yours.

๐Ÿš€ Quick Start

Requirements

Install

git clone https://github.com/rmbell09-lang/tradesight.git
cd tradesight
pip install -r requirements.txt

Run

python START_TRADESIGHT.py

Dashboard opens at http://localhost:5000

Demo Mode (No API Keys Required)

TradeSight runs fully in demo mode with simulated market data โ€” no Alpaca account needed to explore.

Live Paper Trading (Optional)

  1. Create a free Alpaca paper account
  2. Add your API keys to config/api_keys.json:
{
  "alpaca_key": "YOUR_KEY",
  "alpaca_secret": "YOUR_SECRET",
  "paper": true
}

๐Ÿ“ธ Dashboard

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  TradeSight Dashboard          [Localhost:5000]  โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Markets  โ”‚Tournamentsโ”‚  Trading  โ”‚   Settings    โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  Active Signals: 3    Open Positions: 2          โ”‚
โ”‚  Best Strategy: MACD Crossover (score: 0.72)     โ”‚
โ”‚  Paper P&L: -$113.96  (initial RSI strategy)     โ”‚
โ”‚  Next Tournament: Tonight @ 2:00 AM              โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿงช Test Results

169/169 tests passing โœ…
python -m pytest tests/ -v

๐Ÿ—๏ธ Architecture

tradesight/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ scanner.py          # Multi-market signal scanner
โ”‚   โ”œโ”€โ”€ strategy_lab/       # AI tournament engine
โ”‚   โ”œโ”€โ”€ trading/            # Alpaca paper trade executor
โ”‚   โ”œโ”€โ”€ indicators/         # 15+ technical indicators
โ”‚   โ””โ”€โ”€ automation/         # Overnight cron jobs
โ”œโ”€โ”€ web/                    # Flask dashboard
โ”œโ”€โ”€ config/                 # API keys + settings
โ”œโ”€โ”€ data/                   # Price history cache
โ””โ”€โ”€ tests/                  # 169 unit tests

๐Ÿ“ˆ Live Paper Trading โ€” April 2026

Real money-at-risk (on paper). Updated automatically. System has been live since March 2026.

Current Portfolio: $532 total value | +6.43% total return (+$32.15)

Strategy Trades P&L Win Rate
MACD Crossover 1 +$17.89 100% โœ…
VWAP Reversion 1 -$4.75 0%
RSI Mean Reversion 5 -$13.77 20%

Recent Closed Trades (Last 7 Days):

Symbol Strategy Entry Exit P&L
JPM MACD Crossover $242.94 $303.24 +$17.89 โœ…
SPY RSI Mean Reversion $596.36 $649.79 +$6.06 โœ…
AMZN VWAP Reversion $223.25 $209.69 -$4.75
QQQ RSI Mean Reversion $590.06 $565.22 -$6.56
GOOG RSI Mean Reversion $297.77 $276.47 -$13.28

This is a live paper trading account connected to Alpaca. All prices are real market data; no real money at risk. System runs overnight tournaments to evolve strategy parameters automatically. Early RSI underperformance drove a regime-filter upgrade now in production.


๐Ÿ—บ๏ธ Roadmap

  • Multi-indicator technical analysis (15+ indicators)
  • AI strategy tournament engine
  • Alpaca paper trading integration
  • Real-time web dashboard
  • Overnight automation (cron)
  • Phase 1: Active stop-loss + take-profit execution
  • Phase 1: Trailing stop with high-water mark
  • Phase 2: Confluence strategy (multi-indicator entry gates)
  • Phase 2: Market regime detection (bull/bear/sideways filter)
  • Phase 3: Monte Carlo simulation for strategy validation


๐Ÿ’ฐ Support Development

TradeSight is MIT-licensed and free to use. If it saved you time or you want the packaged strategy lab with setup guide and pre-tuned parameters:

Get TradeSight Strategy Lab on Gumroad โ†’ โ€” $49 one-time

Includes: packaged download, setup walkthrough, pre-configured Alpaca integration, and strategy parameter reference.

๐Ÿ”— Related Projects & Alternatives

TradeSight is similar to โ€” but different from โ€” these popular Python trading tools:

Project What It Does How TradeSight Differs
backtrader Python backtesting framework TradeSight adds AI strategy evolution + live paper trading web dashboard
freqtrade Crypto trading bot TradeSight focuses on stocks (Alpaca API) with overnight strategy tournaments
vectorbt Vectorized backtesting in notebooks TradeSight is a self-hosted web app โ€” no notebook required
zipline-reloaded Algorithmic trading library TradeSight is a full app, not a library โ€” no Python trading experience needed
Jesse Crypto strategy framework TradeSight is for stocks + prediction markets, not crypto
nautilus_trader High-performance trading platform TradeSight is simpler, self-hosted, built for hobbyists not HFT
BillingWatch Self-hosted billing anomaly detection Same maker โ€” catch Stripe issues before they cost you

Also useful for: python trading bot ยท algorithmic trading python ยท paper trading software ยท free backtesting ยท stock trading python ยท quantitative finance ยท algo trading strategy tester ยท self-hosted trading platform ยท automated trading system ยท backtesting framework


๐Ÿ“„ License

MIT โ€” free to use, modify, and build on.


โญ If This Helped You

Star the repo โ€” it helps other Python traders find it.

Got broken AI-generated code? โ†’ Vibe Code Rescue

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tradesight-1.0.0.tar.gz (35.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tradesight-1.0.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file tradesight-1.0.0.tar.gz.

File metadata

  • Download URL: tradesight-1.0.0.tar.gz
  • Upload date:
  • Size: 35.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for tradesight-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1d9b8c5e393265e1185f7ae275e6081033ab0afa90f7821fc7875bdd14c95914
MD5 3ee1160ed687d5050446fb16f7c96e24
BLAKE2b-256 c979f44f0577a6d8d1f057fb720ef2ed1da75961250f0c8f9891014a7dc9c381

See more details on using hashes here.

File details

Details for the file tradesight-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: tradesight-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for tradesight-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f8f57763b19336da1168a1784c6ad6f7f45dda3b88989508080b1cd4bfc3b9ab
MD5 538638a82156fc46ae376a805ac04970
BLAKE2b-256 1c8a3f25de3b09aba28d5a4174e99809572fd9f9092fafbe5fd3fa1b308fdb52

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page