Description Usage Arguments Value Examples

View source: R/FundamentalFactor.Cov.R

Estimate covariance matrix by fitting a fundamental factor model using OLS or WLS regression

1 | ```
FundamentalFactor.Cov(assets, exposure, method = "WLS")
``` |

`assets` |
a N*p matrix of asset returns, N indicates sample size and p indicates the dimension of asset returns |

`exposure` |
a p*q matrix of exposure indicator for the fundamental factor model, p corresponds to the dimension of asset returns, q indicates the number of fundamental industries |

`method` |
a character, indicating regression method: "OLS" or "WLS" |

an estimated p*p covariance matrix

1 2 3 4 5 6 7 8 | ```
data(m.excess.c10sp9003)
assets <- m.excess.c10sp9003[,1:10]
Indicator <- matrix(0,10,3)
dimnames(Indicator) <- list(colnames(assets),c("Drug","Auto","Oil"))
Indicator[c("ABT","LLY","MRK","PFE"),"Drug"] <- 1
Indicator[c("F","GM"),"Auto"] <- 1
Indicator[c("BP","CVX","RD","XOM"),"Oil"] <- 1
FundamentalFactor.Cov(assets,exposure=Indicator,method="WLS")
``` |

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.