**Mark Sinclair-McGarvie discusses how to simplify complex VaR optimisation problems**

**Introduction**

Financial institutions invariably need to strike a balance between controlling the risk that is taken and ensuring a sufficient expected return: a balance between risk and reward. For instance, an insurer might aim for a strategy that has both low capital requirements and high expected profitability.

Possible procedures for choosing such a strategy can range from an ad hoc approach of specifying several different strategies and projecting which may be best, to using a computer algorithm to propose the best strategy in some semi-automated way, ie. strategy optimisation.

This article focuses on methods for strategy optimisation where the measure of risk is Value at Risk (VaR) , and the underlying risk model is of the Monte Carlo type.

**The optimisation problem**

Consider a stochastic model for determining the Net Asset Value (NAV) of an insurer at the end of a time horizon, which is dependent on the strategy that the insurer plans to adopt over that period. There are many ways of phrasing the aim stated above, such as:

Minimisation of the VaR figure over the horizon, whilst keeping expected profit above some level.

Maximisation of an expected profit measure over the horizon, whilst keeping the VaR figure below some limit.

Maximisation of the expected return on capital over the horizon. This simultaneously considers both profit and VaR in one expression.

This article focuses on the first of these cases; the other two cases are similar in general approach.

A Monte Carlo VaR calculation process has the following stages:

Inputs

Inputs

Everything that controls how the model runs, including data about the organisation and the strategy that to be adopted over the time horizon.

The strategy inputs correspond to "levers" that the organisation controls, such as how much to invest in asset classes or the amount of underwriting to perform in different business classes.

**Model**

The model will run over the specified time horizon, producing projected results of interest.

**Loss distribution **

The loss distribution will be selected from the results produced by the model. This might be the drop in the net asset value of the organisation over the time horizon, or the fall in value of a portfolio of assets.

**VaR **

The VaR figure is a specified percentile of the loss distribution.

We want to choose values for the inputs representing our strategy so that we minimise our VaR measure whilst at the same time keeping some measure of profit or success above a given level, such as expected NAV. Unfortunately, most practical VaR optimisation problems cannot be solved analytically. Thus, a numerical optimisation algorithm must be used to determine a good strategy. For each iteration ("guess") of such an algorithm, the entire model must be run and the objective and constraint functions recalculated. Since there may be many thousands of guesses and hence many thousands of model runs required, this can be a highly numerically intensive process.** **

**VaR is Hell**

Monte Carlo VaR is a difficult function to optimise. It is not a linear function, and so non-linear optimisation algorithms must be applied. It is typically a 'jagged' function of its variables, with many sharp edges, and it also has many local minima that make it hard for an optimiser to find the true "global" minimum.

Graph 1 plots an example 99.5% VaR surface for the case of two variables, which we wish to minimise. Every point on this surface corresponds to a different strategy, which has been run through a model to produce the corresponding VaR figure. It is not a smooth surface: it is made up of many different facets that are stitched together with sharp edges at the joins. Each facet corresponds to a different scenario. There are also many different "dips" in the surface, corresponding to different local minima.

An intuitive way of thinking about a numerical optimisation algorithm is like a ball that is rolling slowly downhill. If the ball gets stuck in a local hollow it can stay there, and so not get to the bottom of the hill. That is what can happen with VaR optimisation too: the numerical optimisers can get stuck in local optima like the one above, and never actually find the global optimum. This will correspond to a suboptimal strategy. The sharp edges here can also confuse the algorithm, so that the ball doesn't know where to move to next.

To make things worse, practical strategies typically don't have just two variables, there may be thousands. This exacerbates the issues described above: there are many more hollows and sharp edges, which make finding a solution all the more difficult.

**Taming VaR: local minima**

In order to get the optimisation past any local minima that the VaR function may have, we need a good starting position. If this starting position is sufficiently close to the global optimum, then there is a better chance of any local optima being bypassed. To achieve this, we may first solve an optimisation problem for an approximate, smoother, version of VaR, which will give us an optimum hopefully close to the VaR optimum.

The 'approximate' version of VaR we typically use is TVaR, although alternatives are possible. Graph 2 shows a 99% TVaR based on the same underlying model as Graph 2. You can see that the functions are similar, but the TVaR graph is much smoother and has only a single minimum, which is close to the global minimum for VaR, giving us a good starting position for the subsequent VaR optimisation.

**Taming VaR: sharp edges**

A minimum will often occur at the join of two or more of the edges in the "stitched together" VaR or TVaR surface. It is hard to see from the apparently smooth TVaR surface, but even here the mathematical surface is made up of facets with tangent discontinuities at the joins. This makes things difficult for nonlinear optimisation algorithms.

Whilst the loss distribution is typically a linear stochastic function, VaR or TVaR is typically a non-linear deterministic function. It is no longer linear due to the percentile selection and it is deterministic since the random variables have been reduced to statistics.

In such cases, Rockafellar [2] has demonstrated a method of optimising TVaR via linear optimisation algorithms, which do not have the problem with the tangent discontinuities in the TVaR surface. Unfortunately, the same approach cannot generally be used with VaR, essentially because VaR (unlike TVaR) is not a convex function, except when we are very close to a VaR minimum - so linear methods can be applied in such positions.

Combining all the above leads us to the following multi-stage approach to VaR optimisation:

Stage 1:Minimise TVaR using linear programming if possible, or otherwise using non-linear programming.

Stage 2:Minimise VaR using non-linear techniques, using the TVaR solution as the starting point. When we diagnose that the non-linear optimiser is "sufficiently close" to a minimum we stop.

Stage 3:Minimise VaR using linear programming if possible, approximating it as a convex function close to the minimum.

This method has been used successfully in otherwise intractable VaR optimisation problems. It does not guarantee finding the absolute mathematical minimum, as no algorithm can for this case, but it gives a good balance of accuracy and performance.

[1] It is important to note that this article is not intended as a recommendation of VaR as a risk measure nor does it consider choice of model, calibration and representation of tail risk. Having said this, VaR is a ubiquitous risk measure in finance today, and the ability to perform strategy optimisation with the aim of minimising VaR - such as the approach described here - is very desirable as part of an organisation's risk management.

[2] Rockafellar R. & Uryasev S. (1999) Optimization of Conditional Value-at-Risk.

*Mark Sinclair-McGarvie is a founding partner at Marriott Sinclair LLP.*