ml4t-live-trading
Installation
SKILL.md
Backtest-to-Live Deployment
Rewriting strategy logic for live trading introduces bugs and invalidates your backtest. The correct pattern is to reuse the exact Strategy class from backtesting - zero code changes between simulation and production.
The Problem
Teams often validate a strategy in backtest, then rewrite it for live trading. That rewrite changes rounding, timing, or position tracking and silently breaks the link to the validated backtest.
The Pattern
WRONG
# Separate live strategy - rewrites logic, diverges from backtest
class LiveMomentumTrader:
def __init__(self, api_key):
self.api = BrokerAPI(api_key)