Amihud Illiquidity
Calculate the Amihud (2002) Illiquidity ratio, per asset.
The Amihud ratio measures the average price impact of trading – how much the price moves per dollar of trading volume. A high value means that even a small amount of trading moves the price a lot (the asset is illiquid), while a low value means the asset can absorb a large amount of trading with little price impact (the asset is liquid).
For more information about the method, see the following paper:
- Amihud, Y. (2002). “Illiquidity and Stock Returns: Cross-Section and Time-Series Effects.” Journal of Financial Markets, 5(1), 31-56.
Also known as: Amihud illiquidity ratio, ILLIQ, price impact ratio.
No programming experience? With the Finance Toolkit MCP server, AI assistants such as Claude and ChatGPT can calculate the Amihud Illiquidity for you. Just ask in plain English.
Calculate the Amihud Illiquidity in Python
The Amihud Illiquidity is available in the Risk module of the open-source Finance Toolkit. Install it with:
pip install financetoolkit -U
Then call get_amihud_illiquidity as shown below.
from financetoolkit import Toolkit
toolkit = Toolkit(["AMZN", "TSLA"], api_key="FINANCIAL_MODELING_PREP_KEY")
toolkit.risk.get_amihud_illiquidity(period="quarterly", scale=1e12)
Which returns:
| Date | AAPL | MSFT | Benchmark |
|---|---|---|---|
| 2022Q1 | 0.9388 | 1.4796 | 0.2251 |
| 2022Q2 | 1.4477 | 2.2593 | 0.3401 |
| 2022Q3 | 1.1619 | 1.942 | 0.3349 |
| 2022Q4 | 1.5347 | 2.429 | 0.3445 |
Note that a large scale is used here since these are liquid, large-cap
stocks with very high dollar trading volume relative to their typical daily
price move – the default scale of 1,000,000 (as used in Amihud’s original
1980s/1990s-era paper) would round these to 0.0 at the default precision.
Parameters
get_amihud_illiquidity accepts the following parameters:
- period (str, optional): The data frequency for returns (daily, weekly, monthly, quarterly, or yearly). Defaults to “quarterly” if the Toolkit is initialised with quarterly=True, otherwise “yearly”.
- within_period (bool, optional): Whether to calculate the ratio within the specified period or for the entire period. Defaults to True.
- scale (float, optional): A multiplier applied to the resulting ratio purely for readability. Defaults to 1,000,000.
- rounding (int | None, optional): The number of decimals to round the results to. Defaults to 4.
- growth (bool, optional): Whether to calculate the growth of the Amihud Illiquidity values over time. Defaults to False.
- lag (int | list[int], 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.
Related Risk Metrics
The Risk module page introduces the module, and the sidebar lists all of its functions.