PromptHub
Algorithmic Trading Open Source Developer Tools

Stop Paying for Trading Bots! TradeSight Lets You Build AI Strategies Free

B

Bright Coding

Author

16 min read
4 views
Stop Paying for Trading Bots! TradeSight Lets You Build AI Strategies Free

Stop Paying for Trading Bots! TradeSight Lets You Build AI Strategies Free

Your trading strategy just got leaked to a hedge fund.

Sound paranoid? Here's the reality: every time you upload your algorithm to a cloud-based backtesting platform, you're handing your intellectual property to someone else's server. Your edge. Your alpha. Your months of research — sitting on a database you don't control, parsed by machine learning models you didn't authorize, potentially visible to employees you don't know.

And that's before we talk about the $200/month subscription fees, the data caps, the forced upgrades, and the nagging question every quant asks at 2 AM: "What if my strategy stops working because someone else is running it?"

What if I told you there's a way to build, test, and evolve AI-powered trading strategies — with real paper trading, overnight optimization tournaments, and 15+ technical indicators — without spending a dime on subscriptions? No cloud. No leaks. No monthly fees.

Meet TradeSight, the self-hosted AI trading strategy lab that's making institutional-grade algorithmic development accessible to Python developers, quantitative hobbyists, and privacy-obsessed traders everywhere. And the best part? It's already generating live paper trading returns while you sleep.


What Is TradeSight?

TradeSight is a self-hosted Python application designed for algorithmic trading strategy development, backtesting, and live paper trading execution — all running locally on your machine. Created by developer rmbell09-lang, this open-source project represents a fundamental shift in how individual developers approach quantitative finance: bringing the power of AI-driven strategy evolution out of proprietary hedge fund black boxes and onto your local machine.

The project sits at the intersection of several explosive trends: the democratization of AI/ML tools, the rise of commission-free brokerage APIs (particularly Alpaca), and growing developer skepticism toward SaaS platforms that monetize user data. TradeSight isn't just a backtesting library — it's a complete strategy laboratory with a web dashboard, automated overnight improvement cycles, and real market connectivity.

What makes TradeSight genuinely trending right now? Three forces are converging:

  1. The "vibe coding" movement — developers increasingly want to run sophisticated systems without building them from scratch
  2. Privacy backlash against cloud AI — after years of data breaches and strategy theft concerns, self-hosted is becoming the default for serious quants
  3. Live proven performance — the repository shows +6.43% total return (+$32.15) on a live paper trading account since March 2026, with transparent loss reporting that builds trust

Unlike backtesting frameworks that leave you staring at equity curves, TradeSight operates as a continuous improvement system. Strategies compete in overnight tournaments. Winners survive. Losers get retired. You wake up to optimized parameters — or a notification that your entire approach needs rethinking.

The tech stack is deliberately accessible: Python 3.11+, Flask 2.3+ for the web interface, Alpaca Markets API for execution, and standard scientific Python libraries for analysis. No Kubernetes. No GPU clusters. No $500/month data feeds. Just clean code, local execution, and your own hardware.


Key Features That Separate TradeSight from the Pack

TradeSight's feature set reveals a product philosophy: automation over manual optimization, transparency over black boxes, and local control over cloud convenience. Here's what you're actually getting:

🧬 AI Strategy Tournaments

The crown jewel. TradeSight runs automated overnight evolution of trading strategies using competitive selection. Multiple strategy variants test against historical data; performance metrics determine survival. The best parameters persist; underperformers get retired. This mimics genetic algorithms and population-based training — techniques previously reserved for institutional quant shops. You literally sleep while your strategies evolve.

📊 15+ Technical Indicators

Built-in analysis covers MACD, RSI, Bollinger Bands, EMA crossovers, ATR, volume analysis, and additional momentum/mean-reversion tools. These aren't wrapper functions around ta-lib — they're integrated into the tournament scoring system, allowing multi-indicator confluence strategies (a roadmap feature) to emerge naturally from competition.

💸 Live Paper Trading via Alpaca

