Skip to main content

Holy Grail Backtester - Institutional-grade quant backtesting engine with 100x leverage support

Project description

BigTest - Holy Grail Backtester v2.0

Institutional-grade backtesting engine for quantitative trading research. Supports 100x leverage, HFT strategies, and zero-bias execution.

Features

  • 🎯 Zero-Bias i+1 Execution - Signals execute on next bar's open, eliminating look-ahead bias
  • 💰 100x Leverage Support - Real-time margin monitoring with automatic liquidation
  • 📊 Raw Bid/Ask Microstructure - True market reality using Dukascopy tick data
  • 📋 Limit Order System - Proper fill logic with maker/taker commission
  • 📈 ATR-Based Slippage - Variable slippage that scales with volatility
  • Batch Tick Fetching - Pre-load hours of tick data for performance

Installation

pip install bigtest

With optional providers:

pip install bigtest[all]  # Alpaca + Binance

Quick Start

from bigtest import BacktestEngine, BacktestConfig

config = BacktestConfig(
    symbol='EUR/USD',
    timeframe='1m',
    start_date='2024-01-01',
    end_date='2024-02-01',
    initial_capital=10000,
    leverage=100,
    stop_out_enabled=True
)

def my_strategy(df):
    signals = []
    # Your strategy logic here
    return signals

engine = BacktestEngine(config)
metrics = engine.run(my_strategy)
engine.generate_html_report('my_report.html')

Key Config Options

Option Default Description
leverage 1 Leverage multiplier (up to 100x)
stop_out_enabled True Enable margin call liquidation
use_notional_commission True Commission on notional value
slippage_model 'fixed' 'none', 'fixed', 'random', 'volume', 'atr'
maintenance_margin_pct 0.5 Stop-out at 50% margin

Supported Data Sources

  • Forex: Dukascopy (tick-level Bid/Ask)
  • Stocks: Alpaca (requires API key)
  • Crypto: Binance (BTC, ETH)

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bigtest-2.0.1.tar.gz (81.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bigtest-2.0.1-py3-none-any.whl (108.0 kB view details)

Uploaded Python 3

File details

Details for the file bigtest-2.0.1.tar.gz.

File metadata

  • Download URL: bigtest-2.0.1.tar.gz
  • Upload date:
  • Size: 81.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for bigtest-2.0.1.tar.gz
Algorithm Hash digest
SHA256 f551b8b5920a6a1133b70a5e14df3fe9da2a0665d34d5982a88db364f31d6290
MD5 fb9ce838b08b37606ebd97a7958d94e5
BLAKE2b-256 6d95a2f417d1db514de52058b112bcf9de181affbf7d9e714fe68354c419d5bb

See more details on using hashes here.

File details

Details for the file bigtest-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: bigtest-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 108.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for bigtest-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dcb7ca181fc621046ae02d426e821ab0ac9ee52eacfb2e77a9e1deb270e1bf2c
MD5 8d19ef19ddee429deea9cbf1098a2726
BLAKE2b-256 6f8f8f04aca9af332da7bd7aab746be1a18804acfb1b3c2f703c37307d7ea01b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page