GMMlogreturn: Modeling log-returns distribution via Gaussian Mixture Models

View source: R/GMM_finance.R

GMMlogreturnR Documentation

Modeling log-returns distribution via Gaussian Mixture Models

Description

Gaussian mixtures for modeling the distribution of financial log-returns.

Usage

GMMlogreturn(y, ...)

## S3 method for class 'GMMlogreturn'
summary(object, ...)

Arguments

y

A numeric vector providing the log-returns of a financial stock.

...

Further arguments passed to densityMclustBounded(). For a full description of available arguments see the corresponding help page.

object

An object of class 'GMMlogreturn'.

Details

Let P_t be the price of a financial stock for the current time frame (day for instance), and P_{t-1} the price of the previous time frame. The log-return at time t is defined as:

y_t = \log( \frac{P_t}{P_{t-1}} )

A univariate heteroscedastic GMM using Bayesian regularization (as described in mclust::priorControl()) is fitted to the observed log-returns. The number of mixture components is automatically selected by BIC, unless specified with the optional G argument.

Value

Returns an object of class 'GMMlogreturn'.

Author(s)

Luca Scrucca

References

Scrucca L. (2024) Entropy-based volatility analysis of financial log-returns using Gaussian mixture models. Unpublished manuscript.

See Also

VaR.GMMlogreturn(), ES.GMMlogreturn().

Examples

set.seed(123)
z = sample(1:2, size = 250, replace = TRUE, prob = c(0.8, 0.2))
y = double(length(z))
y[z == 1] = rnorm(sum(z == 1), 0, 1)
y[z == 2] = rnorm(sum(z == 2), -0.5, 2)
GMM = GMMlogreturn(y)
summary(GMM)
y0 = extendrange(GMM$data, f = 0.1)
y0 = seq(min(y0), max(y0), length = 1000)
plot(GMM, what = "density", data = y, xlab = "log-returns",
     breaks = 21, col = 4, lwd = 2)


mclustAddons documentation built on Sept. 20, 2024, 5:06 p.m.