Initial backtesting engine
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
"""
|
||||
RaptorBT - High-performance Rust backtesting engine for quant5.
|
||||
|
||||
This module provides Python bindings for the Rust-based backtesting engine,
|
||||
offering significant performance improvements over vectorbt:
|
||||
- Disk footprint: <10MB (vs vectorbt's ~450MB)
|
||||
- Startup latency: <10ms (vs 200-600ms)
|
||||
- 100% deterministic execution (no JIT cache)
|
||||
- Native parallelism via Rayon + explicit SIMD
|
||||
"""
|
||||
|
||||
from raptorbt._raptorbt import (
|
||||
# Config classes
|
||||
PyBacktestConfig,
|
||||
PyStopConfig,
|
||||
PyTargetConfig,
|
||||
# Result classes
|
||||
PyBacktestResult,
|
||||
PyBacktestMetrics,
|
||||
PyTrade,
|
||||
# Backtest functions
|
||||
run_single_backtest,
|
||||
run_basket_backtest,
|
||||
run_options_backtest,
|
||||
run_pairs_backtest,
|
||||
run_multi_backtest,
|
||||
# Indicator functions
|
||||
sma,
|
||||
ema,
|
||||
rsi,
|
||||
macd,
|
||||
stochastic,
|
||||
atr,
|
||||
bollinger_bands,
|
||||
adx,
|
||||
vwap,
|
||||
supertrend,
|
||||
)
|
||||
|
||||
__version__ = "0.1.0"
|
||||
|
||||
__all__ = [
|
||||
# Config classes
|
||||
"PyBacktestConfig",
|
||||
"PyStopConfig",
|
||||
"PyTargetConfig",
|
||||
# Result classes
|
||||
"PyBacktestResult",
|
||||
"PyBacktestMetrics",
|
||||
"PyTrade",
|
||||
# Backtest functions
|
||||
"run_single_backtest",
|
||||
"run_basket_backtest",
|
||||
"run_options_backtest",
|
||||
"run_pairs_backtest",
|
||||
"run_multi_backtest",
|
||||
# Indicator functions
|
||||
"sma",
|
||||
"ema",
|
||||
"rsi",
|
||||
"macd",
|
||||
"stochastic",
|
||||
"atr",
|
||||
"bollinger_bands",
|
||||
"adx",
|
||||
"vwap",
|
||||
"supertrend",
|
||||
]
|
||||
Binary file not shown.
BIN
Binary file not shown.
Reference in New Issue
Block a user