You are on page 1of 16

!

" # $ % &' (
) *+ )

),

- .

Using Quadratic Programming in Determine Optimal


investment portfolio: With reference to bank sector in Iraqi
Financial Market
0

1 2 3/ /
0
874.5 *% 4
6
Ahmed H. Battal Alani
College of Administration and Economics / AL-Anbar University

9
34 5

!
7

#
!"

)?

#$

!" #$
" 8 9 2* $ +, - $ . / #$ 0 ' 1 % &
' ( )
2 : ;/ 7: <1
!
= #$ > / &
A # B C 1 D !B E F 1
G
,
-& $ H I ? > solver $ . / # (1 27
!" #$
2
="
= ) = #
" / 5 ) /!" J I 7 :

Abstract
The investment portfolio is a tool composed of at least two assets or
more, and the goal from owning portfolio is to maximize the market value and
achieve the optimum employment for these assets. Selection investment
portfolio is one of the models used in modern financial markets and contained
a large proportion of the risk.
The aim of the this paper is to clarify how can employ Quadratic
Programming as a way to determine the optimal investment portfolio. We
used Excel Solver Spreadsheets to find the optimal portfolio on the actual
historical data of the selected sample from the Iraqi financial market.
#
!
"
Key Words: optimal investment portfolio, Quadratic Programming, Risk and return,
Speared sheet and financial markets

%
"

" )

"

-.

"$

3 "4 "
2

:;
7

&
2

3 4

+ ))

"
*

> "! :" $

)$( # $ %

&

/0, 3 5 '
*

6
$

.
$

*
23

$ > )$ %
*

&

&

7 )

$
4

& '

1)

2< '
"

/0,

8
"

6 =

>$

' 3

'

7" *
2"

*
1

1 "

"

*,"

*'

8"
"

" 4

? !
>4

5'

5'

)$

9"

"

&
0 2

@ $

! <'

! !'

7
5

)* ($ &
"
D

") 5

A "

B$

&

/0, @ ;

5C %

2*

&

@4

! !'

"

G !

*'
6

1 5

@ ;

"

"

&
4

B $

&

$$

* !
E

H0 $
I 1

& , @ ;

.'
2%

& F;

.'
$ $

* '

>

2
"$

4 B $

@ ;

F;

Microsoft Excel

" 3 "'

7
*

23 5 '

($
> 7

2 6$ * &
"$

4 $

* '

* %
$

'

"

"

,
&

30 'C >

))

* "

0", " B $ $ 2+

"6

<

4
2+

:;'

<

'
$

(3

$
3

5(
J L

5 '

<'7 3
3

,
23 5 '

*"

Markowitz , 7$
6

major mix
"

"$
!

:" $

H8

8
:5

A0

!=
M

$, 8
.'

1)

(Markowitz,1952, pp77-91)

* H8

" 8
2

)
0, .'

))

!
&

optimum portfolio

5' J ' :

> , 1)

- . +

1" 5 9 "

"$ * "

,4

>

5)

G A

3 7

-0

, +

"

<

5(

F 5!

'
29

-"

$
,4

5'

"

"L @ ;

$8

, &. ' ?

& , 1)

5$

."'

' 5 $
4

6.

' 5 $ - $, :
4 : $

D(Robert, 2004, P 110) ,


3"

'

&
2

0",

& '

))

3 8

AK

) > !)

* )

2 $8
&

9)

))

!)

3 5' E

2:
"5 ( ,

$?

* ) *

?
D+

>"

"

6 /0,

Rational Investor 7
23 5 '

)"7

>

5 ? ;

<

6 E

!$ / 4

Speculator investor ? ;

6 E?
23 5 '

# "7

>)) A0 # 7

>))

$
$

A0

6
>$

"

5;

$"

A0 # 7

$
>))

A0

>

" $
!

< $
3 5'

!$ / 4 >

3 5'

>

> 4 3 5'

-0
$

> >))
$

0,

A0 # 7

$ $ /4

5 $ /4
4
*

$
& $!

5; 3 8 3 5 '
A

/ 4 /.

" ; )

? ;

$
)

"6

$ $ /4

6
6

8 A0 ? ;
6

9 $

trade off risk 3 5 "'

4
1

2 8
!"$ / "4 >"

6
6

>))

$?

$ ))

2! $ >
$

1)

