Expand description
Pre-built trading strategies.
Ready-to-use strategy implementations that can be used directly with the backtest engine.
Each strategy implements the Strategy trait and can be customized via builder methods.
Short signals are always emitted when the condition is met. Whether they are
executed is controlled solely by BacktestConfig::allow_short.
§Available Strategies
| Strategy | Description |
|---|---|
SmaCrossover | Dual SMA crossover (trend following) |
RsiReversal | RSI mean reversion |
MacdSignal | MACD line crossover |
BollingerMeanReversion | Bollinger Bands mean reversion |
SuperTrendFollow | SuperTrend trend following |
DonchianBreakout | Donchian channel breakout |
§Example
ⓘ
use finance_query::backtesting::{SmaCrossover, BacktestConfig};
let strategy = SmaCrossover::new(10, 20);
let config = BacktestConfig::builder().allow_short(true).build().unwrap();Structs§
- Bollinger
Mean Reversion - Bollinger Bands Mean Reversion Strategy
- Donchian
Breakout - Donchian Channel Breakout Strategy
- Macd
Signal - MACD Signal Strategy
- RsiReversal
- RSI Reversal Strategy
- SmaCrossover
- SMA Crossover Strategy
- Super
Trend Follow - SuperTrend Following Strategy