Home | Command Reference | Run Example

PC_ANALYSIS Command

The PC_ANALYSIS command performs principal component analysis on a list of time series. It converts a group of related series into a smaller set of independent principal components, also called eigenfactors.

Example

SLIDESHOW(PC_ANALYSIS(LIST(UNRATE,U6RATE,PAYEMS,SP500,VIXCLS)))

This example compares several economic and market series and shows how their shared variation can be summarized by principal components.

Syntax

PC_ANALYSIS(seriesList)

The input should be a LIST of time series. The series are aligned to the same date range before the analysis is performed.

Output

The command produces a PCA analysis panel including:

How to Read the Results

The explained variance chart shows how much of the total variation is captured by each principal component. A large first component means the series share a strong common factor.

The correlation chart shows how each original series relates to the eigenfactors. Large positive or negative correlations indicate that a series is strongly connected to that component.

The loading charts show which series contribute most to each principal component. Positive and negative loadings indicate opposite movement within the same factor.

Interpretation

Principal component analysis is useful when many time series move together. Instead of studying every series separately, PCA identifies the main independent patterns driving the group.

For example, a macroeconomic list may contain interest rates, inflation, employment, equity prices, and volatility. PCA can help identify whether the dominant factor looks like a growth factor, inflation factor, risk factor, or market-stress factor.

Typical Use Cases

Extractable Views

The PCA object supports several extractable views:

Notes

PCA is exploratory. The components are mathematical factors, not automatically economic causes. The meaning of each component must be inferred from its loadings, correlations, and the behavior of the input series.

Run this example in RainbowStats