NNS.FSD: NNS FSD Test

Description Usage Arguments Value Author(s) References Examples

View source: R/FSD.R

Description

Bi-directional test of first degree stochastic dominance using lower partial moments.

Usage

1
NNS.FSD(x, y, type = "discrete")

Arguments

x

a numeric vector.

y

a numeric vector.

type

options: ("discrete", "continuous"); "discrete" (default) selects the type of CDF.

Value

Returns one of the following FSD results: "X FSD Y", "Y FSD X", or "NO FSD EXISTS".

Author(s)

Fred Viole, OVVO Financial Systems

References

Viole, F. and Nawrocki, D. (2016) "LPM Density Functions for the Computation of the SD Efficient Set." Journal of Mathematical Finance, 6, 105-126. https://www.scirp.org/Journal/PaperInformation.aspx?PaperID=63817.

Viole, F. (2017) "A Note on Stochastic Dominance." https://www.ssrn.com/abstract=3002675.

Examples

1
2
3
set.seed(123)
x <- rnorm(100) ; y <- rnorm(100)
NNS.FSD(x, y)

Example output

Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl_init' failed, running with rgl.useNULL = TRUE 
3: .onUnload failed in unloadNamespace() for 'rgl', details:
  call: fun(...)
  error: object 'rgl_quit' not found 
[1] "NO FSD EXISTS"

NNS documentation built on June 26, 2021, 1:07 a.m.