Factor Asset Correlations
Calculates factor exposures for each asset.
The major difference between the Fama and French Model here is that the correlation is taken as opposed to a Linear Regression in which the R-squared or Slope can be used to understand the exposure to each factor.
For assessing the exposure or influence of a stock to external factors, it’s often preferable to use R-squared (R²) or Beta because it explicitly measures how well the factors explain the stock’s returns. A higher R² indicates that the stock’s returns are more closely related to the factors, and thus, the factors have a greater influence on the stock’s performance.
However, since the results are closely related and tend to point into the same direction it could be fine to use correlations as well depending on the level of accuracy required.
The formula is as follows:
\[\text{Excess Return} = \text{Daily Asset Return} - \text{Daily Risk Free Rate} (\text{RF})\] \[\text{Factor Asset Correlation} = \text{Pearson Correlation} (\text{Daily Excess Return},\; \text{Daily Factor Return}),\;\; \text{using the daily Fama and French 5 Factor returns within each period (e.g. each year)}\]Also known as: factor exposure, asset correlations.
Factor Asset Correlations in Python or via the MCP
Install the Finance Toolkit with:
pip install financetoolkit -U
Then call get_factor_asset_correlations as shown below.
from financetoolkit import Toolkit
toolkit = Toolkit(
["CAT", "PFE", "ORCL"],
api_key="FINANCIAL_MODELING_PREP_KEY",
start_date="2025-01-01",
end_date="2025-12-31",
)
toolkit.performance.get_factor_asset_correlations()["CAT"]
Or, after setting up the Finance Toolkit MCP, ask:
How strongly did the daily returns of Caterpillar correlate with each of the five Fama and French factors in 2025?
Which returns:
| Mkt-RF | SMB | HML | RMW | CMA | |
|---|---|---|---|---|---|
| 2025 | 0.698 | 0.2883 | -0.2279 | -0.2868 | -0.0246 |
Parameters
get_factor_asset_correlations 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”. | "quarterly" |
factors_to_calculate | list of str | List of factors to calculate scores and residuals for. Defaults to [“Mkt-RF”, “SMB”, “HML”, “RMW”, “CMA”]. | ["Mkt-RF", "SMB", "HML"] |
region | str | The region whose factors to use: “United States”, “Developed”, “Developed ex US”, “Europe”, “Japan”, “Asia Pacific ex Japan” or “North America” (the factors of Ken French’s library for that region’s stocks). Every region’s factors are U.S. dollar returns with the U.S. one-month Treasury bill as the risk-free rate (RF), so a ticker quoted in another currency is best analysed with its U.S. dollar returns; otherwise the exchange rate’s moves end up in the factor loadings, mostly the market beta. Defaults to “United States”. | "Europe" |
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 |
show_columns | list of str | Restrict the result to these top level columns. Defaults to None, which returns every column. | ["Mkt-RF", "HML"] |