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):
are better than these trades:
Second, I would like to replace all these ratios with 1 generic metric, if such exists.


1 Answer 1


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:

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.

  • $\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, 2019 at 13:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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