dnts | R Documentation |
dnts
calculates pdf of the NTS distribution with parameters (\alpha, \theta, \beta, \gamma, \mu)
.
If only three parameters are given, it calculates pdf of the standard NTS distribution with parameter (\alpha, \theta, \beta)
If a time parameter value is given, it calculates pdf of the NTS profess
f(x)dx=d(P((X(t+s)-X(s))<x))
, where X is the NTS process generated
by the NTS distribution with parameters (\alpha, \theta, \beta, \gamma, \mu)
.
dnts(xdata, ntsparam)
xdata |
An array of x |
ntsparam |
A vector of the NTS parameters |
Density of NTS distribution
Kim, Y. S. (2020) Portfolio Optimization on the Dispersion Risk and the Asymmetric Tail Risk https://arxiv.org/pdf/2007.13972.pdf
#
library(functional)
library(nloptr)
library(pracma)
library(spatstat)
library(Matrix)
library("temStaR")
alpha <- 1.2
theta <- 1
beta <- -0.2
ntsparam <- c(alpha, theta, beta)
x <- seq(from = -6, to = 6, length.out = 101)
d <- dnts(x, ntsparam)
plot(x,d,type = 'l')
alpha <- 1.2
theta <- 1
beta <- -0.2
gamma <- 0.3
mu <- 0.1
ntsparam <- c(alpha, theta, beta, gamma, mu)
x <- seq(from = -2, to = 2, by = 0.01)
d <- dnts(x, ntsparam)
plot(x,d,type = 'l')
#Annual based parameters
alpha <- 1.2
theta <- 1
beta <- -0.2
gamma <- 0.3
mu <- 0.1
#scaling annual parameters to one day
dt <- 1/250 #one day
ntsparam <- c(alpha, theta, beta, gamma, mu, dt)
x <- seq(from = -0.02, to = 0.02, length.out = 101)
d <- dnts(x, ntsparam)
plot(x,d,type = 'l')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.