Skip to main content

Advertisement

Log in

Evolutionary Frequency and Forecasting Accuracy: Simulations Based on an Agent-Based Artificial Stock Market

  • Published:
Computational Economics Aims and scope Submit manuscript

Abstract

Learning how to forecast is always important for traders, and divergent learning frequencies prevail among traders. The influence of the evolutionary frequency on learning performance has occasioned many studies of agent-based computational finance (e.g., Lettau in J Econ Dyn Control 21:1117–1147, 1997. doi:10.1016/S0165-1889(97)00046-8; Szpiro in Complexity 2(4):31–39, 1997. doi:10.1002/(SICI)1099-0526(199703/04)2:4<31::AID-CPLX8>3.0.CO;2-3; Cacho and Simmons in Aust J Agric Resour Econ 43(3):305–322, 1999. doi:10.1111/1467-8489.00081). Although these studies all suggest that evolving less frequently and, hence, experiencing more realizations help learning, this implication may result from their common stationary assumption. Therefore, we first attempt to approach this issue in a ‘dynamically’ evolving market in which agents learn to forecast endogenously generated asset prices. Moreover, in these studies’ market settings, evolving less frequently also meant having a longer time horizon. However, it is not true in many market settings that are even closer to the real financial markets. The clarification that the evolutionary frequency and the time horizon are two separate notions leaves the effect of the evolutionary frequency on learning even more elusive and worthy of exploration independently. We find that the influence of a trader’s evolutionary frequency on his forecasting accuracy depends on all market participants and the resulting price dynamics. In addition, prior studies also commonly assume that traders have identical preferences, which is too strong an assumption to apply to a real market. Considering the heterogeneity of preferences, we find that converging to the rational expectations equilibrium is hardly possible, and we even suggest that agents in a slow-learning market learn frequently. We also apply a series of econometric tests to explain the simulation results.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5

Similar content being viewed by others

