Description Usage Arguments Details Value Author(s) Examples
BDA
performs a range of parameter instability diagnostics
for financial multi-factor models and returns data frames containing the
drifting parameters and their standard errors, a list of summary statistics
and an overview plot for each factor.
1 2 |
data |
an xts object containing all relevant time series. Please note that
|
spec |
contains the formula for the baseline model. |
horizon |
the time period for which the paramters should be estimated. (e.g. 250 for a year, assuming daily data). By default, half of the data length is used. |
min.hor |
the minimum horizon used in the analysis, by default one month, assuming daily data (21 obs if available). |
max.hor |
the maximum horizon used in the analysis, by default three years, assuming daily data (750 obs if available) |
family |
type of regression family passed to the |
doplot |
logical. If |
... |
aditional commands passed to the |
BDA
performs a threefold analyis of a user-specified baseline model.
First, BDA
performs a rolling regression across the entire data frame
where horizon
determines the regression window size. The function includes
all rolling parameter estimates and standard errors in the output, so users
can access them using $tdrift
and $tdrift.se
respectively.
Second, BDA
estimates the baseline model parameters with estimation
windows of varying length from (min.hor
to max.hor
). Users can access
the resulting parameter estimates and standard errors using $hdrift
and
$hdrift.se
respectively.
Third, BDA
checks the baseline model for observations that have a noteworthy
impact on the parameter estimate.
For further details on the summary statistics output and plotting, please
reference summary.BDA
and plot.BDA
respectively.
Although BDA
was primarily developed to analyze financial multi-factor
models, it is capable to analyze any model fit, as long as the underlying data
is of class xts
. However, BDA
was developed with large datasets
in mind, so that very small datasets might produce errors or non-sensical results.
a list with 8 elements:
CALL |
function call |
base.model |
baseline model |
tdrift |
xts matrix containing historical estimates of baseline model |
tdrift.se |
xts matrix containing historical standard errors of baseline model |
hdrift |
matrix containing estimates of baseline model with varying horizon lengths |
hdrift.se |
matrix containing standard errors of baseline model with varying horizon lengths |
jackknife |
jackknife procedure of object class lm.influence |
sumstats |
list containing various summary statistics |
Markus Peter Auer <mp.auer@meanerreversion.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | ## 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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.