IF.SoR: Influence Function - Sortino Ratio

Description Usage Arguments Details Value Author(s) Examples

View source: R/IF_SoR.R

Description

IF.SoR returns the data and plots the shape of either the IF or the IF TS for the Sortino Ratio.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
IF.SoR(
  returns = NULL,
  evalShape = FALSE,
  retVals = NULL,
  nuisPars = NULL,
  k = 4,
  IFplot = FALSE,
  IFprint = TRUE,
  threshold = c("const", "mean")[1],
  const = 0,
  rf = 0,
  prewhiten = FALSE,
  ar.prewhiten.order = 1,
  cleanOutliers = FALSE,
  cleanMethod = c("locScaleRob")[1],
  eff = 0.99,
  ...
)

Arguments

returns

Returns data of the asset or portfolio. This can be a numeric or an xts object.

evalShape

Evaluation of the shape of the IF risk or performance measure if TRUE. Otherwise, a TS of the IF of the provided returns is computed.

retVals

Values used to evaluate the shape of the IF.

nuisPars

Nuisance parameters used for the evaluation of the shape of the IF (if no returns are provided).

k

Range parameter for the shape of the IF (the SD gets multiplied k times).

IFplot

If TRUE, the plot of the IF shape or IF TS of the returns is produced.

IFprint

If TRUE, the data for the IF shape or the IF TS of the returns is returned.

threshold

Parameter of threshold is either "mean" or "const". Default is "mean".

const

The threshold if threshold is "const".

rf

Risk-free interest rate.

prewhiten

Boolean variable to indicate if the IF TS is pre-whitened (TRUE) or not (FALSE).

ar.prewhiten.order

Order of AR parameter for the pre-whitening. Default is AR(1).

cleanOutliers

Boolean variable to indicate whether outliers are cleaned with a robust location and scale estimator.

cleanMethod

Robust method used to clean outliers from the TS. Default choice is "locScaleRob".

eff

Tuning parameter for the normal distribution efficiency for the "locScaleRob" robust data cleaning.

...

Addtional parameters.

Details

For further details on the usage of the nuisPars argument, please refer to Section 3.1 for the RPEIF vignette.

Value

Influence function of SoR.

Author(s)

Anthony-Alexander Christidis, anthony.christidis@stat.ubc.ca

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# Plot of IF with nuisance parameter with return value
outIF <- IF.SoR(returns = NULL, evalShape = TRUE, 
                retVals = NULL, nuisPars = NULL,
                 IFplot = TRUE, IFprint = TRUE)

data(edhec, package = "PerformanceAnalytics")
colnames(edhec) = c("CA", "CTAG", "DIS", "EM","EMN", "ED", "FIA",
                    "GM", "LS", "MA", "RV", "SS", "FoF") 

# Plot of IF a specified TS 
outIF <- IF.SoR(returns = edhec[,"CA"], evalShape = TRUE, 
                retVals = seq(-0.1, 0.1, by = 0.001), nuisPars = NULL,
                IFplot = TRUE, IFprint = TRUE)

# Computing the IF of the returns (with prewhitening) with a plot of IF TS
outIF <- IF.SoR(returns = edhec[,"CA"], evalShape = FALSE, 
                retVals = NULL, nuisPars = NULL,
                IFplot = TRUE, IFprint = TRUE,
                prewhiten = FALSE)

RPEIF documentation built on Oct. 14, 2021, 5:22 p.m.