Title: | Computation and Plots of Influence Functions for Risk and Performance Measures |
---|---|
Description: | Computes the influence functions time series of the returns for the risk and performance measures as mentioned in Chen and Martin (2018) <https://www.ssrn.com/abstract=3085672>, as well as in Zhang et al. (2019) <https://www.ssrn.com/abstract=3415903>. Also evaluates estimators influence functions at a set of parameter values and plots them to display the shapes of the influence functions. |
Authors: | Anthony Christidis <anthony.christidis@stat.ubc.ca>, Shengyu Zhang <syzhang@uw.edu>, Douglas Martin <doug@amath.washington.edu> |
Maintainer: | Anthony Christidis <anthony.christidis@stat.ubc.ca> |
License: | GPL (>= 2) |
Version: | 1.2.4 |
Built: | 2025-02-20 05:45:26 UTC |
Source: | https://github.com/anthonychristidis/rpeif |
IF
returns the data and plots the shape of either the IF or the IF TS for a specified estimator.
IF( estimator, returns = NULL, evalShape = FALSE, retVals = NULL, nuisPars = NULL, k = 4, IFplot = FALSE, IFprint = TRUE, prewhiten = FALSE, ar.prewhiten.order = 1, cleanOutliers = FALSE, cleanMethod = c("locScaleRob")[1], family = c("mopt", "opt", "bisquare")[1], eff = 0.99, ... )
IF( estimator, returns = NULL, evalShape = FALSE, retVals = NULL, nuisPars = NULL, k = 4, IFplot = FALSE, IFprint = TRUE, prewhiten = FALSE, ar.prewhiten.order = 1, cleanOutliers = FALSE, cleanMethod = c("locScaleRob")[1], family = c("mopt", "opt", "bisquare")[1], eff = 0.99, ... )
estimator |
The estimator of interest. |
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. |
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". |
family |
Family for robust m-estimator of location. Must be one of "mopt" (default), "opt" or "bisquare". |
eff |
Tuning parameter for the normal distribution efficiency for robust methods. |
... |
Additional parameters passed on to influence function of risk or performance measure. |
For further details on the usage of the nuisPars
argument, please refer to Section 3.1 for the RPEIF
vignette.
Anthony-Alexander Christidis, anthony.christidis@stat.ubc.ca
# Plot of IF using the wrapper function outIF <- IF(estimator = "Mean", returns = NULL, evalShape = TRUE, retVals = NULL, nuisPars = list(mu = 0.005), IFplot = TRUE, IFprint = TRUE) #' # Loading data (hedge funds returns) data(edhec, package = "PerformanceAnalytics") colnames(edhec) = c("CA", "CTAG", "DIS", "EM","EMN", "ED", "FIA", "GM", "LS", "MA", "RV", "SS", "FoF") # Plot of IF using wrapper function and with a specified TS outIF <- IF(estimator = "Mean", 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(estimator = "Mean", returns = edhec[,"CA"], evalShape = FALSE, retVals = NULL, nuisPars = NULL, IFplot = TRUE, IFprint = TRUE, compile = TRUE, prewhiten = FALSE)
# Plot of IF using the wrapper function outIF <- IF(estimator = "Mean", returns = NULL, evalShape = TRUE, retVals = NULL, nuisPars = list(mu = 0.005), IFplot = TRUE, IFprint = TRUE) #' # Loading data (hedge funds returns) data(edhec, package = "PerformanceAnalytics") colnames(edhec) = c("CA", "CTAG", "DIS", "EM","EMN", "ED", "FIA", "GM", "LS", "MA", "RV", "SS", "FoF") # Plot of IF using wrapper function and with a specified TS outIF <- IF(estimator = "Mean", 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(estimator = "Mean", returns = edhec[,"CA"], evalShape = FALSE, retVals = NULL, nuisPars = NULL, IFplot = TRUE, IFprint = TRUE, compile = TRUE, prewhiten = FALSE)
IF.DSR
returns the data and plots the shape of either the IF or the IF TS for the Downside Sharpe Ratio.
IF.DSR( returns = NULL, evalShape = FALSE, retVals = NULL, nuisPars = NULL, k = 4, IFplot = FALSE, IFprint = TRUE, rf = 0, prewhiten = FALSE, ar.prewhiten.order = 1, cleanOutliers = FALSE, cleanMethod = c("locScaleRob")[1], eff = 0.99, ... )
IF.DSR( returns = NULL, evalShape = FALSE, retVals = NULL, nuisPars = NULL, k = 4, IFplot = FALSE, IFprint = TRUE, rf = 0, prewhiten = FALSE, ar.prewhiten.order = 1, cleanOutliers = FALSE, cleanMethod = c("locScaleRob")[1], eff = 0.99, ... )
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. |
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. |
For further details on the usage of the nuisPars
argument, please refer to Section 3.1 for the RPEIF
vignette.
Influence function of DSR.
Anthony-Alexander Christidis, anthony.christidis@stat.ubc.ca
# Plot of IF with nuisance parameter with return value outIF <- IF.DSR(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.DSR(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.DSR(returns = edhec[,"CA"], evalShape = FALSE, retVals = NULL, nuisPars = NULL, IFplot = TRUE, IFprint = TRUE, prewhiten = FALSE)
# Plot of IF with nuisance parameter with return value outIF <- IF.DSR(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.DSR(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.DSR(returns = edhec[,"CA"], evalShape = FALSE, retVals = NULL, nuisPars = NULL, IFplot = TRUE, IFprint = TRUE, prewhiten = FALSE)
IF.ES
returns the data and plots the shape of either the IF or the IF TS for the ES
IF.ES( returns = NULL, evalShape = FALSE, retVals = NULL, nuisPars = NULL, k = 4, IFplot = FALSE, IFprint = TRUE, alpha.ES = 0.05, prewhiten = FALSE, ar.prewhiten.order = 1, cleanOutliers = FALSE, cleanMethod = c("locScaleRob")[1], eff = 0.99, ... )
IF.ES( returns = NULL, evalShape = FALSE, retVals = NULL, nuisPars = NULL, k = 4, IFplot = FALSE, IFprint = TRUE, alpha.ES = 0.05, prewhiten = FALSE, ar.prewhiten.order = 1, cleanOutliers = FALSE, cleanMethod = c("locScaleRob")[1], eff = 0.99, ... )
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. |
alpha.ES |
Tail Probability. |
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. |
... |
Additional parameters. |
For further details on the usage of the nuisPars
argument, please refer to Section 3.1 for the RPEIF
vignette.
Influence function of the ES.
Anthony-Alexander Christidis, anthony.christidis@stat.ubc.ca
# Plot of IF with nuisance parameter with return value outIF <- IF.ES(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.ES(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.ES(returns = edhec[,"CA"], evalShape = FALSE, retVals = NULL, nuisPars = NULL, IFplot = TRUE, IFprint = TRUE, prewhiten = FALSE)
# Plot of IF with nuisance parameter with return value outIF <- IF.ES(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.ES(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.ES(returns = edhec[,"CA"], evalShape = FALSE, retVals = NULL, nuisPars = NULL, IFplot = TRUE, IFprint = TRUE, prewhiten = FALSE)
IF.ESratio
returns the data and plots the shape of either the IF or the IF TS for the Expected Shortfall Ratio.
IF.ESratio( returns = NULL, evalShape = FALSE, retVals = NULL, nuisPars = NULL, k = 4, IFplot = FALSE, IFprint = TRUE, alpha = 0.1, rf = 0, prewhiten = FALSE, ar.prewhiten.order = 1, cleanOutliers = FALSE, cleanMethod = c("locScaleRob")[1], eff = 0.99, ... )
IF.ESratio( returns = NULL, evalShape = FALSE, retVals = NULL, nuisPars = NULL, k = 4, IFplot = FALSE, IFprint = TRUE, alpha = 0.1, rf = 0, prewhiten = FALSE, ar.prewhiten.order = 1, cleanOutliers = FALSE, cleanMethod = c("locScaleRob")[1], eff = 0.99, ... )
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. |
alpha |
Tail Probability. |
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. |
... |
Additional parameters. |
For further details on the usage of the nuisPars
argument, please refer to Section 3.1 for the RPEIF
vignette.
Influence function of ESratio.
Anthony-Alexander Christidis, anthony.christidis@stat.ubc.ca
# Plot of IF with nuisance parameter with return value outIF <- IF.ESratio(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.ESratio(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.ESratio(returns = edhec[,"CA"], evalShape = FALSE, retVals = NULL, nuisPars = NULL, IFplot = TRUE, IFprint = TRUE, prewhiten = FALSE)
# Plot of IF with nuisance parameter with return value outIF <- IF.ESratio(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.ESratio(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.ESratio(returns = edhec[,"CA"], evalShape = FALSE, retVals = NULL, nuisPars = NULL, IFplot = TRUE, IFprint = TRUE, prewhiten = FALSE)
IF.LPM
returns the data and plots the shape of either the IF or the IF TS for the LPM
IF.LPM( returns = NULL, evalShape = FALSE, retVals = NULL, nuisPars = NULL, k = 4, IFplot = FALSE, IFprint = TRUE, const = 0, order = 1, prewhiten = FALSE, ar.prewhiten.order = 1, cleanOutliers = FALSE, cleanMethod = c("locScaleRob")[1], eff = 0.99, ... )
IF.LPM( returns = NULL, evalShape = FALSE, retVals = NULL, nuisPars = NULL, k = 4, IFplot = FALSE, IFprint = TRUE, const = 0, order = 1, prewhiten = FALSE, ar.prewhiten.order = 1, cleanOutliers = FALSE, cleanMethod = c("locScaleRob")[1], eff = 0.99, ... )
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. |
const |
Constant threshold. |
order |
Order of LPM. Can only take values 1 or 2. |
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. |
... |
Additional parameters. |
For further details on the usage of the nuisPars
argument, please refer to Section 3.1 for the RPEIF
vignette.
Influence function of LPM.
Anthony-Alexander Christidis, anthony.christidis@stat.ubc.ca
# Plot of IF with nuisance parameter with return value outIF <- IF.LPM(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.LPM(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.LPM(returns = edhec[,"CA"], evalShape = FALSE, retVals = NULL, nuisPars = NULL, IFplot = TRUE, IFprint = TRUE, prewhiten = FALSE)
# Plot of IF with nuisance parameter with return value outIF <- IF.LPM(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.LPM(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.LPM(returns = edhec[,"CA"], evalShape = FALSE, retVals = NULL, nuisPars = NULL, IFplot = TRUE, IFprint = TRUE, prewhiten = FALSE)
IF.Mean
returns the data and plots the shape of either the IF or the IF TS for the mean.
IF.Mean( returns = NULL, evalShape = FALSE, retVals = NULL, nuisPars = NULL, k = 4, IFplot = FALSE, IFprint = TRUE, prewhiten = FALSE, ar.prewhiten.order = 1, cleanOutliers = FALSE, cleanMethod = c("locScaleRob")[1], eff = 0.99, ... )
IF.Mean( returns = NULL, evalShape = FALSE, retVals = NULL, nuisPars = NULL, k = 4, IFplot = FALSE, IFprint = TRUE, prewhiten = FALSE, ar.prewhiten.order = 1, cleanOutliers = FALSE, cleanMethod = c("locScaleRob")[1], eff = 0.99, ... )
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. |
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. |
... |
Additional parameters. |
For further details on the usage of the nuisPars
argument, please refer to Section 3.1 for the RPEIF
vignette.
Influence function for the specified risk or performance measure.
Anthony-Alexander Christidis, anthony.christidis@stat.ubc.ca
# Plot of IF with nuisance parameter with return value outIF <- IF.Mean(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.Mean(estimator = "mean", 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.Mean(returns = edhec[,"CA"], evalShape = FALSE, retVals = NULL, nuisPars = NULL, IFplot = TRUE, IFprint = TRUE, prewhiten = FALSE)
# Plot of IF with nuisance parameter with return value outIF <- IF.Mean(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.Mean(estimator = "mean", 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.Mean(returns = edhec[,"CA"], evalShape = FALSE, retVals = NULL, nuisPars = NULL, IFplot = TRUE, IFprint = TRUE, prewhiten = FALSE)
IF.OmegaRatio
returns the data and plots the shape of either the IF or the IF TS for the Omega Ratio.
IF.OmegaRatio( returns = NULL, evalShape = FALSE, retVals = NULL, nuisPars = NULL, k = 4, IFplot = FALSE, IFprint = TRUE, const = 0, prewhiten = FALSE, ar.prewhiten.order = 1, cleanOutliers = FALSE, cleanMethod = c("locScaleRob")[1], eff = 0.99, ... )
IF.OmegaRatio( returns = NULL, evalShape = FALSE, retVals = NULL, nuisPars = NULL, k = 4, IFplot = FALSE, IFprint = TRUE, const = 0, prewhiten = FALSE, ar.prewhiten.order = 1, cleanOutliers = FALSE, cleanMethod = c("locScaleRob")[1], eff = 0.99, ... )
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. |
const |
Constant threshold. |
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. |
... |
Additional parameters. |
For further details on the usage of the nuisPars
argument, please refer to Section 3.1 for the RPEIF
vignette.
Influence function of Omega Ratio.
Anthony-Alexander Christidis, anthony.christidis@stat.ubc.ca
# Plot of IF with nuisance parameter with return value outIF <- IF.OmegaRatio(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.OmegaRatio(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.OmegaRatio(returns = edhec[,"CA"], evalShape = FALSE, retVals = NULL, nuisPars = NULL, IFplot = TRUE, IFprint = TRUE, prewhiten = FALSE)
# Plot of IF with nuisance parameter with return value outIF <- IF.OmegaRatio(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.OmegaRatio(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.OmegaRatio(returns = edhec[,"CA"], evalShape = FALSE, retVals = NULL, nuisPars = NULL, IFplot = TRUE, IFprint = TRUE, prewhiten = FALSE)
IF.RachevRatio
returns the data and plots the shape of either the IF or the IF TS for the Rachev Ratio.
IF.RachevRatio( returns = NULL, evalShape = FALSE, retVals = NULL, nuisPars = NULL, k = 4, IFplot = FALSE, IFprint = TRUE, alpha = 0.1, beta = 0.1, prewhiten = FALSE, ar.prewhiten.order = 1, cleanOutliers = FALSE, cleanMethod = c("locScaleRob")[1], eff = 0.99, ... )
IF.RachevRatio( returns = NULL, evalShape = FALSE, retVals = NULL, nuisPars = NULL, k = 4, IFplot = FALSE, IFprint = TRUE, alpha = 0.1, beta = 0.1, prewhiten = FALSE, ar.prewhiten.order = 1, cleanOutliers = FALSE, cleanMethod = c("locScaleRob")[1], eff = 0.99, ... )
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. |
alpha |
Lower tail probability. |
beta |
Upper tail probability. |
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. |
... |
Additional parameters. |
For further details on the usage of the nuisPars
argument, please refer to Section 3.1 for the RPEIF
vignette.
Influence function of Rachev Ratio.
Anthony-Alexander Christidis, anthony.christidis@stat.ubc.ca
# Plot of IF with nuisance parameter with return value outIF <- IF.RachevRatio(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.RachevRatio(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.RachevRatio(returns = edhec[,"CA"], evalShape = FALSE, retVals = NULL, nuisPars = NULL, IFplot = TRUE, IFprint = TRUE, prewhiten = FALSE)
# Plot of IF with nuisance parameter with return value outIF <- IF.RachevRatio(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.RachevRatio(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.RachevRatio(returns = edhec[,"CA"], evalShape = FALSE, retVals = NULL, nuisPars = NULL, IFplot = TRUE, IFprint = TRUE, prewhiten = FALSE)
IF.robMean
returns the data and plots the shape of either the IF or the IF TS for the M-estimator of Mean.
IF.robMean( returns = NULL, family = c("mopt", "opt", "bisquare")[1], eff = 0.95, evalShape = FALSE, retVals = NULL, nuisPars = NULL, k = 4, IFplot = FALSE, IFprint = TRUE, prewhiten = FALSE, ar.prewhiten.order = 1, ... )
IF.robMean( returns = NULL, family = c("mopt", "opt", "bisquare")[1], eff = 0.95, evalShape = FALSE, retVals = NULL, nuisPars = NULL, k = 4, IFplot = FALSE, IFprint = TRUE, prewhiten = FALSE, ar.prewhiten.order = 1, ... )
returns |
Returns data of the asset or portfolio. This can be a numeric or an xts object. |
family |
Family for robust m-estimator of Mean. Must be one of "mopt" (default), "opt" or "bisquare". |
eff |
Tuning parameter for the normal distribution efficiency. Default is 0.99. |
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. |
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). |
... |
Addtional parameters. |
For further details on the usage of the nuisPars
argument, please refer to Section 3.1 for the RPEIF
vignette.
Influence function for M-estimator of Mean
Anthony-Alexander Christidis, anthony.christidis@stat.ubc.ca
data(edhec, package = "PerformanceAnalytics") colnames(edhec) = c("CA", "CTAG", "DIS", "EM","EMN", "ED", "FIA", "GM", "LS", "MA", "RV", "SS", "FoF") # Plot of IF shape outIF <- IF.robMean(returns = edhec[,"CA"], evalShape = TRUE, retVals = NULL, IFplot = TRUE, IFprint = TRUE) # Plot of IF a specified TS outIF <- IF.robMean(returns = edhec[,"CA"], evalShape = TRUE, retVals = seq(-0.1, 0.1, by = 0.001), IFplot = TRUE, IFprint = TRUE) # Computing the IF of the returns (with prewhitening) with a plot of IF TS outIF <- IF.robMean(returns = edhec[,"CA"], evalShape = FALSE, retVals = NULL, IFplot = TRUE, IFprint = TRUE, prewhiten = FALSE)
data(edhec, package = "PerformanceAnalytics") colnames(edhec) = c("CA", "CTAG", "DIS", "EM","EMN", "ED", "FIA", "GM", "LS", "MA", "RV", "SS", "FoF") # Plot of IF shape outIF <- IF.robMean(returns = edhec[,"CA"], evalShape = TRUE, retVals = NULL, IFplot = TRUE, IFprint = TRUE) # Plot of IF a specified TS outIF <- IF.robMean(returns = edhec[,"CA"], evalShape = TRUE, retVals = seq(-0.1, 0.1, by = 0.001), IFplot = TRUE, IFprint = TRUE) # Computing the IF of the returns (with prewhitening) with a plot of IF TS outIF <- IF.robMean(returns = edhec[,"CA"], evalShape = FALSE, retVals = NULL, IFplot = TRUE, IFprint = TRUE, prewhiten = FALSE)
IF.SD
returns the data and plots the shape of either the IF or the IF TS for the standard deviation
IF.SD( returns = NULL, evalShape = FALSE, retVals = NULL, nuisPars = NULL, k = 4, IFplot = FALSE, IFprint = TRUE, prewhiten = FALSE, ar.prewhiten.order = 1, cleanOutliers = FALSE, cleanMethod = c("locScaleRob")[1], eff = 0.99, ... )
IF.SD( returns = NULL, evalShape = FALSE, retVals = NULL, nuisPars = NULL, k = 4, IFplot = FALSE, IFprint = TRUE, prewhiten = FALSE, ar.prewhiten.order = 1, cleanOutliers = FALSE, cleanMethod = c("locScaleRob")[1], eff = 0.99, ... )
returns |
Vector of the returns of the asset or portfolio. |
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. |
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. |
... |
Additional parameters. |
For further details on the usage of the nuisPars
argument, please refer to Section 3.1 for the RPEIF
vignette.
Influence function of the standard deviation.
Anthony-Alexander Christidis, anthony.christidis@stat.ubc.ca
# Plot of IF with nuisance parameter with return value outIF <- IF.SD(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.SD(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.SD(returns = edhec[,"CA"], evalShape = FALSE, retVals = NULL, nuisPars = NULL, IFplot = TRUE, IFprint = TRUE, prewhiten = FALSE)
# Plot of IF with nuisance parameter with return value outIF <- IF.SD(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.SD(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.SD(returns = edhec[,"CA"], evalShape = FALSE, retVals = NULL, nuisPars = NULL, IFplot = TRUE, IFprint = TRUE, prewhiten = FALSE)
IF.SemiSD
returns the data and plots the shape of either the IF or the IF TS for the SemiSD
IF.SemiSD( returns = NULL, evalShape = FALSE, retVals = NULL, nuisPars = NULL, k = 4, IFplot = FALSE, IFprint = TRUE, prewhiten = FALSE, ar.prewhiten.order = 1, cleanOutliers = FALSE, cleanMethod = c("locScaleRob")[1], eff = 0.99, ... )
IF.SemiSD( returns = NULL, evalShape = FALSE, retVals = NULL, nuisPars = NULL, k = 4, IFplot = FALSE, IFprint = TRUE, prewhiten = FALSE, ar.prewhiten.order = 1, cleanOutliers = FALSE, cleanMethod = c("locScaleRob")[1], eff = 0.99, ... )
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. |
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. |
... |
Additional parameters. |
For further details on the usage of the nuisPars
argument, please refer to Section 3.1 for the RPEIF
vignette.
Influence function of SemiSD.
Anthony-Alexander Christidis, anthony.christidis@stat.ubc.ca
# Plot of IF with nuisance parameter with return value outIF <- IF.SemiSD(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.SemiSD(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.SemiSD(returns = edhec[,"CA"], evalShape = FALSE, retVals = NULL, nuisPars = NULL, IFplot = TRUE, IFprint = TRUE, prewhiten = FALSE)
# Plot of IF with nuisance parameter with return value outIF <- IF.SemiSD(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.SemiSD(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.SemiSD(returns = edhec[,"CA"], evalShape = FALSE, retVals = NULL, nuisPars = NULL, IFplot = TRUE, IFprint = TRUE, prewhiten = FALSE)
IF.SoR
returns the data and plots the shape of either the IF or the IF TS for the Sortino Ratio.
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, ... )
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, ... )
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. |
For further details on the usage of the nuisPars
argument, please refer to Section 3.1 for the RPEIF
vignette.
Influence function of SoR.
Anthony-Alexander Christidis, anthony.christidis@stat.ubc.ca
# 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)
# 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)
IF.SR
returns the data and plots the shape of either the IF or the IF TS for the SR
IF.SR( returns = NULL, evalShape = FALSE, retVals = NULL, nuisPars = NULL, k = 4, IFplot = FALSE, IFprint = TRUE, rf = 0, prewhiten = FALSE, ar.prewhiten.order = 1, cleanOutliers = FALSE, cleanMethod = c("locScaleRob")[1], eff = 0.99, ... )
IF.SR( returns = NULL, evalShape = FALSE, retVals = NULL, nuisPars = NULL, k = 4, IFplot = FALSE, IFprint = TRUE, rf = 0, prewhiten = FALSE, ar.prewhiten.order = 1, cleanOutliers = FALSE, cleanMethod = c("locScaleRob")[1], eff = 0.99, ... )
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. |
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. |
... |
Additional parameters. |
For further details on the usage of the nuisPars
argument, please refer to Section 3.1 for the RPEIF
vignette.
Influence function of the SR.
Anthony-Alexander Christidis, anthony.christidis@stat.ubc.ca
# Plot of IF with nuisance parameter with return value outIF <- IF.SR(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.SR(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.SR(returns = edhec[,"CA"], evalShape = FALSE, retVals = NULL, nuisPars = NULL, IFplot = TRUE, IFprint = TRUE, prewhiten = FALSE)
# Plot of IF with nuisance parameter with return value outIF <- IF.SR(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.SR(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.SR(returns = edhec[,"CA"], evalShape = FALSE, retVals = NULL, nuisPars = NULL, IFplot = TRUE, IFprint = TRUE, prewhiten = FALSE)
IF.VaR
returns the data and plots the shape of either the IF or the IF TS for the Value at Risk
IF.VaR( returns = NULL, evalShape = FALSE, retVals = NULL, nuisPars = NULL, k = 4, IFplot = FALSE, IFprint = TRUE, alpha = 0.05, prewhiten = FALSE, ar.prewhiten.order = 1, cleanOutliers = FALSE, cleanMethod = c("locScaleRob")[1], eff = 0.99, ... )
IF.VaR( returns = NULL, evalShape = FALSE, retVals = NULL, nuisPars = NULL, k = 4, IFplot = FALSE, IFprint = TRUE, alpha = 0.05, prewhiten = FALSE, ar.prewhiten.order = 1, cleanOutliers = FALSE, cleanMethod = c("locScaleRob")[1], eff = 0.99, ... )
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. |
alpha |
The tail probability of interest. |
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. |
... |
Additional parameters. |
For further details on the usage of the nuisPars
argument, please refer to Section 3.1 for the RPEIF
vignette.
Influence function of the VaR.
Anthony-Alexander Christidis, anthony.christidis@stat.ubc.ca
# Plot of IF with nuisance parameter with return value outIF <- IF.VaR(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.VaR(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.VaR(returns = edhec[,"CA"], evalShape = FALSE, retVals = NULL, nuisPars = NULL, IFplot = TRUE, IFprint = TRUE, prewhiten = FALSE)
# Plot of IF with nuisance parameter with return value outIF <- IF.VaR(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.VaR(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.VaR(returns = edhec[,"CA"], evalShape = FALSE, retVals = NULL, nuisPars = NULL, IFplot = TRUE, IFprint = TRUE, prewhiten = FALSE)
IF.VaRratio
returns the data and plots the shape of either the IF or the IF TS for the VaR Ratio.
IF.VaRratio( returns = NULL, evalShape = FALSE, retVals = NULL, nuisPars = NULL, k = 4, IFplot = FALSE, IFprint = TRUE, alpha = 0.05, rf = 0, prewhiten = FALSE, ar.prewhiten.order = 1, cleanOutliers = FALSE, cleanMethod = c("locScaleRob")[1], eff = 0.99, ... )
IF.VaRratio( returns = NULL, evalShape = FALSE, retVals = NULL, nuisPars = NULL, k = 4, IFplot = FALSE, IFprint = TRUE, alpha = 0.05, rf = 0, prewhiten = FALSE, ar.prewhiten.order = 1, cleanOutliers = FALSE, cleanMethod = c("locScaleRob")[1], eff = 0.99, ... )
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. |
alpha |
The tail probability of interest. |
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. |
... |
Additional parameters. |
For further details on the usage of the nuisPars
argument, please refer to Section 3.1 for the RPEIF
vignette.
Influence function of the VaRratio.
Anthony-Alexander Christidis, anthony.christidis@stat.ubc.ca
# Plot of IF with nuisance parameter with return value outIF <- IF.VaRratio(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.VaRratio(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.VaRratio(returns = edhec[,"CA"], evalShape = FALSE, retVals = NULL, nuisPars = NULL, IFplot = TRUE, IFprint = TRUE, prewhiten = FALSE)
# Plot of IF with nuisance parameter with return value outIF <- IF.VaRratio(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.VaRratio(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.VaRratio(returns = edhec[,"CA"], evalShape = FALSE, retVals = NULL, nuisPars = NULL, IFplot = TRUE, IFprint = TRUE, prewhiten = FALSE)
nuis.pars
returns the value of the nuisance parameters used in the evaluation of the shape of influence functions for risk and performance measures.
nuisParsFn(mu = 0.01, sd = 0.05, c = 0, alpha = 0.1, beta = 0.1)
nuisParsFn(mu = 0.01, sd = 0.05, c = 0, alpha = 0.1, beta = 0.1)
mu |
Mean parameter. |
sd |
Standard deviation parameter. |
c |
Constant value for threshold. |
alpha |
Parameters for the lower tail quantile. |
beta |
Parameter for the upper tail quantile. |
For further details on the usage of the nuisParsFn
function, please refer to Section 3.1 for the RPEIF
vignette.
List of nuisance parameters.
Anthony-Alexander Christidis, anthony.christidis@stat.ubc.ca
# Nuisance parameters using default values defaultNuisance <- nuisParsFn() # Nuisance parameters using specified values specifiedNuisance <- nuisParsFn(mu=0.02, sd=0.1, c=0.01, alpha=0.05, beta=0.1)
# Nuisance parameters using default values defaultNuisance <- nuisParsFn() # Nuisance parameters using specified values specifiedNuisance <- nuisParsFn(mu=0.02, sd=0.1, c=0.01, alpha=0.05, beta=0.1)