Sharpe ratio
The Sharpe ratio measures an investment’s excess expected return over the risk-free rate per unit of return volatility.
Build a Robo-Advisor with Python (From Scratch)
The Sharpe ratio is the expected return above the risk-free rate divided by the investment's volatility, measuring expected reward per unit of risk.
- How it is used
- Evaluates investments by expected excess return relative to volatility rather than by return alone.
- How deep it goes
- Derives the formula from the capital allocation line, works a leverage example, and distinguishes total from diversifiable risk.
- Examples
- Uses a leveraged $1 million investment and capital allocation line diagrams to illustrate interpretation and comparison.
- What you can do after
- Evaluate investments using expected excess return, volatility, leverage invariance, and portfolio-level risk.
Read how Build a Robo-Advisor with Python (From Scratch) explains Sharpe ratio →
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.
- How it is used
- Evaluates portfolio returns against volatility when comparing risk-adjusted performance.
- 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.
Related concepts
- risk-adjusted returnmeasures · Risk-adjusted return is investment performance evaluated relative to the amount or type of risk taken to achieve it.
- information ratioequivalent to · The information ratio is the expected return above a benchmark divided by the volatility of the portfolio's return difference from that benchmark.
- alphacontrasts with · Alpha is investment performance beyond a relevant benchmark or the return explained by specified systematic risk factors.
- risk-free returnused by · Risk-free return is the theoretical return on an investment assumed to have no default or other relevant uncertainty risk over a specified horizon.
- tangent planeequivalent to · A tangent plane is the plane that locally best approximates a smooth surface at a specified point.
- slopeproduced by · Slope is the rate at which a dependent quantity changes relative to an independent quantity, often represented by a line’s gradient or a coefficient in a linear relationship.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

