Uses of Record Class
com.quantfinlib.backtest.PerformanceMetrics
Packages that use PerformanceMetrics
Package
Description
The alpha research pipeline — signal to evaluated, validated, cost-aware,
constructed, reported strategy, with each stage a separate, composable
step:
Signal generation —
Factors:
nine standard factors (MA crossover, contrarian RSI, MACD,
Bollinger reversion, mean reversion, 12-1 momentum, value, quality,
low volatility) producing raw cross-sectional scores over an
AlphaContext panel;
Evaluation — SignalEvaluator:
rank IC, IR, t-stat, hit rate, turnover, cross-factor exposure —
the cheap filter before any backtest;
Validation — AlphaValidation:
walk-forward selection with OOS efficiency, blocked k-fold
consistency, Monte Carlo permutation p-values, parameter
sensitivity — the overfitting defense;
Execution-aware backtest —
AlphaBacktester: commission, bid-ask
spread, slippage and square-root market impact
(microstructure.MarketImpactModel), with gross-vs-net cost
decomposition;
Portfolio construction —
PortfolioConstruction: z-score
sizing with caps, inverse-vol risk budgeting, sector and beta
neutralization, mean-variance tilt;
Reporting — AlphaReport:
alpha decay with half-life, OLS factor attribution, drawdown
curves, rolling Sharpe, and the shared ratio set from
backtest.PerformanceAnalytics.
Bar-based backtesting.
Multi-asset backtesting:
PortfolioBacktester rebalances
long/short weight targets from a
PortfolioStrategy with
commission and turnover tracking (input series must be index-aligned —
see data.SeriesAligner), and in its survivorship-aware overload
consumes a data.PointInTimeUniverse (delistings terminate at the
delisting return, mergers convert at deal terms, index drops force sales)
plus explicit ex-date cash dividends;
CrossSectionalMomentum is the
built-in point-in-time factor strategy (12-1 momentum ranked over the
members alive at each rebalance);
PositionSizing supplies Kelly,
fixed-fractional risk, inverse-volatility weights and vol-target leverage.Event-driven tick-level backtesting — the level below bars, where queue
position decides whether a passive order actually trades:
TickBacktester replays QFLT tick
files through a TickStrategy with
microstructure-aware fills (market orders pay half the spread; limit
orders fill on trade-through or earn fills print-by-print against a
simulated queue; optional tick-size grid for real-world prices; no fills
against the triggering print).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.Professional report generation, all writers hand-rolled on the JDK:
ReportGenerator assembles portfolio,
performance, risk, allocation, trade, Monte Carlo and technical sections
into a Report, exported as HTML (with
inline SvgCharts equity/drawdown charts),
CSV, PDF, or XLSX.-
Uses of PerformanceMetrics in com.quantfinlib.alpha
Methods in com.quantfinlib.alpha that return PerformanceMetricsModifier and TypeMethodDescriptionAlphaBacktester.Result.grossMetrics()Returns the value of thegrossMetricsrecord component.AlphaBacktester.Result.netMetrics()Returns the value of thenetMetricsrecord component.static PerformanceMetricsAlphaReport.summarize(double[] equity, int periodsPerYear) The full ratio set on an equity curve — Sharpe, Sortino, Calmar, CAGR, max drawdown — computed by the same engine the backtesters use, so definitions never fork between research and backtest reports.Constructors in com.quantfinlib.alpha with parameters of type PerformanceMetricsModifierConstructorDescriptionResult(double[] netEquity, double[] grossEquity, PerformanceMetrics netMetrics, PerformanceMetrics grossMetrics, double commissionDrag, double spreadDrag, double slippageDrag, double impactDrag, double meanTurnover) Creates an instance of aResultrecord class. -
Uses of PerformanceMetrics in com.quantfinlib.backtest
Methods in com.quantfinlib.backtest that return PerformanceMetrics -
Uses of PerformanceMetrics in com.quantfinlib.backtest.portfolio
Methods in com.quantfinlib.backtest.portfolio that return PerformanceMetricsModifier and TypeMethodDescriptionPortfolioBacktester.Result.metrics()Returns the value of themetricsrecord component.Constructors in com.quantfinlib.backtest.portfolio with parameters of type PerformanceMetricsModifierConstructorDescriptionResult(double[] equityCurve, PerformanceMetrics metrics, double totalCosts, double totalTurnoverNotional, Map<String, Double> finalPositions, double dividendCashCredited, int lifecycleEventsApplied) Creates an instance of aResultrecord class. -
Uses of PerformanceMetrics in com.quantfinlib.backtest.tick
Methods in com.quantfinlib.backtest.tick that return PerformanceMetricsModifier and TypeMethodDescriptionTickBacktester.TickBacktestResult.metrics()Returns the value of themetricsrecord component.Constructors in com.quantfinlib.backtest.tick with parameters of type PerformanceMetricsModifierConstructorDescriptionTickBacktestResult(String strategyName, List<Execution> fills, double[] sampledEquity, double finalEquity, long ticksProcessed, PerformanceMetrics metrics) Creates an instance of aTickBacktestResultrecord class. -
Uses of PerformanceMetrics in com.quantfinlib.backtest.validation
Methods in com.quantfinlib.backtest.validation that return PerformanceMetricsModifier and TypeMethodDescriptionGridSearchOptimizer.Candidate.metrics()Returns the value of themetricsrecord component.WalkForwardAnalyzer.WalkForwardResult.outOfSampleMetrics()Returns the value of theoutOfSampleMetricsrecord component.Method parameters in com.quantfinlib.backtest.validation with type arguments of type PerformanceMetricsModifier and TypeMethodDescriptionWalkForwardAnalyzer.analyze(BarSeries series, ParameterGrid grid, StrategyFactory factory, BacktestConfig config, int trainBars, int testBars, ToDoubleFunction<PerformanceMetrics> objective) GridSearchOptimizer.best(ParameterGrid grid, StrategyFactory factory, BarSeries series, BacktestConfig config, ToDoubleFunction<PerformanceMetrics> objective) The winning parameter set only.static List<GridSearchOptimizer.Candidate> GridSearchOptimizer.search(ParameterGrid grid, StrategyFactory factory, BarSeries series, BacktestConfig config, ToDoubleFunction<PerformanceMetrics> objective) Constructors in com.quantfinlib.backtest.validation with parameters of type PerformanceMetricsModifierConstructorDescriptionCandidate(Map<String, Double> params, PerformanceMetrics metrics, double objective) Creates an instance of aCandidaterecord class.WalkForwardResult(List<WalkForwardAnalyzer.Fold> folds, double[] outOfSampleEquity, PerformanceMetrics outOfSampleMetrics, List<Trade> outOfSampleTrades, double efficiency) Creates an instance of aWalkForwardResultrecord class. -
Uses of PerformanceMetrics in com.quantfinlib.report
Methods in com.quantfinlib.report with parameters of type PerformanceMetricsModifier and TypeMethodDescriptionReportGenerator.addPerformance(String title, PerformanceMetrics m)