-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathipnts.Rd
60 lines (55 loc) · 1.56 KB
/
ipnts.Rd
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/distNTS.R
\name{ipnts}
\alias{ipnts}
\title{ipnts}
\usage{
ipnts(u, ntsparam, maxmin = c(-10, 10), du = 0.01)
}
\arguments{
\item{u}{Real value between 0 and 1}
\item{ntsparam}{A vector of the NTS parameters \eqn{(\alpha, \theta, \beta, \gamma, \mu)}.
A vector of the standard NTS parameters \eqn{(\alpha, \theta, \beta)}.}
}
\value{
Inverse cdf of the NTS distribution. It is the same as qnts function.
}
\description{
\code{ipnts} calculates inverse cdf of the NTS distribution with parameters \eqn{(\alpha, \theta, \beta, \gamma, \mu)}.
If only three parameters are given, it calculates inverse cdf of the standard NTS distribution with parameter \eqn{(\alpha, \theta, \beta)}
}
\examples{
library("temStaR")
alpha <- 1.2
theta <- 1
beta <- -0.2
ntsparam <- c(alpha, theta, beta)
u <- seq(from = 0.01, to = 0.99, length.out = 99)
q <- ipnts(u, ntsparam)
plot(u,q,type = 'l')
alpha <- 1.2
theta <- 1
beta <- -0.2
gamma <- 0.3
mu <- 0.1
ntsparam <- c(alpha, theta, beta, gamma, mu)
u <- seq(from = 0.01, to = 0.99, length.out = 99)
q <- ipnts(u, ntsparam)
plot(x,q,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)
u <- seq(from = 0.01, to = 0.99, length.out = 99)
q <- ipnts(u, ntsparam)
plot(x,q,type = 'l')
}
\references{
Kim, Y. S. (2020) Portfolio Optimization on the Dispersion Risk and the Asymmetric Tail Risk
\url{https://arxiv.org/pdf/2007.13972.pdf}
}