## Not run:
# ###################################################
# #### 3-Factor Stock Example: ExxonMobil ####
# ###################################################
#
# results1 <- BDA(data = FFfactors,
# spec = (XOM~Mkt.RF + SMB + HML),
# horizon = 250, doplot = TRUE)
#
# ###################################################
# #### 5-Factor Active Fund Example: BlackRock ####
# ###################################################
#
# results2 <- BDA(data = FFfactors,
# spec = (MDLRX~Mkt.RF + SMB + HML + RMW + CMA),
# horizon = 250, doplot = TRUE)
#
# ###################################################
# #### 1-Factor Index Fund Example: Vanguard ####
# ###################################################
#
# results3 <- BDA(data = FFfactors, spec = (VOO~SP500),
# horizon = 250, doplot = FALSE)
# ## End(Not run)
###################################################
#### CRAN-compatible example ####
###################################################
results <- BDA(data = FFfactors[nrow(FFfactors):(nrow(FFfactors)-300),],
spec = (VOO~SP500),horizon = 250, doplot = TRUE)
message("NOTE: This is a shortened example. Reference the manual for more complex examples")
Run the code above in your browser using DataLab