DynamicBeta | R Documentation |
Calculates the beta of an investment strategy or stock by applying the Kalman filter & smoother. Apart from the beta timeseries, the state covariances are also returned so as to provide an estimate of the uncertainty of the results. The python package "Pykalman" is used for the calculations given its proven stability.
DynamicBeta(csvfilename, do_not_set_to_true = FALSE)
csvfilename |
the name of csv file containing the track record of the fund & the benchmark |
do_not_set_to_true |
function returns zero when TRUE - used only so as to pass the CRAN tests where pykalman couldn't be installed |
A list of beta values based on Kalman Filter & smoother and the respective covariance matrices
Tasos Grivas <tasos@openriskcalculator.com>
## calling DynamicBeta() without an argument loads a test file containing a sample track
## record and a benchmark index
## ATTENTION!!: set do_not_set_to_true to FALSE when running the example
##-- this is only used to pass CRAN tests whereby
## pykalman was not installable!
dyn_beta_values = DynamicBeta(do_not_set_to_true = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.