Package com.quantfinlib.backtest.strategies
package com.quantfinlib.backtest.strategies
Built-in
TradingStrategy implementations:
SMA/EMA crossovers, RSI mean reversion, MACD signal-line cross, and
Bollinger band reversion. All precompute indicators in
init(BarSeries) and are allocation-free per bar; use them as
baselines and as templates for custom strategies.-
ClassesClassDescriptionBollinger Band mean reversion: buy when the close dips below the lower band, sell when it recovers to the middle band or stretches above the upper band.EMA crossover: buy when the fast EMA crosses above the slow EMA, sell on the reverse cross.MACD signal-line crossover: buy when MACD crosses above its signal line, sell on the reverse.RSI mean reversion: buy when RSI crosses up through the oversold level, sell when it crosses down through the overbought level.Golden/death cross: buy when the fast SMA crosses above the slow SMA, sell on the reverse cross.