learning to forecast with genetic algorithms

Learning to Forecast with Genetic Algorithms Mikhail Anufriev 1 Cars - PowerPoint PPT Presentation

Introduction Model Results Conclusion Extra Learning to Forecast with Genetic Algorithms Mikhail Anufriev 1 Cars Hommes 2 , 3 Tomasz Makarewicz 2 , 3 1 EDG, University of Technology, Sydney 2 CeNDEF, University of Amsterdam 3 Tinbergen


  1. Introduction Model Results Conclusion Extra Learning to Forecast with Genetic Algorithms Mikhail Anufriev 1 Cars Hommes 2 , 3 Tomasz Makarewicz 2 , 3 1 EDG, University of Technology, Sydney 2 CeNDEF, University of Amsterdam 3 Tinbergen Institute Computation in Economics and Finance Taipei 21 June 2015 Computation in Economics and Finance Taipei Mikhail Anufriev (UTS) LtF with GA / 48

  2. Introduction Model Results Conclusion Extra Computational Markov model explaining experimental data: Agents use Genetic Algorithms to optimize a linear forecasting rule. Contribution: Alternative to the RE model of expectation formation motivated by the 1 experimental evidence Generalization of the existing theoretical model, Heuristic Switching 2 Model (Anufriev, Hommes, 2012, AEJ-Micro); Realism: heterogeneous agents using individual learning; 3 Model replicates both aggregate and individual characteristics of data 4 from four Learning-to-Forecast experiments. Focus of the presentation: experimental data from Bao et al, 2012, JEDC (but also a bit from Heemeijer et al, 2009, JEDC ). Computation in Economics and Finance Taipei Mikhail Anufriev (UTS) LtF with GA / 48

  3. Introduction Model Results Conclusion Extra Price Expectations Price/predictions feedback – cornerstone of any dynamic model. Classical framework: ‘as-if’ perfect rationality leads to rational expectations (RE), i.e., model-consistent predictions. Problems: (i) model is silent on how the agents get RE; (ii) data do not confirm RE hypothesis and its implications Surveys: housing market (Case, Schiller, Thompson, 2012); inflation expectations of consumers (Malmendier and Nagel, 2009) and professional forecasters (Nunes, 2010). Financial market examples: bubbles and crashes (dot-com bubble of 1997 − 2000; US bear market of 2007 − 09). Experiments: macro-level bubbles in Smith et al. experiments; micro-level expectations in Learning-to-Forecast experiments (Hommes, 2011). Computation in Economics and Finance Taipei Mikhail Anufriev (UTS) LtF with GA / 48

  4. Introduction Model Results Conclusion Extra Agenda A mechanism of bubbles: self-fulfilling trend-following type of price expectations (Brock, Hommes, 1997, 1998) LtF Experiments find individual evidence in favor of this mechanism in the market with positive feedback (Hommes et al, 2005) Heuristic Switching Model: agents switch between simple forecasting heuristics like adaptive vs. trend following expectations. HSM fits well the experimental aggregate data for different types of markets (Anufriev, Hommes 2012; Anufriev et al, 2013). Problem: heuristics in HSM should be specified, but how and how many? � Genetic Algorithms (Hommes, Lux, 2013) This Paper: micro-foundations for HSM; model of endogenous learning. Computation in Economics and Finance Taipei Mikhail Anufriev (UTS) LtF with GA / 48

  5. Introduction Model Results Conclusion Extra Learning-to-Forecast General structure of a LtF experiment Focus on a market of a specific commodity, e.g., financial asset (demand-driven market with positive feedback) or agricultural good (supply-driven market with negative feedback). Subjects play a role of price forecasters to computer agents. The submit forecasts during 50 periods. Computer agents trade rationally given the submitted forecasts. Price is determined from the market clearing condition. Feedback between subject price predictions and prices through optimal demand/supply decisions. Subjects are rewarded for their forecasting accuracy. Computation in Economics and Finance Taipei Mikhail Anufriev (UTS) LtF with GA / 48

  6. Introduction Model Results Conclusion Extra Learning-to-Forecast Computer Screen � � 1 − 1 t , h ) 2 , 0 × 1 49 ( p t − p e earnings per period: e t , h = max 2 euro Computation in Economics and Finance Taipei Mikhail Anufriev (UTS) LtF with GA / 48

  7. Introduction Model Results Conclusion Extra Learning-to-Forecast GA is applied to four experiments 1 Heemeijer et al. (2009, JEDC) : simple linear framework. Negative feedback Positive feedback Price Price 120 120 100 100 80 80 60 60 40 40 20 20 80 100 120Prediction 80 100 120Prediction 20 40 60 20 40 60 p t = 60 − 20 p t = 60 + 20 � p e � � p e � t − 60 + ε t t − 60 + ε t 21 21 2 Bao et al. (2012, JEDC) : large breaks in fundamental price. 3 vd Velden (2001) and Hommes et al. (2007, MD) : nonlinear cobweb producers economy. 4 Hommes et al. (2005, RFS) : two-period ahead nonlinear asset pricing economy. Computation in Economics and Finance Taipei Mikhail Anufriev (UTS) LtF with GA / 48

  8. Introduction Model Results Conclusion Extra Learning-to-Forecast Experimental outcome Producer market ( negative feedback between forecasts and prices) quickly converges to RE. Asset pricing market ( positive feedback ) may converge slowly, but typically oscillates. With non-linear feedback more oscillations and instability is observed. Large between-treatment heterogeneity in forecasting and prediction rules; small within-treatment heterogeneity in forecasts (coordination). Computation in Economics and Finance Taipei Mikhail Anufriev (UTS) LtF with GA / 48

  9. Introduction Model Results Conclusion Extra Learning-to-Forecast Experimental outcome Negative feedback Positive feedback 80 80 60 60 Price Price 40 40 20 20 0 10 20 30 40 50 0 10 20 30 40 50 Time Time Prices in all groups, 6 for negative feedback and 6 for positive feedback ( Heemeijer et al., 2009 ). Computation in Economics and Finance Taipei Mikhail Anufriev (UTS) LtF with GA / 48

  10. Introduction Model Results Conclusion Extra Learning-to-Forecast Experimental outcome Negative feedback Positive feedback 100 100 80 80 60 60 40 40 20 20 0 0 0 10 20 30 40 50 60 0 10 20 30 40 50 60 Individual predictions (green) and prices (black) from the selected groups ( Bao et al, 2012 ). Computation in Economics and Finance Taipei Mikhail Anufriev (UTS) LtF with GA / 48

  11. Introduction Model Results Conclusion Extra GA model Individual Prediction Rules Market with I = 6 artificial agents. Agent i uses a simple forecasting heuristic (adaptive expectations + trend extrapolation) to predict p t : p e i , t = α i p t − 1 + (1 − α i ) p e i , t − 1 + β i ( p t − 1 − p t − 2 ) . The rule requires specific parameters, e.g., rule may extrapolate trend stronger or weaker. General constraint: α i ∈ [0 , 1], β i ∈ [ − 1 . 1 , 1 . 1]. Active rule is picked from H = 20 specifications p e i , h , t = α i , h p t − 1 + (1 − α i , h ) p e i , t − 1 + β i , h ( p t − 1 − p t − 2 ) . Computation in Economics and Finance Taipei Mikhail Anufriev (UTS) LtF with GA / 48

  12. Introduction Model Results Conclusion Extra GA model Individual learning In period t : Each agent has a pool of 20 heuristics, i.e., different ( α i , h , β i , h ). Forecast is generated by the active rule taken with probability exp( − MSE i , h ) MSE i , h = ( p e i , h , t − 1 − p t − 1 ) 2 , � 20 k =1 exp( − MSE i , k ) Between periods t and t + 1: individual learning agents independently update the set of heuristics { ( α i , h , β i , h ) } with Genetic Algorithms evolutionary operators (Haupt and Haupt, 2004): each heuristic { ( α i , h , β i , h ) } is encoded as a binary ‘chromosome’. GA operators: procreation, crossover, mutation, election update the pool of heuristics We use GA, because it is efficient and simple. Heuristic parameters evolve with time as the price series unfolds! Computation in Economics and Finance Taipei Mikhail Anufriev (UTS) LtF with GA / 48

  13. Introduction Model Results Conclusion Extra GA model Individual Learning: agent’s heuristics update Between periods t and t + 1 agent i updates the pool of heuristics H i , t = { ( α i , h , β i , h ) } 20 h =1 in order to get the new pool H i , t +1 Procreation Agent samples 20 heuristics from the pool with probabilities based on the logit function of MSE i , h = − ( p e i , h , t − p t ) 2 Mutation Each bit reverses its value with probability δ m = 0 . 01 Crossover Every pair of heuristics swap their α ’s entries with probability δ c = 0 . 9 Election So generated 20 ‘new’ heuristics are compared pairwise with the 20 ‘old’ heuristics composing the previous pool H i , t . New heuristic takes place in the new pool, if its MSE is strictly larger than of the old. Computation in Economics and Finance Taipei Mikhail Anufriev (UTS) LtF with GA / 48

  14. Introduction Model Results Conclusion Extra GA model Whole Model Fix the experimental environment (i.e., pricing equation) Initialization Take as many agents as subjects in the experiment. Initialize 20 heuristics per agent randomly Sample the first forecasts randomly from exogenous distribution. Next time draw randomly one heuristic to form forecast. Loop of one iteration Agents observe the price and evaluate heuristics’ hypothetical MSE. 1 Every agent update own pool of heuristics with GA. 2 Every agent stochastically picks one heuristic from the new pool based 3 on its hypothetical past performance and submit the corresponding price forecast. New price is generated from the individual predictions. 4 Computation in Economics and Finance Taipei Mikhail Anufriev (UTS) LtF with GA / 48

Recommend


More recommend