mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-11 02:33:51 +00:00
Add short backtesting results
This commit is contained in:
parent
44363be94e
commit
5828981646
|
@ -111,6 +111,29 @@ export default class BacktestResultView extends Vue {
|
|||
|
||||
get backtestResultStats() {
|
||||
// Transpose Result into readable format
|
||||
const shortMetrics =
|
||||
this.backtestResult?.trade_count_short && this.backtestResult?.trade_count_short > 0
|
||||
? [
|
||||
{ metric: '___', value: '___' },
|
||||
{
|
||||
metric: 'Long / Short',
|
||||
value: `${this.backtestResult.trade_count_long} / ${this.backtestResult.trade_count_short}`,
|
||||
},
|
||||
{
|
||||
metric: 'Total profit Long',
|
||||
value: `${formatPercent(
|
||||
this.backtestResult.profit_total_long || 0,
|
||||
)} | ${this.formatPriceStake(this.backtestResult.profit_total_long_abs)}`,
|
||||
},
|
||||
{
|
||||
metric: 'Total profit Short',
|
||||
value: `${formatPercent(
|
||||
this.backtestResult.profit_total_short || 0,
|
||||
)} | ${this.formatPriceStake(this.backtestResult.profit_total_short_abs)}`,
|
||||
},
|
||||
]
|
||||
: [];
|
||||
|
||||
return [
|
||||
{
|
||||
metric: 'Total Profit',
|
||||
|
@ -170,6 +193,8 @@ export default class BacktestResultView extends Vue {
|
|||
value: `${this.backtestResult.timedout_entry_orders} / ${this.backtestResult.timedout_exit_orders}`,
|
||||
},
|
||||
|
||||
...shortMetrics,
|
||||
|
||||
{ metric: '___', value: '___' },
|
||||
{ metric: 'Min balance', value: this.formatPriceStake(this.backtestResult.csum_min) },
|
||||
{ metric: 'Max balance', value: this.formatPriceStake(this.backtestResult.csum_max) },
|
||||
|
|
|
@ -127,6 +127,13 @@ export interface StrategyBacktestResult {
|
|||
winner_holding_avg: number;
|
||||
winning_days: number;
|
||||
|
||||
trade_count_long?: number;
|
||||
trade_count_short?: number;
|
||||
profit_total_long?: number;
|
||||
profit_total_short?: number;
|
||||
profit_total_long_abs?: number;
|
||||
profit_total_short_abs?: number;
|
||||
|
||||
/** Start time of the backtest run */
|
||||
backtest_run_start_ts: number;
|
||||
/** End time of the backtest run */
|
||||
|
|
Loading…
Reference in New Issue
Block a user