pnts: pnts

View source: R/distNTS.R

pntsR Documentation

pnts

Description

pnts calculates cdf of the NTS distribution with parameters (\alpha, \theta, \beta, \gamma, \mu). If only three parameters are given, it calculates cdf of the standard NTS distribution with parameter (\alpha, \theta, \beta) 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 (\alpha, \theta, \beta, \gamma, \mu).

Usage

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

Arguments

xdata

An array of x

ntsparam

A vector of the NTS parameters (\alpha, \theta, \beta, \gamma, \mu). For the NTS process case it is a vector of parameters (\alpha, \theta, \beta, \gamma, \mu, t). A vector of the standard NTS parameters (\alpha, \theta, \beta).

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

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)
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.90 documentation built on June 1, 2025, 4:15 p.m.