Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

coin-screener-script

Simple utilities for:

  • Batch importing candle data into your Jesse database
  • Running parallel backtests to find the best symbols and timeframes for a strategy and period

Scripts

  • batch_importer.py: Imports historical candles for a list of symbols and repeats daily. Handles rate limits and temporary network issues with retries.
  • batch-backtest.py: Runs many backtests in parallel (via Ray) across symbols and timeframes, then prints a sorted summary and plots to compare performance.

Requirements

  • Python 3 with your Jesse environment available
  • Jesse Framework (used via jesse.research and jesse.enums)
  • For backtesting visuals/parallelism: pandas, matplotlib, seaborn, tqdm, ray
  • Place these scripts inside your Jesse project and run them from that directory
  • Ensure the conda environment with Jesse is installed and activated

Install extras into the same environment that has Jesse installed, for example:

pip install pandas matplotlib seaborn tqdm ray

Video walkthrough

Watch a quick demo: Parallel backtesting and importer overview

Usage

1) Import candles in batch

  1. Open batch_importer.py and adjust configuration at the top:
    • EXCHANGE: exchange enum (e.g., exchanges.BINANCE_PERPETUAL_FUTURES)
    • SYMBOLS: list of symbols to keep up to date
    • START_DATE: earliest date to import (YYYY-MM-DD)
  2. Run:
python batch_importer.py

The script loops through all symbols, retries on rate limits/network issues, and then sleeps for 24 hours.

2) Run parallel batch backtests

  1. Open batch-backtest.py and adjust configuration at the top:
    • STRATEGY_NAME
    • EXCHANGE_NAME
    • SYMBOLS, TIMEFRAMES
    • START_DATE, END_DATE
    • Optional data routes in DATA_ROUTES (for higher-timeframe/context data)
    • CONFIG (starting balance, fees, leverage, warm_up_candles, etc.)
  2. Run:
python batch-backtest.py

The script:

  • Initializes Ray and uses ~80% of available CPU cores (falls back to sequential if Ray init fails)
  • Executes all symbol/timeframe combinations
  • Prints a summary table sorted by Sharpe Ratio and shows comparison plots (heatmaps and bar charts)

Notes

  • Ensure candle data for desired symbols/timeframes exists locally; use batch_importer.py beforehand if needed.
  • Equity curve and file outputs are disabled in the backtester to keep runs fast and clean.

About

Repository for hosting the coin screener script

Resources

Stars

12 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages