Factor analysis (predictive power) of the risk metrics: whether the tickers that score high on a metric go on to return more than those that score low. Per period, the information coefficient (IC) is the Spearman rank correlation between the metric of the tickers in the period and their return over the following horizon: 1 means the metric ranks the later returns perfectly, -1 in reverse and 0 that it says nothing about them. The IC measures skill in Grinold and Kahn’s fundamental law of active management, IR ≈ IC × √breadth: a small but consistent IC across many tickers and periods gives a high information ratio.

The summary has a row per metric and horizon with the mean IC, its standard deviation, the IC information ratio (mean divided by standard deviation), the t-statistic of the mean with its p-value, the share of periods with a positive IC, the number of periods, the top minus bottom spread (the mean forward return of the highest quantile minus that of the lowest), the mean turnover of the top and bottom quantiles and the mean rank autocorrelation of the metric from one period to the next. With detail, it returns one of those parts per period (or per quantile) for a single metric.

Each metric is measured within each period (e.g. the volatility of a month’s daily returns) and compared with the returns from the close of the period’s last trading day onwards, using the dividend and split adjusted close, so a metric never overlaps the returns it is compared with. Each ticker keeps its own history: a ticker without a value or a return in a period is left out of that period only.

Factor Analysis in Python or via the MCP

Install the Finance Toolkit with:

pip install financetoolkit -U

Then call get_factor_analysis as shown below.

from financetoolkit import Toolkit

toolkit = Toolkit(
    ["AAPL", "MSFT", "GOOGL", "AMZN", "META", "NVDA", "JPM", "JNJ",
     "XOM", "PG", "KO", "WMT", "V", "UNH", "HD", "CVX"],
    api_key="FINANCIAL_MODELING_PREP_KEY",
    start_date="2016-01-01",
    end_date="2025-12-31",
)

toolkit.risk.get_factor_analysis(horizons=[1, 12])

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

How well did volatility, maximum drawdown and the other risk metrics predict the 1- and 12-month returns of Apple, Microsoft, Alphabet, Amazon, Meta, Nvidia, JPMorgan Chase, Johnson & Johnson, Exxon Mobil, Procter & Gamble, Coca-Cola, Walmart, Visa, UnitedHealth, Home Depot and Chevron from 2016 to 2025?

Which returns:

  Mean IC IC Standard Deviation IC Information Ratio t-Statistic p-Value Positive Share Observations Top Minus Bottom Quantile Turnover Rank Autocorrelation
(‘get_volatility’, ‘1 Month’) 0.096 0.3681 0.2607 2.8438 0.0053 0.6218 119 0.0184 0.4702 0.5869
(‘get_volatility’, ‘12 Months’) 0.2759 0.3699 0.7458 7.7505 0 0.7685 108 0.316 0.4702 0.5869
(‘get_maximum_drawdown’, ‘1 Month’) -0.0251 0.331 -0.0758 -0.8268 0.41 0.4538 119 -0.0038 0.6275 0.2713
(‘get_maximum_drawdown’, ‘12 Months’) -0.1743 0.3545 -0.4916 -5.1093 0 0.3241 108 -0.2068 0.6275 0.2713
(‘get_skewness’, ‘1 Month’) 0.0136 0.295 0.0462 0.5035 0.6155 0.5378 119 -0.0005 0.7535 0.0582
(‘get_skewness’, ‘12 Months’) 0.0106 0.2989 0.0354 0.3674 0.714 0.5185 108 0.0136 0.7535 0.0582
(‘get_amihud_illiquidity’, ‘1 Month’) -0.0285 0.3896 -0.0733 -0.7992 0.4258 0.479 119 -0.0059 0.1852 0.9
(‘get_amihud_illiquidity’, ‘12 Months’) -0.1154 0.379 -0.3045 -3.1645 0.002 0.3611 108 -0.08 0.1852 0.9

Parameters

get_factor_analysis accepts the following parameters.

ParameterTypeDescriptionExample
metricsstr | list[str]A risk method name with a value per ticker and period, e.g. “get_volatility”, a list of them, or a collection: “anomalies” or “all”. Defaults to “anomalies”, the volatility, maximum drawdown, skewness and Amihud illiquidity. “all” adds the downside deviation, kurtosis, value at risk, conditional value at risk, tail ratio and Roll spread.
periodstrThe frequency at which the metrics are measured and evaluated: weekly, monthly, quarterly or yearly. Each metric is calculated within each period from that period’s daily returns, so use monthly or longer for enough returns per period. Defaults to “monthly”."weekly"
horizonslist[int] | int | NoneThe number of periods the forward returns cover. Defaults to None, which uses about a period, a quarter and a year ahead (1, 3 and 12 months for monthly).None, which uses about a period, a quarter and a year ahead (1, 3 and 12 months for monthly)
quantilesintThe number of quantiles the tickers are sorted into per period. Defaults to 5.[0.05, 0.5, 0.95]
periods_apartintThe number of periods between the dates the quantile turnover and the rank autocorrelation compare. Defaults to 1.1
detailstr | NoneReturns one part of the analysis of a single metric instead of the summary: “information_coefficient” (per period and horizon), “quantile_returns” (the mean forward return per quantile and horizon), “quantile_turnover” (per period and quantile) or “rank_autocorrelation” (per period). Defaults to None.None
columnstr | NoneThe output to use of a metric with several. Defaults to None, which uses the first."Return"
roundingint | NoneThe number of decimals to round the results to. Defaults to None, which uses the Toolkit’s rounding. **kwargs: Parameters passed to the metrics that take them, e.g. alpha=0.05.2
Share