Abstract
We take the model of Alfarano et al. (J Econ Dyn Control 32:101–136, 2008) as a prototype agent-based model that allows reproducing the main stylized facts of financial returns. The model does so by combining fundamental news driven by Brownian motion with a minimalistic mechanism for generating boundedly rational sentiment dynamics. Since we can approximate the herding component among an ensemble of agents in the aggregate by a Langevin equation, we can either simulate the model in full at the micro level, or via an approximate aggregate law of motion. In the simplest version of our model, only three parameters need to be estimated. We explore the performance of a simulated method of moments (SMM) approach for the estimation of this model. As it turns out, sensible parameter estimates can only be obtained if one first provides a rough “mapping” of the objective function via an extensive grid search. Due to the high correlations of the estimated parameters, uninformed choices will often lead to a convergence to any one of a large number of local minima. We also find that the efficiency of SMM is relatively insensitive to the size of the simulated sample over a relatively large range of sample sizes and the SMM estimates converge to their GMM counterparts only for large sample sizes. We believe that this feature is due to the limited range of moments available in univariate asset pricing models, and that the sensitivity of the present model to the specification of the SMM estimator could carry over to many related agent-based models of financial markets as well as to similar diffusion processes in mathematical finance.
Similar content being viewed by others
Notes
Lux (2009a) estimates a related model directly for a sentiment index of the German economy, and finds that the behavior of the index can be well reproduced once one allows for an “effective” number of agents that is smaller than the notional one. He justifies this adjustment by agents being not as autonomous as the basic model assumes, but actually belonging to a limited number of groups with relatively uniform behavior and interaction in the sense of Eq. (3) occurring between these groups.
Following the suggestion of one of the reviewers, we have also investigated the sensitivity of the moments on the parameters over a larger range of variation of parameter values. Pertinent plots confirm that all moments show systematic variation with the three parameter values, with the only exception being \(m_{2}\) under variation of a and b. Those moments for which analytical approximations exist, are also close to their analytical counterparts. Details are available upon request.
We have also experimented with alternative, more refined optimization methods such as CMA-ES (completely derandomized self-adaptation in evolution strategies) proposed by Hansen and Ostermeier (2001), but did not find any remarkable differences in performance compared to the baseline Nelder–Mead algorithm. Many more algorithms can be tried such as, for example, the large spectrum of Bayesian optimization techniques (cf. Shahriari et al. 2016).
Obviously, using an extensive grid search with subsequent repeated applications of the Nelder–Mead algorithm from different starting points, we make a relatively big effort in each iteration of our Monte Carlo study to find the global optimum of the objective function. It is, however, not clear that such a computational intensive approach would be optimal for some applied purpose (e.g., using the estimated model for forecasting of volatility as in Ghonghadze and Lux 2016). A local optimum obtained with less effort might be ‘good enough’ for such a purpose, cf. Gilli and Schumann (2011) for a discussion of in-sample fit and out-of-sample performance in stochastic optimization problems. With respect to a portfolio choice problem, the authors demonstrate that the relationship between in-sample and out-of-sample performance is not necessarily monotonic in the computation invested to solve a numerical problem.
References
Alfarano, S., & Lux, T. (2007). A noise trader model as a generator of apparent financial power laws and long memory. Macroeconomic Dynamics, 11(S1), 80–101.
Alfarano, S., Lux, T., & Wagner, F. (2005). Estimation of agent-based models: The case of an asymmetric herding model. Computational Economics, 26(1), 19–49.
Alfarano, S., Lux, T., & Wagner, F. (2008). Time variation of higher moments in a financial market with heterogeneous agents: An analytical approach. Journal of Economic Dynamics and Control, 32(1), 101–136.
Barde, S. (2016). Direct calibration and comparison of agent-based herding models of financial markets. Journal of Economic Dynamics and Control, 73, 329–353.
Brock, W. A., & Hommes, C. H. (1998). Heterogeneous beliefs and routes to chaos in a simple asset pricing model. Journal of Economic Dynamics and Control, 22(8–9), 1235–1274.
Brown, G. W., & Cliff, M. T. (2004). Investor sentiment and the near-term stock market. Journal of Empirical Finance, 11(1), 1–27.
Carrasco, M., & Florens, J.-P. (2002). Simulation-based method of moments and efficiency. Journal of Business and Economic Statistics, 20(4), 482–492.
Chiarella, C., & He, X.-Z. (2002). Heterogeneous beliefs, risk and learning in a simple asset pricing model. Computational Economics, 19(1), 95–132.
Day, R. H., & Huang, W. (1990). Bulls, bears and market sheep. Journal of Economic Behavior and Organization, 14(3), 299–329.
De Grauwe, P., Dewachter, H., & Embrechts, M. (1995). Exchange rate theory: Chaotic models of foreign exchange markets. Oxford: Blackwell.
Duffie, D., & Singleton, K. J. (1993). Simulated moments estimation of Markov models of asset prices. Econometrica, 61(4), 929–952.
Ethier, S., & Kurtz, T. (1986). Markov processes: Characterization and convergence. New York: Wiley.
Franke, R. (2009). Applying the method of simulated moments to estimate a small agent-based asset pricing model. Journal of Empirical Finance, 16(5), 804–815.
Franke, R., & Westerhoff, F. (2011). Estimation of a structural stochastic volatility model of asset pricing. Computational Economics, 38(1), 53–83.
Franke, R., & Westerhoff, F. (2012). Structural stochastic volatility in asset pricing dynamics: Estimation and model contest. Journal of Economic Dynamics and Control, 36(8), 1193–1211.
Franke, R., & Westerhoff, F. (2016). Why a simple herding model may generate the stylized facts of daily returns: Explanation and estimation. Journal of Economic Interaction and Coordination, 11(1), 1–34.
Ghonghadze, J., & Lux, T. (2016). Bringing an elementary agent-based model to the data: Estimation via GMM and an application to forecasting of asset price volatility. Journal of Empirical Finance, 37, 1–19.
Gilli, M., & Schumann, E. (2011). Optimal enough? Journal of Heuristics, 17(4), 373–387.
Gilli, M., & Winker, P. (2003). A global optimization heuristic for estimating agent based models. Computational Statistics & Data Analysis, 42(3), 299–312.
Grammig, J., & Schaub, E.-M. (2014). Give me strong moments and time: Combining GMM and SMM to estimate long-run risk asset pricing models (July 22, 2014). CFS Working Paper No. 479. Available at SSRN: http://ssrn.com/abstract=2508125 or http://dx.doi.org/10.2139/ssrn.2508125.
Grazzini, J. (2012). Analysis of the emergent properties: Stationarity and ergodicity. Journal of Artificial Societies and Social Simulation, 15(2), 7.
Grazzini, J., & Richiardi, M. (2015). Estimation of ergodic agent-based models by simulated minimum distance. Journal of Economic Dynamics and Control, 51, 148–165.
Hansen, N., & Ostermeier, A. (2001). Completely derandomized self-adaptation in evolution strategies. Evolutionary Computation, 9(2), 159–195.
Hommes, C. H. (2006). Heterogeneous agent models in economics and finance. In L. Tesfatsion & K. Judd (Eds.), Handbook of computational economics (Vol. 2, pp. 1109–1186). Amsterdam: Elsevier.
Jang, T.-S. (2015). Identification of social interaction effects in financial data. Computational Economics, 45(2), 207–238.
Kearns, P., & Pagan, A. (1997). Estimating the density tail index for financial time series. Review of Economics and Statistics, 79(2), 171–175.
Kirman, A. (1993). Ants, rationality, and recruitment. Quarterly Journal of Economics, 108(1), 137–156.
Lamperti, F. (2015). An information theoretic criterion for empirical validation of time series models. LEM Working Papers Series 2015/02, Sant’Anna School of Advanced Studies, Pisa, Italy.
Larsen, K. S., & Sørensen, M. (2007). Diffusion models for exchange rates in a target zone. Mathematical Finance, 17(2), 285–306.
LeBaron, B. (2006). Agent-based computational finance. In L. Tesfatsion & K. Judd (Eds.), Handbook of computational economics (Vol. 2, pp. 1187–1233). Amsterdam: Elsevier.
Lee, B.-S., & Ingram, B. F. (1991). Simulation estimation of time-series models. Journal of Econometrics, 47(2–3), 197–205.
Lux, T. (1995). Herd behaviour, bubbles and crashes. Economic Journal, 105(431), 881–896.
Lux, T. (2009a). Rational forecasts or social opinion dynamics? Identification of interaction effects in a business climate survey. Journal of Economic Behavior & Organization, 72(2), 638–655.
Lux, T. (2009b). Stochastic behavioral asset-pricing models and the stylized facts. In T. Hens & K. R. Schenk-Hoppé (Eds.), Handbook of financial markets: Dynamics and evolution (pp. 161–215). San Diego: North-Holland.
Manzan, S., & Westerhoff, F. (2005). Representativeness of news and exchange rate dynamics. Journal of Economic Dynamics and Control, 29(4), 677–689.
McFadden, D. (1989). A method of simulated moments for estimation of discrete response models without numerical integration. Econometrica, 57(5), 995–1026.
Molina, G., Bayarri, M. J., & Berger, J. O. (2005). Statistical inverse analysis for a network microsimulator. Technometrics, 47(4), 388–398.
Pakes, A., & Pollard, D. (1989). Simulation and the asymptotics of optimization estimators. Econometrica, 57(5), 1027–1057.
Rahmandad, H., & Sabounchi, N. (2012). Modeling and estimating individual and population obesity dynamics. In S. Yang, A. Greenberg, & M. Endsley (Eds.), Social Computing, Behavioral—Cultural Modeling and Prediction, Volume 7227 of Lecture Notes in Computer Science (pp. 306–313). Berlin: Springer.
Ruge-Murcia, F. J. (2007). Methods to estimate dynamic stochastic general equilibrium models. Journal of Economic Dynamics and Control, 31(8), 2599–2636.
Shahriari, B., Swersky, K., Wang, Z., Adams, R. P., & de Freitas, N. (2016). Taking the human out of the loop: A review of Bayesian optimization. Proceedings of the IEEE, 104(1), 148–175.
Winker, P., Gilli, M., & Jeleskovic, V. (2007). An objective function for simulation based inference on exchange rate data. Journal of Economic Interaction and Coordination, 2(2), 125–145.
Acknowledgements
We gratefully acknowledge funding from the European Union’s Seventh Framework Programme under Grant Agreement No. 612955. Helpful comments by Reiner Franke, Simone Alfarano, two anonymous reviewers and participants at various seminars and conference presentations are thankfully acknowledged as well.
Author information
Authors and Affiliations
Corresponding author
Electronic supplementary material
Below is the link to the electronic supplementary material.
Appendices
Appendix 1: Pseudo Code
Below is the pseudo code for the SMM Monte Carlo simulations.
Algorithm: SMM Monte Carlo simulations | |
---|---|
1: for i = 1 to 400, do | |
2: Set random seed 1: seed1(i). | |
3: Generate pseudo-empirical time series with sample size \(T_{emp}\). | |
4: Set random seed 2: seed2(i). | |
5: Set weighting matrix W1 equal to identity matrix. | |
6: Grid search to find 10 best parameter sets \(\theta _{k}, k=1, \ldots , 10\). | |
7: for k = 1 to 10, do | |
8: Based on \(\theta _{k}\), simulate time series with sample size \(T_{sim}\) and calculate weighting matrix W2 using Newey West estimator. | |
9: Minimize the objective function to obtain the optimized parameter \(\widehat{\theta }_{k}\). | |
10: end for | |
11: Output the best optimized parameter set among the 10 optimized \(\widehat{\theta }_{k}\). | |
12: end for |
Appendix 2: Tests for Stationarity and Ergodicity
We follow the runs test procedure of Grazzini (2012) to test the stationarity and ergodicity of the sentiment dynamics and raw returns from the agent based model as well as the generated moments. For the stationarity test, we generate a time series with sample size 2,000,000 and adopt the runs test procedures with different test window lengths 1, 10, 50, 100, 500, 1000, 5000 and 10,000. We repeat the test for 100 runs. As reported in Table 8, under the bimodal setting, the probabilities of rejecting stationarity at the level of 5% are much higher than 0.05 for the second and fourth moment and the autocovariances of squared returns for small test windows. Increasing the test window, probabilities of rejection of stationarity decrease towards their nominal size. It can be concluded that sentiment, raw returns as well as all the moment conditions are stationary but for the second and fourth moment and autocovariances of squared returns, the long-range dependence of volatility makes smaller samples appear non-stationary. Similar results can be found under the unimodal setting.
For the ergodicity test, we generate time series with different sample sizes 5000, 10,000, 20,000, 100,000 and 200,000. We divide these time series into 100 sub-samples to create the first test sample. Matching the sample size of these sub-samples, we also generate 100 time series (with different random seeds) to create the second test sample. The two test samples are used to test the ergodicity property of the sentiment index \(x_{t}\), raw returns and the 15 moment conditions. We again repeat the test 100 times. Table 9 reports the result of the ergodicity tests. Regardless of the parameter values, the number of rejections is smaller than the nominal size of the test for raw returns and all the moment conditions. For sentiment, we find sizable numbers of rejections for smaller sample size reflecting the strong autocorrelation of this variable.
Rights and permissions
About this article
Cite this article
Chen, Z., Lux, T. Estimation of Sentiment Effects in Financial Markets: A Simulated Method of Moments Approach. Comput Econ 52, 711–744 (2018). https://doi.org/10.1007/s10614-016-9638-4
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10614-016-9638-4