kgvar | R Documentation |
This function performs k-geometric means for time-varying value-at-risk.
kgvar(y, centers, iter.max = 10, conf.level = 0.95)
y |
data frame from which the estimate is to be computed; first column corresponds to time and the second to the remainder of interest. |
centers |
the number of clusters or a set of initial
(distinct) cluster centres. If a number, a random set of (distinct)
rows in |
iter.max |
the maximum number of iterations allowed. The default is 10. |
conf.level |
the confidence level. The default is 0.95. |
The intermediate sequence κ_T is chosen proportional to T/\log T.
kgvar returns an object of class "kgvar"
which has a
fitted method. It is a list with at least the following components:
var.new |
cluster center value-at-risk function. |
clusters |
cluster allocation. |
Y |
raw data. |
n.clust |
number of clusters. |
scale.param |
the scale parameters in the Pareto-like tail specification. |
conf.level |
the confidence level. |
hill |
hill estimator of extreme value index. |
The plot
method depicts the k-geometric means algorithm for
time-varying value-at-risk. If c.c
is TRUE
, the method displays the
cluster means.
Miguel de Carvalho, Rodrigo Rubio.
Rubio, R., de Carvalho, M. and Huser, R. (2018) Similarity-Based Clustering of Extreme Losses from the London Stock Exchange. Submitted.
## Not run: ## Example (Overlapping version of Fig. 8 in Supplementary Materials) data(lse) attach(lse) y <- -apply(log(lse[, -1]), 2, diff) fit <- kgvar(y, centers = 3) plot(fit, c.c = TRUE, ylim = c(0, 0.1)) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.