Repository navigation
Risk-normalized and return-decomposition analytics across pinerun and
pinetop, backed by the @heyphat/piner 0.12.0 engine.
Added
- R-multiple expectancy — trade quality normalized by planned risk. The
backtest and portfolio tearsheets (CLI and pinetop) gain an
R-multiple expectancyrow withn/Ncoverage, showing the mean net trade
P&L per unit of immutable initial risk — the risk frozen at the first
protective stop covering each entry, never derived from hindsight values
like MAE or max drawdown. Trade ledgers (--trades, CSV, JSON) carry
per-rowinitialRisk/rMultiple(nullwhen no valid protective stop
applied). Scans can rank withstrategy.rMultipleExpectancy(runs without
stop coverage rank as NaN and are dropped). Requires a piner engine that
emitsClosedTrade.initialRisk(≥ 0.12.0); older engines reportnawith
0/Ncoverage rather than a guess. - Annualized return decomposition — the tearsheets gain
arithmetic return,geometric return, andvolatility dragrows, and
both compare surfaces (CLIcompare, pinetop) show them side by side. The
two means are computed by the engine over the same per-bar return sample as
Sharpe and both are linearly annualized, so the drag is their exact AM-GM
gap; a return below −100% (equity crossing zero) reportsnafor geometric
and drag. All three are rankable in scans/sweeps
(strategy.arithmeticReturnPercent,strategy.geometricReturnPercent,
strategy.volatilityDragPercent).
Changed
@heyphat/piner0.11.1 → 0.12.0 — the engine release carrying
ClosedTrade.initialRisk/rMultipleand the annualized return
decomposition that the analytics above surface.