0
$\begingroup$

I'm backtesting some algorithmic trading strategy based on the buy/sell signals: enter image description here

To validate the strategy performance I compare it against the buy-and-hold strategy of the same asset and calculate the following metrics:

  • the strategy total return
  • the strategy Calmar/Sharpe ratios
  • the strategy trades win/loss ratio

First of all, I want to add another metrics based on the trades win/loss positions. For example, I assume that the following trades (1-win, -1-loss):
1,-1,1,-1,1,-1
are better than these trades:
1,1,1,-1,-1,-1
Second, I would like to replace all these ratios with 1 generic metric, if such exists.

$\endgroup$
2
$\begingroup$

There does not exist a single metric that encompasses all your criteria; but you could simply construct a (linear or non-linear) combination of the measures you like. For the win/loss streaks you describe, you could either look at the absolute maximum drawdown of the cumulative series (1 in the first case, 3 in the second), or look at streaks and penalise streaks of -1s. For instance, in R:

library("NMOF")
drawdown(cumsum(c(1,-1,1,-1,1,-1)), relative = FALSE)$maximum
## [1] 1
drawdown(cumsum(c(1,1,1,-1,-1,-1)), relative = FALSE)$maximum
## [1] 3

For streaks, look at function rle.

|improve this answer|||||
$\endgroup$
  • $\begingroup$ Yes, I see. I'll add also max drawdown and drawdown duration metrics and order strategies according to each ratio ranks. $\endgroup$ – mirik Nov 28 '19 at 13:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.