launch open-source python algo-trading

TradeSight Launch Week: What We Built, What Broke, and What Actually Worked

๐Ÿ“… April 3, 2026 โฑ 8 min read ๐Ÿ‘ค TradeSight Project

TradeSight is live. Week one is done. Here's the real version of what happened โ€” not a highlight reel, just an honest rundown of what shipped, what immediately broke, and what surprised us.

The short version: 9 strategies in production, overnight AI tournaments running, 169 tests passing, and paper P&L hovering around +6.43%. The longer version involves a lot of pandas gotchas, one really stupid cron timing bug, and a MACD strategy that outperformed every other approach we tried.

169
Tests passing (169/169)
9
Live paper trading strategies
+6.43%
Paper portfolio return
15+
Technical indicators implemented

What TradeSight Actually Is

A self-hosted Python app that backtests strategies, runs them as live paper trades via Alpaca, and uses an AI tournament engine overnight to evolve the best-performing ones. No cloud subscription. No strategy leaks to a third-party server. Runs on your machine.

The core loop is simple:

  1. Strategies compete overnight in a backtested tournament
  2. Winners advance, losers get retired or mutated
  3. Winning strategies execute as paper trades through Alpaca
  4. Results feed back into the next tournament cycle

The web dashboard (Flask, localhost:5000) shows live positions, signal feeds, tournament brackets, and P&L in real time. You wake up to new results every morning.

Demo mode works without any API keys. Clone the repo, run python START_TRADESIGHT.py, and you get simulated market data immediately. No Alpaca account required to explore.

The First Real Problem: pandas EWM and adjust=False

The MACD implementation was the first place we hit a real correctness issue. pandas' EWM function has an adjust parameter that defaults to True, which uses a different weighting formula than most trading platforms and textbooks expect.

# What most tutorials show:
ema_fast = prices.ewm(span=12).mean()

# What you actually want for MACD that matches TradingView:
ema_fast = prices.ewm(span=12, adjust=False).mean()

With adjust=True, early values get inflated because pandas normalizes by the sum of decaying weights. With adjust=False, each value is computed recursively โ€” which matches how the rest of the world calculates EMA. We were getting signals that looked correct in isolation but drifted from any external reference.

Fix took 20 minutes once we knew what to look for. Finding it took two days.

The Cron Timing Bug

The overnight tournament is supposed to run at 2 AM. It was running at 2 AM UTC, which is 9 PM or 10 PM Eastern depending on daylight saving. So tournaments were completing before US market close, using incomplete daily candles for the final period.

This is a boring bug with a boring fix โ€” always store and schedule in UTC, display in local time โ€” but it cost us several days of tournament results that included partially-formed candlesticks as the "close" of the session.

# config/schedule.py โ€” explicit UTC timezone
import pytz

TOURNAMENT_HOUR_UTC = 7  # 2 AM ET (EST offset), adjust for EDT
TOURNAMENT_TIMEZONE = pytz.UTC

Now tournaments run after US market data is fully settled and cleaned up.

What the AI Tournament Engine Actually Does

"AI tournament" sounds more exotic than it is. The tournament engine is a genetic-style selection loop: strategies are parameterized (fast period, slow period, signal period, risk filter thresholds), we run N backtests with randomized parameter variants, score them on a combined metric (Sharpe ratio weighted against max drawdown and win rate), keep the top performers, mutate their parameters slightly, and repeat.

It's not a neural network. It's just systematic parameter search with selection pressure. The "AI" label comes from the fact that it's using an LLM to suggest parameter mutations and interpret why certain configurations outperformed others โ€” generating a plain-English explanation of what each winning strategy is actually doing.

๐Ÿ† Week 1 Tournament Winner: MACD Crossover with SMA Trend Filter

Fast EMA: 10, Slow EMA: 23, Signal: 9, SMA filter: 50-period. Added a trend filter that prevented entering long trades when price was below the 50 SMA โ€” cut false signals by ~40% in ranging markets. Win rate: 82% (filtered) vs 63% (unfiltered). Still running as live paper position.

The RSI Strategy: A Useful Failure

The first live strategy we ran was RSI-based: buy when RSI crosses below 30 (oversold), sell when it crosses above 70 (overbought). Classic. And it lost money immediately.

Not because RSI is bad โ€” it's not โ€” but because oversold conditions in a strong downtrend just mean the stock keeps going down. RSI mean-reversion only works in ranging markets. We were running it during a trending period and it was catching falling knives.

The fix (which the tournament engine independently discovered) was adding a trend confirmation filter: only take RSI oversold entries when the broader trend (50 SMA) is pointing up. This alone recovered most of the losses in backtests.

The lesson isn't that RSI is bad. It's that no single indicator works in all market regimes, and running live paper trades with unfiltered signals is a fast way to learn that.

โš ๏ธ Paper trading โ‰  real trading

TradeSight uses Alpaca's paper environment. Fills are simulated at mid-price with no slippage model. Real execution would see worse fills on thinly-traded names. Don't treat paper P&L as a direct prediction of live performance โ€” treat it as a sanity check that your signals aren't completely broken.

The Multi-Market Scanner

One feature that surprised us with its usefulness: scanning Polymarket prediction markets alongside stocks. Polymarket prices on events like Fed rate decisions, macro data releases, and geopolitical events are real money bets โ€” they're often earlier signals than news sentiment.

We haven't proven edge from this yet. But having a live view of what the prediction markets are pricing on the same dashboard as your equity signals is genuinely interesting, and it's a data source most retail algo setups ignore.

What's Next

A few things on the roadmap that didn't make week one:

Get It Running

If you want to run TradeSight yourself, setup is about 5 minutes:

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

Dashboard opens at http://localhost:5000. No API keys required for demo mode. If you want live paper trading, connect a free Alpaca paper account in config/api_keys.json.

The repo is MIT licensed. Issues, PRs, and strategy ideas welcome โ€” especially if you've found a signal combination that works in the current market regime.

โ†’ github.com/rmbell09-lang/tradesight