czfactor-package |
Chib and Zeng (2020) plus Chib, Zeng and Zhao (2020) factor models |
BpLS |
BpLS calculates the LS estimate of Y = X * Bp + E model |
CZchangefactor |
CZchangefactor does marginal likelihood calculation of the gaussian factor model of Chib and Zeng (2020) where the training sample is given |
CZchangefactort |
CZchangefactort does Bayes estimation of the student-t factor model of Chib and Zeng (2020) where the training sample is given |
CZchangescan |
CZchangescan does Bayes change-point marg likelihood model scan by the Chib and Zeng (2020) method using student-t errors |
czfactor |
Chib and Zeng (2020) plus Chib, Zeng and Zhao (2020) factor models |
CZfactorg |
CZfactorg does Bayes estimation of the Gaussian factor model of CZ (2020) |
CZfactort |
CZfactort does Bayes estimation of the student-t factor model of Chib and Zeng (2020) |
CZfactortmle |
CZfactormle_ calculates the mle estimate of CZ student factor model Monte Carlo EM algorithm is used |
czmargg |
czmargg does marginal likelihood calculation of Gaussian factor model of Chib and Zeng (2020) |
CZscang |
CZscang does Bayes marg likelihood model scan by the Chib and Zeng (2020) method |
CZscant |
CZscant does Bayes marg likelihood model scan of the student-t factor model by the Chib and Zeng (2020) method |
CZsummaryb |
CZsummaryb produces posterior summary of b = Omegaxinv*lam in the factor model of Chib and Zeng (2020) |
CZsummaryBlam |
CZsummaryBlam produces posterior summary of B*lambda in the factor model of Chib and Zeng (2020) |
CZsummaryg |
CZsummaryg produces summary given draws from the Gaussian factor model of Chib and Zeng (2020) |
CZsummaryt |
CZsummaryt produces summary of posterior draws from the Student-t factor model of Chib and Zeng (2020) |
CZtchangenuscan |
CZtchangenuscan does Bayes change-point marg likelihood model scan by the Chib and Zeng (2020) method using student-t errors |
CZtnuscan |
CZtnuscan does Bayes marg likelihood model scan by the Chib and Zeng (2020) method using student-t errors |
diwish |
diwish calculates the log density of the inverse Wishart |
dmvn0 |
dmvn0 is the log density of the multivariate normal with mean 0 |
dmvn1 |
dmvn1 is the log density of the multivariate normal |
makedffrommnuscan |
makedffrommnuscan makes a data.frame object of scan results |
makedffrommscan |
makedffrommscan makes a matrix object of scan results |
makelamprior |
makelamprior makes the lambda prior |
makesubsets |
'makesubsets' makes all subsets of names in a data-frame |
plotlambda |
plotlambda produces summary given draws from czfactor package |
plotsdf |
plotsdf produces summary of SDF theta draws from the factor model of Chib and Zeng (2020) |
plotxts |
plotxts plots xts time series |
plotxtsls |
plotxtsls plots xts time series in a list where each is produced by plotxts |
portgseq |
portgseq calculates factor portfolios and realized returns out of sample for Gaussian Chib, Zeng, Zhao (2020) model |
predictfacret |
predictfacret predicts using factors and characteristics |
pricing |
pricing does Bayes test of pricing using risk-factors |
pricingls |
pricingls does Bayes test of pricing where asset data is in a list and risk factor data is in an xts |
riwish |
riwish generates an inverse wishart draw |
rmvn0 |
rmnv0 simulates from the MVN distribution |
sampleprior |
sampleprior samples the prior and then risk-factors in CZ factor model |
sdfgen |
sdfgen produces summary of SDF given draws from the factor model of Chib and Zeng (2020) |
sharperatio |
sharperatio calculates the sharp ratio given theta draws from the factor model of Chib and Zeng (2020) |
SigmainvLS |
SigmainvLS calculates the LS estimate of the inverse covariance in the Y = X * Bp + E model |
simdataczfacmod |
simdataczfacmod does simulation from Chib and Zeng (2020) factor model |
sqrtmat |
sqrtmat get the square root of a symmetric pd matrix |
summaryb |
summaryb produces posterior summary of b = Omegaxinv*lam in the macro factor model |
vech_ |
vech does row-wise unique elements vectorization of a symmetric matrix |
xpnd |
xpnd creates a symmetric matrix; inverse of vech |