Sterling Ratio
Calculate the Sterling Ratio of an investment portfolio or asset’s returns.
The Sterling Ratio is a risk-adjusted return metric that divides the (annualized) return of an investment portfolio or asset by its Average Drawdown plus a fixed adjustment (conventionally 10%), providing insight into the return achieved relative to the typical depth of its drawdowns rather than only the single worst one (as with the Calmar Ratio).
The formula is as follows:
\[\text{Sterling Ratio} = \text{Return} / (| \text{Average Drawdown} | + \text{Adjustment})\]Also known as: Sterling-Calmar ratio.
Sterling Ratio in Python
get_sterling_ratio is part of the Performance module of the open-source Finance Toolkit. Install it with:
pip install financetoolkit -U
Then call get_sterling_ratio as shown below.
from financetoolkit import Toolkit
toolkit = Toolkit(["AAPL", "TSLA"], api_key="FINANCIAL_MODELING_PREP_KEY")
toolkit.performance.get_sterling_ratio()
Which returns:
| Date | AAPL | TSLA |
|---|---|---|
| 2021 | 2.0094 | 1.7258 |
| 2022 | -1.074 | -1.4667 |
| 2023 | 3.2891 | 4.193 |
| 2024 | 1.9286 | 2.1544 |
| 2025 | 0.4371 | 0.3785 |
| 2026 | 0.886 | -0.6097 |
Parameters
get_sterling_ratio accepts the following parameters:
- period (str, optional): The period to use for the calculation. Defaults to “quarterly” if the Toolkit is initialized with quarterly=True, otherwise “yearly”.
- within_period (bool, optional): Whether to calculate the Average Drawdown within the specified period or for the entire period. Thus whether to look at the Average Drawdown within a specific year (if period = ‘yearly’) or look at the entirety of all years. Defaults to True.
- adjustment (float, optional): The fixed adjustment added to the Average Drawdown, conventionally 0.1 (10%). Defaults to 0.1.
- rounding (int, optional): The number of decimals to round the results to. Defaults to 4.
- growth (bool, optional): Whether to calculate the growth of the ratios. Defaults to False.
- lag (int | str, optional): The lag to use for the growth calculation. Defaults to 1.
- standardize (bool, optional): Whether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False.