Risk-Adjusted Return Calculator Formula

Understand the math behind the risk-adjusted return calculator. Each variable explained with a worked example.

Formulas Used

Sharpe Ratio

sharpe_ratio = std_deviation > 0 ? excess_return / std_deviation : 0

Sortino Ratio

sortino_ratio = downside_dev > 0 ? excess_return / downside_dev : 0

Excess Return

excess_ret = excess_return

Return per Unit of Risk

return_per_unit = std_deviation > 0 ? portfolio_return / std_deviation : 0

Variables

VariableDescriptionDefault
portfolio_returnPortfolio Annual Return(%)12
risk_free_rateRisk-Free Rate(%)4
std_deviationStandard Deviation (Volatility)(%)15
downside_devDownside Deviation(%)10
excess_returnDerived value= portfolio_return - risk_free_ratecalculated

How It Works

Risk-Adjusted Performance

Raw returns do not tell the full story. A 15% return with 30% volatility may be worse than 10% with 10% volatility.

Sharpe Ratio

Sharpe = (Portfolio Return - Risk-Free Rate) / Standard Deviation

SharpeInterpretation < 0Below risk-free, poor 0 - 1Mediocre risk-adjusted 1 - 2Good > 2Excellent

Sortino Ratio

Sortino = (Portfolio Return - Risk-Free Rate) / Downside Deviation

The Sortino ratio only penalizes downside volatility, which is more relevant since investors do not mind upside surprises.

Worked Example

12% return, 4% risk-free rate, 15% volatility, 10% downside deviation.

portfolio_return = 12risk_free_rate = 4std_deviation = 15downside_dev = 10
  1. 01Excess return = 12% - 4% = 8%
  2. 02Sharpe ratio = 8% / 15% = 0.53
  3. 03Sortino ratio = 8% / 10% = 0.80
  4. 04The Sortino is higher because downside deviation < total volatility

Frequently Asked Questions

What is a good Sharpe ratio?

A Sharpe ratio above 1.0 is considered good, above 2.0 is very good, and above 3.0 is excellent. Most diversified portfolios have Sharpe ratios between 0.4 and 1.0. The S&P 500 long-term Sharpe is about 0.4-0.5.

Which is better: Sharpe or Sortino?

The Sortino ratio is generally more informative because it only penalizes harmful volatility (downside). The Sharpe ratio treats upside and downside volatility equally, which unfairly penalizes investments with large positive moves.

Can I compare different investments with these ratios?

Yes, that is their primary purpose. When comparing two investments, the one with the higher Sharpe or Sortino ratio delivered better returns per unit of risk, regardless of absolute return levels.

Ready to run the numbers?

Open Risk-Adjusted Return Calculator