## Constrained Optimization

CO is an applications module written in the GAUSS programming language. It solves the Nonlinear Programming problem, subject to general constraints on the parameters – linear or nonlinear, equality or inequality, using the Sequential Quadratic Programming method in combination with several descent methods selectable by the user – Newton-Raphson, quasi-Newton (BFGS and DFP), and scaled quasi-Newton. There are also several selectable line search methods. A Trust Region method is also available which prevents saddle point solutions. Gradients can be user-provided or numerically calculated.

CO is fast and can handle large, time-consuming problems because it takes advantage of the speed and number-crunching capabilities of GAUSS. It is thus ideal for large scale Monte Carlo or bootstrap simulations.

**Example**

A Markowitz mean/variance portfolio allocation analysis on a thousand or more securities would be an example of a large scale problem CO could handle.

CO also contains a special technique for semi-definite problems, and thus it will solve the Markowitz portfolio allocation problem for a thousand stocks even when the covariance matrix is computed on fewer observations than there are securities.

Because CO handles general nonlinear functions and constraints, it can solve a more general problem than the Markowitz problem. The efficient frontier is essentially a quadratic programming problem where the Markowitz Mean/Variance portfolio allocation model is solved for a range of expected portfolio returns which are then plotted against the portfolio risk measured as the standard deviation:

where *l* is a conformable vector of ones, and where is the observed covariance matrix of the returns of a portfolio of securities, and µ are their observed means.

This model is solved for

and the efficient frontier is the plot of on the vertical axis against

on the horizontal axis. The portfolio weights in describe the optimum distribution of portfolio resources across the securities given the amount of risk to return one considers reasonable.

Because of CO’s ability to handle nonlinear constraints, more elaborate models may be considered. For example, this model frequently concentrates the allocation into a minority of the securities. To spread out the allocation one could solve the problem subject to a maximum variance for the weights, i.e., subject to

where is a constant setting a ceiling on the sums of squares of the weights.

This data was taken from from Harry S. Marmer and F.K. Louis Ng, “Mean-Semivariance Analysis of Option-Based Strategies: A Total Asset Mix Perspective”, Financial Analysts Journal, May-June 1993.

An unconstrained analysis produced the results below:

It can be observed that the optimal portfolio weights are highly concentrated in T-bills.

Now let us constrain w´w to be less than, say, .8. We then get:

The constraint does indeed spread out the weights across the categories, in particular stocks seem to receive more emphasis.

**Efficient portfolio for these analyses**

We see there that the constrained portfolio is riskier everywhere than the unconstrained portfolio given a particular portfolio return.

In summary, COMT is well-suited for a variety of financial applications from the ordinary to the highly sophisticated, and the speed of GAUSS makes large and time-consuming problems feasible.

COMT is an advanced GAUSS Application and comes as GAUSS source code.

GAUSS Applications are modules written in GAUSS for performing specific modeling and analysis tasks. They are designed to minimize or eliminate the need for user programming while maintaining flexibility for non-standard problems.

**Platform:** Windows, Mac, and Linux.

**Requirements:** GAUSS/GAUSS Light version 10 or higher.