mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-10 18:23:50 +00:00
Improve expectancy output to include ratio
This commit is contained in:
parent
f7516ee4ab
commit
c89218ebd2
|
@ -169,9 +169,16 @@ const backtestResultStats = computed(() => {
|
|||
value: `${props.backtestResult.calmar ? props.backtestResult.calmar.toFixed(2) : 'N/A'}`,
|
||||
},
|
||||
{
|
||||
metric: 'Expectancy',
|
||||
metric: `Expectancy ${props.backtestResult.expectancy_ratio ? '(ratio)' : ''}`,
|
||||
value: `${
|
||||
props.backtestResult.expectancy ? props.backtestResult.expectancy.toFixed(2) : 'N/A'
|
||||
props.backtestResult.expectancy
|
||||
? props.backtestResult.expectancy_ratio
|
||||
? props.backtestResult.expectancy.toFixed(2) +
|
||||
' (' +
|
||||
props.backtestResult.expectancy_ratio.toFixed(2) +
|
||||
')'
|
||||
: props.backtestResult.expectancy.toFixed(2)
|
||||
: 'N/A'
|
||||
}`,
|
||||
},
|
||||
{
|
||||
|
|
|
@ -162,6 +162,7 @@ export interface StrategyBacktestResult {
|
|||
sharpe?: number;
|
||||
calmar?: number;
|
||||
expectancy?: number;
|
||||
expectancy_ratio?: number;
|
||||
|
||||
winner_holding_avg: string;
|
||||
winner_holding_avg_s: number;
|
||||
|
|
Loading…
Reference in New Issue
Block a user