Sharpe Ratio calculation in MS123 visualizer/scorecard, Information Ratio
Author: sedelstein
Creation Date: 3/3/2012 2:48 PM
profile picture

sedelstein

#1
In the MS123 Visualizer code, there is a Sharpe ratio calculation. It is different than what is generally on the standard performance tab because

1) It is based on a monthly calculation.
2) It only uses complete months.

It can clearly be adapted to use daily data and the annualization factor used in that calculation, 12, for monthly data, can be changed to 252 for daily data.

I am still not matching the standard performance engine calculation and would appreciate some help in understanding why.

a) Are you using a different annualization factor
b) Anything else?
c) Can I access the result that the standard performance tab displays so there is no need to calculate it myself?

Thanks for the help
profile picture

Eugene

#2
a, b) If memory serves, the purpose of including Sharpe ratio in our visualizer library was to make it available for optimization i.e. something not provided by the built-in Scorecards.

The code was adapted from a legacy WL4 PerfScript, we didn't make effort to match the WL4/WL6 numbers. I recommend you take a look at the solution (PerformanceEngine.cs) to have your question answered instantly - by virtue of open source code.

c) No, you can not.
profile picture

sedelstein

#3
Thanks, I have seen the source code.

Since the obvious modifications haven't helped much I'd like to appeal to anyone in the "Community".

By chance, is there anyone out there who has matched the WL values successfully?
profile picture

sedelstein

#4
Eugene

If it's not too much trouble, can you tell me if the Sharpe calculation in WL is based on daily, monthly, or annual returns?
profile picture

sedelstein

#5
Since the response has been underwhelming I've decided to calculate an information ratio using the geometric return in the numerator and based on daily data.

In the interest of giving back to the community (and perhaps start a dialog) here is the code. It's ugly code and not what I edit heavily but it contains all my PrintDebug statements for some who might find it useful.

CODE:
Please log in to see this code.
profile picture

Eugene

#6
Steve,
QUOTE:
If it's not too much trouble, can you tell me if the Sharpe calculation in WL is based on daily, monthly, or annual returns?
It's based on the annualized average return.
profile picture

sedelstein

#7
Yes, but there are many ways to annualize data. In the code above, I use daily rates of change and multiply buy the square root of 252 to get an annualized standard deviation. Similarly, you can use a 21-day (trading days) and multiply by the sqrt(12) since volatility is proportional to the square root of time.

I'm not sure why a particular Sharpe ratio calculation is considered proprietary. My prior is that being able to confirm a result is a plus for users of WL.

I think the IR calculation above might be handy to some. What is the procedure for putting it into the next version of Community Component's PerformanceEngine.cs code?
profile picture

Eugene

#8
QUOTE:
I'm not sure why a particular Sharpe ratio calculation is considered proprietary.

Not the Sharpe ratio calculation is proprietary: being Fidelity's intellectual property, the built-in performance visualizers are closed source.
QUOTE:
What is the procedure for putting it into the next version of Community Component's PerformanceEngine.cs code?

Thank you for sharing your code. The PerformanceEngine.cs is part of a visualizer project by MS123, not a Community extension. First we need to decide if it's appropriate to put it there, then how exactly, and finally, in which version. A breaking change to the Sharpe ratio from Performance+/MS123 Scorecard might not be welcomed by its existing users, and putting another Sharpe ratio next to it will be confusing to some. Considering the aforementioned, I'll mark this subject for a later review.
profile picture

Eugene

#9
Hi Steve,

What are the main differences of the Information ratio to Sharpe ratio? Thanks.
profile picture

sedelstein

#10
Sorry so long to respond. I hadn't been monitoring the forums

One explanation is here http://seekingalpha.com/article/63911-clarifying-the-information-ratio-and-sharpe-ratio

Sharpe uses a risk free rate a the benchmark, Information ratio typically uses a different benchmark

In my case, the benchmark is zero return. Looking at trading as if I am a hedge fund with a zero return benchmark, I look at any return as my value added and divide that by the standard deviation of the value added. I think it is a little cleaner to use as there is no discussion about what the risk free rate is.

Alternatively, you could use an S&P benchmark to see if you have any skill vs that benchmark.

I think the thing to do would pass the bars of a benchmark index to my code and subtract that.
profile picture

Eugene

#11
Thanks for the pointer. Surprisingly, I either haven't heard of or have successfully forgotten that ratio.

I see your point re: moving the risk free rate out of the equation. A serious problem is that there would hardly be a way (if ever) to use a custom risk free rate as the formula's constituent when calculating the Information Ratio in a Scorecard for optimization purposes. There's no room for interactivity in there. Likewise, I'm not sure that obtaining an S&P benchmark in a performance visualizer isn't clumsy from both programming and usability standpoints. The only trouble-free option is to use a zero return benchmark; however, that's not necessarily what the folks out there expect that ratio to deliver after reading the Investopedia definition.

Let's mark this for a later time.
profile picture

sedelstein

#12
That's fair.

given the new routine in community components that gets the equity, if people out there want to calculate an information ratio with whatever benchmark they like, it's availab

QUOTE:
or have successfully forgotten that ratio.


IR's are worthwhile. See Grinold and Kahn's book where they discuss "The Fundamental Laws of Active Management" or papers here
http://www.barra.com/newsletter/nl163/SevIns3NL163.asp
and herehttp://www.northinfo.com/documents/327.pdf
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).