Package: PCRA 1.2

PCRA: Companion to Portfolio Construction and Risk Analysis

A collection of functions and data sets that support teaching a quantitative finance MS level course on Portfolio Construction and Risk Analysis, and the writing of a textbook for such a course. The package is unique in providing several real-world data sets that may be used for problem assignments and student projects. The data sets include cross-sections of stock data from the Center for Research on Security Prices, LLC (CRSP), corresponding factor exposures data from S&P Global, and several SP500 data sets.

Authors:Doug Martin [cre, aut], Alexios Galanos [ctb], Kirk Li [aut, ctb], Jon Spinney [ctb], Thomas Philips [ctb]

PCRA_1.2.tar.gz
PCRA_1.2.zip(r-4.5)PCRA_1.2.zip(r-4.4)PCRA_1.2.zip(r-4.3)
PCRA_1.2.tgz(r-4.4-any)PCRA_1.2.tgz(r-4.3-any)
PCRA_1.2.tar.gz(r-4.5-noble)PCRA_1.2.tar.gz(r-4.4-noble)
PCRA_1.2.tgz(r-4.4-emscripten)PCRA_1.2.tgz(r-4.3-emscripten)
PCRA.pdf |PCRA.html
PCRA/json (API)

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

Peer review:

Datasets:

On CRAN:

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

3.62 score 84 scripts 455 downloads 30 exports 34 dependencies

Last updated 1 years agofrom:0f1ff59b01. Checks:OK: 3 NOTE: 4. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 22 2024
R-4.5-winNOTENov 22 2024
R-4.5-linuxNOTENov 22 2024
R-4.4-winNOTENov 22 2024
R-4.4-macNOTENov 22 2024
R-4.3-winOKNov 22 2024
R-4.3-macOKNov 22 2024

Exports:barplotWtsbootEfrontschart.EfrontcleanOutliersdivHHIellipsesPlotPCRA.covfmgetPCRADataKRestlevgLongShortmathEfrontmathEfrontCashRiskymathEfrontRiskymathEfrontRiskyMuCovmathGmvmathGmvMuCovmathTportmathWtsEfrontRiskymathWtsEfrontRiskyMuCovmeanReturns4Typesopt.outputMvoPCRAplotLSandRobustSFMqqnormDatWindatreturnsCRSPxtsselectCRSPandSPGMISKeststocksCRSPxtstsPlotMPturnOverwinsorizewinsorMean

Dependencies:backportsbootcheckmatecodetoolscorpcordata.tableDEoptimRdigestforeachGenSAiteratorslatticemcomvtnormpcaPPPerformanceAnalyticsPortfolioAnalyticspsopyinitquadprogR.cacheR.methodsS3R.ooR.utilsregistryRobStatTMrobustbaseROIROI.plugin.symphonyrrcovRsymphonyslamxtszoo

Introduction to CRSP Stocks and SPGMI Factors in PCRA

Rendered fromPCRAVignette.pdf.asisusingR.rsp::asison Nov 22 2024.

Last update: 2023-05-02
Started: 2023-03-08

Readme and manuals

Help Manual

Help pageTopics
A Barplot of a Set of Portfolio WeightsbarplotWts
Bootstrapped Efficient FrontiersbootEfronts
Create Efficient Frontierchart.Efront
Clean Returns OutlierscleanOutliers
crsp.returns8crsp.returns8
Fama-French Weekly 3-Factor ModeldatFF3W
Fama-French-Carhart Weekly 4-Factor ModeldatFF4W
HHI Based Diversification IndexdivHHI
Overlaid Correlations Ellipses PlotsellipsesPlotPCRA.covfm
factorsSPGMIfactorsSPGMI
Federal Reserve Board Interest RatesFRBinterestRates
Download CRSP and SPGMI DatagetPCRAData
gfunds5gfunds5
Earnings per Share of InvensysinvensysEPS
Kurtosis EstimatorKRest
Long Short Portfolio LeveragelevgLongShort
Efficient Frontiers from ReturnsmathEfront
Math Efficient Frontier: Cash and Risky AssetsmathEfrontCashRisky
Efficient Frontier of Risky StocksmathEfrontRisky
Efficient FrontiermathEfrontRiskyMuCov
Global Minimum Variance Portfolio (GMV)mathGmv
Global Minimum Variance Portfolios From Mu and CovmathGmvMuCov
Tangency Portfolio WeightsmathTport
Efficient Frontier Portfolio Weights VectorsmathWtsEfrontRisky
Efficient Frontier Portfolio Weights VectorsmathWtsEfrontRiskyMuCov
Four Types of Mean ReturnsmeanReturns4Types
Optimal Portfolio Weights and Performanceopt.outputMvoPCRA
Robust and Least Square Single Factor Model (SFM) FitsplotLSandRobustSFM
qqnormDatWindatqqnormDatWindat
Stock with Ticker DDretDD
Stock with Ticker EDSretEDS
Stock with Ticker FNBretFNB
Stock with Ticker KBHretKBH
Stock with Ticker MERretMER
Stock with Ticker OFGretOFG
Stock with Ticker PSCretPSC
Select CRSP Stocks ReturnsreturnsCRSPxts
Stock with Ticker VHIretVHI
Stock with Ticker WTSretWTS
Select and merge data from the stocksCRSP and factorsSPGMI data setsselectCRSPandSPGMI
Skewness estimatorSKest
SP400IndustrialsSP400Industrials
SP425IndustrialsSP425Industrials
SP500SP500
SP500from1967to2007SP500from1967to2007
SPIndustrialsSPIndustrials
stocksCRSPstocksCRSP
Select CRSP Stocks ReturnsstocksCRSPxts
Hedge Fund Strategies Returnsstrategies
Lattice Multi-Panel Time Series PlotstsPlotMP
Portfolio TurnoverturnOver
Winsorize Datawinsorize
Winsorized MeanwinsorMean