Notes

  1. This distinction was made in Bullard and Duffy (1999).

  2. They did this by increasing the investment horizon over which agents’ fitness was calculated by summing returns to equity.

  3. Even in the analytical economic dynamics literature, it is common that the evolutionary frequency and the time horizon are controlled by two different parameters, for example, Diks and van der Weide (2005). In Diks and van der Weide (2005), agents evaluated the past performance of their beliefs using a geometrically down-weighted average of past performance; therefore, the values of the weights were used to control the agents’ time horizons, which is similar to the device adopted by the SFASM. In Diks and van der Weide (2005), agents updated their beliefs every period. In one of their cases, agents might delay the updating of their beliefs; hence, the evolutionary frequency was determined by the probability that agents did update their beliefs at each time step.

  4. In his market, one of the five least-wealthy agents was chosen and removed at random in each period, and one new agent with a randomly drawn horizon length replaced this agent.

  5. Also refer to Arthur et al. (1997); Ehrentreich (2003, 2006); Joshi et al. (2000); LeBaron et al. (1999) and LeBaron (2002).

  6. \(X_{i,t}\) of Eq. (3) is a function of \(p_t \), which will be explained in Sect. 2.2.

  7. Agent i’s wealth is updated as \(W_{i,t} =X_{i,t-1} \left( {p_t +d_t } \right) +\left( {W_{i,t-1} -p_{t-1} \cdot X_{i,t-1} } \right) \left( {1+r} \right) \).

  8. The weighted average of squared forecast error of agent i’s predictorj activated at time \(t-1\), \(v_{t,i,j}^2 \), is calculated as \(v_{t,i,j}^2 =(1-\frac{1}{\theta })v_{t-1,i,j}^2 +\frac{1}{\theta }\left[ {\left( {p_t +d_t } \right) -E_{i,t-1} \left( {p_t +d_t } \right) } \right] ^{2}\).

  9. C is set equal to 500 for all experiments.

  10. Therefore, a rule’s fitness is negatively related to its weighted average of squared forecast error and the number of non-ignored bits. Such penalizing rule specificity is to ensure that each bit is actually serving a useful purpose in terms of a forecasting rule. Moreover, to calculate the fitness of initial rules, a dividend history of 500 periods before formal trading is generated following Eq. (1), and an associated history of fundamental prices is generated.

  11. It is operated by drawing a value s from the uniform distribution U(0, 1). If \(\hbox {s}<0.9\), a new predictor is generated by mutation, and by crossover otherwise.

  12. With probability 0.03, each bit in the string undergoes the following changes. 0\(\rightarrow \)# with probability 2/3. 1\(\rightarrow \)# with probability 2/3. # \(\rightarrow \)0 with probability 1/3. Other changes are as expected, i.e., 0\(\rightarrow \)1 with probability 1/3. On average, this preserves the ‘specificity,’ or fraction, of #’s of a rule LeBaron et al. (1999).

  13. More details can be found in Appendix A of Arthur et al. (1997).

  14. Following LeBaron et al. (1999)’s definition, as long as an agent’s evolutionary frequency (\(\Delta _i \)) reaches 1000, he is described as slow learning.

  15. We have ever increased the number of agents in each experiment to sixty. The findings in this paper are not affected.

  16. More details can be found in Appendix A of Arthur et al. (1997).

  17. We have also tried to use the last 1000 periods to estimate the final forecasting errors. The findings in this paper are unchanged.

  18. The reason will be discussed in Sect. 5.

  19. In the first experiment, half of the market participants are slow learning. In the third experiment, all of the market participants are slow learning. The results of these two experiments both indicate that the agents who evolve rules less frequently will forecast more precisely. In addition to these two experiments, we have also conducted an experiment in which 80% of the market participants are slow learning. As the first and the third experiments, the same finding is obtained.

  20. Research has frequently used both ADF and KPSS for tests of stationarity and non-stationarity (Bahmani-Oskooee 1998; Brida et al. 2008; Brooks 2002; Cardia et al. 2003; Cheung and Chinn 1996; Driffill and Snell 2003; Park and Jei 2010).

  21. The lag length is decided by 0.75\(\root 3 \of {T}\), where T is the length of data. The bandwidth is decided by automatic selection based on the Newey-West Bandwidth using the estimation method of a Barlett kernel.

  22. LeBaron (2001) found that populations in his all-horizon market composed of both short- and long-horizon agents leave patterns in volatility and trading volume similar to actual financial markets. However, our mixed-learning market is far from a real one. Therefore, the time horizon and the evolutionary frequency are different not only in their meanings but also in their effects on the resulting price dynamics.

  23. Moreover, it is also observed that although the residual series of the second experiment also rejects the unit root hypothesis, the averaged ADF test statistic is much less than those of other experiments.

  24. It is necessary to designate the ‘Maxbreaks,’ the maximum number of breaks allowed, and the ‘Minspan,’ the minimum number of periods between two breaks, when using the RATS procedure to perform the Bai-Perron test.

  25. This table presents test results considering Maxbreaks \(=\) 10 and Minspan \(=\) 1000. It shows that the greatest number of structural breaks present in one series is 6. Therefore, it is sufficient to allow the maximum number of breaks to be 10. There are two information criteria to select the number of breaks, BIC and LWZ. Because BIC performs badly when no serial correlation is present in the errors but a lagged dependent variable is present, the BIC performs badly when the coefficient on the lagged dependent variable is large. Therefore, the LWZ is used when BIC and LWZ suggest differently.

  26. We applied the ADF and KPSS tests to the first regimes of the residual series. The tests rejected the null hypothesis of the ADF test but did not reject that of the KPSS test. Therefore, the residual series in a regime without any structural breaks is stationary.

  27. This changelessness also explains why the forecasting errors in the third experiment generally decrease compared with those in the second experiment.

  28. Although Chen and Huang (2008) also mentioned the influence of time horizons on forecasting accuracy, and their agents had divergent preferences, their agents learned to predict an exogenously given dividend process. Therefore, whether their agents’ preferences were heterogeneous would not affect their learning.

