Sharpe's Ratio which evaluates the excess return of an asset over the risk free rate of return for each additional unit of risk which the portfolio assumes.
The average return from the portfolio over the period considered expressed in decimal format (i.e. 1 percent = 0.01).
standardDeviation
Standard deviation of the market price of the portfolio (i.e. its risk) over the period considered expressed in decimal format (i.e. 1 percent = 0.01).
riskFree
The (constant) risk free interest rate expressed in decimal format (i.e. 1 percent = 0.01). The risk free interest rate of a given maturity within a given currency is usual taken to be the yield to maturity of a Government Bond of the same maturity. Here we should taken the yield to maturity of the Government bond at the beginning of the period under consideration which matures at the end of the period over which Sharpe's ration is evaluated. Note that if no such interest rate security exists then you could use the yield to maturity of the closest instrument or better still use such instruments and the boot-strapping technique.
Return Value
A double equal to Sharpe's Ratio of portfolio returns.
Remarks
Sharpe's ratio is a widely used measure which makes it possible to make balanced
risk adjusted comparisons between different portfolios. In accordance to Sharpe's
methodology the portfolio with a higher Sharpe's ratio should be preferred to a
portfolio with a lower Sharpe's ratio.
Applying Sharpe's Ratio
Suppose an US stock investment gives a return over a given year of 10 percent
and the rate available from a risk free Treasury Bond over the same year is 6 percent.
Then the reward for taking on the higher level of risk of the stock over the risk free
Treasury is 4 percent. Say the risk (i.e. standard deviation) of the stock over the
year is 2 percent. Then the excess return of the stock over the Treasury per unit of
risk (i.e. per 1 percent of standard deviation) is 2 percent. That is, the Sharpe's
ratio here is 2 percent.