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

| Sharpe | Interpretation | |---|---| | < 0 | Below risk-free, poor | | 0 - 1 | Mediocre risk-adjusted | | 1 - 2 | Good | | > 2 | Excellent |

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

Ready to run the numbers?

Open Risk-Adjusted Return Calculator