Maximum Sharpe vs. minimum volatility

Introduction to Portfolio Analysis in Python

Charlotte Werger

Data Scientist

Remember the Efficient Frontier?

$$

  • Efficient frontier: all portfolios with an optimal risk and return trade-off
  • Maximum Sharpe portfolio: the highest Sharpe ratio on the EF
  • Minimum volatility portfolio: the lowest level of risk on the EF

$$ Graph of the efficient frontier

Introduction to Portfolio Analysis in Python

Adjusting PyPortfolioOpt optimization

Chart of options in PyPortfolioOpt

Introduction to Portfolio Analysis in Python

Maximum Sharpe portfolio

Maximum Sharpe portfolio: the highest Sharpe ratio on the EF

from pypfopt.efficient_frontier import EfficientFrontier
# Calculate the Efficient Frontier with mu and S
ef = EfficientFrontier(mu, Sigma)
raw_weights = ef.max_sharpe()
# Get interpretable weights 
cleaned_weights = ef.clean_weights()
{'GOOG': 0.01269,'AAPL': 0.09202,'FB': 0.19856,
 'BABA': 0.09642,'AMZN': 0.07158,'GE': 0.02456,...}
Introduction to Portfolio Analysis in Python

Maximum Sharpe portfolio

# Get performance numbers
ef.portfolio_performance(verbose=True)
Expected annual return: 33.0%
Annual volatility: 21.7%
Sharpe Ratio: 1.43
Introduction to Portfolio Analysis in Python

Minimum Volatility Portfolio

Minimum volatility portfolio: the lowest level of risk on the EF

# Calculate the Efficient Frontier with mu and S
ef = EfficientFrontier(mu, Sigma)
raw_weights = ef.min_volatility()
# Get interpretable weights and performance numbers
cleaned_weights = ef.clean_weights()
{'GOOG': 0.05664, 'AAPL': 0.087, 'FB': 0.1591,
'BABA': 0.09784, 'AMZN': 0.06986, 'GE': 0.0123,...}
Introduction to Portfolio Analysis in Python

Minimum Volatility Portfolio

ef.portfolio_performance(verbose=True)
Expected annual return: 17.4%
Annual volatility: 13.2%
Sharpe Ratio: 1.28
Introduction to Portfolio Analysis in Python

Let's have another look at the Efficient Frontier

Graph of efficient frontier with minimum volatility and maximum Sharpe portfolio indicated

Introduction to Portfolio Analysis in Python

Maximum Sharpe versus Minimum Volatility

Graph of efficient frontier with minimum volatility and maximum Sharpe portfolio indicated

Introduction to Portfolio Analysis in Python

Let's practice!

Introduction to Portfolio Analysis in Python

Preparing Video For Download...