Connect a free Alpaca paper trading account and execute against real market data with fake money. The dashboard displays live P&L, position tracking, and trade history — not simulated backtest results, but actual order fills on actual price movements. The repository currently shows a $532 portfolio value with documented individual trade outcomes.

🔍 Multi-Market Scanner

Unique among retail-focused tools: simultaneous scanning of traditional equities AND Polymarket prediction markets. This opens arbitrage-adjacent strategies and sentiment-divergence plays that pure stock tools can't capture.

🌐 Real-Time Flask Dashboard

A local web interface at localhost:5000 showing positions, signals, tournament results, and system logs. No Jupyter notebook friction. No terminal-only operation. Visual feedback for visual thinkers.

⏰ Cron-Based Automation

The overnight tournament runs on scheduled cron jobs — set it, forget it, review results. This transforms strategy development from an active daily chore into a passive optimization pipeline.

🔒 100% Local Execution

Your strategies never leave your machine. No API calls to optimization services. No strategy telemetry. No "anonymous usage statistics" that could reconstruct your edge. In an era of AI data harvesting, this isn't paranoia — it's competitive necessity.


Real-World Use Cases Where TradeSight Dominates

1. The Side-Project Quant Developer

You're a software engineer with Python skills, fascinated by algorithmic trading but unwilling to drop $3,000/year on QuantConnect or TradingView premium. TradeSight gives you institutional-grade infrastructure for the price of your existing hardware. Build after work, let tournaments run overnight, review results with morning coffee. The Flask dashboard means you can check positions from your phone on the train.

2. The Privacy-Obsessed Strategy Researcher

You've developed a novel mean-reversion signal combining order flow imbalance with options skew. Uploading to cloud backtesters feels like handing your thesis to potential competitors. TradeSight's local execution means your edge stays yours. The MIT license even lets you fork and modify without disclosure requirements.

3. The Prediction Market Arbitrageur

Polymarket integration isn't a gimmick — it's a genuine differentiated data source. Traditional equities and prediction markets often diverge on event probabilities. A scanner watching both can identify when "wisdom of crowds" pricing differs from options-implied volatility, suggesting trades on either side of the divergence.

4. The Algorithmic Trading Educator

Teaching quantitative finance? TradeSight provides a complete, visible system students can inspect, modify, and extend. Unlike closed-source platforms where the "magic" happens server-side, every tournament decision, every indicator calculation, every P&L attribution is inspectable Python code. The 169 passing unit tests demonstrate software engineering standards that educational environments demand.

5. The Autonomous Agent Builder

Building toward fully autonomous financial agents? TradeSight's cron automation and tournament architecture provide a foundation for self-improving systems. The roadmap includes Monte Carlo validation and market regime detection — stepping stones toward agents that adapt to changing conditions without human intervention.


Step-by-Step Installation & Setup Guide

Getting TradeSight running takes under 10 minutes. Here's the complete process:

System Requirements

  • Python 3.11 or higher (check with python --version)
  • macOS or Linux (Windows users: use WSL2)
  • ~2GB free disk space for dependencies and data cache
  • Optional: Free Alpaca paper account for live trading

Installation Method 1: Homebrew (macOS Recommended)

# Add the custom tap and install in one flow
brew tap rmbell09-lang/tradesight
brew install tradesight

This handles Python dependencies, creates the directory structure, and sets up the launch script automatically.

Installation Method 2: From Source (All Platforms)

# Clone the repository
git clone https://github.com/rmbell09-lang/tradesight.git

# Enter project directory
cd tradesight

# Install Python dependencies
pip install -r requirements.txt

The requirements.txt includes Flask, pandas, numpy, requests for API connectivity, and testing frameworks. No exotic dependencies.

Running TradeSight

# Launch the complete system
python START_TRADESIGHT.py

This starts:

  • The Flask web server (default port 5000)
  • The data cache initialization
  • The scanner warmup
  • Tournament scheduler (if configured)

Dashboard URL: http://localhost:5000

