Add new backtesting Metrics to freqUI

This commit is contained in:
Matthias 2022-12-29 17:49:41 +01:00
parent 5a93424cdf
commit 47bb5bef71
2 changed files with 22 additions and 0 deletions

View File

@ -138,6 +138,24 @@ const backtestResultStats = computed(() => {
metric: 'CAGR',
value: `${props.backtestResult.cagr ? formatPercent(props.backtestResult.cagr) : 'N/A'}`,
},
{
metric: 'Sortino',
value: `${props.backtestResult.sortino ? props.backtestResult.sortino.toFixed(2) : 'N/A'}`,
},
{
metric: 'Sharpe',
value: `${props.backtestResult.sharpe ? props.backtestResult.sharpe.toFixed(2) : 'N/A'}`,
},
{
metric: 'Calmar',
value: `${props.backtestResult.calmar ? props.backtestResult.calmar.toFixed(2) : 'N/A'}`,
},
{
metric: 'Expectancy',
value: `${
props.backtestResult.expectancy ? props.backtestResult.expectancy.toFixed(2) : 'N/A'
}`,
},
{
metric: 'Profit factor',
value: `${

View File

@ -137,6 +137,10 @@ export interface StrategyBacktestResult {
csum_min: number;
csum_max: number;
sortino?: number;
sharpe?: number;
calmar?: number;
expectancy?: number;
winner_holding_avg: string;
winner_holding_avg_s: number;