Uses of Interface
com.quantfinlib.backtest.TradingStrategy
Packages that use TradingStrategy
Package
Description
Bar-based backtesting.
Built-in
TradingStrategy implementations:
SMA/EMA crossovers, RSI mean reversion, MACD signal-line cross, and
Bollinger band reversion.The defense against overfit backtests:
ParameterGrid +
GridSearchOptimizer enumerate
and rank parameter combinations;
WalkForwardAnalyzer optimizes
on rolling train windows and evaluates on unseen test windows, stitching
out-of-sample equity (capital carries across folds) and reporting the
walk-forward efficiency ratio;
SharpeValidation applies the
Bailey/López de Prado probabilistic and deflated Sharpe — the
multiple-testing haircut for grid-picked winners — plus the minimum
track record length (how many periods before the record MEANS
something, in closed form);
BlockBootstrap hands the
backtest Sharpe its sampling DISTRIBUTION (stationary Politis-Romano
blocks — an iid resample destroys the autocorrelation and understates
the uncertainty, the classic route to false confidence): the honest
question is whether the 5th percentile is still positive, not whether
1.2 is a good number.Strategy Builder DSL: compose
Rules (built via
Rules factories over indicator arrays, with
and/or/not combinators) into a backtestable strategy through
StrategyBuilder — entry/exit rules, stop loss
and take profit in a fluent chain.-
Uses of TradingStrategy in com.quantfinlib.backtest
Methods in com.quantfinlib.backtest with parameters of type TradingStrategyModifier and TypeMethodDescriptionstatic BacktestResultBacktester.run(TradingStrategy strategy, BarSeries series, BacktestConfig config) static BacktestResultBacktester.run(TradingStrategy strategy, BarSeries series, BacktestConfig config, int tradeFrom) Variant with a WARM-UP prefix: indicators are initialized over the whole series, but no signal is acted on (and no equity recorded) beforetradeFrom.static ExecutionAwareResultExecutionAwareBacktester.run(TradingStrategy strategy, BarSeries series, BacktestConfig config, ExecutionModel model) -
Uses of TradingStrategy in com.quantfinlib.backtest.strategies
Classes in com.quantfinlib.backtest.strategies that implement TradingStrategyModifier and TypeClassDescriptionfinal classBollinger 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.final classEMA crossover: buy when the fast EMA crosses above the slow EMA, sell on the reverse cross.final classMACD signal-line crossover: buy when MACD crosses above its signal line, sell on the reverse.final classRSI mean reversion: buy when RSI crosses up through the oversold level, sell when it crosses down through the overbought level.final classGolden/death cross: buy when the fast SMA crosses above the slow SMA, sell on the reverse cross. -
Uses of TradingStrategy in com.quantfinlib.backtest.validation
Methods in com.quantfinlib.backtest.validation that return TradingStrategyModifier and TypeMethodDescription -
Uses of TradingStrategy in com.quantfinlib.dsl
Classes in com.quantfinlib.dsl that implement TradingStrategyModifier and TypeClassDescriptionstatic final classA rule-based strategy produced by the builder.