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.0.tar.gz (81.3 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.0-py3-none-any.whl (108.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bigtest-2.0.0.tar.gz
  • Upload date:
  • Size: 81.3 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.0.tar.gz
Algorithm Hash digest
SHA256 206530517d4e2dc2d68e5b7fd3134f94eb51821325a96a8b13c273a5d3f55515
MD5 b27afb281e424b5ff4281dafc2d1a903
BLAKE2b-256 cc11b4e37693898b26f325574fc5387807baaf910003c3d402bca662c26e6c3b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bigtest-2.0.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 48c339e80d34df50a12a52d8a54802722602e0f75d46fec2857b1c2ff0ece9b7
MD5 18fd13048b5f197e3b33950dcc3ea6a0
BLAKE2b-256 13a26c4d67dc34b2c32998522f5b386c314fbd71d58c9084ef8dc28f0f76f3ab

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