liveBook · Manning

Sharpe ratio

As explained in Investing for Programmers

The Sharpe ratio is a portfolio performance measure that compares excess return over the risk-free rate with the portfolio's volatility.

The Sharpe ratio measures risk-adjusted portfolio performance by comparing excess return over the risk-free rate with portfolio volatility. Higher values indicate more return per unit of risk, but the portfolio with maximum Sharpe ratio need not be the only Markowitz-efficient choice. section 7.6.1

Portfolio screening example

Using three years of prices for AAPL, WMT, GOOGL, KO, PFE, BRK-B, and NVDA, the calculation samples 10,000 portfolios and produces optimal weights, including substantial allocations to NVDA and PFE.

How Investing for Programmers covers it

How deep it goes
Calculates the ratio inside portfolio simulation and visualization, while distinguishing it from the broader efficient-frontier criterion.
Examples
Uses historical prices, seven named stocks, 10,000 simulated portfolios, plots, and an optimal-weight table.
What you can do after
Evaluate candidate portfolios by calculating, ranking, plotting, and inspecting their Sharpe ratios.
How it connects
Connects portfolio optimization with excess return, risk-free rate, volatility, and the efficient frontier.

Also explained in

Compare how 2 books explain Sharpe ratio →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Investing for Programmers. The section links point to the parts of the book it draws on.