Background
In 1952, economist Harry Markowitz published "Portfolio Selection" which first introduced modern portfolio theory (MPT), or mean-variance analysis.[1] The goal of MPT is to maximize the expected return of a portfolio for a given level of risk, as measured by the variance of its asset prices. The optimized part of the risk-return spectrum (i.e. the portfolios whose allocations provide the highest return for a given level of risk) is referred to as the efficient frontier.
In 1966, economist William Sharpe published "Mutual Fund Performance" which defined the reward-to-variability ratio (now known as the Sharpe ratio).[2] This research grew from his part in the development of the capital asset pricing model (CAPM) for which he shared the 1990 Alfred Nobel Memorial Prize in Economic Sciences with Markowitz and Merton Miller.[3] In 1994, he published "The Sharpe Ratio" which defined the ex post (historic) Sharpe ratio Sh.[4] To calculate this value, we first define the differential return Dt in period t as the difference between the historical return RFt on fund F and the return RBt on a benchmark (often the arithmetic average of the historic annualized 3-month Treasury bill rate, also called the risk-free rate):[5]
We then define D as the average value of Dt over the time period from t=1 to T:
We can define the standard deviation during the period σD as:
We can then define the ex post Sharpe Ratio as the ratio of the historic average differential return to its standard deviation:
This site contains a preloaded set of data from over 100 popular assets including stocks, ETFs, cryptocurrencies, and more. The data contains the annualized monthly percent return from the historic adjusted close prices of each asset over their maximum periods, the variances of these values, and the covariances of these values with respect to each others' values. When calculating the Sharpe ratio, it is common to use the assets' monthly close prices.[6] Since portfolio optimization is an extension of asset diversification, the developer chose to calculate the covariances only over periods where both assets had data, while still capturing each individual assets' returns and variances over their maximum time periods. Note that this choice may affect the accuracy of the results, and as a purely educational app we are not liable for the accuracy of this data nor its resulting information as per the Terms of Service. Please refer to the source code for how this data was gathered for more details.
This site uses Monte Carlo simulation to approximate the efficient frontier from 1,000,000 random allocations (please see the site's source code for more details). The ex post Sharpe ratio is calculated via the following formula, where μ is the vector of mean returns, Q is the covariance matrix, and x is the vector of weights (or allocations) such that they are all positive and add to 1 (or 100%):[7]
In our case, the portfolio that produces the highest Sharpe ratio out of the 1,000,000 is plotted on a graph of historic average return vs. standard deviation. The efficient frontier is calculated by splitting the risk into at most 20 equally spaced bins and choosing the largest return from within each bin. Note that the efficient frontier here is approxmiated via Monte Carlo simulation and a more accurate calculation can be done via quadratic programming; however, this is beyond the scope of this educational web app and the reader is encouraged to learn more about this after experimenting with the site.[7] 1,000 of the 1,000,000 randomly generated portfolios are chosen at random and plotted to outline the hyperbolic shape known as the Markowitz bullet which shows the general distribution of returns and risks as a function of the possible portfolio allocations.
The capital market line (CML) is a straight line drawn from the benchmark rate to the portfolio on the efficient frontier with the highest Sharpe ratio, also known as the tangency portfolio. The CML represents the capital allocation line with the highest slope (equal to the highest Sharpe ratio). Points on the CML to the left of the tangency portfolio represent incorporating lending at the benchmark rate into the portfolio. Points to the right incorporate borrowing,[8] and higher returns may be made from incorporating short selling,[9] but these concepts are beyond the scope of this app and the reader is encouraged to learn more about them after experimenting with the site.
On this site, we only introduce the most basic aspects of modern portfolio theory for educational purposes. Standard calculations of the annualized ex post Sharpe ratio have a wide range of criticisms, such as how historical returns cannot guarantee an asset's future performance, how it assumes a normal distribution of returns which in practice may underestimate tail risk, how it does not take into account serial correlation of the portfolio's assets which has been shown in some cases to overestimate the calculation by over 65%,[10] and many more. The reader is encouraged to look into other similar quantities and models such as the Sortino ratio (which penalizes downside volatility more than upside), the Treynor ratio (which measures risk via the beta (β), or how its volatility correlates with the market's), the Black-Litterman model (which takes into account an investor's beliefs about the future of an asset's returns),[11] among many more.
References
- Markowitz, H.M. (March 1952). "Portfolio Selection". The Journal of Finance. 7 (1): 77–91. doi:10.2307/2975974.
- Sharpe, W. F. (1966). "Mutual Fund Performance". Journal of Business. 39 (S1): 119–138. https://www.jstor.org/stable/2351741.
- Press release. NobelPrize.org. Nobel Prize Outreach AB 2022. Fri. 18 Nov 2022. https://www.nobelprize.org/prizes/economic-sciences/1990/press-release/.
- Sharpe, William F. (1994). "The Sharpe Ratio". The Journal of Portfolio Management. 21 (1): 49–58. doi:10.3905/jpm.1994.409501.
- Board of Governors of the Federal Reserve System (US), 3-Month Treasury Bill Secondary Market Rate, Discount Basis [TB3MS], retrieved from FRED, Federal Reserve Bank of St. Louis. November 17, 2022. https://fred.stlouisfed.org/series/TB3MS.
- Fernando, Jason. "Sharpe Ratio Formula and Definition with Examples." Investopedia. June 06, 2022. https://www.investopedia.com/terms/s/sharperatio.asp.
- "Maximizing the Sharpe ratio." IEOR 4500. https://people.stat.sc.edu/sshen/events/backtesting/reference/maximizing%20the%20sharpe%20ratio.pdf.
- "Lee, M. C., & Su, L. E. (2014). Capital market line based on efficient frontier of portfolio with borrowing and lending rate. Universal Journal of Accounting and Finance, 2(4), 69-76. doi:10.13189/ujaf.2014.020401.
- Jacobs, B. I., Levy, K. N., & Markowitz, H. M. (2005). Portfolio optimization with factors, scenarios, and realistic short positions. Operations Research, 53(4), 586-599. doi:10.1287/opre.1050.0212.
- Lo, Andrew W. "The statistics of Sharpe ratios." Financial analysts journal 58, no. 4 (2002): 36-52. doi:10.2469/faj.v58.n4.2453.
- Idzorek, Thomas M. "A step-by-step guide to the Black-Litterman model." July 20, 2004. https://people.duke.edu/~charvey/Teaching/BA453_2006/Idzorek_onBL.pdf.