Risk-Return Ratio

Calculate the risk-return ratio of an investment portfolio or asset: its mean return per unit of volatility, the Sharpe ratio without the risk free rate.

The formula is as follows:

\[\text{Risk-Return Ratio} = \frac{\operatorname{Mean}(\text{Returns})}{\text{Standard Deviation}(\text{Returns})}\]

Computed from the daily returns within each period (or the period returns over a rolling window), per observation; annualizing multiplies it by the square root of the observations in a year (252 daily returns, 365 for a ticker that trades on weekends, or 52, 12, 4 or 1 for rolling weekly, monthly, quarterly or yearly returns). Leaving out the risk free rate makes it comparable across currencies and rate environments, but it overstates the reward of a low-risk asset that earns little more than cash; get_sharpe_ratio subtracts the risk free rate.

The ratio under this name is defined in quantstats (Ran Aroussi) and ffn (Philippe Morissette).

Also known as: return to risk ratio, return over volatility, information ratio against cash.

Example · AAPL, MSFT, KO · 2021 to 2025

Install the Finance Toolkit with pip install financetoolkit -U, then call get_risk_return_ratio:

from financetoolkit import Toolkit

toolkit = Toolkit(
    ["AAPL", "MSFT", "KO"],
    api_key="FINANCIAL_MODELING_PREP_KEY",
    start_date="2021-01-01",
    end_date="2025-12-31",
)

toolkit.performance.get_risk_return_ratio(annualize=True)

Or, with the Finance Toolkit MCP set up, ask an AI assistant such as Claude or ChatGPT:

What was the annualized return per unit of volatility of Apple, Microsoft and Coca-Cola in each year from 2021 to 2025?

Which returns:

Parameters

get_risk_return_ratio accepts the following parameters.

ParameterTypeDescriptionExample
periodstrThe period to use for the calculation. Options are: “daily”, “weekly”, “monthly”, “quarterly”, “yearly”. Defaults to “quarterly” if the Toolkit is initialised with quarterly=True, otherwise “yearly”."weekly"
rollingintThe rolling window size to use for the calculation. If you select period = ‘monthly’ and set rolling to 12 you obtain the rolling 12-month ratio. At least 2. Defaults to None.4
annualizeboolWhether to annualize the ratio, multiplying it by the square root of the observations in a year. Defaults to False.True
roundingint | NoneThe number of decimals to round the results to. Defaults to None, which uses the rounding of the Toolkit (4 unless set otherwise).2
growthboolWhether to calculate the growth of the ratios. Defaults to False.True
lagint | list[int]The lag to use for the growth calculation. Defaults to 1.4
standardizeboolWhether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False.True
show_columnsstr | list[str] | NoneThe columns to keep, a name or a list of names, matched on every column level, or the rows when no column has those names (such as the line items of a financial statement). Names that do not exist are logged, and when none exist the result is returned in full. Defaults to None, which keeps every column.None, which keeps every column

References

Share