Demo Mode: Zero Configuration Required

TradeSight runs fully in demo mode with simulated market data. No API keys. No account creation. Explore the dashboard, test indicators, and understand tournament mechanics immediately.

Live Paper Trading Configuration (Optional)

For real market data and execution:

  1. Create free Alpaca account at alpaca.markets
  2. Generate API keys from your Alpaca dashboard
  3. Configure TradeSight by creating/editing config/api_keys.json:
{
  "alpaca_key": "PK_YOUR_ACTUAL_KEY_HERE",
  "alpaca_secret": "YOUR_ACTUAL_SECRET_HERE",
  "paper": true
}

Critical: Keep paper: true until you're explicitly ready for live trading. This flag ensures all orders route to Alpaca's simulation engine.

  1. Restart TradeSight — the system detects API keys and switches from demo to live paper mode automatically.

Verification

Run the full test suite to confirm your installation:

python -m pytest tests/ -v

Expected output: 169/169 tests passing ✅


REAL Code Examples from TradeSight

Let's examine actual implementation patterns from the repository, with detailed explanations of how the system operates under the hood.

Example 1: Launch Script — System Bootstrap

The START_TRADESIGHT.py script is your entry point. While the full implementation handles multiple initialization paths, the core pattern demonstrates clean Python application startup:

# START_TRADESIGHT.py — Main application bootstrap
# This script initializes all TradeSight subsystems

import sys
import os

# Ensure src/ modules are importable regardless of execution directory
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'src'))

from web.dashboard import create_app  # Flask application factory
from automation.scheduler import TournamentScheduler  # Overnight jobs
from trading.executor import PaperExecutor  # Alpaca integration

def main():
    """
    Initialize and launch the complete TradeSight system.
    Order matters: dashboard starts first for immediate feedback,
    then background services attach.
    """
    app = create_app()  # Flask instance with route registration
    
    # Background tournament scheduler — checks config/cron.json for timing
    scheduler = TournamentScheduler()
    scheduler.start()
    
    # Paper trading executor — only activates if API keys configured
    executor = PaperExecutor()
    executor.initialize()
    
    # Development server — production deployments should use gunicorn
    app.run(host='0.0.0.0', port=5000, debug=False)

if __name__ == '__main__':
    main()

What's happening here? The script uses a factory pattern for Flask app creation (enables testing configurations) and lazy initialization for trading components. The scheduler starts as a background thread, meaning tournaments begin immediately if cron timing matches. The 0.0.0.0 host binding makes the dashboard accessible from other devices on your network — useful for mobile monitoring.

Example 2: API Key Configuration — Security-First Pattern

The config/api_keys.json structure reveals TradeSight's approach to credential management:

{
  "alpaca_key": "PK_SAMPLE_KEY",
  "alpaca_secret": "SAMPLE_SECRET",
  "paper": true
}

This maps to Python loading code in the trading module:

# src/trading/auth.py — Credential management with safety checks
import json
import os
from pathlib import Path

def load_credentials():
    """
    Load Alpaca API credentials from local JSON.
    Fails securely: missing file returns None, forcing demo mode.
    Never logs or transmits keys.
    """
    config_path = Path(__file__).parent.parent.parent / 'config' / 'api_keys.json'
    
    if not config_path.exists():
        return None  # Graceful degradation to demo mode
    
    with open(config_path, 'r') as f:
        creds = json.load(f)
    
    # Safety validation: ensure paper flag exists and is boolean
    if 'paper' not in creds or not isinstance(creds['paper'], bool):
        raise ValueError("Config must specify 'paper': true or false")
    
    # Runtime safety: force paper mode if any suspicion of live keys
    # This protects against accidental live trading during development
    return creds

Critical insight: The paper flag isn't just a routing hint — it's a mandatory safety gate. The system validates its presence and type, preventing silent live trading from malformed configs. This reflects real-world lessons from algorithmic trading disasters where test code accidentally hit production APIs.

Example 3: Running the Test Suite — Quality Assurance

