pnts: pnts

Description Usage Arguments Value References Examples

View source: R/distNTS.R

Description

pnts calculates cdf of the NTS distribution with parameters (α, θ, β, γ, μ). If only three parameters are given, it calculates cdf of the standard NTS distribution with parameter (α, θ, β) If a time parameter value is given, it calculates cdf of the profess F(x)=P((X(t+s)-X(s))<x), where X is the NTS process generated by the NTS distribution with parameters (α, θ, β, γ, μ).

Usage

1
pnts(xdata, ntsparam, dz = 2^-8, m = 2^12)

Arguments

xdata

An array of x

ntsparam

A vector of the NTS parameters (α, θ, β, γ, μ). For the NTS process case it is a vector of parameters (α, θ, β, γ, μ, t). A vector of the standard NTS parameters (α, θ, β).

Value

Cumulative probability of the NTS distribution

References

Kim, Y. S. (2020) Portfolio Optimization on the Dispersion Risk and the Asymmetric Tail Risk https://arxiv.org/pdf/2007.13972.pdf

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
library("temStaR")

alpha <- 1.2
theta <- 1
beta <- -0.2
ntsparam <- c(alpha, theta, beta)
x <- seq(from = -6, to = 6, length.out = 101)
p <- pnts(x, ntsparam)
plot(x,p,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)
p <- pnts(x, ntsparam)
plot(x,p,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)
p <- pnts(x, ntsparam)
plot(x,p,type = 'l')

aaron9011/temStaR-v0.814 documentation built on Dec. 24, 2021, 6:16 p.m.