sharpe ratio in Financial time series toolbox

2 views (last 30 days)
Dear all,
I used the "sharpe" function to calculate the sharpe ratio of my monthly return data. But the result is different from the the function I wrote using the definition from http://financetrainingcourse.com/education/2011/04/market-risk-metrics-sharpe-and-treynor-ratios/.
Here is my code:
RI = (sum(Return))*12/N; % holding period return
MonSigma = std(Return); % monthly volatility
AnuSigma = MonSigma*sqrt(12); % annual volatility
IPO.SharpeRatio = (RI-RIF)/AnuSigma;
could anyone help me out with this?
Thank you.

Answers (1)

Sean de Wolski
Sean de Wolski on 21 Feb 2013
Just run:
edit sharpe
Scroll down and you can see exactly what it's doing. Looks like likes 75:79 are the engine.
  2 Comments
Kaijie Cui
Kaijie Cui on 21 Feb 2013
Thank you for your answer. I checked the sharpe source code, the problem is I do not understand what kind of data is the function "sharpe" working with, annual return? monthly? or daily? That might be financial question not Matlab question...
Sean de Wolski
Sean de Wolski on 21 Feb 2013
It describes it in the doc for sharpe and provides an example.

Sign in to comment.

Categories

Find more on Historical Contests in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!