在投资组合统计中,度量值显示错误值
Statistics: Start 2025-01-02 09:00:00 End 2025-11-05 00:55:00 Period 139 days 21:45:00 Start Value 1000000.0 End Value 968867.126509 Total Return [%] -3.113287 Benchmark Return [%] 19.514706 Max Gross Exposure [%] 517.763041 Total Fees Paid 0.0 Max Drawdown [%] 5.361855 Max Drawdown Duration 127 days 05:50:00 Total Trades 198 Total Closed Trades 198 Total Open Trades 0 Open Trade PnL 0.0 Win Rate [%] 19.191919 Best Trade [%] 0.929219 ← ERROR Worst Trade [%] -0.323281 Avg Winning Trade [%] 0.141278 Avg Losing Trade [%] -0.054745 Avg Winning Trade Duration 0 days 01:25:23.684210526 Avg Losing Trade Duration 0 days 00:27:08.025477707 Profit Factor 0.790508 Expectancy -171.578702 Sharpe Ratio -1.128709 Calmar Ratio -1.477118 Omega Ratio 0.942158 Sortino Ratio -1.637499 Trades Records: CAPITAL = 1000000.0 # Initial capital trades = pf.trades.records_readable trades_clean = trades.copy() trades_clean['PnL %'] = trades_clean['PnL'] / CAPITAL * 100 top_10_trades = trades_clean.sort_values(by='PnL %', ascending=False).head(10) print(top_10_trades.to_string(index=False))
PnL% ERROR ----------------------------------->------------------------------------------------------------------------------------------------->--------------------------------------------v
内容来源: polakowo/vectorbt