Calculate the Calmar Ratio of an investment portfolio or asset’s returns.

The Calmar Ratio is a risk-adjusted return metric that divides the return of an investment portfolio or asset over each period (a calendar-year return for period=’yearly’, a quarterly return for period=’quarterly’) by its Maximum Drawdown, providing insight into the return achieved per unit of the worst historical loss of value.

The formula is as follows:

\[\text{Calmar Ratio} = \text{Return} / | \text{Maximum Drawdown} |\]

See definition: https://en.wikipedia.org/wiki/Calmar_ratio

Also known as: Drawdown ratio.

Calmar Ratio in Python or via the MCP

Install the Finance Toolkit with:

pip install financetoolkit -U

Then call get_calmar_ratio as shown below.

from financetoolkit import Toolkit

toolkit = Toolkit(
    ["VTI", "VEA", "VWO"],
    api_key="FINANCIAL_MODELING_PREP_KEY",
    start_date="2020-01-01",
    end_date="2025-12-31",
)

toolkit.performance.get_calmar_ratio()

Or, after setting up the Finance Toolkit MCP, ask:

What was the Calmar ratio of VTI, VEA and VWO in each year from 2021 to 2025?

Which returns:

Date VTI VEA VWO
2021 4.9482 1.643 0.0948
2022 -0.7709 -0.5338 -0.6106
2023 2.4416 1.483 0.7946
2024 2.7771 0.3321 1.1734
2025 0.8851 2.6195 1.7646

Parameters

get_calmar_ratio accepts the following parameters.

ParameterTypeDescriptionExample
periodstrThe period to use for the calculation. Defaults to “quarterly” if the Toolkit is initialised with quarterly=True, otherwise “yearly”."quarterly"
within_periodboolWhether to calculate the Maximum Drawdown within the specified period or for the entire period. Thus whether to look at the Maximum Drawdown within a specific year (if period = ‘yearly’) or look at the entirety of all years. Defaults to True.False
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
Share