kgvar {extremis} | R Documentation |
K-Geometric Means Algorithm for Value-at-Risk
Description
This function performs k-geometric means for time-varying value-at-risk.
Usage
kgvar(y, centers, iter.max = 10, conf.level = 0.95)
Arguments
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. |
Details
The intermediate sequence \kappa_T
is chosen
proportional to T/\log T
.
Value
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.
Author(s)
Miguel de Carvalho, Rodrigo Rubio.
References
Rubio, R., de Carvalho, M. and Huser, R. (2018) Similarity-Based Clustering of Extreme Losses from the London Stock Exchange. Submitted.
Examples
## 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)