Volatility Skewness

Calculate the Volatility Skewness or Variability Skewness: whether the returns of an investment portfolio or asset spread out more on the gain side than on the loss side of a minimum acceptable return.

The Volatility Skewness (Bacon 2008) divides the upside variance by the downside variance around a minimum acceptable return (MAR): above 1 the returns spread out more on the gain side than on the loss side, below 1 the volatility comes mostly from losses. The Variability Skewness is its square root, the Upside Deviation over the Downside Deviation, on the scale of the returns. Both describe the asymmetry of the return distribution without the third moment, which a single extreme return can dominate.

The formula is as follows:

\[\text{Volatility Skewness} = \frac{\sum \max(\text{Return}_{t} - \text{MAR},\; 0)^{2}}{\sum \max(\text{MAR} - \text{Return}_{t},\; 0)^{2}}\] \[\text{Variability Skewness} = \sqrt{\text{Volatility Skewness}} = \frac{\text{Upside Deviation}}{\text{Downside Deviation}}\]

Where the sums run over all returns of the sample, so it is the upside variance over the downside variance, both divided by the number of all returns. A sample without a return below the MAR gives NaN.

Also known as: variability skewness, upside to downside variance ratio.

Example · SPY, QQQ, IWM · 2021 to 2025

Install the Finance Toolkit with pip install financetoolkit -U, then call get_volatility_skewness:

from financetoolkit import Toolkit

toolkit = Toolkit(
    ["SPY", "QQQ", "IWM"],
    api_key="FINANCIAL_MODELING_PREP_KEY",
    start_date="2021-01-01",
    end_date="2025-12-31",
)

toolkit.risk.get_volatility_skewness(period="yearly", within_period=True)

Or, with the Finance Toolkit MCP set up, ask an AI assistant such as Claude or ChatGPT:

Did the daily returns of the Invesco QQQ, iShares Russell 2000 (IWM) and SPDR S&P 500 (SPY) ETFs spread out more on the gain side than on the loss side in each year from 2021 to 2025, measured by the volatility skewness?

Which returns:

Parameters

get_volatility_skewness accepts the following parameters.

ParameterTypeDescriptionExample
periodstrThe data frequency for returns. Options are: “daily”, “weekly”, “monthly”, “quarterly”, “yearly”. Defaults to “daily”."weekly"
minimum_acceptable_returnfloatThe minimum acceptable return (MAR) per observation of the chosen period (e.g. per day). Defaults to 0.0.0.001
methodstrThe ratio. Options are: “volatility” (Volatility Skewness, the ratio of the variances), “variability” (Variability Skewness, the ratio of the deviations). Defaults to “volatility”."volatility"
within_periodboolWhether to calculate the Volatility Skewness within the specified period or for the entire period. Thus whether to look at the Volatility Skewness within a specific year (if period = ‘yearly’) or look at the entirety of all years. Defaults to False. Note that this requires intraday data when period = ‘daily’, since a single day only nests observations when intraday data was fetched.True
rollingintThe rolling window size to use for the calculation. If set, the Volatility Skewness is calculated over a rolling window of this many periods across the full return history instead of per period. At least 2. 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 Volatility Skewness values over time. 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
show_columnsstr | list[str] | NoneThe columns to keep, a name or a list of names, matched on every column level, or the rows when no column has those names (such as the line items of a financial statement). Names that do not exist are logged, and when none exist the result is returned in full. Defaults to None, which keeps every column.None, which keeps every column

References

  • Paper Bacon, C.R. (2008). “Practical Portfolio Performance Measurement and Attribution.” John Wiley & Sons, chapter 4.
  • Library Shares similar logic as PerformanceAnalytics (R)’s VolatilitySkewness
Share