Geneic Algorihm in Muli-Sage Porfolio Opimizaion Syem Abrac Man-Chung CHAN 1, Chi-Cheong WONG 1, Bernard K-S Cheung 2, Gordon Y-N Tang 3 1 Deparmen of Compuing, The Hong Kong Polyechnic Univeriy, Hong Kong 2 GERAD and Ecole Polyechique de Monreal, Canada 3 Dep of Finance and Deciion Science, Hong Kong Bapi Univeriy, Hong Kong e-mail: cccwong@comp.polyu.edu.hk Tel: + (852) 2766 4900 Porfolio opimizaion problem decide he percenage of he overall porfolio value allocaed o each porfolio componen wih pecified rik-reurn characeriic. A muliage ochaic opimizaion manage porfolio in conanly changing financial marke by periodically rebalancing he ae porfolio o achieve reurn maximizaion and/or rik minimizaion. Thi paper preen a deciion-making proce ha incorporae Geneic Algorihm ino muli-age porfolio opimizaion yem. The objecive funcion i o maximize one economic uiliy or end-of-period wealh. The performance of our yem i demonraed by opimizing he allocaion of cah and variou ock in Shenzhen marke of China. Experimen are conduced o compare performance of he porfolio opimized by differen objecive funcion in erm of expeced reurn and andard derivaion. Keyword: Geneic Algorihm, muli-age ochaic opimizaion, ae allocaion 1. Inroducion Financial planning involve ae allocaion and rik managemen. Ae allocaion problem decide he percenage of he overall porfolio value allocaed o each porfolio componen. Rik managemen meaure he rik of differen invemen inrumen and creae or mainain porfolio wih he pecified rik-reurn characeriic. A muli-age ochaic opimizaion i a quaniaive model ha inegrae ae allocaion raegie and aving raegie in a comprehenive fahion. I manage porfolio in conanly changing financial marke by periodically rebalancing he ae porfolio o achieve reurn maximizaion and rik minimizaion. The muli-age opimizaion echnique capure dynamic apec of he problem, leading o opimal porfolio. Opimizaion of ae allocaion i complex and NP-hard. I i non-linear wih many local opima. To olve he ae allocaion problem, one may employ linear programming olver uch a CPLEX and OSL. The nonlinear erm in he objecive funcion can be piecewie linearized (ee [Carino(1995)]). The inerior-poin algorihm are well uied o he cenario rucure of muli-age ochaic program. Searching he global oluion by hee mehod i compuaionally expenive and ineffecively. Since ime i a conrain for financial problem, a rade-off hould be made beween he performance and he compuaional ime. Heuriic mehod provide ome appropriae way o find opimal ae allocaion. Berger ([Berger(1995)], [Berger(1996)]) applied
Tabu Search, an adapive memory programming, o he problem. Their mehod improve compuaional performance by over 200 ime a capered wih inerior-poin mehod for olving he problem. Tabu Search i yemaic and raegic oward he problem. We ue a le problem-dependen heuriic mehod Geneic Algorihm (GA) a our elf-learning porfolio opimizer o opimize one ae allocaion. GA reaure a higher chance of reaching a global opimum by aring wih muliple random earch poin and conidering everal candidae oluion imulaneouly. The unique croover operaor in GA offer he poibiliy of exchanging aribue among poenial oluion. In nex ecion, he muli-age porfolio opimizaion model i decribed. In ecion 3, we menion how GA applie o he porfolio problem. The yem developmen i decribed in ecion 4. The experimenal reul are decribed in ecion 5. Finally, concluion are drawn in ecion 6. 2. Muli-Sage Porfolio Opimizaion Model Single period porfolio opimizaion model poee everal drawback. For example, he rik i inconien over ime. The muli-age ochaic model [Mulvey(1997)] capure dynamic apec of ae allocaion problem. I manage porfolio in conanly changing financial marke by periodically rebalancing he ae porfolio o achieve reurn maximizaion and/or rik minimizaion, leading o opimal porfolio. The ochaic naure incorporae cenario analyi ino he model. Each cenario depic a ingle pah over a muli-age planning period, haring he ame hiory. In our yem, cenario are defined by he change of marke index. For example, we can imply e wo cenario a: (1) he marke index ha been dropped and (2) he marke index ha been raied. Suppoe we have o opimize A ae, wih 1 denoing cah and he oher may repreen any invemen inrumen uch a bond, fund, fuure and ock. Le he enire planning horizon T be divided ino a number of period a = {1,2,3,,T}. Invemen deciion are made a each of he period. Each period may have differen cenario. A graphical cenario ree can be conruced o viualize he opimal dynamic balanced invemen raegy for ae allocaion. Figure 1 depic a cenario ree wih wo cenario and hree ime period.
= 1 = 2 = 1 = 2 = 1 = 2 = 1 = 2 = 1 = 2 = 1 = 2 = 1 = 2 0 1 2 3 Figure 1 A cenario ree wih wo cenario and hree ime period The mahemaical formulaion of he porfolio opimizaion i decribed a follow: Parameer: r i, =1+ ρ i,, where ρ i he reurn percenage of ae i a ime under cenario i, π i probabiliy ha cenario occur, hu π =1 w 0 i he wealh a he beginning of ime 0 w i he wealh a he beginning of ime under cenario v i he amoun of money in ae i a he beginning of ime under cenario before i, rebalancing T i he ime ep conidered in invemen deciion-making Deciion variable: x i he amoun of money allocaed o ae i a ime under cenario afer rebalancing i, p i he amoun of ae i purchaed for rebalancing a ime under cenario i, d i he amoun of ae i old for rebalancing a ime under cenario i, Max Z= π Meaure ubjec o xi, 0 = w0 (1) i x i, = w i vi, ri, 1xi, 1 =, T, =1,,T (2) i A, =1,,T (3)
where 1, 1, i, i 1 x i, vi, + pi, d i, x = v + d p, =1,,T (4) i, i 1 i, =, =1,,T, i 1 (5) x = x for all cenario and wih idenical pa up o ime (6) ' i, Meaure T i performance meaure value under cenario a ime period T. Conrain (1) and (2) ae he iniial oal wealh and he oal wealh under cenario a he beginning of ime period repecively. Conrain (3) ae he wealh accumulaed a he end of -h period under cenario before rebalancing in ae i. Conrain (4) and (5) are he balance conrain for cah and oher ae caegorie repecively. Conrain (6) i he non-anicipaiviy condiion ipulae ha deciion variable are equal o each oher whenever hey hare a common hiorical pa up o ime in he planning horizon {0,1,,T}. The objecive funcion i performance meaure weighed by occurrence probabiliy of cenario. The probabiliy-weighed opimizaion mean ha he opimizaion focue more on he cenario wih higher occurrence probabiliy han hoe wih le occurrence probabiliy. The probabiliy of he occurrence of each cenario can be generaed by hiorical aiic or any forecaing yem. If one favour unbiaed opimizaion, we may aign he ame weigh o all cenario. In hi paper, we adop hiorical aiic o generae he occurrence probabiliy of each cenario. The performance meaure we ue are decribed in he nex ecion. The porfolio managemen proce of our yem i graphically repreened in he figure 2. Inveor' Rik Averion Level Ae Selecion Ae Allocaion Opimizaion Review of Inveor' Objecive Figure 2 Porfolio Managemen Proce Inveor rik averion level and ae eleced are he inpu of our ae allocaion opimizer which opimize he allocaion of he eleced ae o a o maximize economic uiliy or end-of-period wealh. The opimized porfolio compoiion and i performance in erm of i average reurn and variance are diplayed o he uer. Baed on he porfolio performance, he uer may review rik averion level or he eleced ae if neceary.
3. Geneic Algorihm a Ae Allocaion Opimizer 3.1 Geneic Algorihm Approach Geneic algorihm (GA) are earch algorihm inpired by naural evoluion ha mimic operaion in naural geneic o earch he opimal oluion in a oluion pace. Geneic provide he chromoomal repreenaion o encode he oluion pace of he problem. GA are heoreically and empirical proven o provide robu earch in complex pace effecively (ee [Goldberg(1989)]). Their evoluionary procedure baed on he urvival-of-he-fie fahion by gradually manipulaing he poenial problem oluion o obain he more uperior oluion in populaion. GA ar wih a populaion of randomly generaed oluion called chromoome o explore he oluion pace of a problem. Then GA earche he improvemen of oluion hrough a number of ieraion called generaion. The performance of each oluion i evaluaed by a fine funcion, which alway conain he objecive funcion. In each generaion, relaively good oluion have a higher chance o be eleced for reproducion of offpring by geneic operaor croover and muaion. Croover combine maerial from paren o produce heir children. Croover provide preure for improvemen or exploiaion while muaion make mall local change of feaible oluion o provide he variabiliy of he populaion. The reproducion cycle goe on unil he maximum number of ieraion i run or here i no furher improvemen in conecuive generaion. The exploraion of feaible oluion made by random iniializaion depend on he populaion ize. Small populaion ize provide an inufficien ample ize, cauing premaure performance while a large populaion ize require more ime o converge he populaion. Krihnakumar [Krihnakumar(1989)] develop Micro-geneic algorihm (µga) which run wih mall populaion ize o horen he compuaional ime. The key o ucce of µga wih mall populaion ize i in bringing new ring ino populaion by random generaion of new chromoome when no convergence occur for a number of generaion. The "ar and rear" procedure of µga infue new chema. So µga help o avoid premaure convergence and i alway looking for beer ring. Oher varian of GA are ued a well. Firly, fine of each chromoome i caled before elecion proce o regulae he level of compeiion among member of he populaion o ha he exraordinary individual canno ake over a ignifican proporion of he finie populaion in a generaion, leading o geneic imilariy of heir offpring. Furhermore, eliim i ued o preerve he be chromoome in each generaion o a o increae he peed of he earch. The keleon of µga i depiced a follow. 1. Iniialize a mall populaion randomly 2. Evaluae each chromoome. 3. Applying elii elecion, carry he be individual o he nex generaion. 4. Selec chromoome for reproducion. 5. Apply croover and muaion o reproduce he nex generaion. 6. Evaluae he new chromoome. 7. If he erminaion condiion i aified, reurn he be oluion; if no, carry he elie o he nex generaion.
8. If he rehuffling condiion for populaion i reached, randomly generae he remaining individual and hen go o 6; if no, go o 4. The keleon of µga i depiced in he following flow char (figure 3). Figure 3 Flowchar of Micro-Geneic Algorihm The populaion i rehuffled when i ha been converged which can be indicaed by he following condiion: 1. The populaion ha no been improved in pecified conecuive generaion afer la rear procedure
2. The percenage of he oal number of he differen gene in he ame poiion of chromoome i le han a pecified GA parameer -- heerogeneic hrehold. GA i erminaed under eiher of he following condiion: 1. The populaion ha no been improved in pecified conecuive generaion for erminaion 2. The maximum number of generaion ha been paed. Micro-Geneic Algorihm i ued a elf-learning porfolio opimizer o opimize one ae allocaion under differen cenario over differen ime period wihin he planning horizon in erm of performance meaure. 3.2 Chromoomal Repreenaion Our deciion variable are he allocaion of variou eleced ae under differen cenario over he planning horizon. Thee deciion variable are encoded in a chromoome for GA implemenaion. Firly, he cenario ree i repreened equenially ino an array. For example, we index each node of he cenario ree wih wo cenario and hree ime period a follow: 1 2 3 4 5 6 7 Figure 4 A cenario ree wih wo cenario and hree ime period 8 9 10 11 12 13 14 15 The equenial repreenaion of hi cenario ree i: Figure 5 Sequenial repreenaion of cenario ree in figure 4 Each node of he array conain he allocaion proporion of all ae under he correponding cenario. The array can be inerpreed a a chromoome a follow.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 allocaion proporion for cah ae 1 ae 2 ae n-1 ae n Figure 6 A muli-age ae allocaion oluion repreened by a chromoome Each allocaion proporion value are ored a 7 bi in a chromoome, repreening from i 0 o 127. Hence, he oal number of bi in a chromoome i 7 A( S ), where A i he number of ae o be opimized and S i he oal number of cenario in a ime ep. For each cenario a ime, he oal ae allocaion proporion mu be equal o 100%. Hence, each of ae allocaion proporion a under he ame cenario i normalized by a ' i = A a i= 1 i a i where a i i T i=0 i he normalized ae allocaion proporion. 3.3 Fine Funcion a Porfolio Evaluaion Alhough mean-variance model i popular in evaluaing a porfolio, [Dahl(1993)] and [Elon(1995)] ae ha i i decripive of inveor wih a quadraic uiliy funcion which ha unrealiic properie. For example, abolue rik averion increae wih quadraic uiliy funcion. Economic uiliy i a more realiic one in evaluaing a porfolio. The power law uiliy funcion or called von Neumann-Morgenern uiliy funcion [Mulvey(1993)] i ued ince i ha conan relaive rik averion for any value of rik-averion value γ (i.e. he percenage inveed in riky ae remain unchanged a wealh increae). The correponding performance meaure funcion i ln( w ) if γ = 0 γ Meaure = ( w ) elewhere γ The advanage of uing uiliy funcion i ha i can generae invemen deciion for a wide range of rik-bearing aiude: Uiliie wih γ > 1 decribe rik-eeking or hrilleeking behaviour and hoe wih γ <1 decribe rik-avere behaviour. The maller he value of γ, he more eniive o he lo he inveor i. I can be een when γ =1, he uiliy funcion i exacly end-of-period wealh and rik i no aken ino accoun in hi evaluaion. So i i uiable for rik-neural inveor. I i noed ha he opimal growh raegy reul when γ =0. Power uiliy funcion i ued o evaluaing he qualiy of a porfolio. fine funcion i Hence, our
Z = π π ln( w T ( wt ) γ γ ) if γ = 0 elewhere 4. Porfolio Opimizaion Syem A porfolio opimizaion yem i developed according o he model decribed in he previou ecion. Figure 7 i he archiecure of our porfolio opimizaion yem. Financial Daabae Geneic Algorihm Opimizer Porfolio Opimizer Uer Inerface Uer Figure 7 Archiecure of Porfolio Opimizaion Syem Financial daa are ored in Oracle daabae. The daily cloing price of ock, ha of he marke index and he inere rae are colleced for our porfolio opimizaion. Our porfolio opimizaion yem i developed on he inerne environmen. Geneic algorihm parameer and oher porfolio opimizaion parameer can be e by he adminiraive uer on he creen hown in figure 8-10. The end uer can elec heir favourie ae and inpu heir rik averion level on he creen hown in figure 11 where he name of ock for elecion are wrien in Chinee. Once he end uer click he Opimize Ae Allocaion buon, he porfolio opimizaion proce proceed by mean of Geneic Algorihm. The opimizaion reul i hen hown on he creen a figure 12-14. The cenario ree i hown in figure 12. When he node of a cenario i clicked, he creen will diplay he precondiion of he cenario, he expeced reurn and he variance of he precondiion and he opimal ae allocaion under he cenario (ee figure 13). Finally, he average reurn and variance of he opimized porfolio under differen cenario and overall cenario in he raining phae and he eing phae are diplayed a well (ee figure 14). If he opimizaion proce i performed when an ad hoc porfolio opimizaion i requeed, each chromoome evaluae every hiorical even a each ieraion, leading o long opimizaion ime and repone ime o he yem. The end-uer may lack paience o wai for he opimal porfolio found by he opimizer. In order o peed up he opimizaion proce for he inerne environmen, preproceing i neceary for horening he opimizaion o increae he efficiency of he yem. Since here i enormou number of poible ae combinaion for he end uer o elec for ae allocaion opimizaion, i i impoible o opimize all poible ae combinaion beforehand. Inead, he daa required in he opimizaion proce i preproceed from he raw daa and he opimizaion i performed wih hi preproceed daa when an ad hoc demand i requeed.
Figure 8 Uer inerface for eing financial parameer Figure 9 Uer inerface defining cenario Figure 10 Uer inerface for eing GA parameer Figure 11 Uer inerface for eing ae o be opimized and rik averion level
Figure 12 Scenario ree Figure 13 Opimal ae allocaion of a cenario Figure 14 Average reurn and variance under differen cenario and overall cenario Once he financial parameer uch a he number of cenario, he range of each cenario, ime wich, raining period and eing period have been e, he expeced
reurn of each ae, variance of each ae and he covariance beween ae are eimaed baed on he hiorical daa over he raining period and hen ored in he daabae for ad hoc porfolio opimizaion. When an end uer elec hi or her favourie ae, our porfolio opimizer horened i opimizaion ime by evaluaing he candidae porfolio wih hee ummarized preproceed daa, inead of raw daa. In hi way, an opimal porfolio can be obained effecively. 5. Experimen and Reul In order o evaluae he yem, experimen were carried ou. Daily cloing price of Shenzhen Compoie Index and Shenzhen ock were colleced. Eigheen ock hown in figure 11 and cah were eleced o be opimized. The enire planning horizon wa divided ino hree period. Each period la a monh and ha wo cenario: rie and drop. The raining period wa from 1 January, 1994 o 1 December, 1998. The eing period follow unil 31 December, 2000. The parameer of µga are deermined empirically. To find ou he uiable value of a parameer, hi parameer i varied while he oher parameer are fixed. Selec he value ha ha he be average performance in en run. A a reul, he following µga parameer were ued: Populaion ize: 4 Croover rae: 0.2 Muaion rae: 0.01 Maximum number of non-improving generaion for rehuffling: 20 Heerogeneic hrehold: 0.01 Maximum number of non-improving generaion for erminaion: 71 Maximum number of generaion: 10000 (which i ufficien large enough o ha GA i rarely erminaed by hi crierion) The rik averion parameer wa varied o e he performance of he yem in erm of expeced reurn, variance and uiliy value weighed by he probabiliy of occurrence of cenario. The performance of marke index, equal weighed porfolio and GA-opimize porfolio wih variou rik averion parameer in he eing phae are hown in figure 15-17. In comparion of GA-opimized porfolio and equal weighed porfolio, GAopimized porfolio ha a higher expeced reurn and uiliy value for any rik averion parameer. For rik averion parameer 1 and 0, GA-opimized porfolio ha a lower variance value. However, for rik averion parameer 1, i ha a higher value han equal weighed porfolio. Since rik averion parameer of 1 i ued by he rik-neural inveor, he variance meric hould no be conidered in hi cae.
MkInd: Marke Index Eq-Pf: Equal weighed porfolio GA -Pf: GA Opimized porfolio Figure 15: Performance of marke index, equal weighed porfolio and GA-opimized porfolio wih γ =-1 Figure 16: Performance of marke index, equal weighed porfolio and GA-opimized porfolio wih γ =0 Figure 17: Performance of marke index, equal weighed porfolio and GA-opimized porfolio wih γ =1
Compared wih marke index, GA-opimized porfolio ha a higher expeced reurn and uiliy value bu a larger variance. Inveor can elec heir invemen beween hem according o heir aiude oward expeced reurn and rik. 6. Concluion & Dicuion In hi paper, we ue micro-geneic algorihm o opimize a muli-age porfolio. Among marke index, equal weighed porfolio and GA-opimized porfolio, GAopimized porfolio ha he highe expeced reurn and uiliy value for any rik averion parameer. For non-rik neural inveor, GA-opimized porfolio ha a lower variance value han equal weighed porfolio. GA-opimized porfolio ha a larger variance han marke index. I provide an alernaive for inveor. Fuure direcion of he reearch hould inveigae new raegie for improving he performance. Reearch can be focued on developing a hybrid form of algorihm, which combine he good feaure of differen algorihm, ay Geneic Algorihm and Tabu Search. Saving compuaional ime i very imporan. Time can be aved from parallel or diribued proceing.
Reference [Berger(1995)] Berger A.J., Glover F., Mulvey J.M. "Solving Global Opimizaion Problem in Long-Term Financial Planning". Saiic and Operaion Reearch Technical Repor, Princeon Univeriy, January (1995). [Berger(1996)] Berger A., Mulvey, J. "Inegraive Rik Managemen for Individual". Ziemba W., Mulvey J. Worldwide Ae and Liabiliy Managemen. Cambridge Univeriy Pre, Cambrige (1996). [Carino(1995)] Carino D.R., Ziemba W.T. "Formulaion of he Ruell-Yauda Kaai Financial Planning Model," Frank Ruell Company, Tacoma, WA, June (1995). [Dahl(1993)] Dahl Henrik, Meerau Alexander and Zenio Savro A. Some Financial Opimizaion Model: I Rik Managemen. Financial Opimizaion. Savro A. Zenio. Cambridge Univeriy Pre, 1993. [Elon(1995)] Elon Edwin J. Modern Porfolio Theory and Invemen Analyi. New York: Wiley, 1995. [Goldberg(1989)] Goldberg D E. Geneic Algorihm in Search, Opimizaion, and Machine Learning, Addion-Weley, (1989). [Krihnakumar(1989)] Krihnakumar, K. Micro-Geneic Algorihm for Saionary and Non-Saionary Funcion Opimizaion. SPIE Proceeding: Inelligen Conrol and Adapive Syem, pp 289-296, (1989). [Mulvey(1993)] Mulvey J.M. Incorporaing ranacion co in model for ae allocaion. Financial Opimizaion. Savro A. Zenio. Cambridge Univeriy Pre, 1993. [Mulvey(1997)] Mulvey J.M., Roenbaum D.P., Shey Bala. Sraegic Financial rik managemen and operaion reearch. European Journal of Operaional Reearch, pp 1-16 (1997).