apaTradeProfile.CVaR(Weights, Returns, ConfidenceLevel, StepSize, nSteps, IsTraditional, IsSmooth)
=apaTradeProfile.CVaR(Weights, Returns, ConfidenceLevel, StepSize, nSteps, IsTraditional, IsSmooth)Result
Calculates the so-called “trade profile” of portfolio conditional value at risk (CVaR), i.e. how +/- changes in the constituent exposures affect the portfolio CVaR.
Syntax
Weights: 1 x n vector of constituent exposures
Returns: m x n matrix of constituent returns (m = nObs, n = nAssets)
ConfidenceLevel: confidence level for CVaR, e.g. 95%
StepSize: size of exposure changes
nSteps: number of exposure changes
IsTraditional: TRUE to set the results of trades resulting in short (< 0) or leveraged (> 1) constituent exposures to #N/A
IsSmooth: TRUE to calculate smooth CVaR (tail <= VaR), FALSE for the usual calculation (tail < VaR)
Remarks
For more information on the IsSmooth parameter, see apaCVaR.Empirical.
