GitHub Logo

Modern Portfolio Theory

Derivations of the formulae used in this implementation of Markowtiz’s Modern Portfolio Theory (MPT) are provided in this document. Their Python implementation is available here.

Choose a collection of assets to consider for a candidate portfolio.

Hint: Start typing to find a particular ticker. Use backspace to remove tickers quickly. The list of selectable tickers comes from the stocks in the S&P 500.
DALDOVCARRABBVGDDYCSCOHASGEEXPEAMGNKMXMGMTYLMHKNEMETNBF_BYUMETRDHRACGLHOLXCBOEAIZMSFTDFSONUEDGFTNTFCXTGTVZTMUSFDXTXTMCKCMCSATSNCLX

Allow Short Selling

Select whether to allow short positions within the portolio.

Risk free rate

The risk free rate is used to calculate the tangency portfolio. The current yield of the three-month U.S. Treasury bill is 5.23%.
r
%

Date Range

Asset statistics are calculated based on price action during a date range. Use the slider to adjust the date range used for the calculation.

Start Year: 2015

End Year: 2025

The efficient frontier, or set of efficient portfolios is indicated by the solid white line. These portfolios are "efficient"/optimal in the sense that they achieve the minimized risk (volatility) for a given level of expected return.

Results