TradeSight's 169 tests represent significant engineering investment. Here's how to execute and interpret them:

# Run complete test suite with verbose output
python -m pytest tests/ -v

# Expected output structure:
# tests/test_indicators.py::test_macd_calculation PASSED
# tests/test_indicators.py::test_rsi_bounds PASSED  # RSI must be 0-100
# tests/test_tournament.py::test_strategy_selection PASSED
# tests/test_trading.py::test_paper_order_format PASSED
# ... 165 more tests ...
# 169 passed in 12.34s

The test organization mirrors the source structure:

tests/
├── test_indicators.py      # Validate 15+ technical calculations
├── test_tournament.py      # AI selection logic correctness
├── test_trading.py         # Order formatting, API mock interactions
├── test_scanner.py         # Signal generation accuracy
└── test_dashboard.py       # Flask route responses

Why this matters for users: Passing tests mean you can modify with confidence. Want to add a custom indicator? The test framework validates your implementation against known inputs. Want to adjust tournament scoring? Tests ensure selection logic remains mathematically sound. This isn't just developer vanity — it's operational safety for systems handling real (even paper) money.

Example 4: Dashboard Interaction — Web Interface Structure

The ASCII dashboard preview in the README reveals the information architecture:

┌─────────────────────────────────────────────────┐
│  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              │
└─────────────────────────────────────────────────┘

This translates to Flask route handlers approximately like:

# web/dashboard.py — Simplified route structure
from flask import Flask, render_template, jsonify
from src.scanner import get_active_signals
from src.strategy_lab.tournament import get_leaderboard
from src.trading.portfolio import get_pnl_summary

app = Flask(__name__)

@app.route('/')
def dashboard():
    """
    Main dashboard: aggregates all subsystem state for single-page view.
    Template receives pre-computed summaries — no heavy calculation in request cycle.
    """
    return render_template('dashboard.html',
        signals=get_active_signals(),
        leaderboard=get_leaderboard(limit=5),
        pnl=get_pnl_summary(),
        next_tournament=get_next_schedule()
    )

@app.route('/api/signals')
def api_signals():
    """
    JSON endpoint for AJAX updates or external integrations.
    Enables mobile apps, browser extensions, or webhook consumers.
    """
    return jsonify(get_active_signals())

Architectural note: The separation of rendered HTML and JSON API endpoints enables both human browsing and programmatic access. You could build a mobile app, a desktop widget, or a secondary alerting system consuming these same endpoints — all without modifying core TradeSight code.


Advanced Usage & Best Practices

Optimization Strategy: Tournament Timing

The default 2:00 AM tournament time isn't arbitrary — it captures overnight price action while avoiding US market hours. For international markets, adjust config/cron.json to match your target exchange's close. Running tournaments during active hours creates lookahead bias in historical validation.

Risk Management: The Regime Filter Lesson

The live trading log reveals critical insight: early RSI mean reversion lost -$13.77 across 5 trades because it lacked market regime detection. The repository notes this drove a "regime-filter upgrade now in production." Lesson: Always validate mean-reversion strategies against trend strength. TradeSight's roadmap explicitly includes bull/bear/sideways filtering — implement your own interim solution using ADX or slope-based trend detection.

Performance: Data Cache Warming

The data/ directory caches price history. For faster tournament execution, pre-warm this cache during market hours using the scanner's bulk download mode. Cold-start tournaments with empty caches trigger sequential API calls, slowing evolution cycles by 10x.

Security: Network Isolation

While Flask's 0.0.0.0 binding enables mobile monitoring, expose only on trusted networks. The dashboard lacks authentication — appropriate for local-only use, dangerous if port-forwarded to the public internet. For remote access, use SSH tunneling: ssh -L 5000:localhost:5000 your-server.

Extensibility: Custom Indicator Integration

The src/indicators/ module uses standard pandas Series inputs. New indicators need only implement:

  • calculate(prices: pd.Series, **params) -> pd.Series signature
  • Return Series with same index as input (no forward-looking calculations)
  • Register in indicators/__init__.py for tournament eligibility

