Initializing help system before first use

# Example problem

An investor wishes to invest a certain amount of money. He is evaluating ten different securities (`shares') for his investment. He estimates the return on investment for a period of one year. The following table gives for each share its country of origin, the risk category (R: high risk, N: low risk) and the expected return on investment (ROI). The investor specifies certain constraints. To spread the risk he wishes to invest at most 30% of the capital into any share. He further wishes to invest at least half of his capital in North-American shares and at most a third in high-risk shares. How should the capital be divided among the shares to obtain the highest expected return on investment?

Table 3.1: List of shares with countries of origin and estimated return on investment
Number | Description | Origin | Risk | ROI
--- | --- | --- | --- | ---
1 | treasury | Canada | N | 5
2 | hardware | USA | R | 17
3 | theater | USA | R | 26
4 | telecom | USA | R | 12
5 | brewery | UK | N | 8
6 | highways | France | N | 9
7 | cars | Germany | N | 7
8 | bank | Luxemburg | N | 6
9 | software | India | R | 31
10 | electronics | Japan | R | 21

To construct a mathematical model, we first identify the decisions that need to be taken to obtain a solution: in the present case we wish to know how much of every share to take into the portfolio. We therefore define decision variables fracs that denote the fraction of the capital invested in share s. That means, these variables will take fractional values between 0 and 1 (where 1 corresponds to 100% of the total capital). Indeed, every variable is bounded by the maximum amount the investor wishes to spend per share: at most 30% of the capital may be invested into every share. The following constraint establishes these bounds on the variables fracs (read: `for all s in SHARES ...').

∀ s ∈ SHARES: 0 ≤ fracs ≤ 0.3

In the mathematical formulation, we write SHARES for the set of shares that the investor may wish to invest in and RETs the expected ROI per share s. NA denotes the subset of the shares that are of North-American origin and RISK the set of high-risk values.

The investor wishes to spend all his capital, that is, the fractions spent on the different shares must add up to 100%. This fact is expressed by the following equality constraint:

∑s ∈ SHARES fracs = 1

We now also need to express the two constraints that the investor has specified: At most one third of the values may be high-risk values—i.e., the sum invested into this category of shares must not exceed 1/3 of the total capital:

∑s ∈ RISK fracs ≤ 1/3

The investor also insists on spending at least 50% on North-American shares:

∑s ∈ NA fracs ≥ 0.5

These two constraints are inequality constraints.

The investor's objective is to maximize the return on investment of all shares, in other terms, to maximize the following sum:

∑s ∈ SHARES RETs·fracs

This is the objective function of our mathematical model.

After collecting the different parts, we obtain the following complete mathematical model formulation:

maximize ∑s ∈ SHARES RETs·fracs
∑s ∈ RISK fracs ≤ 1/3
∑s ∈ NA fracs ≥ 0.5
∑s ∈ SHARES fracs = 1
∀ s ∈ SHARES: 0 ≤ fracs ≤ 0.3

In the next chapter we shall see how this mathemetical model is transformed into a Mosel model that is then solved with Xpress Optimizer. Chapter Mixed Integer Programming discusses how to input this model directly into the Optimizer without modeling support.

Parent Topic Building models

© 2001-2026 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.