Add CAGR and profit factor to backtest view

https://github.com/freqtrade/freqtrade/issues/7116
This commit is contained in:
Matthias 2022-07-24 20:09:44 +02:00
parent dfc38dff68
commit 7f0715d133
2 changed files with 13 additions and 0 deletions

View File

@ -136,6 +136,18 @@ export default defineComponent({
props.backtestResult.profit_total_abs, props.backtestResult.profit_total_abs,
)}`, )}`,
}, },
{
metric: 'CAGR',
value: `${props.backtestResult.cagr ? formatPercent(props.backtestResult.cagr) : 'N/A'}`,
},
{
metric: 'Profit factor',
value: `${
props.backtestResult.profit_factor
? formatPrice(props.backtestResult.profit_factor, 3)
: 'N/A'
}`,
},
{ {
metric: 'Total trades / Daily Avg Trades', metric: 'Total trades / Daily Avg Trades',
value: `${props.backtestResult.total_trades} / ${props.backtestResult.trades_per_day}`, value: `${props.backtestResult.total_trades} / ${props.backtestResult.trades_per_day}`,

View File

@ -61,6 +61,7 @@ export interface StrategyBacktestResult {
profit_total: number; profit_total: number;
profit_total_abs: number; profit_total_abs: number;
cagr?: number; cagr?: number;
profit_factor?: number;
backtest_end: string; backtest_end: string;
backtest_end_ts: number; backtest_end_ts: number;