Skip to Content
Jesse StrategiesGetting Started

Getting Started

This guide covers setting up the Jesse trading framework and running the AMT strategies.

Prerequisites

  • Python 3.9+
  • PostgreSQL (for live trading)
  • Docker (optional, for containerized deployment)

Installation

Option 1: Local Installation

# Install Jesse pip install jesse # Navigate to project cd jesse-strategies # Install additional dependencies pip install -r requirements.txt

Option 2: Docker Installation

# Navigate to project cd jesse-strategies # Start with Docker Compose docker-compose up -d # Access dashboard open http://localhost:9000

Configuration

Exchange Setup

Edit config.py:

config = { 'exchanges': { 'Binance Spot': { 'fee': 0.001, 'type': 'spot', 'balance': 10000, # For backtesting }, }, 'app': { 'debug_mode': False, 'trading_mode': 'backtest', # or 'paper' or 'live' }, }

Strategy Routes

Edit routes.py:

from jesse.strategies.AMTTrendContinuation import AMTTrendContinuation routes = [ ('Binance Spot', 'BTC-USDT', '1h', AMTTrendContinuation), ]

Importing Historical Data

Before backtesting, import candle data:

# Import BTC-USDT data from Binance jesse import-candles "Binance Spot" BTC-USDT 2023-01-01 # Import multiple pairs jesse import-candles "Binance Spot" ETH-USDT 2023-01-01 jesse import-candles "Binance Spot" SOL-USDT 2023-01-01

Running a Backtest

# Basic backtest jesse backtest 2023-01-01 2024-01-01 # With debug mode jesse backtest 2023-01-01 2024-01-01 --debug # Export results jesse backtest 2023-01-01 2024-01-01 --csv

Backtest Output

METRICS | ──────────────────────────────────────┼───────── Total Closed Trades | 45 Total Net Profit | 1,450$ Starting => Finishing Balance | 10,000$ => 11,450$ Total Open Trades | 0 Open PL | 0$ Total Paid Fees | 145$ Max Drawdown | 8.2% Sharpe Ratio | 1.56 Calmar Ratio | 1.89 Winning Streak | 5 Losing Streak | 3 Largest Winning Trade | 320$ Largest Losing Trade | -150$ Total Winning Trades | 28 Total Losing Trades | 17 Win Rate | 62.2%

Live Trading Setup

Warning: Live trading involves real financial risk. Always test thoroughly in paper trading mode first.

  1. Configure API keys in environment:
export JESSE_BINANCE_API_KEY="your_api_key" export JESSE_BINANCE_API_SECRET="your_api_secret"
  1. Update config for live trading:
config = { 'app': { 'trading_mode': 'live', }, }
  1. Start live trading:
jesse live

Next Steps

Last updated on