In this article, I’m going to explain how to calculate one of the most famous ratios, among financial analysis, to measure risk in Microsoft Excel: the **Sharpe Ratio.**

According to Investopedia:

“*The Sharpe ratio tells us whether a portfolio’s returns are due to smart investment decisions or a result of excess risk. Although one portfolio or fund can reap higher returns than its peers, it is only a good investment if those higher returns do not come with too much additional risk. The greater a portfolio’s Sharpe ratio, the better its risk-adjusted performance has been. A negative Sharpe ratio indicates that a risk-less asset would perform better than the security being analyzed.”*

The formula is the following:

Where Expected Return (P) is the expected return of the portfolio and “Standard Deviation (P)” is the standard deviation of the portfolio.

**Calculation of Sharpe Ratio**

Now let’s get hands-on work and calculate the Sharpe Ratio for a two – stocks portfolio in MS Excel.

For the analysis, we will suppose that our portfolio is composed 50% by Apple Inc. (AAPL) and 50% by Microsoft Corp. (MSFT).

### **Step 1:**

First of all, we need to get the stocks’ daily prices in order to calculate the daily returns that we are going to use to calculate the variables that compose the Sharpe Ratio.

We can get the historical prices from many sources but the most famous ones are Yahoo! Finance or Google Finance:

**Step 2:**

Input the daily prices into an Excel worksheet and calculate daily returns for the period being analyzed (I will use a 3-year time horizon).

A daily return can be calculated with the formula below:

Daily Return = (Price 1 – Price 0) / Price 0

**Daily Return = (Price 1 / Price 0) -1**

Where Price 1 is the following day close price and Price 0 is the previous day close price.

**Step 3:**

Once we have all the daily returns we are able to calculate the **expected return** for each of the stocks. To do this, we have to calculate the average of the daily returns of the period being analyzed and then annualize it.

We will use Excel’s average formula: =AVERAGE (Range of Returns1) and then we annualize it by multiplying by 252 (tradable days).

Then, we have to do the same calculations for the second stock:

=AVERAGE (Range of Returns2) and then we annualize it by multiplying by 252.

**Step 4:**

Following the Sharpe Ratio formula, other variable we need to calculate is the **Standard Deviation of the portfolio**.

Let’s remember the Variance formula for a two-stocks portfolio:

VAR (P) = Weight1^2 * STDEV1^2 + Weight2^2 * STDEV^2 +2 * Weight1 * Weight2 * STDV1 * STDV2 *CORR(1,2)

Where COV(1,2) = STDEV1 *STDEV2 * CORR1,2

So, **VAR (P) = Weight1^2 * STDEV1^2 + Weight2^2 * STDEV^2 + 2 * Weight1 * Weight2 * COV1,2**

Then, the standard deviation of the portfolio is the squared root of the Variance.

**STDEV (P) = (Weight1^2 * STDEV1^2 + Weight2^2 * STDEV^2 + 2 * Weight1 * Weight2 * COV1,2)^(1/2)**

One of the inputs we can easily calculate in Excel is the Standard Deviation of the returns of each stock:

For the first stock = STDEV1 (Range of Returns1)

For the second stock = STDEV2 (Range of Returns2).

Then, we need to calculate the Covariance of the two stocks based on the returns.

*Note**: According to Investopedia, the covariance is a** measure of the degree to which returns on two risky assets move in tandem. A positive covariance means that asset returns move together. A negative covariance means returns move inversely.*

To do this we use the covariance function provided by Excel: =COVAR (Range of Returns 1; Range of Returns2)

Once we have calculated the Standard Deviation and the Covariance of the stocks, we can put all the variables together and get the **Standard Deviation of the Portfolio**.

The standard deviation calculated is in a daily basis and we have to get it annualized so we have to multiply the result by the squared root of 252 (average number of tradable days per year).

**Step 5:**

We are one step to finish the calculation! We just need to get the Risk Free Rate and put all the variables together. The United States Treasury Bonds are known as risk free because they always pay. For this analysis, a 5-year bond will be considered with an annual rate of 1.72%.

The numbers for the example are the following:

Annualized Expected Return MSFT= 0.07%*252 = **18.46%**

Annualized Expected Return AAPL= 0.08%*252 = **19.29%**

Portfolio’s Annualized Expeted Return= 0.5*18.46% + 0.5*19.29% = **18.87%**

Std Dev MSFT= **1.49%**

Std Dev AAPL= **1.77%**

Covariance (MSFT, AAPL)= 0,0001

Portfolio’s Std Dev (Daily) = (0.5^2*1.49%^2+0.5^2*1.77%^2+2*0,5*0,5*0,0001)^(1/2) = **0.02%**

Portfolio’s Std Dev (Annualized) = (0.02%*252)^(1/2)= **20.71%**

Risk Free Rate= **1.72%**

Putting all the variables together into the Sharpe Ratio formula we get the following:

Sharpe Ratio (P) = (18.87% – 1.72%) / 20.71% = **0.83**

**About the Author:** **Fernando Ventureira **is a** Financial Analyst **at** **iBillionaire Inc.

**Here’s an offer on Breaking Into Wall Street (BIWS) programs:**

**All FinanceWalk readers will get FREE $97 Bonus – FinanceWalk’s Equity Research Program. **

If you want to build a long-term career in Financial Modeling, Investment Banking, and Private Equity, I’m confident these are the only courses you’ll need. ( Because Brian (BIWS) has created world-class online financial modeling training programs that will be with you FOREVER).

If you purchase BIWS courses through FinanceWalk links, I’ll give you a **FREE Bonus of FinanceWalk’s online Equity Research Program ($97 Value).**

I see FinanceWalk’s Equity Research Program as a pretty perfect compliment to BIWS courses – BIWS helps you build financial modeling and investment banking skills and then I will help you build equity research and report writing skills.

**To get the FREE $97 Bonus, please purchase from the following links.**

Excel and Financial Modeling Fundamentals – Free $97 Bonus

Advanced Financial Modeling – Free $97 Bonus

Bank & Financial Institution Modeling – Free $97 Bonus

Oil & Gas Modeling – Free $97 Bonus

Real Estate & REIT Modeling – Free $97 Bonus

Investment Banking Networking Toolkit – Free $97 Bonus

Investment Banking Interview Guide – Free $97 Bonus

IB Networking Toolkit + IB Interview Guide $144 ( Save $50)

BIWS Platinum – Save $632 ( Save 35%) + Free $97 Bonus : The most comprehensive IB package on the market today. Includes the NEW and Improved BIWS Premium Financial Modeling Course (RRP: $497) PLUS access to the above 6 complementary courses designed to make you into an even more well-rounded IB Professional:

**In order to get your FREE Bonus, you must:**

- Purchase the course through FinanceWalk links.
- Send me an email along-with your full name and best email address to
**avadhut@financewalk.com**so I can send you the course login details.

Our Full Time **Financial Modeling Investment Banking** Course (6 Weeks) starts on 8th September, 2015 and 10 Day Weekend Workshop starts on 29th August, 2015 in **New Delhi, India**.

Only few seats remain. Interested candidates can contact me

## Leave a Reply