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.
Similar content being viewed by others
Notes
This distinction was made in Bullard and Duffy (1999).
They did this by increasing the investment horizon over which agents’ fitness was calculated by summing returns to equity.
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.
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.
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) \).
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}\).
C is set equal to 500 for all experiments.
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.
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.
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).
More details can be found in Appendix A of Arthur et al. (1997).
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.
We have ever increased the number of agents in each experiment to sixty. The findings in this paper are not affected.
More details can be found in Appendix A of Arthur et al. (1997).
We have also tried to use the last 1000 periods to estimate the final forecasting errors. The findings in this paper are unchanged.
The reason will be discussed in Sect. 5.
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.
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.
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.
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.
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.
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.
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.
This changelessness also explains why the forecasting errors in the third experiment generally decrease compared with those in the second experiment.
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.
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.
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.
Bai, J., & Perron, P. (1998). Estimating and testing linear models with multiple structural changes. Econometrica, 66, 47–78. doi:10.2307/2998540.
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.
Brida, J. G., Carrera, E., & Risso, W. A. (2008). Tourism’s impact on long-run Mexican economic growth. Economics Bulletin, 3, 1–10.
Brooks, C. (2002). Introductory Econometrics for Finance. Cambridge: Cambridge University Press.
Bullard, J., & Duffy, J. (1999). Using genetic algorithms to model the evolution of heterogeneous beliefs. Computational Economics, 13, 41–60.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Kirman, A. (2014). Is it rational to have rational expectations? Mind & Society, 13, 29–48. doi:10.1007/s11299-014-0136-x.
LeBaron, B. (2001). Evolution and time horizons in an agent-based stock market. Macroeconomic Dynamics, 5, 225–254. doi:10.1017/S1365100501019058.
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.
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.
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.
Perron, P. (1989). The great crash, the oil price shock, and the unit root hypothesis. Econometrica, 57(6), 1361–1401. doi:10.2307/1913712.
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.
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
Corresponding author
Rights and permissions
About this article
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
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10614-017-9662-z