References

  • Anand, K., Kirman, A., & Marsili, M. (2013). Epidemics of rules, rational negligence and market crashes. The European Journal of Finance, 19(5), 438–447. doi:10.1080/1351847X.2011.601872.

    Article  Google Scholar 

  • Arthur, W. B., Holland, J. H., LeBaron, B. D., Palmer, R. G., & Tayler, P. (1997). Asset pricing under endogenous expectations in an artificial stock market in the economy as an evolving complex system II. In W. B. Arthur, S. Durlauf, & D. Lane (Eds.), The Economy as an Evolving Complex System II (pp. 15–44). Reading, MA: Addison-Wesley.

    Google Scholar 

  • Badegruber, T. (2003). Agent-based computational economics: New aspects in learning speed and convergence in the Santa Fe artificial stock market. Ph.D. Thesis. Graz, Austria, Universitat.

  • Bahmani-Oskooee, M. (1998). Do exchange rates follow a random walk process in middle eastern countries? Economics Letters, 58, 339–344. doi:10.1016/S0165-1765(98)00013-5.

    Article  Google Scholar 

  • Bai, J., & Perron, P. (1998). Estimating and testing linear models with multiple structural changes. Econometrica, 66, 47–78. doi:10.2307/2998540.

    Article  Google Scholar 

  • Bai, J., & Perron, P. (2003). Computation and analysis of multiple structural change models. Journal of Applied Econometrics, 18, 1–22. doi:10.1002/jae.659.

    Article  Google Scholar 

  • Brida, J. G., Carrera, E., & Risso, W. A. (2008). Tourism’s impact on long-run Mexican economic growth. Economics Bulletin, 3, 1–10.

    Google Scholar 

  • Brooks, C. (2002). Introductory Econometrics for Finance. Cambridge: Cambridge University Press.

    Google Scholar 

  • Bullard, J., & Duffy, J. (1999). Using genetic algorithms to model the evolution of heterogeneous beliefs. Computational Economics, 13, 41–60.

    Article  Google Scholar 

  • Cacho, O., & Simmons, P. (1999). A genetic algorithm approach to farm investment. The Australian Journal of Agricultural and Resource Economics, 43(3), 305–322. doi:10.1111/1467-8489.00081.

    Article  Google Scholar 

  • Cardia, E., Kozhaya, N., & Ruge-Murcia, F. J. (2003). Distortionary taxation and labor supply. Journal of Money, Credit and Banking, 35, 351–373. doi:10.1353/mcb.2003.0018.

    Article  Google Scholar 

  • Chen, S.-H., & Huang, Y.-C. (2008). Risk preference, forecasting accuracy and survival dynamics: Simulations based on a multi-asset agent-based artificial stock market. Journal of Economic Behavior and Organization, 67(3), 702–717. doi:10.1016/j.jebo.2006.11.006.

    Article  Google Scholar 

  • Cheung, Y.-W., & Chinn, M. D. (1996). Deterministic, stochastic, and segmented trends in aggregate output: A cross-country analysis. Oxford Economic Papers, 48, 134–162. doi:10.1093/oxfordjournals.oep.a028557.

    Article  Google Scholar 

  • Diks, C., & van der Weide, R. (2005). Herding, a-synchronous updating and heterogeneity in memory in a CBS. Journal of Economic Dynamics and Control, 29, 741–763. doi:10.1016/j.jedc.2003.12.004.

    Article  Google Scholar 

  • Driffill, J., & Snell, A. (2003). What moves OECD real interest rates? Journal of Money, Credit and Banking, 35, 375–402. doi:10.1353/mcb.2003.0019.

    Article  Google Scholar 

  • Ehrentreich, N. (2003). A corrected version of the Santa Fe Institute artificial stock market model. In Complexity 2003: Second workshop of the society for computational economics.

  • Ehrentreich, N. (2006). Technical trading in the Santa Fe Institute artificial stock market revisited. Journal of Economic Behavior and Organization, 61, 599–616. doi:10.1016/j.jebo.2004.07.022.

    Article  Google Scholar 

  • Hommes, C. H. (2006). Heterogeneous agent models in economics and finance in handbook of computational economics. In L. Tesfatsion & K. L. Judd (Eds.), Handbook of Computational Economics (pp. 1109–1186). New York: Elsevier.

    Google Scholar 

  • Johnson, P. E. (2002). Agent-based modeling: What I learned from the artificial stock market. Social Science Computer Review, 20(2), 174–186. doi:10.1177/089443930202000207.

    Article  Google Scholar 

  • Joshi, S., Parker, J., & Bedau, M. A. (2000). Technical trading creates a prisoner’s dilema: Results from an agent-based model in computational finance 99. In Y. Abu-Mostafa, B. LeBaron, A. W. Lo, & A. S. Weigend (Eds.), Computational Finance (pp. 465–479). Cambridge, MA: MIT Press.

    Google Scholar 

  • Kirman, A. (2014). Is it rational to have rational expectations? Mind & Society, 13, 29–48. doi:10.1007/s11299-014-0136-x.

    Article  Google Scholar 

  • LeBaron, B. (2001). Evolution and time horizons in an agent-based stock market. Macroeconomic Dynamics, 5, 225–254. doi:10.1017/S1365100501019058.

    Article  Google Scholar 

  • LeBaron, B. (2002). Building the Santa Fe artificial stock market. Working Paper, Brandeis University.

  • LeBaron, B., Arthur, W. B., & Palmer, R. (1999). Time series properties of an artificial stock market. Journal of Economic Dynamics and Control, 23, 1487–1516.

    Article  Google Scholar 

  • Lettau, M. (1997). Explaining the facts with adaptive agents: The case of mutual fund flows. Journal of Economic Dynamics and Control, 21, 1117–1147. doi:10.1016/S0165-1889(97)00046-8.

    Article  Google Scholar 

  • Park, S. Y., & Jei, S. Y. (2010). Estimation and hedging effectiveness of time-varying hedge ratio: Flexible bivariate garch approaches. Journal of Futures Markets, 30, 71–99. doi:10.1002/fut.20401.

    Article  Google Scholar 

  • Perron, P. (1989). The great crash, the oil price shock, and the unit root hypothesis. Econometrica, 57(6), 1361–1401. doi:10.2307/1913712.

    Article  Google Scholar 

  • Polhill, J. G., Izquierdo, L. R., & Gotts, N. M. (2004). The ghost in the model (and other effects of floating point arithmetic). Journal of Artificial Societies and Social Simulation, 8(1), 5.

  • Szpiro, G. G. (1997). The emergence of risk aversion. Complexity, 2(4), 31–39. doi:10.1002/(SICI)1099-0526(199703/04)2:4<31::AID-CPLX8>3.0.CO;2-3.

Download references

Acknowledgements

The authors are grateful to the respected editor and two anonymous referees for very useful comments. Ya-Chi Huang gratefully acknowledges the support provided by the Ministry of Science and Technology in the form of Grant No. NSC. 100-2410-H-262-006. The authors of the Santa Fe Artificial Stock Market are also greatly acknowledged for their open source code.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Ya-Chi Huang.

Appendix

Appendix

Tables 10, 11, 12 and 13 present the results of the multiple comparison analyses for the four experiments.

Table 10 Multiple comparison analysis of the mixed-learning case
Table 11 Multiple comparison analysis of the fast-learning case
Table 12 Multiple comparison analysis of the slow-learning case
Table 13 Multiple comparison analysis of the slow-learning case with heterogeneous preferences

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Huang, YC., Tsao, CY. Evolutionary Frequency and Forecasting Accuracy: Simulations Based on an Agent-Based Artificial Stock Market. Comput Econ 52, 79–104 (2018). https://doi.org/10.1007/s10614-017-9662-z

Download citation

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10614-017-9662-z

Keywords

Navigation