Package: facmodCS 1.0.1

Mido Shammaa

facmodCS: Cross-Section Factor Models

Linear cross-section factor model fitting with least-squares and robust fitting the 'lmrobdetMM()' function from 'RobStatTM'; related volatility, Value at Risk and Expected Shortfall risk and performance attribution (factor-contributed vs idiosyncratic returns); tabular displays of risk and performance reports; factor model Monte Carlo. The package authors would like to thank Chicago Research on Security Prices,LLC for the cross-section of about 300 CRSP stocks data (in the data.table object 'stocksCRSP', and S&P GLOBAL MARKET INTELLIGENCE for contributing 14 factor scores (a.k.a "alpha factors".and "factor exposures") fundamental data on the 300 companies in the data.table object 'factorSPGMI'. The 'stocksCRSP' and 'factorsSPGMI' data are not covered by the GPL-2 license, are not provided as open source of any kind, and they are not to be redistributed in any form.

Authors:Mido Shammaa [aut, cre], Doug Martin [ctb, aut], Kirk Li [aut, ctb], Avinash Acharya [ctb], Lingjie Yi [ctb]

facmodCS_1.0.1.tar.gz
facmodCS_1.0.1.zip(r-4.5)facmodCS_1.0.1.zip(r-4.4)facmodCS_1.0.1.zip(r-4.3)
facmodCS_1.0.1.tgz(r-4.4-any)facmodCS_1.0.1.tgz(r-4.3-any)
facmodCS_1.0.1.tar.gz(r-4.5-noble)facmodCS_1.0.1.tar.gz(r-4.4-noble)
facmodCS_1.0.1.tgz(r-4.4-emscripten)facmodCS_1.0.1.tgz(r-4.3-emscripten)
facmodCS.pdf |facmodCS.html
facmodCS/json (API)

# Install 'facmodCS' in R:
install.packages('facmodCS', repos = c('https://robustport.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/robustport/facmodcs/issues

On CRAN:

30 exports 1.02 score 27 dependencies 2 scripts 244 downloads

Last updated 11 months agofrom:f226a6795c. Checks:OK: 1 NOTE: 6. Indexed: yes.

TargetResultDate
Doc / VignettesOKSep 11 2024
R-4.5-winNOTESep 11 2024
R-4.5-linuxNOTESep 11 2024
R-4.4-winNOTESep 11 2024
R-4.4-macNOTESep 11 2024
R-4.3-winNOTESep 11 2024
R-4.3-macNOTESep 11 2024

Exports:convertdCornishFisherextractRegressionStatsfitFfmfitFfmDTfmCovfmEsDecompfmmcSemiParamfmRsqfmSdDecompfmTstatsfmVaRDecomplagExposurespCornishFisherportEsDecompportSdDecompportVaRDecompqCornishFisherrCornishFisherrepExposuresrepReturnrepRiskresidualizeReturnsriskDecomp.ffmroll.fitFfmDTspecFfmstandardizeExposuresstandardizeReturnstsPlotMPvif

Dependencies:curldata.tableDEoptimRjsonlitelatticeMASSMatrixMatrixModelsmnormtmvtnormnumDerivpcaPPPerformanceAnalyticspyinitquadprogquantmodquantregRobStatTMrobustbaserrcovsnSparseMsurvivaltseriesTTRxtszoo

Readme and manuals

Help Manual

Help pageTopics
calcFLAMcalcFLAM
convertconvert
Function to convert to current class # mido to change to retroFitconvert.ffmSpec
Cornish-Fisher expansionCornish-Fisher dCornishFisher pCornishFisher qCornishFisher rCornishFisher
extractRegressionStatsextractRegressionStats
Fit a fundamental factor model using cross-sectional regressioncoef.ffm fitFfm fitted.ffm residuals.ffm
fitFfmDTfitFfmDT
Covariance Matrix for assets' returns from fitted factor model.fmCov fmCov.ffm
Decompose ES into individual factor contributionsfmEsDecomp fmEsDecomp.ffm
Semi-parametric factor model Monte CarlofmmcSemiParam
Factor Model R-Squared and Adj R-Squared ValuesfmRsq
Decompose standard deviation into individual factor contributionsfmSdDecomp fmSdDecomp.ffm
fmTstats.ffm t-stats and plots for a fitted Fundamental Factor Model objectfmTstats
Decompose VaR into individual factor contributionsfmVaRDecomp fmVaRDecomp.ffm
lagExposures allows the user to lag exposures by one time periodlagExposures
Plots from a fitted fundamental factor modelplot.ffm
Decompose portfolio ES into individual factor contributionsportEsDecomp portEsDecomp.ffm
Decompose portfolio standard deviation into individual factor contributionsportSdDecomp portSdDecomp.ffm
Decompose portfolio VaR into individual factor contributionsportVaRDecomp portVaRDecomp.ffm
Predicts asset returns based on a fitted fundamental factor modelpredict.ffm
Prints a fitted fundamental factor modelprint.ffm
print.ffmSpecprint.ffmSpec
Portfolio Exposures ReportrepExposures
Portfolio return decomposition reportrepReturn
Decompose portfolio risk into individual factor contributions and provide tabular reportrepRisk repRisk.ffm
residualizeReturnsresidualizeReturns
Decompose Risk into individual factor contributionsriskDecomp.ffm
roll.fitFfmDTroll.fitFfmDT
Specifies the elements of a fundamental factor modelspecFfm
standardizeExposuresstandardizeExposures
standardizeReturnsstandardizeReturns
Summarizing a fitted fundamental factor modelprint.summary.ffm summary.ffm
Time Series PlotstsPlotMP
Factor Model Variance Inflaction Factor Valuesvif