Comparison with Alternatives: Why TradeSight Wins

Tool Type Cloud Required? AI Evolution? Live Trading? Best For
TradeSight Self-hosted app ❌ No ✅ Yes ✅ Paper (Alpaca) Privacy-first developers
backtrader Python library ❌ No ❌ No ❌ No Manual backtesting research
freqtrade Crypto bot ❌ No ⚠️ Limited ✅ Live crypto Cryptocurrency traders
vectorbt Notebook library ❌ No ❌ No ❌ No Jupyter-centric analysis
zipline-reloaded Trading library ❌ No ❌ No ❌ No Quantopian migrants
Jesse Crypto framework ❌ No ❌ No ✅ Live crypto Crypto strategy developers
nautilus_trader HFT platform ❌ No ❌ No ✅ Live institutional Professional high-frequency

TradeSight's unique position: It's the only open-source, stock-focused, AI-evolving, self-hosted complete application with live paper trading. Others force choices: libraries without execution, crypto without stocks, cloud without privacy, speed without accessibility.


Frequently Asked Questions

Is TradeSight free to use?

Yes. MIT licensed. No subscription fees. The optional Gumroad package ($49) provides convenience files and pre-tuned parameters, but all core functionality is freely available from the GitHub repository.

Do I need trading experience to use TradeSight?

Basic Python required, trading knowledge helpful. The demo mode lets you explore without financial risk. Understanding of technical indicators (RSI, MACD) improves strategy interpretation, but isn't mandatory — the tournament system surfaces effective combinations automatically.

Can I lose real money with TradeSight?

Only if you explicitly disable paper mode. The paper: true configuration flag is mandatory and validated. Even with live Alpaca keys, paper mode routes to simulation. Remove this safety at your own deliberate risk.

How does the AI tournament actually work?

Population-based optimization. Multiple strategy parameter sets compete on historical data. Performance metrics (Sharpe ratio, win rate, max drawdown) determine survival. Top performers breed variants; losers are pruned. This runs overnight via cron, with results visible each morning.

Is Windows supported?

Via WSL2 only. Native Windows support isn't currently implemented. The Linux subsystem provides full compatibility for all features including cron scheduling.

Can I use my own brokerage instead of Alpaca?

Not directly — yet. The trading module abstracts executor interfaces, making additional brokerages a community contribution opportunity. Alpaca's free paper API makes it the optimal starting point for development.

How do I contribute or report issues?

GitHub issues and pull requests welcome. The 169 test suite provides contribution guardrails. For broken AI-generated code specifically, the maintainer offers Vibe Code Rescue resources.


Conclusion: Your Algorithmic Edge, Finally Yours

TradeSight represents something rare in quantitative finance tooling: genuine institutional-grade capability delivered with hobbyist accessibility and radical transparency.

The live paper trading results — both the +$17.89 MACD winner and the painful -$13.77 RSI lesson — demonstrate something more valuable than marketing claims: honest evolution. This system learns publicly, fails visibly, and improves continuously. That's the scientific method applied to algorithmic trading, and it's how trust gets built in an industry saturated with opaque performance promises.

For Python developers curious about quantitative finance, TradeSight removes every excuse. No cloud costs. No data exposure. No black-box optimization where you can't inspect the "AI's" decisions. Just clean code, real market data, and a tournament engine that does the tedious parameter search while you sleep.

The roadmap promises even more: active stop-loss execution, trailing stops, multi-indicator confluence strategies, market regime detection, and Monte Carlo validation. Each milestone makes the system more robust without sacrificing accessibility.

Star the repository to track development and help other developers discover it. Clone it today to start your first overnight tournament. And when your alarm goes tomorrow morning, check localhost:5000 — your strategies may have evolved something worth trading.

The future of algorithmic trading isn't locked in hedge fund server farms. It's running on your laptop, right now, waiting for you to start the tournament.

Comments (0)

Comments are moderated before appearing.

No comments yet. Be the first to share your thoughts!

Support us! ☕