Introduction - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


 

Introduction to the Global Optimization Toolbox

 

Overview of Features

Introduction

Returns Data and Minimum Acceptable Return

Overview of Features

Maple has partnered with Noesis Solutions to develop a new version of the Maple Global Optimization Toolbox that is powered by Optimus® technology, first released with the Global Optimization Toolbox 17.

 

The new global solver offers two solver methods, a differential evolution algorithm and a hybrid algorithm that uses interpolating response surface models, as well as new options to guide the search.  In addition, the updated toolbox is fully compatible with existing code.

 

Highlights of some of the new options available for the two new solver methods:

 

Differential Evolution Algorithm

• 

Average step width  the variation in design variables used as stopping criterion

• 

Population size  the number of designs evaluated during each iteration

• 

Inverse crossover probability  the probability that variables might be the same as predecessors without adjustment

• 

Target weighting factor  applies weighted differences of the variables of the randomly selected designs of the previous generation, allowing you to set the balance between computation speed and probability of success

 

Adaptive Stochastic Search Methods

• 

Theta method  methods for maximizing the predictive quality of the model, maximizing the likelihood of the set of points with respect to the model, and minimizing the semi-norm of the correlation matrix

• 

Number of sigma how much attention is given to the estimated standard deviation when selecting the next points

• 

Nugget  the smoothing factor for the kriging response surface model

• 

Optimum search method — different methods for locating new promising points in the design space

 

The following sample application solves an investment optimization problem in two ways.

Introduction

Traditional investment performance benchmarks, like the Sharpe Ratio, approximate the returns distribution with mean and standard deviation. This, however, assumes the distribution is normal.  Many modern investments vehicles, like hedge funds, display fat tails, and skew and kurtosis in the returns distribution. Hence, they cannot be adequately benchmarked with traditional approaches.

 

One solution, proposed by Shadwick and Keating in 2002 is the Omega Ratio.  This divides the returns distribution into two halves – the area below a target return, and the above a target return. The Omega Ratio is simply the former divided by the latter. A higher value is better.

 

For a set of discrete returns, the Omega Ratio is given by

 

ΩL=EmaxRL,0EmaxLR,0

 

where L is a target return and R is a vector of returns.

 

This application finds the asset weights that maximize the Omega Ratio of a portfolio of ten investments, given their simulated monthly returns and a target return.

 

This is a non-convex problem, and requires global optimizers for a rigorous solution. However, a transformation of the variables (only valid for Omega Ratios of over 1) converts the optimization into a linear program.

 

This application implements both approaches, the former using Maple's Global Optimization Toolbox, and the latter using Maple's linear programming features. For the data set provided in this application, both approaches give comparable results.

Returns Data and Minimum Acceptable Return

restart:

Monthly hedge fund returns

Number of funds

NLinearAlgebraColumnDimensiondata

N:=10

(3.1)

Number of returns for each fund

SLinearAlgebraRowDimensiondata

S:=36

(3.2)

Target Return

L0.1:

Omega Ratio

OmegaRatioprocL&comma;returns&comma;weights local weightedReturns&comma;above&comma;below&comma;N&comma;S&colon;NLinearAlgebraColumnDimensionreturns&colon;SLinearAlgebraRowDimensionreturns&colon; weightedReturnsseqaddreturnsi&comma;jweightsj&comma;j&equals;1..N&comma;i&equals;1..S&colon;belowselectx&rarr;evalbx<L&comma;weightedReturns&colon;aboveselectx&rarr;evalbx&gt;L&comma;weightedReturns&colon; return addaL&comma;ainaboveaddLa&comma;ainbelowend proc&colon;

 

"Strawman" portfolio of equal weights at the target return

OmegaRatioL&comma;data&comma;0.1&comma;0.1&comma;0.1&comma;0.1&comma;0.1&comma;0.1&comma;0.1&comma;0.1&comma;0.1&comma;0.1

4.003192510

(3.3)

Global Optimization

The new Global Optimization Toolbox finds the optimum asset weights easily.

resultsGO:=GlobalOptimizationGlobalSolve&apos;OmegaRatio&apos;L&comma;data&comma;seqwi&comma;i&equals;1..10&comma;addwi&comma;i&equals;1..N&equals;1&comma;seqwi&equals;0..1&comma;i&equals;1..N&comma;maximize&colon;

 

Optimized Omega Ratio

resultsGO1

6.97039644046392137

(3.2.1)

Optimized investment weights

weightsGOresultsGO2

weightsGO:=w1&equals;0.00000276016608452556&comma;w2&equals;0.00000228470381952173&comma;w3&equals;3.9470862256418810-7&comma;w4&equals;0.410741791062930&comma;w5&equals;8.4123635946120610-7&comma;w6&equals;0.234868780012149&comma;w7&equals;0.353335563853041&comma;w8&equals;0.00000174272058245384&comma;w9&equals;0.000176546056103011&comma;w10&equals;0.000869375380069815

(3.2.2)

Linear Program

Finding the optimum asset weights using the linear programming method:

eq1seqadddatai&comma;jwj&comma;j&equals;1..Nui&plus;diLt&equals;0&comma;i&equals;1..S&colon;

eq2addwj&comma;j&equals;1..N&equals;t&colon;

eq3adddiS&comma;i&equals;1..S&equals;1&colon;

objadduiS&comma;i&equals;1..S&colon;

conssequi0&comma;di0&comma;i&equals;1..S&comma;seqwj0&comma;j&equals;1..N&colon;

resultsLPOptimizationLPSolveobj&comma;eq1&comma;eq2&comma;eq3&comma;cons&comma;maximize&comma;assume&equals;nonnegative&colon;


Optimized Omega Ratio

resultsLP1

6.97971754550025

(3.3.1)

Optimized investment weights

assignselecthas&comma;resultsLP2&comma;t

weightsLP:=mapi&rarr;lhsi&equals;rhsit&comma;selecthas&comma;resultsLP2&comma;w

weightsLP:=w1&equals;0.&comma;w2&equals;0.&comma;w3&equals;0.&comma;w4&equals;0.409790222161672&comma;w5&equals;0.&comma;w6&equals;0.219617381328148&comma;w7&equals;0.333211183439266&comma;w8&equals;0.&comma;w9&equals;0.&comma;w10&equals;0.0373812133486924

(3.3.2)