feat: add payoff_ratio and recovery_factor metrics, bump to 0.3.2

Add two new risk/reward metrics to BacktestMetrics:
- payoff_ratio: avg winning return / avg losing return (absolute)
- recovery_factor: net profit / max drawdown in absolute terms
Computed in both StreamingMetrics::finalize() and PortfolioEngine.
Exposed via PyO3 with #[pyo3(get)] on PyBacktestMetrics.
Updated README with API reference and changelog.
This commit is contained in:
porcelaincode
2026-02-18 18:57:42 +05:30
parent ab568cc9fb
commit 0ff67e7fe2
9 changed files with 179 additions and 8 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ from raptorbt._raptorbt import (
rolling_max,
)
__version__ = "0.3.1"
__version__ = "0.3.2"
__all__ = [
# Config classes