MyNixOS website logo
Description

A Collection of Methods to Estimate Parameters of Different Tempered Stable Distributions.

A collection of methods to estimate parameters of different tempered stable distributions (TSD). Currently, there are seven different tempered stable distributions to choose from: Tempered stable subordinator distribution, classical TSD, generalized classical TSD, normal TSD, modified TSD, rapid decreasing TSD, and Kim-Rachev TSD. The package also provides functions to compute density and probability functions and tools to run Monte Carlo simulations. This package has already been used for the estimation of tempered stable distributions (Massing (2023) <arXiv:2303.07060>). The following references form the theoretical background for various functions in this package. References for each function are explicitly listed in its documentation: Bianchi et al. (2010) <doi:10.1007/978-88-470-1481-7_4> Bianchi et al. (2011) <doi:10.1137/S0040585X97984632> Carrasco (2017) <doi:10.1017/S0266466616000025> Feuerverger (1981) <doi:10.1111/j.2517-6161.1981.tb01143.x> Hansen et al. (1996) <doi:10.1080/07350015.1996.10524656> Hansen (1982) <doi:10.2307/1912775> Hofert (2011) <doi:10.1145/2043635.2043638> Kawai & Masuda (2011) <doi:10.1016/j.cam.2010.12.014> Kim et al. (2008) <doi:10.1016/j.jbankfin.2007.11.004> Kim et al. (2009) <doi:10.1007/978-3-7908-2050-8_5> Kim et al. (2010) <doi:10.1016/j.jbankfin.2010.01.015> Kuechler & Tappe (2013) <doi:10.1016/j.spa.2013.06.012> Rachev et al. (2011) <doi:10.1002/9781118268070>.

TempStable

A collection of methods to estimate parameters of different tempered stable distributions. Currently, there are seven different tempered stable distributions to choose from: Tempered stable subordinator distribution, classical tempered stable distribution (TSD), normal TSD, generalized classical TSD, modified TSD, Kim-Rachev TSD, rapidly decreasing TSD. The package also provides functions to compute density and probability functions and tools to run Monte Carlo simulations.

The main function of this package are briefly described below:

  • Main function: TemperedEstim() computes all the information about the estimator. It allows the user to choose the preferred method and several related options.
  • Characteristic function, density function, probability function and other functions for every tempered stable distribution mentioned above. E.g. charTSS(), dCTS(), …
  • Monte Carlo simulation: a tool to run a Monte Carlo simulation (TemperedEstim_Simulation()) is provided and can save output files or produce statistical summary.

The package was developed by Till Massing and Cedric Jüssen and is structurally based on the “StableEstim” package by Tarak Kharrat and Georgi N. Boshnakov.

Installation

Since we use the package “copula” and this uses C code, it may be that this package has to be installed manually beforehand.

TempStable is now available on CRAN! In R-Studio the package can be installed directly with the following command:

install.packages("TempStable")

You can install the development version of TempStable from GitHub with:

# install.packages("devtools")
devtools::install_github("TMoek/TempStable")

Example

This is a basic example which shows you how to solve a common problem:

library(TempStable)
## basic example code
# Such a simulation can take a very long time. Therefore, it can make sense to 
# parallelise after Monte Carlo runs. Parallelisation of the simulation is not 
# yet part of the package. 

# For testing purposes, the amount of runs and parameters is greatly reduced. 
# Therefore, the result is not meaningful. To start a meaningful simulation, the
# SampleSize could be, for example, 1000 and MCParam also 1000.
thetaT <- c(1.5,1,1,1,1,0)
res_CTS_ML_size10 <- TemperedEstim_Simulation(ParameterMatrix = rbind(thetaT),
                                               SampleSizes = c(10), MCparam = 3,
                                               TemperedType = "CTS", Estimfct = "ML",
                                               saveOutput = FALSE)
#> ---------------- Alpha=1.5 *** DeltaP=1 *** DeltaM=1 *** LambdaP=1 *** LambdaM=1 *** mu=0 ---------------
#> Warning in log(densis): NaNs wurden erzeugt
#> *** Iter 1/3 *** Estimated Remaining Time: 0h0min12sec. *** 
#> *** Iter 2/3 *** Estimated Remaining Time: 0h0min12sec. ***
#> Warning in log(densis): NaNs wurden erzeugt
#> *** Iter 3/3 *** Estimated Remaining Time: 0h0min0sec. ***

colMeans(sweep(res_CTS_ML_size10$outputMat[,9:14],2,thetaT), na.rm = TRUE)
#>     alphaE    delta+E    delta-E   lambda+E   lambda-E        muE 
#> -1.4999990 -0.9999990  9.5255124  7.2885255  0.3178998 -0.7087628
Metadata

Version

0.2.2

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows