# Tag Info

14

You have the correct approach. (1) The simulation generates sampled portfolio values, $P_1,P_2, \dots, P_n$ at time $t=T$. VaR is specified as a left-tail percentile. Order the sample as $$P_{(1)} \leq P_{(2)} \leq \dots \leq P_{(n)}.$$ If you are considering $VaR_\alpha$ at the $100(1-\alpha) \%$ confidence level , then choose the smallest integer $k$ ...

11

In my experience, a VaR or CVaR portfolio optimization problem is usually best specified as minimizing the VaR or CVaR and then using a constraint for the expected return. As noted by Alexey, it is much better to use CVaR than VaR. The main benefit of a CVaR optimization is that it can be implemented as a linear programming problem. Another option I have ...

8

The VaR constraint is convex and quadratic and can be handled with any solver supports quadratic constraints, like Guribi, cplex (from IBM) or xpress (from FICO). The CVaR can be formulated as a linear program if you are able to perform monte-carlo simulations on the returns. Briefly, the LP model is \begin{eqnarray*} c &\ge& \alpha + {1 \over (...

7

Regression analysis, as a minimization of the sum of squared errors, does not require normality of the error term. The requirements are that errors are homoscedastic and uncorrelated. And these are the fundamental assumptions (together with exogeneity). Then estimators are unbiased, optimal (exhibit the minimum variance within the class of unbiased ...

7

The answer to your question is no. Value at Risk is not additive in the sense that $\text{VaR}(X+Y) \neq \text{VaR}(X) + \text{VaR}(Y)$. But I guess your question is more to aimed at finding a formula for your investments than to look at the property itself. I think the only way to get a nice formula for this is to assume that both assets are: Normally ...

6

The Historical Method, which I would call Historical Simulation requires that you have a reasonably clean and accurate time series of data for the underlying asset. Essentially, you are using the past performance of the asset to model its likely behaviour over a time frame of typically 1 to 10 days. Choosing and updating your time series data set needs to ...

6

There is experimental code available under https://sourceforge.net/tracker/?func=detail&atid=312740&aid=3413982&group_id=12740 Basically I tried to answer the question if you should do the riskfactor shifts on the level of the pricing engine or on the level of the market data. For me the answer is that one has to do it on the level of the ...

6

I'm guessing you're simulating rate curves etc. inside your system, and you want to reprice your instruments over the simulated curves using QuantLib. In this case, most of the logic is in your system already, and you have to plug pricing functionality in. If so, I don't think there's many steps involved besides, well, pricing the instrument on the ...

6

In general you don't need copulas to calculate VaR on portfolio. You can use historical method if you have time series of returns for the assets in your portfolio. If you have sufficiently enough data this will allow you to take into account correlation risk, non-normality of returns. Example of code in R for equally weighted portfolio without assuming any ...

5

It's very common to work in spreads rather than price for this calculation. The simplest approach would be to get an implied spread for each bond, and then allow the spreads to vary in simulation according to an equity-style factor model. Each spread simulation can then be mapped back to bond prices by reversing the formula. A few points: If you can, you ...

5

It doesn't make sense to use option price series data for computing option risk anyway. Since they are derivatives (i.e. their value is derived from other securities) it is more basic and reasonable to handle the underlying risks. As hinted by John, the risks to an option portfolio are generally considered in the context of inputs to a pricing model (which ...

5

There are several methods to compute VAR: i) historical, ii) variance-covariance, and iii) monte carlo. iv) copula techniques. I assume you are asking about approach (ii). If the data are not multivariate normal and i.i.d. then the variance-covariance approach will not reflect true risk. For example, if there is serial correlation then risk is understated. ...

5

If $z_\alpha$ is the so-called standard normal $z$-score of the significance level $\alpha$ such that $$\frac 1 {\sqrt{2\pi}}\int_{-\infty}^{z_\alpha} e^{-\xi^2/2}d\xi=\alpha$$ and we assume normality, (ignoring skewness and kurtosis,) then we can estimate the $\alpha$ quantile of a distribution with cdf $\Phi$ as $$\Phi^{-1}(\alpha)=\mu + \sigma z_\alpha.... 5 A probabilistic view on your full scale simulation. In the steps 1-3 you calculate the 0.99 quantile of the lognormal distribution with parameters \ln N(\ln S_0 +(\mu - \frac{\sigma^2}{2})t,\sigma^2 t^2). The cdf of lognormal distribution is \Phi(\frac{\ln x-\mu}{\sigma}) Thus, you can calculate V_p through V_p=e^{\ln S_0 +(\mu - \frac{\sigma^2}{2})... 5 Standard (read: regulators will accept it) could be a one day, 99% VaR calculated with two years of historical data. A minimum of one year of history is needed although this is not the norm. Typically the one-day VaR is transformed into a 10-day VaR by scaling the calculation by sqrt(10). However, the new market risk rule governs that one justify their ... 5 The given matrix can not represent a covariance matrix since it would imply that asset 1 is negatively correlated to asset 2 and asset 3. But asset 2 is negatively correlated to asset 3 which contradicts the first statement. In general a covariance matrix has to be positive semi-definite and symmetric, and conversely every positive semi-definite symmetric ... 5 Values of VaR are just the inverses of the cumulative distributions. CVaR is not a very commonly used term, its more frequently used synonym is Expected Shortfall. See http://www.maths.manchester.ac.uk/~saralees/chap17.pdf for the list of Expected Shortfall values for more than 20 distributions. 5 There are a few different ways to calculate VaR. Historical Method For this method, you calculate the return of your portfolio each day, and get a list of daily returns over your calibration period. Once you have this, then you find the 5th percentile to give the 95% VaR. The advantage of this method is that it is the most straightforward to compute, and ... 4 Usually when it is for (market) risk management purposes it is quite standard to have 1 day horizon with (allegedly ;-) ) 99% confidence level. As far as I know when it is for regulatory or economic capital requirement and/or Asset Liability Management then horizons might be much longer up to one year and confidence levels are usually 99% and 95%. Regards 4 I think what you're looking for is a type of solver called a second-order cone program (SOCP) solver. This is just like a quadratic program (QP) solver, except the constraints can be quadratic as well as the objective function. There is an open-source implementation in python via the CVXOPT module. 4 You can find a good example on CVaR optimization in the book "Portfolio Optimization with R/Rmetrics" By Diethelm Wuertz, Yohan Chalabi, William Chen, Andrew Ellis. #load library fPortfolio library(fPortfolio) #use indicies LPP2005, see http://www.pictet.com/en/home/lpp_indices.html lppData <- 100*LPP2005.RET[,1:6] #create portfolio specification ... 4 Both approaches have drawbacks, so if one must choose among the two then one shall compare those drawbacks in the specific case. Or another way would be devising a hybrid of the two (e.g. adding statistics of historical deviations of the fund portfolio from the (1) view etc...). Among the drawbacks of (1): trading costs, rebalancings, management fees etc ... 4 Do N MC simulations of M samples, calculating your estimate of VaR for each one \{\widehat{VaR}_i\}_{i=1}^N and you now have an IID sample! Take the sample (or unbiased) standard deviation for your estimate of VaR (this is probably what you mean by error) SD(\widehat{VaR})=\sqrt{\frac{1}{N-1} \sum_{i=1}^N (\widehat{VaR}_i - \overline{VaR})^2} and of ... 4 As discussed, banks do use VaR for risk management. They will have something modified for the specific use (i.e. probably not your VaR from a fitted normal distribution), it's likely more sophisticated but the underlying idea is the same. VaR is used for reporting/ceremonial business decisions as much as (or perhaps even more than) it is for trading ... 4 The most important difference is that the calculations are based on a "stressed" historical period in the markets as opposed to the most recent X number of years. 4 By definition, your loss cannot be positive, so you'd set the VaR to zero. But it really depends, on how you calculate your VaR. If you calculate your returns, sort them and look at the 5% quantile (which, as you say, may be positive), then you'd simply set your VaR to zero. But if you treat your returns as realizations of some (unknown) random variable, ... 4 To answer you question "is it because X is a mixture of a continous and discrete Random Variable": the answer is no. The mean reasons are (1) the sample size (which is limited / countable) (2) the fact that you're trying to get the tail value and (3) the shape of the KDE (distribution).The theoretical value of 3.088 will be emprirically calculated if and ... 4 VaR is not sub-additive in general. Relying on Mark Joshi comment, there are particular cases where it can be. Such cases occur for portfolios containing elliptically distributed risk factors. Of course the normal distribution is among the elliptical distributions family. The latter can be helpful for analytical VaR modelling as an elliptical model is ... 4 Simple example where sub-additivity fails Let there be four possible outcomes i=1,2,3,4 that occur with equal probability \frac{1}{4}. Payoffs for X, Y, and X + Y are given by:$$ X = \begin{bmatrix}-1\\0\\1\\2 \end{bmatrix} \quad Y = \begin{bmatrix}0\\-1\\1\\2 \end{bmatrix} \quad X + Y = \begin{bmatrix}-1\\-1\\2\\4 \end{bmatrix}$$What's the ... 4 Let u=t^{-1}_v(\alpha) and recall that g_v(u)=c_v(v+u^2)^{-\frac{v+1}2} for some constant c_v. By the formulas you provided,$$\begin{eqnarray*}\lim_{\alpha\to 1^-}\frac{\mathrm{ES}_\alpha(X)}{\mathrm{VaR}_\alpha(X)}&=&\lim_{\alpha\to 1^-} \frac{g_v(t^{-1}_v(\alpha))}{(1-\alpha)(v-1)\left(\frac{t^{-1}(\alpha)}{v+(t^{-1}(\alpha))^2}\right)}\\ =\...

Only top voted, non community-wiki answers of a minimum length are eligible