So far I have just theoretical knowledge of risk measure and never used them in application. Therefore I have some basic question how risk measures are used in reality and how they are implemented in R.
- Let's assume you are managing a portfolio containing some assets. In particular I'm interested in VaR and CVaR. VaR is a quantile of the loss distribution. In reality one would calculate the VaR for the returns to see what the current risk of your portfolio is. This leads to a series of VaR over time, is this correct?
- How CVaR implemented in R? I know there is the PerformanceAnalytics package containing the function ES. But how does this function calculate the CVaR? Moreover, this function (ES) has as argument a vector, matrix, data frame, timeSeries or zoo object of asset returns. How does the calculation differs if the argument is a data frame of asset returns or a timeSeries object?
- Closely related to 2. How are Time Series used to calculate VaR/CVar?
I'm very thankful for any explanations / references.