0,

3 5'
@N $

return
O

1)

!$ / 4 >

> P
8

>

J '$" 3 " 8 3 !" 3 5 '

3Q

F! ? ;
6

3 4

,4 >

- / +
Efficient frontier A
3 5'

3@ "

"$ $

3 5'

3@ "
"

$ $ &

<

A
"

$ $

4
" :")

* !
4

( 3@

7 A

4 &
7

3@

$ $

.$

"

+ (

3 5'

23 5 '

.$
$

$
O

4 A

A0

2( Frank and Keith, 2002, p 228 ) 6


"

3@

01

L$

:)

" $
"

3@
O

"

2+
".

"

7
6

@N 84

3@

, A

@N 84
5

3@

$ -0

3@

4 01
A

3@

$ $ + (

( Frank and Keith, 2002, p 239 ) D


A

" :" (

3 5 "'

5'

" :" (

+ (

,6

4$ .
4$

$
2+

5 "$
/0", "

"

A0
3@ "

$ $
4

3 5'
A

@84

6
$

$
+ 5

"6

"

F !9
"

(Robert and Daniel,


DA

3@

3 5'

Indifferences curve @

6
$ $

$ $

+ (

5 ' .'
7

3 5'

1995,pp160-162)

01

4 01
A

3@

$ $

+ (

(Frank and Keith, 2002, p230)


"

5 "$

"

"$ $

(U1',U2',U3')

3@ "
/0,

"$ $ : @

3 5'

"$ $

$ $

?$4
8

"

7 3 5'

/4 9

3 5'

A0

3@
*

"
0,

$ $

tangency 9

X 5)$
"

Y 5)$

4$

X "5)$

"$ A

$ A

3@

$ $
$

2
A

.$ + (

(U1,U2,U3)
$

? ;
!

3 5'

5)$ .'
+

<

3@

A $ (

$ $ U2 @

$ $ : U2' @
2X

$ 9
3 5'

$ $ 9

$ $

$ > $

$ > $ *
6

5*

A= @

/ 4$ ? ;

"

&

H0 " $ ",
2+

<

> 7

H0 $

'

( 5'

H0 $ , 5'

+ <

4
G H0 $ ( 5'

G 4

1 5

( + 5'

G ,.

'

&,
4

(Frederick and Gerad, 2001, p 683.)

H0 $ G !
D = *

Max f(X) = C X - 1/2X QX


S. to
AX K b ,
XL .
D
1 (Robert J., 2002, p 400)
Min f(X) = CTX + 1/2XTQX
S. to
AX L b ,
XL0.

H0 $

D M%
)
&

5
H0 $ * '

4 Q C
!

) *

67 " -

M (Markowitz, 1959)

(Dietmar, $

Markowitz

H0 $ 0, $

'

4
D2005, p: 7 )

& !

4 *

$ E

2& 7
@ 7

3 5 "'
O

A 4
6

1)

"

"

"

# $

3 5'

"$

"6

,
-

"

)
(

$;

H0 $

&

EH

:;
-0

(Mokhtar and etil, 2006, pp22-24) 6


.'

3 5'

0( * = 6

E?
4

4
!

' $

2
+*

9) 8

H0 $

3 5'

23 5 '
;

covariance - 7

*'
$ /4

.' +

5 . (

# $ *

>

:8

* ) A : $

.'

2+ <

3 5'

/0,
$4

(Bernard, * "

3 5'

$ H0 $

&

L!
D

Min S = X 12 S 12 + X 22 S 22 ... + X n2 S n2

-0

2007, p465)

x i x j rij s i s j
i j

2j

D M%

i *

)$
2i*

2j

i *

2j
9)

'

@84

9)

rij
&

&

Si,Sj

L!

" %."

(Chincarini and Kim, 2006, pp256-266)

S2i

@84

i*

$ XjXi

.$

H0 $

2- 7
D ,

L ! 0'

>) )

?G

A0

ri xi + r2 x2 + ........ + rn xn rm

D M%

2i*

A $

2i*

? G

A $

L! 1

>

ri

)$

$ xi

rm
5 7

X 1 + X 2 + ...... X n = 1.0

8
*,
" 4

9 !

. 1

"
, 8

(3"

"8

+*

* '

1 "

9"

23 5 '
E

!
*'

? "

.'

& !"

/0",

@ ;

. 1
*

3 "

9
5

2+ <

,& !

$4

@ ;

< '7

'

+S(

4
+ (

& !

4
E

(3

& !
)

0,

1
$

"L & !
"$

67 " !

&

2+

& !"

0 2

" & !

A "4

5 7D %

xi 0

'

' *
H0 $ 1 5 +

.'

. 1

& ! ( ,& !
?

+ S(

(3

.'

. 1

& !

D "

+ (

$ (

M2N

O2P

Q2P

Q2QN

QRRO

N2P

M2S

Q2TN

U2RN

QRRT

P2Q

QN2V

S2VN

Q2N

QRRP

P2V

R2T

V2P

QRRR

T2V

P2R

V2NN

VUUU

S2R

V2PN

S2R

V2Q

VUUQ

V.35

V2RN

VUUV

N2T

S2TN

M2RN

V2PN

VUUS

N2R

QO2S

QU2TNU

QN2TN

VUUM

VU2U

O2M

S2R

S2RN

VUUN

5 "
7
http://www.isx-iq.net
3
6
) 5

? "

I 1

(3

.' *

3 7$ D !
?

D(Frank R. and Keith, P: 7)


;4

+
+

E
$ (+

A 4 & !

5* -.

(3
E

.'
(3

." 5* -.

& !
.'

& !

L & !

& !

+ (*
$

+ (*

& !

4
$

U2VR

U2STE

U2USE

U2QTE

QRRT

U2MU

V2NS

U2PO

U2NP

QRRP

U2UQ

U2SOE

U2PN

U2PT

QRRR

U2QVE

U2VPE

U2MP

U2URE

VUUU

U2MOE

U2NRE

U2NOE

U2QPE

VUUQ

U2US

U2QPE

U2VME

U2UNE

VUUV

U2MS

U2OU

U2OP

U2MS

VUUS

U2UM

S2SN

Q2QT

M2NS

VUUM

V2SR

U2OQE

U2OME

U2TNE

VUUN

."' "

"

H0 $ 1 5

O '

MD !

0, +

E
2

L!

(3
B $

.'
&

. "

!"

- 7"

"

2+
+

(3

(3

.'

.'

& !

& !

U2SS

U2MN

U2VR

U2NT

U2OU

Q2RQ

U2MU

V2QO

xi & !
ri 5
si

%
6

- 7

+ (

MD !

C,D
(3 , 4)

B,D
(2 , 4)

B,C
(2 , 3)

A,D
(1 , 4)

A,C
(1, 3)

A,B
(1,2)

0.62

0.98

0.18

0.72

0.13

0.64

A 4 & !

& !

L & !

1.00
-0.33
-0.50
-0.67

-0.33
1.00
0.67
0.77

cov (ij) - 7

! + (

& !

-0.50
0.67
1.00
0.82

rij

"

-0.67
0.77
0.82
1.00

MinZ = S =

H0 $
7 H0 $

G !

MD !

67 " < / +

(Jackson and Staunton, 1999 pp.1256-1266) Excel


H0 $ 1

MD !
4

+ j i( *

%
& !

+ (

, & !
D

+(

$ (

& !

& !

+
A 4 & !

+ ( + ( + (

"

B $

&

(Peter and Stephen,1994, pp 58-66)

4 B6 $

X 12 (0.6) + X 22 (1.91) + X 32 (0.4) + X 42 ( 2.16)


+ X 1 X 2 (0.62)(0.33)1 2 (0.45)1 2 + X 1 X 3 (0.98)(0.62)1 2 (0.29)1 2
+ X 1 X 4 (0.18)(0.33)1 2 (0.57 )1 2 + X 2 X 3 (0.72)(0.45)1 2 (0.29)1 2
+ X 2 X 4 (0.13)(045)1 2 (0.45)1 2 + X 3 X 4 (0.64)(0.29)1 2 (0.57 )1 2

data analysis

!' * '

- 7

) *

+ X 2 X 1 (0.62)(0.45)1 2 (0.33)1 2 + X 3 X 1 (0.98)(0.29)1 2 (0.33)1 2


2 (Vijay, 2002) - 0

$ Microsoft Excel

B $

+ X 4 X 1 (0.18)(0.57 )1 2 (0.33)1 2 + X 3 X 2 (0.72)(0.29)1 2 (0.45)1 2


+ X 4 X 2 (0.13)(0.57 )1 2 (0.45)1 2 + X 4 X 3 (0.64)(0.57 )1 2 (0.29)1 2
9

Subject to

0.33 X 1 + 0.45 X 2 + 0.29 X 3 + 0.57 X 4 0.4


X 1 + X 2 + X 3 + X 4 = 1.00
""

Xi 0

""

"

"$

"

L !" /0",

"

*
"6

; *

* .

# "4

"

.'

E6:E9

L ! /0,
2*"

H0 $ G ! F; + (
>$

.$

B20

"

"

+xi ( &
, H0 $

&

<

H 8=
'

*
; -0

- 7

67 "

H0 $
D

10

=SUMPRODUCT(B6:B9;E6:E9)

"
$

L! 5 7

H0 $ G ! + (
+

'

2B19

Solver 3
7

! $ Solver

*
'

,.

solver 30 $ + (
D

7 7 ! $ solver 8

H0 $
& !"

*"

" >

"

& !

"
*"

"

? G

&

B6 $ + (

1)

4$ H0 $ B6 $
,

& !

:5

"

" A "
1

&
$

0, 0.153 /

: *4 $ 0,

,
2

11

L & !
2

)$

* )

T
6

)
T
A !

A 4
>

7A &

& !

$)

1)

.$

3 5'
)

$
$

$
$ %

A "

& " $ T
2T

T E

5
)

8 #8

$;

- $,

+
"4$ + <

( B$

? ; ?

"$ +3 5 ' (

.
2

) T

3 8
&

$(

AK T

0.475 F ! &

B6 $ + (

3 8

3 8

Microsoft Excel 10.0 Sensitivity Report


Adjustable Cells
Cell

Final
Value

Name

Reduced
Gradient

$E$6
$E$7
$E$8

X1= prop
X2= prop
X3= prop

0.6227
0.0000
0.0813

0.0000
0.2261
0.0000

$E$9

X4= prop

0.2961

0.0000

Constraints
Cell

Final
Value

Name

$B$21

tot prop inves Altacam

$B$19

tot port ret Altacam

Lagrange
Multiplier
1

-0.025046003

0.4

0.830806816

4 ' D !

solver
F; J L
0

+
4

( 5'

3 5'

H0 $ &

3 8

O $ ? G

.$

2- 0 F; + (
B6 $

? G

6
1)

0.119
0.119
0.124
0.153
0.288
0.775

:
6
0.318
0.318
0.350
0.400
0.450
0.500

+ (

?4 ? G

J " '$ :" J '$


+3 5 "' (

"

" T
2&!$ 3

"

3@ "

"$ $

0",

$ $
+

( 3 5'

4$ T
$

T
6

6
L

3 8 $ >$ 4$ $$

T
5'

12

+ (
>$

: :
6

MD !

$
!

" ? "G

& ;
+ (

3 5'

" T

? G
6
0.25
0.30
0.35
0.40
0.45
0.50

-0

%
( T

3 8 $

4$
6

J'
+6
& ;

.
.

A0

H0 $

"

@84
"

"

*G "

)
:

6 9
: 3 5'

!
$ $

0,

@84

$ $

/ 4$ ? ;

3 5'

0.600

0.500

0.400

(5,

0.300

0.200

0.100

0.000
0

0.1

0.2

0.3

0.4

0.5

:% ;

0.6

0.7

0.8

0.9

<2

H0 $ A

3@

$ $ + (

"
" J "L
H8"
"

5 '

3 "

"

* " H8

3 5'

0, .'

2
$

2
!

!
*

))

,
6

major mix

8
*

D
.'

))

3 8

) > !)

2 $83
9 ")

))

!)

2:
-$
",
"$

3 5'

>

Efficient frontier A
3 5'

23 5 '

)7

"

3@ "

3 5'
A

0,
A0

$ $ 9

- $,

.'

$ $ ?

13

3 5'
@$ *

4
@

$8

6
2

&

A0

$
3 5'

" 8

"

, ;

1 5

B $

&,

"

"

"4 $
"

"

"4

. 1

H0 $ * '

"

1 "

"

"$

"4 B "$
T

& !"
6

&

" T

1)

.$
"$

"$

H0 $

3 8
"

B$

A
2

& !

$)
&

? ; ?

23 5 '

&

$
4

3 8
$

H0 $ B6 $
& !

2
*

7A &

$ +3 5 ' (

) T

Microsoft Excel

A 4
T

? G

0, 0.153 /

1)

2T
6

H0 $ 1 5 * 2

>

" A

& !

L & !

$ 2

4$
,

:5

A !
4

* )
"

*
4

>

3 5'

&

2
" >

& !

>$ $ 4
2

2
*

2? G
*"

AK T
6

5'

14

3 5'

H0 $

0.475 F ! &
. - $,

,
)
3 8
*

1
>

>?@ A @
> .@ ? 5@
Z
[
(
? @ X> Y"
WQ
= # > ]" J ^
5 : > ' Z1 # " \ B
C B *
B4
' Z . ) ) ] ` ( : -C > * :a J ! b % 1X
= " _ `?
2" ^5 e G ? VUUS " !d cQMcQV
9 :
a
D
E
6 !
&6 E
: E
?9 # 9
WV
2VUUV f !
)# g
) ] h? Z
) ^5
!
) @ "
!" 5D #$ F G3@@ * >?@@
> @ " * H@@
E
i 5 W S
M 2VUUO
2VUUU 9 :
& "
"G *
), A j
8 i
W M
2VUUN 9 : ^5 -l "
"" *
I4
!k 9 < " WN
7 : " ^5 G
)?
@
. / # ? !" #$ m>
" n ^? % # W O
t?
7 : " o s
#o J
) p '> q ?d r
I D$ h %
:http://www.kantakji.org/fiqh/Files/Finance/223.doc\ 1$
1* @ K @0
@
@!
@
LM @ 0 H/* N # O1 2 3/ / O 0 BJ
ORSST O 3@@
G3@@ O Q 4 @ O @
- @
@ 6 @ O:H3@@6 < @ 0* P
ZVJYXVQWU
O4 @] O^= @_, * `@ P 4 OR L O[4 .@ 5
@ P H
O
\
O $ P BY
ZRSSa
^5 -l "
@
F @" ! * [ @ G @;b F
@
% 4'
Z W R
2VUUM 9 :
t?
7:
) D^ 7 : >
= " _ = ) = & ! 5& ^5 WQU
http://www.isx-iq.net \ 1$
c P0b ] (8
0_
1-Bernard W. T.,2007, Introduction to Management Science, 9th
ed., Prentice Hall, New Jersey.
2-Chincarini, Ludwig B and Kim, Daehwan ,2006, Quantitative
Equity Portfolio Management, McGraw-Hill ,New York.
3-Dietmar Maringer, 2005, Portfolio Management with Heuristic
Optimization, Springer.

15

4-Frank R. and Keith C., 2002, Investment analysis and


Portfolio Management, South Western.
5-Frederick S. H. and Gerad T. J., 2001, Introduction to
Operations Research. 7th ed., McGraw-Hill, New York.
6-M. Jackson; M. D. Staunton, 1999, Quadratic Programming
Applications in Finance Using Excel, The Journal of the
Operational Research Society Vol. 50, No. 12. 1256-12662
7-Markowitz Harry, 1952, Portfolio Selection, Journal of finance,
Vol. 7, No.1, pp77-91.
8-Markowitz, Harry,
1959, Portfolio selection :Efficient
Diversification of Investment, Cowels Foundation Monograph #
16 , John Wiley & Sons, New York.
9-Mokhtar S. Bazaraa, Hanif D. Sherali and C. M. Shetty ,2006,
Nonlinear Programming :Theory and Algorithms, John Wiley
& Sons, New Jerse10-Peter B. and Stephen L, 1994,
Computing Markowitz
Efficient Frontiers Using a Spreadsheet Optimizer, Journal of
Property Finance, Vol. N, No. Q, pp 58-66.
11-Robert J., 2002, Linear Programming: Foundation and
Extension, Springer .
12-Robert
L.
Hagin,
2004,
Management,
Portfolio
Diversification Risk, and Timing fact and fiction, John Wiley &
Sons, New Jersey.
13-Robert S. Pindyck, and Daniel L. Rubinfelid, 1995,
Microeconomics, 3rd ed., Prentice-Hill.
14-Vijay Gapta, 2002, Statistical Analysis Using Excel, VB
Books , Canada .

16

You might also like