Coskewness
Calculate the co-skewness of each asset with the benchmark: how the asset’s return moves with the squared, i.e. large, moves of the market in either direction. An asset with a negative co-skewness does worse when the market makes large moves and adds to the downside skewness of a market portfolio, so investors demand a higher return for holding it (Kraus and Litzenberger, 1976; Harvey and Siddique, 2000). A positive co-skewness works as a hedge against large market moves.
The formulas are as follows:
\[\text{"standardized":}\;\; \text{Co-Skewness} = E \left[(r_{i} - \mu_{i}) (r_{m} - \mu_{m}) ^{2}\right] / (\sigma_{i} \cdot \sigma_{m} ^{2})\] \[\text{"residual":}\;\; \beta_{SKD} = E \left[\epsilon_{i} \cdot \epsilon_{m} ^{2}\right] / (\sqrt{E \left[\epsilon_{i} ^{2}\right]} \cdot E \left[\epsilon_{m} ^{2}\right]) (\text{Harvey and Siddique},\; 2000)\]Where r_i is the asset return, r_m the benchmark return, ε_m = r_m − μ_m and ε_i the residual of the regression r_i = α + β·r_m + ε_i. The residual version only looks at the part of the asset’s return the market does not explain, so the market’s own skewness does not enter through the beta. For the benchmark itself the standardized co-skewness is the benchmark’s skewness.
By default one value is reported per period, computed from the daily returns within that period on the dates both the asset and the benchmark have a return. The expectations are population moments (1 / n), so σ_i and σ_m use 1 / n as well and the measure does not depend on the scale of the returns.
For more information about the method, see the following papers:
- Harvey, C.R., & Siddique, A. (2000). “Conditional Skewness in Asset Pricing Tests.” Journal of Finance, 55(3), 1263-1295.
- Kraus, A., & Litzenberger, R.H. (1976). “Skewness Preference and the Valuation of Risk Assets.” Journal of Finance, 31(4), 1085-1100.
Also known as: coskewness, systematic skewness, co-skewness beta.
Coskewness in Python or via the MCP
Install the Finance Toolkit with:
pip install financetoolkit -U
Then call get_coskewness as shown below.
from financetoolkit import Toolkit
toolkit = Toolkit(
["AAPL", "MSFT", "TLT", "GLD"],
api_key="FINANCIAL_MODELING_PREP_KEY",
start_date="2021-01-01",
end_date="2025-12-31",
)
toolkit.performance.get_coskewness()
Or, after setting up the Finance Toolkit MCP, ask:
What was the coskewness of Apple, Microsoft, TLT and gold (GLD) with the S&P 500 in each year from 2021 to 2025?
Which returns:
| Date | AAPL | MSFT | TLT | GLD |
|---|---|---|---|---|
| 2021 | -0.1202 | -0.1723 | -0.069 | -0.0972 |
| 2022 | 0.1063 | 0.09 | 0.1369 | 0.0849 |
| 2023 | 0.1241 | 0.085 | 0.0816 | 0.059 |
| 2024 | -0.423 | -0.6011 | -0.0005 | -0.418 |
| 2025 | 1.4001 | 1.4254 | 0.2683 | 0.6826 |
Parameters
get_coskewness accepts the following parameters.
| Parameter | Type | Description | Example |
|---|---|---|---|
period | str | The period to use for the calculation. Defaults to “quarterly” if the Toolkit is initialised with quarterly=True, otherwise “yearly”. | "weekly" |
method | str | “standardized” or “residual”, as described above. Defaults to “standardized”. | "standardized" |
rounding | int | None | The number of decimals to round the results to. Defaults to None, which uses the rounding of the Toolkit (4 unless set otherwise). | 2 |
growth | bool | Whether to calculate the growth of the values. Defaults to False. | True |
lag | int | list[int] | The lag to use for the growth calculation. Defaults to 1. | 4 |
standardize | bool | Whether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False. | True |