GENETIC ALGORITHMS AND GENETIC PROGRAMMING IN COMPUTATIONAL FINANCE GENETIC ALGORITHMS AND GENETIC PROGRAMMING IN COMPUTATIONAL FINANCE Edited by SHU-HENG CHEN Department of Economics National Chengchi University Springer Science+Business Media, LLC Library of Congress Cataloging-in-Publication Data Genetic algorithms and genetic programming in computational finance/edited by Shu-Heng Chen. p.cm. "Ten chapters...are based on a selection of papers presented at the 6th International Conference of the Society for Computational Economics on Computing in Economics and Finance, which was held at Universität Pompeu Fabra, Barcelona, Catalonia, Spain on July 6-8, 2000"--Pref. Includes bibliographical references and index. ISBN 978-1-4613-5262-4 ISBN 978-1-4615-0835-9 (eBook) DOI 10.1007/978-1-4615-0835-9 1. Finance—Mathematical models. 2. Genetic algorithms. 3. Genetic programming (Computer science) 4. Stocks-Prices-Mathematical models. I. Chen, Shu-Heng, 1959- II. International Conference of the Society for Computational Economics on Computing in Economics and Finance (6th:2000 : Universität Pompeu Fabra) HG106.G464 2002 332' .01 '5118-dc21 2002070058 Copyright ® 2002 by Springer Science+Business Media New York Originally published by Kluwer Academic Publishers in 2002 Softcover reprint of the hardcover 1st edition 2002 All rights reserved. No part of this work may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, microfilming, recording, or otherwise, without written permission from the Publisher, with the exception of any material supplied specifically for the purpose of being entered and executed on a computer system, for exclusive use by the purchaser of the work. Permissions for books published in Europe: [email protected] Permissions for books published in the United States of America: [email protected] Printed on acid-free paper. Contents List of Figures ix List of Tables xv Preface xix 1 An Overview 1 Shu-Heng Chen Part I Introduction 2 Genetic Algorithms in Economics and Finance 29 Adrian E. Drake and Robert E. Marks 3 Genetic Programming: A TUtorial 55 Shu-Heng Chen, Tzu-Wen Kuo, and Yuh-Pyng Shieh Part II Forecasting 4 GP and the Predictive Power of Internet Message Traffic 81 James D. Thomas and Katia Sycara 5 Genetic Programming of Polynomial Models for Financial Forecasting 103 Nikolay Y. Nikolaev and Hitoshi Iba 6 NXCS: Hybrid Approach to Stock Indexes Forecasting 125 Giuliano Armano, Michele Marchesi, and Andrea Murru VI GA AND GP IN COMPUTATIONAL FINANCE Part III Trading 7 EDDIE for Financial Forecasting 161 Edward P. K. Tsang and Jim Li 8 Forecasting Market Indices Using Evolutionary Automatic 175 Programming Michael O'Neill, Anthony Brabazon, and Conor Ryan 9 Genetic Fuzzy Expert Trading System for NASDAQ Stock Market 197 Timing Sze Sing Lam, Kai Pui Lam, and Hoi Shing Ng Part IV Miscellaneous Applications Domains 10 Portfolio Selection and Management 221 Juan G. L. Lazo, Marco A. C. Pacheco, and Marley M. R. Vellasco 11 Intelligent Cash Flow: Planning and Optimization Using GA 239 M. A. C. Pacheco, M. M. R. Vellasco, M. F. de Noronha, and C. H. P. Lopes 12 The Self-Evolving Logic of Financial Claim Prices 249 Thomas H. Noe and Jun Wang 13 Using GP to Predict Exchange Rate Volatility 263 Christopher J. Neely and Paul A. Weller 14 EDDIE for Stock Index Options and Futures Arbitrage 281 Sheri Markose, Edward Tsang, and Hakan Er Part V Agent-Based Computational Finance 15 A Model of Boundedly Rational Consumer Choice 311 Thomas Riechmann 16 Price Discovery in Agent-Based Computational Modeling of the 335 Artificial Stock Market Shu-Heng Chen and Chung-Chih Liao Contents Vll 17 Individual Rationality as a Partial Impediment to Market Efficiency 357 Shu-Heng Chen, Chung-Ching Tai, and Bin-Tzong Chie 18 A Numerical Study on the Evolution of Portfolio Rules 379 Guido Caldarelli, Marina Piccioni, and Emanuela Sciubba 19 Adaptive Portfolio Managers in Stock Markets 397 K wok Yip Szeto 20 Learning and Convergence to Pareto Optimality 421 Chris R. Birchenhall and Jie-Shin Lin Part VI Retrospect and Prospect 21 The New Evolutionary Computational Paradigm 443 Sheri M. Markose Index 485 List of Figures 2.1 Roulette Wheel Selection: A Larger Segment Im- plies Larger Fitness 36 2.2 Crossover Diagram 37 2.3 Mutation Diagram 38 2.4 Visualization of Schemata as Hyperplanes in 3-di- mensional Space 40 2.5 The Simple Moving Average of the U.S.$/ DM Ex- change Rate 46 2.6 The Double Moving Average of the U.S.$/ DM Ex- change Rate 46 3.1 The Control Panel of Simple GP 57 3.2 Comparison between Uniform Selection and Propor- tionate Selection in Ng 59 3.3 Comparison between Tournament Selection and Pro- portionate Selection in SSE 60 3.4 Effect of the Number of Elites on Ng and SSE 61 3.5 Effects of the Population Size and the Number of Generations on SSE 63 3.6 An Illustration of the Diminishing Marginal Pro- ductivity of Search Intensity 64 3.7 The Effect of the Pop-Gen Combination on GP Per- formance 67 3.8 The Effect of the Algorithmic Complexity on the Discovery Probability 67 3.9 The Effect of the Terminal Sets on the Discovery Probability 69 3.10 Consequences of Including Irrelevant Terminals 70 3.11 Distribution between Riskless and Risky Genetic Operators 72 x GA AND GP IN COMPUTATIONAL FINANCE 3.12 The Effect of Risky Genetic Operator on GP Per- formance 73 4.1 Results of GP Trading Strategy Learner 92 4.2 Message Volume vs. Lagged Trading Volume and Returns as a Predictor Variable 94 4.3 Event Approach vs. Moving Average Approach 96 4.4 Results of Standard Approach on Holdout Test Data Set 97 4.5 "Reversed Polarity" Algorithm on Test Set and Hold- out Set 100 5.1 Tree-like Polynomial in the Enhanced STROGANOFF 107 5.2 Original (Normalized) Financial Series 111 5.3 Corresponding Sections from the Integral and Orig- inal Series 111 5.4 Differential Financial Series 112 5.5 Corresponding Sections from the Rational and Dif- ferential Series 113 5.6 Interpolation by the Best (Original) Polynomial from STROGANOFF 114 5.7 Extrapolation by the Best (Original) Polynomial from STROGANOFF 115 5.8 Interpolation by the Best (Integral) Polynomial from STROGANOFF 116 5.9 Extrapolation by the Best (Integral) Polynomial from STROGANOFF 117 5.10 Interpolation by the Best (Differential) Polynomial from STROGANOFF 117 5.11 Extrapolation by the Best (Differential) Polynomial from STROGANOFF 118 5.12 Interpolation by the Best (Rational) Polynomial from STROGANOFF 119 5.13 Extrapolation by the Best (Rational) Polynomial from STROGANOFF 120 6.1 Identifying a Regime and Forming the Match Set 139 6.2 A Feedforward ANN for Stock Market Forecasting 143 6.3 Overall System Architecture 145 6.4 Economic Results on the COMIT Index 149 6.5 Economic Results on the S&P500 Index 149 6.6 Economic Results on the NASDAQ Index 151 List of Figures Xl 6.A.1 The XCS Basic Scheme 152 7.1 Dow Jones Industrial Average (DJIA) Index Daily Closing Prices from 07/04/1969 to 09/04/1980 169 7.2 Visualization of the Effect of the Constraint ~ on the Mean Performances of FGP-2 171 8.1 A Comparison between the Grammatical Evolution System and a Biological Genetic System 181 8.2 A Plot of the FTSE 100 over the Data Sets 186 8.3 A Plot of the DAX over the Data Sets 187 8.4 A Plot of the Nikkei over the Data Sets 188 9.1 Selection of Fuzzy Trading Rules Using GA 203 9.2 Defining Fuzzy System with Fuzzy Logic Toolbox 204 9.3 Closing Price of Microsoft, Oracle, CISCO, IBM, and Starbucks 205 9.4 Buy /Sell CISCO Stock Using Simple GFETS 207 9.5 Incremental Training Approach for m-day Training and n-day Testing 209 9.6 Time Frame of Incremental Training Approach from the 1st to 3rd m-day Training and n-day Testing 209 9.7 Buy/Sell CISCO Stock Using GFETS under (60,30) Incremental Training 212 9.8 Dynamic Training Approach 213 9.9 Time Frame of Dynamic Training Approach 213 9.10 Buy /Sell CISCO Stock Using GFETS under Dy- namic Training 215 10.1 Chromosome for Asset Selection 224 10.2 Comparison between the Performance of the Port- folio Managed by GA and the Market Portfolio (BOVESPA) 226 10.3 Real Data vs. Weekly Predictions 1 Step Ahead 230 10.4 Chromosome 231 10.5 Comparison between the Performance of the Port- folio that Maximizes the Return and the Market Portfolio 234 10.6 Comparison between the Performance of the Port- folio that Minimizes the Risk for a Given Return of More than 95% and the Market Portfolio 234 10.7 Comparison between the Predicted VaR for the Port- folio and the Value of the Portfolio at the End of the Management Period 235 xii GA AND GP IN COMPUTATIONAL FINANCE 11.1 Chromosome Representation (a) First Model (b) Po- sitional Rigidity Relaxing Model for Epistatic Pro- blems 242 11.2 A Table of a Cash Flow Suggested by the ICF 245 11.3 ICF Performance Graph of the Cash Flow Example 246 12.1 Black-Sholes Option Pricing Formula in Tree Rep- resentation 253 12.2 Crossover Operation 254 12.3 Program 2 from Table 12.1 257 12.4 Program 2 from Table 12.2 257 13.1 An Example of a Hypothetical Forecast Function 267 13.2 An Example of a One-Day Ahead Forecasting Func- tions for the DEM Found by the Genetic Program 270 13.3 The Kernel Estimates of the Densities of the One- Day Forecast Errors 274 13.4 The Kernel Estimates of the Densities of the Five- Day Forecast Errors 275 13.5 The Kernel Estimates of the Densities of the Twenty- Day Forecast Errors 276 14.1 Cross Market Arbitrage 285 15.1 Crossover (example) 316 15.2 Main Loop of Preselection Algorithm 318 15.3 Canonical Algorithm 321 15.4 Election Algorithm 321 15.5 Preselection Algorithm 322 15.6 Canonical Algorithm - High Elasticity of Supply 323 15.7 Election Algorithm - High Elasticity of Supply 323 15.8 Preselection Algorithm - High Elasticity of Supply 324 15.9 Canonical Algorithm - Low Elasticity of Supply 324 15.10 Election Algorithm - Low Elasticity of Supply 325 15.11 Preselection Algorithm - Low Elasticity of Supply 325 16.1 Time Series Plots of the Stock Price (I) 344 16.2 Time Series Plots of the Stock Price (II) 345 16.3 Time Series Plots and Histograms of the Percentage Error (I) 346 16.4 Time Series Plots and Histograms of the Percentage Error (II) 347 16.5 Time Series Plots and Histograms of the Percentage Error (III) 349
Description: