Description Usage Arguments Details Value Author(s) References See Also Examples

Asymptotic Principal Components Analysis for a fixed number of factors

1 | ```
apca(x,nf)
``` |

`x` |
a numeric matrix or other object for which 'as.matrix' will produce a numeric matrix. |

`nf` |
number of factors desired |

NOTE: This is a preliminary version of this function, and it may be modified in the future.

A list with four components:

`eig` |
eigenvalues |

`factors` |
estimated factor scores |

`loadings` |
estimated factor loadings |

`rsq` |
R-squared from the regression of each variable on the factor space |

Ruey Tsay

Ruey Tsay (2005) Analysis of Financial Time Series, 2nd ed. (Wiley, sec. 9.6, pp. 436-440)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | ```
# Consider the monthly simple returns of 40 stocks on NYSE and NASDAQ
# from 2001 to 2003 with 36 observations.
data(m.apca0103)
dim(m.apca0103)
M.apca0103 <- with(m.apca0103, array(return, dim=c(36, 40), dimnames=
list(as.character(date[1:36]),
paste("Co", CompanyID[seq(1, 1440, 36)], sep=""))))
# The traditional PCA is not applicable to estimate the factor model
# because of the singularity of the covariance matrix. The asymptotic
# PCA provides an approach to estimate factor model based on asymptotic
# properties. For the simple example considered, the sample size is
# $T$ = 36 and the dimension is $k$ = 40. If the number of factor is
# assumed to be 1, the APCA gives a summary of the factor loadings as
# below:
#
apca40 <- apca(M.apca0103, 1)
#
# (min, 1st Quartile, median, mean, 3rd quartile, max) =
# (0.069, 0.432, 0.629, 0.688, 1.071, 1.612).
#
# Note that the sign of any loading vector is not uniquely determined
# in the same way as the sign of an eigenvector is not uniquely
# determined. The output also contains the summary statistics of the
# R-squares of individual returns, i.e. the R-squares measuring the
# total variation of individual return explained by the factors. For
# the simple case considered, the summary of R-squares is (min, 1st
# Quartile, median, mean, 3rd quartile, max) =
# (0.090,0.287,0.487,0.456,0.574,0.831).
``` |

FinTS documentation built on May 29, 2017, 9:08 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.