kernel_entropy function

Partial Information Kernel-Damping

Partial Information Kernel-Damping

Find the probability distribution that can constrain the first two moments while imposing the minimal structure in the data.

kernel_entropy(x, mean, sigma = NULL) ## Default S3 method: kernel_entropy(x, mean, sigma = NULL) ## S3 method for class 'numeric' kernel_entropy(x, mean, sigma = NULL) ## S3 method for class 'matrix' kernel_entropy(x, mean, sigma = NULL) ## S3 method for class 'ts' kernel_entropy(x, mean, sigma = NULL) ## S3 method for class 'xts' kernel_entropy(x, mean, sigma = NULL) ## S3 method for class 'tbl_df' kernel_entropy(x, mean, sigma = NULL) ## S3 method for class 'data.frame' kernel_entropy(x, mean, sigma = NULL)

Arguments

  • x: An univariate or a multivariate distribution.
  • mean: A numeric vector in which the kernel should be centered.
  • sigma: The uncertainty (volatility) around the mean. When NULL, only the mean is constrained.

Returns

A numerical vector of class ffp with the new probabilities distribution.

Examples

library(ggplot2) ret <- diff(log(EuStockMarkets[ , 1])) mean <- -0.01 # scenarios around -1% sigma <- var(diff(ret)) ke <- kernel_entropy(ret, mean, sigma) ke autoplot(ke) + scale_color_viridis_c()

See Also

double_decay

  • Maintainer: Bernardo Reckziegel
  • License: MIT + file LICENSE
  • Last published: 2022-09-29