Calculate the Morningstar Risk-Adjusted Return (MRAR), the measure Morningstar ranks funds on within their category for its star rating.

MRAR is the annualized certainty equivalent of the monthly geometric excess returns for an investor with risk aversion gamma: the return such an investor would accept with certainty instead of the uncertain returns. It equals the annualized geometric mean excess return when every month returns the same and falls further below it the more the returns vary, penalizing downside variation most. Morningstar uses a gamma of 2 and rates funds on 36, 60 and 120 months (three, five and ten years), which rolling=36, rolling=60 and rolling=120 give, weighting them 20%, 30% and 50% in the overall rating. For US dollar funds its risk-free rate is the three-month Treasury bill (auction average), which risk_free_rate=”13w” follows. Morningstar also adjusts for tax-advantaged dividends where appropriate, which these total returns don’t.

The formula is as follows:

\[\text{Geometric Excess Return} = (1 + \text{Monthly Total Return}) / (1 + \text{Monthly Risk Free Rate}) - 1\] \[\operatorname{MRAR}(\gamma) = \left[1 / T \cdot \operatorname{SUM}((1 + \text{Geometric Excess Return}\; t) ^{-\gamma})\right] ^{- 12 / \gamma} - 1\]

with T the number of months. With a gamma of 0 it is the annualized geometric mean of the excess returns, Morningstar Return.

For more information, see the following:

Morningstar Risk-Adjusted Return (MRAR) in Python

Install the Finance Toolkit with:

pip install financetoolkit -U

Then call get_morningstar_risk_adjusted_return as shown below.

from financetoolkit import Toolkit

toolkit = Toolkit(
    ["VOO", "QQQ", "SCHD"],
    api_key="FINANCIAL_MODELING_PREP_KEY",
    start_date="2021-01-01",
    end_date="2025-12-31",
    risk_free_rate="13w",
)

toolkit.performance.get_morningstar_risk_adjusted_return()

Which returns:

Date VOO QQQ SCHD
2021 0.3178 0.278 0.32
2022 -0.2349 -0.3837 -0.0851
2023 0.1797 0.4298 -0.0232
2024 0.1795 0.1826 0.0484
2025 0.1199 0.135 -0.0101

Parameters

get_morningstar_risk_adjusted_return accepts the following parameters.

ParameterTypeDescriptionExample
gammafloatThe risk aversion, 0 or higher. Defaults to 2.0, which Morningstar uses for its ratings.
periodstrThe period to group the monthly returns by, “yearly” or “quarterly”. Defaults to “yearly”."weekly"
within_periodboolWhether to calculate the MRAR of the months within each period or of all months in the range. Defaults to True.True
rollingintThe number of months in a rolling window, e.g. 36 for the three year MRAR at every month end. Overrides period and within_period. Defaults to None.4
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 values. 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
Share