# Sharpe Ratio - is it correct?

84

I just started playing with MT5 and I have a ton of questions. Let's start with the first one.

I am really happy that sharpe ratio appeared on the list of predefined optimisation criteria. I was really surprised that a rather poor MA strategy (one of the examples) got a SR=17. Normally a SR=2 would guarantee the system to make loads of money with fairly small risk, 17 is something I could never see anywhere.

Does anyone know how exactly is the SR in the new MT5 calculated?

648

baq:

I just started playing with MT5 and I have a ton of questions. Let's start with the first one.

I am really happy that sharpe ratio appeared on the list of predefined optimisation criteria. I was really surprised that a rather poor MA strategy (one of the examples) got a SR=17. Normally a SR=2 would guarantee the system to make loads of money with fairly small risk, 17 is something I could never see anywhere.

Does anyone know how exactly is the SR in the new MT5 calculated?

Metaquotes published this article with information and formula for Sharpe Ratio.

http://championship.mql4.com/2007/news/203

News - Automated Trading Championship 2007
• championship.mql5.com
News - Automated Trading Championship 2007
84

wackena:

Metaquotes published this article with information and formula for Sharpe Ratio.

http://championship.mql4.com/2007/news/203

Thanks wackena,

I know how to calculate SR and this article confirms what I know. And take a look at this:

It follows that the value of Sharpe Ratio exceeding 3 is very good.

..

The account of Participant named RobinHood confirms this: his EA made 26 trades at the Automated Trading Championship 2006 without any losing one among them. Sharpe Ratio=3.07!

How can you explain this:

 Results Bars: 3 218 Ticks: 756 680 Total Net Profit: 784,77 Gross Profit: 1 686,37 Gross Loss: - 901,60 Profit Factor: 1,87 Expected Payoff: 15,70 Recovery Factor: 1,17 Sharpe Ratio: 11,10 Balance Drawdown: Balance Drawdown Absolute: 252,18 Balance Drawdown Maximal: 497,60 Balance Drawdown Relative: 9,49 Equity Drawdown: Equity Drawdown Absolute: 271,21 Equity Drawdown Maximal: 669,68 Equity Drawdown Relative: 12,40 Total Trades: 50 Short Positions (won %): 31 (35.48%) Long Positions (won %): 19 (21.05%) Profit Trades (% of total): 15 (30.00%) Loss Trades (% of total): 35 (70.00%) Largest profit trade: 305,90 Largest loss trade: - 77,70 Average profit trade: 112,42 Average loss trade: - 25,76 Maximum consecutive wins (\$): 2 (309.88) Maximum consecutive losses (\$): 13 (-482.95) Maximal consecutive profit (count): 309.88 (2) Maximal consecutive loss (count): -482.95 (13) Average consecutive wins: 1 Average consecutive losses: 3

only 30% profit trades, poor profit, and SR==11 ? that isn't right !!!

648

As I understand the Sharpe Ratio (SR), it is not a measure of overall profitability. But, a measure of risk and time on profitable trades.  Having a good SR does not mean that trading strategy will make a profit, just that the profit making trades had a good SR. No guarantee this is correct, it is just the way I understand SR.

84

wackena:
As I understand the Sharpe Ratio (SR), it is not a measure of overall profitability. But, a measure of risk and time on profitable trades.  Having a good SR does not mean that trading strategy will make a profit, just that the profit making trades had a good SR. No guarantee this is correct, it is just the way I understand SR.

What you are doing is to interpret the results of the SR. That's fine  but calculating it is something totally different. It's like 2+2=4. We may wonder what 4 means to us, but it will always be 4, this is just plain and simple maths :)

There is a simple mathematical formula that produces the result for SR:

Sharpe Ratio=(AHPR-(1+RFR))/SD

where:
AHPR - average holding period returns;
RFR - risk-free rate;

SD - standard deviation.

I assume than RFR is 0 here. So we have

((AHPR - 1) / SD)  = 11.

AHPR - 1 = 11 * SD

AHPR = 11 * SD + 1

So basically it says that in my strategy, average holding period return is more than eleven times bigger than standard deviation.

Now I went to Excel with orders generated by this script. What I got is

AHPR = 7,52

SD = 61,07

And behold... that gives us 0,11 :)

The real SR for this strategy is 0.11, tester shows us 11,10

Can anyone from metaquotes refer to this PLEASE? :)

I'm not saying that I'm doing everything right,  but if I'm wrong, please show me where!

If you want to reproduce results:

(Movinga Averages from Examples strategy, EU H1, data set to "last year", parameters (from top) 0.02, 6.6, 51, 29)

12315

baq:

Can anyone from metaquotes refer to this PLEASE? :)

I'm not saying that I'm doing everything right,  but if I'm wrong, please show me where!

If you want to reproduce results:

(Movinga Averages from Examples strategy, EU H1, data set to "last year", parameters (from top) 0.02, 6.6, 51, 29)

Can you provide us the detailed report? Or may be it would be better if you write to servicedesk.
84

Rosh:
Can you provide us the detailed report? Or may be it would be better if you write to servicedesk.

Thanks Rosh,

Here it is, you can see my calculations below the "deals" section:

http://dl.dropbox.com/u/370821/Forex/Reports/ReportTester-100351.xlsx

If anyone can have a quick look and confirm that I got it right I'll write the service desk request.

EDIT: I have sent a bug information anyway :)

84

I can see that there is very small number of people who treat MT5 seriously... does it mean I should wait few months?
192

baq:
I can see that there is very small number of people who treat MT5 seriously... does it mean I should wait few months?

I believe MT5 "Sharpe ratio" calculation is wrong, but I think yours as well, in your Excel file you calculate (=AVERAGE(K156:K256)) and =STDEV(K156:K256), so you count open orders (always profit of 0.00) but we should count close only so we divide by 50 not 100.

I sent to MT5/MQL5 regarding this issue, they fixed a bug I reported before but it takes some time of course. Really hope so soon this time.

Get in touch with developers using Service Desk!
• www.mql5.com
We therefore attach great importance to all user reports about issues in our programs and try to answer each one of them.
Moderator
6587

cymact:

I believe MT5 "Sharpe ratio" calculation is wrong, but I think yours as well, in your Excel file you calculate (=AVERAGE(K156:K256)) and =STDEV(K156:K256), so you count open orders (always profit of 0.00) but we should count close only so we divide by 50 not 100.

I sent to MT5/MQL5 regarding this issue, they fixed a bug I reported before but it takes some time of course. Really hope so soon this time.

Your request has been recieved.
84

cymact:

I believe MT5 "Sharpe ratio" calculation is wrong, but I think yours as well, in your Excel file you calculate (=AVERAGE(K156:K256)) and =STDEV(K156:K256), so you count open orders (always profit of 0.00) but we should count close only so we divide by 50 not 100.

I sent to MT5/MQL5 regarding this issue, they fixed a bug I reported before but it takes some time of course. Really hope so soon this time.

You are 100% right cymact :) I still can't get used to the new way the orders are handled

Anyway, with new calculation SR is 0.16 :-)

123