Jesse: Crypto Algo-Trading Framework with a Minute-Based Engine in Python and Rust

In-depth review of Jesse - an algo-trading framework for crypto markets. Minute-based simulation, strategies as state machines, Rust-accelerated indicators, optimization with overfitting protection, and the boundary between open-source core and live trading.

Jesse — algo-trading framework

Most open-source backtesting engines fall into two camps: academic stacks that test beautifully but are useless for real trading, and battle-tested terminals that trade but won't let you research properly. Jesse tries to be both — a crypto trading framework with a unified engine for backtesting, optimization, and (via plugin) live trading.

Architecture: Not a Library, but a Pipeline

Jesse is a strategy execution engine + API + UI bundle: CLI starts uvicorn with FastAPI, PostgreSQL via Peewee, LSP for the strategy editor, and optional jesse-live plugin.

Minute-Based Simulation: The "Source of Truth"

Jesse minute simulation

A critical invariant: only 1-minute candles are accepted in backtests. Higher timeframes are aggregates — the 1h strategy fires every 60 minutes, but orders execute within each minute by high/low.

from jesse.research import backtest

result = backtest(
    config,
    routes=[("Binance", "BTC-USDT", "4h", "MyStrategy")],
    candles=candles_1m,  # strictly 60_000 ms between candles
)

Strategy: A State Machine with Declarative Orders

def go_long(self):
    qty = utils.size_to_qty(self.balance * 0.5, self.price)
    self.buy = qty, self.price
    self.stop_loss = qty, self.price * 0.97
    self.take_profit = qty, self.price * 1.05

The system decides: market, limit, or stop — based on price position relative to current. In live mode, price is rounded by exchange precision.

Optimization: Cutting Noise, Not Maximizing Profit

Fitness function fights overfitting: minimum 5 trades filter, log-normalized trade count, dual train/test validation, and "smart" Sharpe with autocorrelation penalty.

Rust Under the Hood

Indicators (EMA, RSI, MACD, ATR…) use jesse-rust. Even basic arithmetic is in Rust: float error accumulation over thousands of trades turns backtests into fiction.

Conclusion

Jesse attempts to reduce crypto algo-trading to a repeatable pipeline: minute engine, strict Strategy, Rust indicators, research API without state leaks, optimization with test period validation.