Heterogeneous Expectations in the Gold Market: Specification and Estimation

The increase in the price of gold between 2002 and 2011 appears to be a candidate for a potential asset price ‘bubble’, suggesting that chartists (feedback traders) were highly active in the gold market during this period. Hence, this paper develops and tests empirically several models incorporating heterogeneous expectations of agents, specifically fundamentalists and chartists, for the gold market. The empirical results show that both agent types are important in explaining historical gold prices but that the 10-year bull run of gold in the early 2000s is consistent with the presence of agents extrapolating long-term trends. Technically this paper is a further step toward providing an empirical foundation for certain assumptions used in the heterogeneous agents literature. For example, the empirical results presented in this paper compare the economical and statistical significance of numerous switching variable specifications, that are generally only introduced ad-hoc.


Introduction
Gold prices have exhibited a strong positive trend between 2002 and 2011 with gold rising from around 300 US dollar in 2002 to values well above 1,900 US dollar per troy ounce in 2011.
Comparing this to the relatively stable period for the twenty years previous there has been much discussion about the cause of this upward trajectory. Many commentators have identified the recent trend as a bubble 1 (similar to the sharp rise and subsequent correction in gold prices in the late 1970s and early 1980s) whilst many others have suggested that there has been a structural change in the prices and volumes in the gold market-and commodity markets in general-in recent years. 2,3 This paper attempts to shed some light onto these issues through the use (and estimation) of a heterogeneous agents model (henceforth HAM) for the gold market in which fundamentalists are convinced that the price will return to its 'fundamental' value and chartists, on the other hand, aim to identify price signals from past price trends. The use of a HAM in the gold market can be justified by the observation that the historical gold price has exhibited a strong and relatively long positive trend which can be explained with chartist traders buying an asset whose price increased in the past thereby enforcing or prolonging the trend. This behaviour is in contrast to a fundamentalist, who would trade toward the fundamental value. A long and positive price trend can thus only be explained by a continuously rising fundamental value or the presence of chartists. We think that the latter, i.e. the presence of chartists or chartist-behaviour, is perhaps a more plausible assumption than a continuously rising fundamental price.
Furthermore, if there is significant evidence for the presence of chartist traders it is likely that their trades have changed the properties often associated with gold, in particular the store of value and the safe haven attributes. 4 Hence, the chartist-fundamentalist approach offers a new and promising alterative behavioural perspective on historical gold price dynamics. To the best of our 1 See, for example, "Gold price bubble a 'high probability' says Deutsche Bank", Financial Times, January 13, 2011 (http://www.ft.com/cms/s/0/2e36ccf4-1f33-11e0-8c1c-00144feab49a.html), or "Cash out of gold and send kids to college", Financial Times, August 7, 2012 (http://www.ft.com/intl/cms/s/0/ 312bf416-d1a7-11e1-bb82-00144feabdc0.html#axzz2K5AdpTV4). 2 See, for example, "Gilt-edged argument", The Economist, April 28, 2011 (http://www.economist.com/ node/18620836). 3 The period from 2004 until recently is sometimes referred to as a period of 'financialization' of commodities (e.g. see Tang and Xiong, 2013) since there has been a dramatic increase in the presence of institutional investors in commodity markets who use these markets for the purpose of asset management. Furthermore, the introduction of exchange-traded funds around 2002 has augmented this trend by providing both institutional and retail investors with additional opportunities to obtain exposure to commodities in general and gold in particular. 4 Baur and Glover (2012) analyse the affect of increased (speculative) investment on the safe haven property of gold. The safe haven property of gold is closely related to a 'flight-to-quality' from stocks to gold. knowledge, this is the first such empirical work focusing on the gold market.
Specifically, we develop a parsimonious HAM for the gold market in which agents are assumed to adapt their heterogenous beliefs in response to the arrival of new information, and therefore switch between different trading strategies. 5 Despite their theoretically appealing features, however, there are many different alternative model specifications available in the HAMs literature; each producing potentially different results. With this in mind, we also consider different variations of our model with different switching specifications. 6 Our empirical findings (based on 43 years of monthly data) are in line with predictions from heterogeneous agent theory. In particular, we find strong evidence that the bubble-like price path of gold observed during the 1970/80s can be characterized well by short-term trend-followers and long-term stabilizers (fundamentalists). In more recent times however, the gold price appears more consistent with long-term trend-following and short-term contrarian chartist behaviour; with little evidence of 'classical' fundamentalist activity. This indicates that the lack of stabilizing agents in the gold market between 2002 and 2011 was a contributing factor to the steadily increasing gold price. Furthermore, an alternative specification with asymmetric demands reveals that agents have generally only followed positive price trends. We explain this result with the significant costs of short-selling gold.
In regards to the switching within our model, results consistently show that the added flexibility of agents to adapt their beliefs increases model fit and the significance of agents' impact on price dynamics. There is also evidence of consistent qualitative behaviour of agents (i.e. parameter sign) across switching variables, but considerable variation in the quantitative effects (i.e. model fit and estimated parameter magnitudes) across switching variables; demonstrating the importance of considering such alternative model specifications. To this end, we find that simple measures of gold price volatility and (risk-adjusted) measures of the deviation of the gold price from the fundamental value of gold perform equally as well as more well-known measures such as the past 5 This idea, influenced by the discrete choice modelling literature (see Manski andMcFadden, 1981, Anderson et al., 1993), was developed by Hommes (1997, 1998) who coined it the 'adaptive belief system'. 6 We do not consider exogenous variables in this paper, only endogenous ones, i.e. lagged prices, simple or squared log-price differences etc. While the use of exogenous variables offer a large set of modelling opportunities the choice of such variables is not straightforward and we therefore restrict ourselves to a 'classical' time-series analysis. profit measure introduced by Hommes (1997, 1998). It is our hope that a comparison of the different switching specifications within this market will provide valuable insight for further theoretical and empirical developments of HAMs for other markets.

Related literature
Models of asset price dynamics based on the interaction of heterogeneous agents have become increasingly popular in recent years. 7 These models are appealing since they allow for more flexibility in the modelling of investors behaviour than classical rational expectations would allow.
Furthermore, even some of the simpler models in this class appear to explain well many of the stylized empirical facts of observed asset price dynamics. Such models essentially posit that asset prices are driven to some degree by an endogenous nonlinear law of motion.
In the majority of the existing theoretical literature, it is found that chartists tend to destabilize markets (increase volatility), whereas fundamentalists act as a stabilizing force on price dynamics.
The dynamic interaction between these two agent types lead to periods of both mean-reverting and explosive behaviour. 8 To account for the additional role of gold as a real (as opposed to financial) asset, we also explicitly model the effect of real supply and demand on the gold price dynamics, such effects can be seen to provide an additional stabilizing force on the gold price.
When it comes to the empirical estimation of heterogeneous agent models, there is a developing literature but there appears still much work to be done. This sentiment is echoed in Chiarella et al. (2009) who state in their conclusions that "much more needs to be done on the calibration and estimation" of the models surveyed in their paper. The relatively late development of empirical studies in this area is no doubt due to the highly nonlinear nature of such models and the resulting econometric issues. In particular, the nonlinear switching mechanism poses some interesting econometric difficulties in their estimation, difficulties that we will elaborate on in Section 3.
Early work avoided the need to estimate the nonlinear switching mechanism directly by employing numerous approaches. One intuitive approach used has been to estimate the model using a Markov regime-switching model (see for example Vigfusson, 1997, Ahrens and Reitz, 2005, Chiarella et al., 2012. Other 'indirect' estimation methods include the use of filtering techniques (see Baak, 1999, Chavas, 2000 and simulation based estimation such as those employed in Winker (2001, 2003) and Winker and Gilli (2004). Furthermore, Alfarano et al. (2005Alfarano et al. ( , 2006 take advantage of a derived closed-form expression for the stationary distribution of returns for a particular class of HAM to estimate the distribution of agents within a given market. One important strand of the estimation literature has attempted to fit certain distributional properties of model outputs aligned to certain stylized facts of real financial time-series. Such methods invariably rely on simulation. Work along these lines include He and Li (2011) who estimate the power-law decay parameters of the autocorrelation of returns, the squared returns and the absolute returns for the DAX 30 stock market daily closing price index. In a similar vein Franke (2009) employs the method of simulated moments (MSM) to estimate the model proposed in Manzan and Westerhoff (2005) for numerous financial time-series. Subsequently, Franke andWesterhoff (2011, 2012) also employ the MSM to S&P 500 data in the context of a structural stochastic volatility model. Here the model parameters are chosen to fit best a selection of nine simulated summary statistics, or moments, including auto-correlation in raw returns and the wellknown Hill estimator of the tail index of absolute returns.
In the present paper, however, our focus is on the explanation of the observed gold price path rather than an explanation of the distributional properties of their returns. In this regard there has also been several attempts to 'directly' estimate the nonlinear switching mechanisms in the literature. Boswijk et al. (2007) estimate a version of the Hommes (1997, 1998) model directly for S&P 500 data using nonlinear least squares and Reitz (2003, 2005) and Reitz and Westerhoff (2007) use the STAR-GARCH model introduced by Lundbergh and Teräsvirta (1998) to estimate various models of chartists and fundamentalists for daily exchange rate data, the US corn market, and various other commodities markets, respectively. More recently, Cornea et al. (2012) Kouwenberg and Zwinkels (2010) to investigate the 5 behaviour of the US housing market over the last 50 years and in ter Ellen and Zwinkels (2010) when considering oil price dynamics.
The majority of the aforementioned papers find evidence of trader heterogeneity and switching.
However, there is no study which analyzes a heterogeneous model for the gold market despite the strong positive trend in the gold market in the early 2000s (between 2002 and 2011) and in the late 1970s.
The remainder of this paper is organised as follows. Section 2 introduces the HAM employed in this paper and describes the econometric estimation framework. Section 3 presents the estimation results and discusses the economic and statistical implications. Finally we summarise the main findings and provide concluding remarks in Section 4.

The model
There is clearly demand for gold from both industrial uses and as an investment asset. 9 Hence gold acts as a real and financial asset and we therefore choose to model both real and financial (speculative) demand for gold in our stylized representation of gold price dynamics. We distinguish between these two types of demands in the following way: Real demand is influenced only by the current gold price, whereas speculative demand-fundamentalist and chartist-is influenced by (heterogeneous) expectations of future gold price movements.
Following Farmer and Joshi (2002) we assume a log-linear price impact function which results in a structural model for the log gold price P of the following form 10 where D denotes excess demand with the superscripts M, F, and C indicating market (real economy), fundamentalist, and chartist demand, respectively. In addition, S t denotes the available 9 The average annual demand (in tonnes) from industrial uses, including jewellery, over the last five years (2008-2012 inclusive) accounted for 60% of total demand, with the remainder coming from investment and central bank purchases (World Gold Council, 2012). 10 Note that the log-linear impact function can be interpreted as the stylized behaviour of a market maker, absorbing temporary imbalances in excess demand (Farmer and Joshi, 2002), or as the outcome of trading via an electronic limit order book (Chiarella et al., 2009). 6 supply of gold at time t, the parameter θ a positive price adjustment coefficient, and crucially, W F and W C are (possibly) time varying weights to incorporate switching between strategies. Finally, e t denotes a noise term which can be interpreted as the influence of so-called 'noise' traders.
Consistent with ter Ellen and Zwinkels (2010), amongst others, the real demand and supply of gold is modelled in the following stylized and intuitive way with where b M > 0 and b S > 0, indicating that the demand for gold decreases, and the supply of gold increases, as the gold price rises. 11 For the speculative demands we use 12 where a j are positive reaction coefficients and E j t [P t+1 ] are the fundamentalists' and chartists' expectations of the next period's gold price. Furthermore, we assume that hence fundamentalists expect prices to revert to the fundamental price, F, with some positive adjustment speed b F . 13 Chartists, on the other hand, expect the trend over the previous period (e.g. month) to continue to some degree, irrespective of the asset's fundamental value. The parameter b C is a measure of the direction and magnitude of the expected trend, with b C > 0 and b C < 11 Evidence of such a response in real supply and demand can be seen clearly from the the World Gold Council 2012 annual report which states that "the long-term downward trend in jewellery and technology volumes, against a backdrop of a twelve-year bull run in gold prices, has seen their share of total demand eroded". Furthermore, they note that there has also been a rising trend in mining production, rising year-on-year for the previous five years and currently at 2,847.7tonnes, 9% above the 5-year average (World Gold Council, 2012). Such a response to an increasing gold price is consistent with the real optionality of gold mines to expand production during times of higher output prices. 12 The model we employ here can be considered a behavioural model. The rules used by the fundamentalists and chartists to determine demand are simply rules of thumb or heuristics rather than being derived by rational expected utility maximisation. For examples of agents demand functions derived from utility maximisation see Chiarella et al. (2007Chiarella et al. ( , 2009. 13 A negative b F would indicate that fundamentalists expect prices to diverge from the fundamental value.
7 0 corresponding to trend-following and contrarian strategies, respectively. We note that these stylized chartist and fundamentalist demand functions have been chosen to capture the stabilizing force of fundamental traders and the trend-following nature of chartists.

The fundamental value
A key ingredient in the model above is the specification of F, the fundamental value of gold.
However, the determination of such a fundamental value is challenging. The main difficulty being that, unlike equity and other contingent claims, gold provides no expected future cash-flow to the investor, other than potential capital gains. Therefore, there appears no clear, or commonly agreed, way to determine, or even define, the fundamental value of gold. 14 One candidate driver of a fundamental price present in the literature is that its real value is simply constant. This assumption implies that gold (like other commodities) provides a natural hedge against inflation. 15 However, using such information to determine a fundamental value is far from straightforward. 16 An alternative argument is that, since gold is used as a store of value and a safe haven for many investors (see Baur and Lucey, 2010), the fundamental price of gold could depend on the economic state of other markets. This dependence, however, could only be introduced in an ad hoc manner and would require the use of exogenous variables, which is outside the scope of our present study. 17 Given such difficulties in identifying a suitable candidate for the fundamental price of commodities, previous estimation of HAMs in such markets have made various simplifying assumptions about the fundamental value. Reitz (2003, 2005) and Reitz and Westerhoff (2007) appeal to the stationary nature of some commodity prices and take the fundamental value to be simply the average of the price over the investigated time period. 18 Alternatively, ter Ellen 14 Articles in the Financial Times, The Economist and the Wall Street Journal suggest that there is a consensus that the fundamental value of gold is unknown. Gold is "hard to value" (The Economist, 2013), "has no fundamental value" (Financial Times, 2013), and "can't be measured in the same way as other financial assets" (Wall Street Journal, 2013). 15 Since the gold price is denominated in government currencies, its nominal value will increase if the value of this currency is eroded by inflation or other factors. 16 Furthermore, Blose (2010), using data from 1988-2008, reports that changes in expected inflation, does not appear to significantly affect the price of gold, casting doubt on the validity of this as a fundamental driver of the gold price. 17 Baker and Van Tassel (1985) is an example of a study that uses exogenous variables to model the price of gold. 18 Clearly this method would involve some form of look-ahead bias and as such would not be useful for forecasting. 8 and Zwinkels (2010), when considering oil price dynamics, follow Schwartz and Smith (2000) and proxy the fundamental price as a two-year moving average.
Similar to the latter authors, and motivated by the aforementioned difficulties, we also choose to interpret the fundamental value, and hence fundamentalism, in a wider context by defining the fundamental value F to be a long-run equilibrium price approximated by an exponentially weighted moving average (EWMA) of historical gold prices with a half-life of two years (and hence a decay parameter of approximately 0.9715). The use of a moving average as a proxy for the fundamental value can be motivated further by noting that if the fundamental value is difficult to estimate then traders may look to other investors for an indication of the fundamental value.
Hence if recent prices have been high then such investors' fundamental value estimate is likely biased upwards by this fact. In other words, under these conditions fundamental value estimates may be anchored to recent market prices. Figure 1 shows the gold price dynamics along with our proxy for its fundamental value. Whatever ones opinion on the fundamental price of gold we think that it is safe to argue that the extreme change in the price of gold from values around 300 US dollars to values above 1, 900 US dollars between 2002 and 2011 cannot be solely explained with a change in the fundamental price of gold.

Switching
The switching between expectations is governed by the weights W C t and W F t , which we assume to sum to unity, i.e. that W t := W C t = 1 − W F t for all t. In line with the extant literature, we assume that such switching could involve an element of delay due to agents' firmly held beliefs; a form of status quo bias (Kahneman et al., 1982). We therefore employ a standard logistic function as the switching mechanism to model such a bias. We also consider an array of different switching variables within this switching mechanism; some drawn from the existing HAMs literature and others, to the best of our knowledge, that are used for the first time here. 19 The switching function 19 We note that our consideration of multiple switching variables within a fixed switching mechanism is consistent with the results of Franke and Westerhoff (2012), who perform a model contest between different switching mechanisms (deterministic vs. stochastic) and different switching variables (past-profits etc.), with the results indicating the primary importance of switching variables over the actual switching mechanism. It should be noted, however, that the results of Franke and Westerhoff (2012) are within a model with a different noise structure than that employed in the present paper.
we use is therefore given by where s t denotes the observable switching variable for which different specifications are entertained. The parameter γ, which can be either positive or negative, dictates the speed at which agents switch their beliefs and is also called the 'intensity of choice' parameter. The threshold c denotes the value around which the logistic function above is centered. For some switching specifications economic intuition will compel us to set c = 0, but for other specifications this value will be empirically estimated. We also choose to normalise by the standard deviation of the switching variable σ s to aid with the comparison of γ across specifications (cf. Silvennoinen and Thorp, 2013).
the indicator function; hence smooth switching reduces to abrupt (binary) switching when the parameter |γ| → ∞. Switching can therefore be either abrupt or smooth, with the nature of the switching ultimately estimated. We also see that a high value of s t corresponds to the chartists regime (if γ is estimated to be positive; the reverse occurring if γ is negative).
Note further that we choose our baseline switching variable to be the standard relative past performance measure of the two trading strategies considered; as was introduced in Brock and Hommes (1997Hommes ( , 1998. The particular performance measure employed here is inspired by De Grauwe and Grimaldi (2006), amongst others, and corresponds to the average realised holdingperiod profit of $1 invested in a given strategy calculated as where D j t−i−1 denotes the holdings at the beginning of the period, P t−i − P t−i−1 the realised return over the period, and L the number of periods over which the past performance is evaluated. The switching variable is thus calculated as s t = π C t − π F t . We will also consider a risk-adjusted version of the realised profit measure-similar to a Sharpe 10 ratio-given byπ j t := π j t /σ j L,t whereσ j L,t is a proxy for the risk of strategy j. 20 For simplicity we assume the risk of all strategies are equal and approximated by the sample standard deviation of gold returns over the same period as the past profits are evaluated (i.e. the previous L periods).
The comparison of profits with risk-adjusted profits not only provides a check for the robustness of our results, but also allows us to assess whether the inclusion of risk-adjustment adds to the model fit.
In addition to these strategy dependent switching variables we also investigate other, nonstrategy dependent, variables. Such variables can be considered 'market variables' as they measure a particular aspect of the current state of the market, e.g. the volatility of the market or the difference between the current price and the fundamental price. We chose a further three economically justifiable market variables, to produce a total of five different switching variables considered.
These switching variables provide a robustness check for our results and offer additional insights into the activity of the heterogenous agents within the gold market. 21 The first market variable considered is the estimated standard deviation (volatility) of gold returns, denotedσ L,t , which is calculated using the standard statistical estimator applied over the previous L periods. Note that we address the effect of volatility indirectly in the risk-adjustment of the realised profits, however we also choose to consider this variable in its own right. 22 The second switching variable is the current price deviation from the fundamental value, given by |F t − P t |, and the third a risk-adjusted version of this, given by |F t − P t |/σ L,t . Similar switching variables have been employed previously in the literature, for example in Reitz (2003, 2005), who motivate such a specification by stating that the larger the deviation from fundamentals-the larger the bubble-the greater the attention placed on the market by technical traders. However, such attention may be modulated by the volatility of the market as increased price volatility results in a higher risk to such chartist trading strategies. 20 An alternative would be to perform the risk-adjustment in the form of a realised utility (for example usingπ t = π t − 0.5ησ 2 L,t for some risk-aversion parameter η) as was done in Hommes (1997, 1998). However, we do not derive agents' demands from utility theory and so we choose not to do this here. 21 It is noteworthy that we use the switching variables as alternatives in different specifications and not in one model as in Lof (2012); who considered a single transition function depending on multiple transition variables. 22 Westerhoff and Reitz (2005) state that a high volatility period makes trading more risky and technical traders are consequently less eager to enter the market. This variable allows us to test this (theoretical) assumption directly.
Finally, we discuss the threshold c employed in the switching mechanism (4). When considering the realised profit differential as our switching variable it is natural to assume that c = 0, since one would expect chartists to dominate (W > 0.5) in periods where the past performance of such a strategy dominates that of the alternative (π C > π F ). 23 Furthermore, we remark that the threshold c can be seen to play a similar role to the parameter γ in modelling the status quo bias since such a bias would result in agents' unwillingness to switch strategies unless the profit differential is sufficiently high to overcome this bias. Therefore, in order to retain parsimony, we focus on the c = 0 case. However, for the market state variables (standard deviation and the absolute deviation from fundamentals) we must set c ≥ 0, since these variables are, by definition, non-negative.
Having clarified our switching mechanism, the dynamics to be estimated can be summarisedafter substitution of Eqs. (3) and (2) into Eq. (1)-as follows: (5) where φ 0 := θ(a M − a S ) and φ 1 := −θ(b M + b S ) characterise the effects of the real economy on prices and φ C := θa C b C and φ F := θa F b F quantify the price impact of chartists and fundamentalists, respectively. Furthermore, ∆P t+1 := P t+1 − P t and the switching function W t is given by Eq. (4), where the switching variable s t is chosen to be one of the five specifications listed in Table 1. Table 1 about here *** To aid our understanding of the above dynamics we observe from Eq. (5) that in the absence of speculative traders, i.e. φ C = φ F = 0, the resulting dynamics are simply an AR(1) process, which is mean reverting (to the level −φ 0 /φ 1 ) for φ 1 < 0. Hence real supply and demand can act as a stabilizing force in the gold market and would result in a mean-reverting gold price consistent with standard economic theory. 24 23 A non-zero threshold may be justified if there are substantial differences in the costs of implementing the competing strategies, or if there is a cost to switching between them. However, given the lack of fundamental knowledge to be obtained in the gold market, we do not expect this to be a reasonable assumption. 24 It is also possible that φ 1 > 0. This would indicate an explosive price process as estimated for some specifications below. However such a result would not be consistent with the law of supply and demand.
The following section explains the estimation procedure for the above model and presents our empirical findings.

Empirical analysis
The model given in Eq. (5) belongs to the class of smooth transition regression (STR) models. 25 It is noteworthy that the autoregressive term is assumed not to vary across the two regimes and that the specification within each regime is different.
Due to the nonlinearities induced by the switching mechanism, it has been well documented (see, for example, de Jong et al., 2009) that estimation results for similar models are usually highly sensitive to the starting values used, particularly in regards to the intensity of choice parameter γ. 26 Within the smooth transition model literature, Teräsvirta (1994) also notes that the estimation of the parameter γ may involve problems such as slow convergence of the estimation routine and difficulty in determining the significance of the resulting estimate.
Given these well documented empirical issues we employ the following standard estimation procedure: We perform a grid-search using conditional least squares estimation over an extensive (γ, c) parameter space. 27 The selection criterion is the estimated R 2 . 28 The selection of the appropriate number of lags (L) for the past profit function, as well as the sample period over which the statistical estimates of the market-based switching variables are estimated, is also based on the goodness-of-fit measure R 2 . 29 The remainder of this section provides a descriptive analysis of the data followed by the presentation and discussion of the estimation results and the necessary robustness checks. 25 This class of models was introduced by Ozaki (1985) and developed further in Teräsvirta and Anderson (1992), Granger and Teräsvirta (1993) and Teräsvirta (1994). Other applications of STR models within the HAMs literature can be found in Taylor et al. (2001) and Reitz and Taylor (2008), among others. 26 This is due to optimization procedures identifying local optima (see Winker, 2001, Winker andGilli, 2004). 27 The parameters γ and c are often called nuisance parameters within the STR literature. 28 The estimation procedure is similar to Leybourne et al. (1998) but uses R 2 instead of the residual sum of squares (RSS). In addition, we note that the range of γ involves both positive and negative values and that the values γ = ±∞ (where W is an indicator function) are also considered in the grid search to assess the performance of abrupt switching. The search range of c is chosen to be simply the range of observed outcomes of the switching variable s t . 29 It can be shown that the commonly used information criteria AIC and BIC for the lag selection are closely related to R 2 . More specifically, a high (low) R 2 is equal to low (high) AIC and BIC measures. We used a simple Monte Carlo simulation to obtain this result.

Data
We use monthly data of the price of gold in US dollars per troy ounce as quoted on the London Bullion Market in the morning (A.M. official). The sample period is January 1970 until December 2012. We use mid-month log-prices denoted as P t to calculate the monthly differences/returns  Table 2 about here *** Table 2 shows the summary statistics of the gold return and the deviation of the gold price from the fundamental value-the drivers of both chartists' and fundamentalists' demand, respectively.
In addition to the full sample, we also choose to split the sample into two, roughly equal, periods (1970-1991 and 1992-2012) to assess the variation in these statistics over time. An advantage of the split is that the first period is characterised by a period of rising and falling prices, i.e. a correction, while the second sub-sample is characterised by a rising price of gold without a substantial correction. This feature may be important to assess the role of trend-following and stabilizing behaviour.
We observe that the average monthly return over the whole sample is 0.75 percent and the standard deviation is 5.97 percent, with the first sub-sample period having a slightly higher return (and associated higher standard deviation) than the second sub-sample period. In addition, typical of many financial time-series, we also observe clear evidence of non-normality in returns, particularly fat tails, over both periods. Another notable feature of the returns distribution is the observed positive skewness during the first sub-sample compared to a negative skew in the more recent sample. In regards to the deviation of the gold price from the fundamental value, the mean and median of both sample periods are negative, indicating that prices were above fundamentals for the majority of the time. 31 We also examined the autocorrelation function (ACF) of monthly gold returns during the full and two sub-sample periods and found significant positive first-order autocorrelation over the first sub-sample and stronger negative first-order autocorrelation in the second sub-sample. The differences of the time-series characteristics between the sub-samples indicate that the split of the sample is an important part of the empirical analysis.

Estimation results
The presentation and discussion of the estimation results is structured as follows: First, we present the estimates of a model without any switching mechanism for the full and sub-sample periods as a preliminary analysis and to act as a benchmark to compare the subsequent switching specifications. Second, we present the estimation results for the HAM with the different switching variables employed. We also estimate these results for the full sample and two sub-sample periods to assess the robustness of the estimation results, and to assess how, given the long sample period chosen, agents behaviour may have changed over time. Third, and finally, to provide more granularity in our results we estimate a modification of our full switching model which allows for asymmetry in agents' demands.
A preliminary analysis revealed that the gold price exhibited very different dynamics during the first sub-sample period (covering the 'bubble' of the 1970s/80s) than it did in the second period (capturing the potential bubble of the 2000s). We therefore choose to focus our attention on each sub-period, rather than trying to infer consistent behaviour over the relatively long 43 year period, in which there have been important institutional changes in the market for gold. 32

No-switching
We use the no-switching case as a benchmark to determine if adding the switching improves model fit and is economically meaningful. We also estimate the model with no speculative traders (in which case we have a simple AR(1) process) and with only either chartists or fundamentalists active. This provides a full picture of the significance of agents' behaviour (in the absence of switching). The estimation results are presented in Table 3 and illustrate that chartists and fundamentalists indeed improve the fit of the model to the data. 33 *** Insert Table 3 about here *** We see from the model with both agents active (W = 0.5) that the implied equilibrium value (calculated as e −φ 0 /φ 1 ) for the full sample is $595.19, as well as $375.40 and $955.99 in the first and second sub-sample, respectively.
We also observe that fundamentalists explain the most over the whole sample, whereas chartists add the most to the explanatory power over the two sub-samples. Furthermore, chartists appear to be following positive feedback (momentum) strategies during the first sub-sample but negative feedback (contrarian) strategies during the second sub-sample. The low explanatory power of chartists over the whole sample is therefore most likely due to the differing behaviour of such agents 'cancelling out' over the full sample. 32 The main institutional change in the market for gold is the introduction of exchange-traded funds (ETFs) on gold which allows both institutional and retail investors to obtain direct exposure to the spot price of gold. This increased opportunity set of investors may also have caused changes of their behaviour. 33 Note that, due to non-stationarity, the t-values of the AR(1)-terms are adjusted using the Dickey-Fuller tables Fuller, 1979, 1981). The other coefficients (φ C and φ F ) need no adjustment due to the stationarity of the related variables. We used an Augmented Dickey-Fuller test to assess the stationarity of the variables and the results of Stock (1994) who demonstrates that the coefficient estimates of the lagged differences (in contrast to lagged levels) follow a standard asymptotic normal distribution.
In regards to fundamentalist behaviour, we observe no significance in both sub-samples and low significance (to the 10% level) over the whole sample. The most notable observation, however, is that the sign of the estimated parameter φ F is negative in all sample periods. If the negative sign persists for a more comprehensive model with switching, we must re-interpret the nature of such 'fundamentalist' strategies. Recall that a positive φ F indicates a long-term price stabilizer (trading towards a long-term moving average). A negative coefficient, therefore, can be interpreted as a contrarian fundamentalist or a positive feedback trader using a long-term average (F) as their trading signal. In other words, such agents purchase gold if the price is above the long-term moving average since they are extrapolating long-term trends (as opposed to the short-term trends considered by the agents labeled chartists). Such agents cannot be seen as a stabilizing force in the gold market. 34 Finally, we observe that in the absence of speculative traders, the AR(1) process in the most recent sub-sample exhibits explosive behaviour (consistent with the expansion of a potential price bubble). However, the addition of our speculative agents into the model specification, whilst also increasing greatly the explanatory power, removes this explosive characteristic, indicating that the presence of both agents can account for the explosive nature of the AR(1) process in recent times.
In other words, once we add the speculative traders to our model specification the source of the explosive behaviour is identified and the AR(1) coefficient becomes negative, consistent with the demand for gold from the real economy.
Whilst the above results provide some evidence of the impact of agents' heterogenous expectations on gold prices it is clear that the addition of switching is necessary to provide a much more satisfactory fit to the observed data.

Switching
We now present the estimation results for the switching model with different switching variables considered. Tables 4, 5 and 6 report the results for the full sample and the two sub-sample periods, respectively. *** Insert Tables 4, 5 and 6 about here *** We note that the addition of switching (PD, PDA, STD, DF and DFA in comparison to 'static') increases the fit to the data and furthermore increases the significance of the speculative demand considerably in most cases. In addition, the signs of the coefficients φ 0 and φ 1 are consistent over all the full sample and the first sub-sample periods indicating the continued presence of stabilizing real demand and supply. Their insignificance, however, suggests their effects are weak in comparison to those of the speculative traders. The results are mixed for the second sub-sample period with some switching variables failing to explain the explosive price behaviour in this period.
The switching variables are discussed in more detail below. We first discuss the strategydependent switching variables-the profit differences PD and PDA-and then focus on the marketdependent switching variables-the return volatility STD and the price deviations from the estimate of the fundamental value DF and DFA.

Strategy-dependent switching
When considering the full sample period, the estimated coefficients φ C and φ F are both found to be negative, as in the no-switching ('static') case, and therefore the dynamics over the whole sample are best explained by short-term contrarian chartists and long-term trend-following 'fundamentalists' with no evidence for stabilizing fundamentalists. The only stabilizing force being real supply and demand. However, as noted previously, interpretation of results covering such a long period should be treated with caution and so we choose instead to focus our attention on the two sub-sample periods.
In stark contrast to the results for the full sample, the first sub-sample period  reveals the chartist and fundamentalist coefficients to be of the opposite sign (both positive) and highly significant. This provides strong evidence in favour of speculator-driven price dynamics consistent with the traditional chartist-fundamentalist paradigm, with destabilizing short-term (trend-following) chartists and stabilizing long-term fundamentalists. The considerable increase in model fit, with R 2 increasing from 3.81% to 10.06% after the addition of switching, also suggests that switching between such 'classical' agents is an important feature of the gold price dynamics during these years. Other notable results from the first sub-sample period are that risk-adjustment does not appear to significantly affect the results and that the switching is estimated to be relatively smooth with γ equal to 4.56 and 4.25 for the PD and PDA specifications, respectively. 35 For the second sub-sample period (1992-2012) the picture is drastically different to the first (but similar to the full sample). We observe strong evidence of short-term contrarian chartist behaviour despite the clear upward trend in the gold price. At first blush it would appear that this finding is contradictory to the undeniable positive price trend. However, the large negative value of φ F indicates that the contrarian chartists are joined by long-run trend-following agents which can explain the steady upward trend. *** Insert Figures 2 and 3 about here *** Figures 2 and 3 plot the time dependence of the estimated weights for the PD specification for the first and second sub-sample period, respectively. 36 We observe active switching during the first sub-sample period and that the market was dominated by short-term trend-following chartists in the run-up to the 'bubble' of the 1970s/80s. We also observe much less variation in the estimated weights in the second sub-sample period in comparison to the first; the weights remain around 0.5 for the majority of the sample period, with only a slight deviation during the recent global financial crisis.
Such evidence, along with only moderate increases in the fit of the model when switching is added, suggests that switching between agents in the second sub-sample period is not a dominant feature of the dynamics. This perhaps is intuitive since the agents identified in this period are 'nonclassical', being long-term trend-followers and short-term contrarians. Agents can profit from both strategies at the same time due to the different time horizons involved. Short-term contrarians 35 We note from unreported results (available upon request) that when considering the case of a non-zero threshold (c 0) we observe that switching is always estimated to be abrupt, i.e. |γ| = ∞. This result is no doubt related to the previously mentioned observation that the threshold c plays a similar role in modelling the status-quo bias of agents as the parameter γ. Such additional results are consistent with observations from the smooth transition literature, finding that for (volatile) financial switching variables abrupt switching is often estimated (Silvennoinen and Thorp, 2013). 36 The plots for the PDA specification looks very similar and are thus not reported.
profit from a short-term negative autocorrelation in returns and long-term trend-followers profit from an increasing price over the longer term. Hence both strategies can profit and neither would necessarily dominate, consistent with the empirically observed switching.

Market-dependent switching
Given the observed difficulty in inferring consistent behaviour over the full sample period, and in the interests of brevity, we do not discuss the results for the full sample period; instead we focus on the results for the two sub-sample periods. The estimation results, however, are presented for completeness.
For both sub-sample periods, the estimated signs show a consistent pattern across all switching variables, whereas the size, significance, and model fit show considerable variation; indicating the importance of considering alternative switching specifications. In the first sub-sample  the coefficient estimates φ C and φ F are both positive and significant (and hence consistent with the strategy dependent switching results) for all switching variables. The only exception being that the estimate of φ F for the DF switching specification is positive but statistically insignificant.
This result indicates that the risk adjustment to the current deviation of the gold price from its long-run (fundamental) value is an important consideration.
We also observe a negative (infinitely large) γ estimate for the STD specification, representing an abrupt switching mechanism with trend-following chartists active in the low volatility regime and stabilizing fundamentalists active in the high volatility regime. This finding is consistent with the ideas of Westerhoff and Reitz (2005) who state that a high volatility period makes trading more risky and technical traders are consequently less eager to enter the market.
The results for the second sub-sample  are once more characterised by negative coefficients for φ C and φ F for all switching variables, consistent with the strategy dependent switching results. Furthermore, the estimated positive sign of the coefficient γ for the STD specification indicates that it is now the long-term trend-followers who are active in the low volatility regime with the short-term contrarians dominant in the high volatility regime.
The above results (for both strategy-dependent and market variables) identify trend-following chartists and stabilizing fundamentalists for the sample period which is characterised by both a 20 substantial price increase and a correction  while we find contrarian chartists and trend-following 'fundamentalists' in the period which is characterised by a substantial price increase and the absence of a correction. These distinctively different results for different price processes is perhaps not surprising and indicates that chartists and fundamentalists may also adapt their strategies through time.

Asymmetric demand
To sharpen our understanding of agents' behaviour further, we now consider the possibility of asymmetric demand, i.e. that chartists' trend-following behaviour could be different when chasing an upward trend, as opposed to a downward trend, and that fundamentalists act differently when prices are below long-run fundamentals than when they are above. We note that such asymmetries could arise from investors' behavioural biases as well as institutional factors such as short-selling constraints etc. As such, the model to be estimated is amended to where (·) + := max(·, 0) and (·) − := min(·, 0). The switching variable specifications remain unchanged. The results of these augmented estimations are presented in Tables 7, 8 and 9 for the full sample and two sub-sample periods, respectively. *** Insert Tables 7, 8 and 9 about here *** The majority of the observations made above in regards to the empirical results for the symmetric demand specification, and their variation across switching variables and sample periods, remain valid for the augmented demand specification. For example, once more we demonstrate that sub-sample estimates provide a better model fit than a full-sample fit. In the interest of brevity, therefore, we only focus on the most salient results.
Firstly, and most importantly, we see clear evidence of asymmetry in agents' expectations. In the first sub-sample period we observe strong evidence of trend-following behaviour in a rising market but much weaker evidence of such behaviour in a falling market; both in terms of size and significance of the coefficients. Such a result is perhaps related to the existence of financial or regulatory constraints on selling gold short-since trend-followers' demand is positive, and hence requires no short selling, only when prices are rising. The fundamentalists also exhibit asymmetry with a much stronger presence (in terms of significance) when the prices are above the fundamental value.
For the second sub-sample period we see clearly that the contrarian nature of the short-term chartists is almost entirely focused on responses to an upward price movement. In other words, such agents expect that prices will fall following a short-term rise in price. The size of the estimated coefficient is also very large in magnitude indicating a large predicted price reversal. When considering the fundamentalist behaviour, or long-term trend-followers as they must be labelled in this period, we once more observe asymmetry in their actions, with a more significant presence when prices are above the long-run fundamental (indicating a positive demand for gold). Once again this is consistent with financial or regulatory constraints on short-selling.

Discussion
We now provide a more general discussion of the possible implications of our empirical results.
Our results can be interpreted in the context of Brunnermeier (2008), who states that if a bubble persists, and prices become 'too' high, it may become optimal for fundamental traders to switch to more chartist strategies and ride the bubble as they cannot afford to trade against the market. This is what we have observed empirically in the gold market with the 'fundamentalist' beliefs apparently switching from stabilizing behaviour, φ F > 0, to de-stabilizing (trend-following) behaviour, φ F < 0, in the 1992-2012 period. Our results suggest that fundamentalists have switched to a trendfollowing strategy in response to a long-lasting episode of increasing prices which made it too costly to speculate against the trend. In order to survive they adopted a trend-following strategy. 37 Furthermore, the absence of a commonly accepted fundamental value in the gold market may have exacerbated this process and has perhaps delayed the return of fundamentalist behaviour to the gold market in recent years, despite the record high prices.
Given this interpretation we may attempt to ask such questions as: "What are the implications of these results for the future?" and "will the price trend be reversed fast or slow?" Our empirical results provide some hints in answering these questions since there is no evidence that chartists have historically chased trends downwards. A market without fundamentalists, and chartists only chasing upward trends, would result in dynamics that have a sharp upward trajectory and then only a slow decline due to the mean-reverting force of real supply and demand. If the chartists also followed downward trends, or fundamentalists returned to the market, we could then observe a sharp correction to the 'bubble', i.e. a crash.

Robustness Checks
We have performed several specification checks to assess the robustness of the results reported above. Some of these checks have been reported and discussed explicitly and others have not been explicitly reported and the discussion has been saved for this section. All results presented in this paper are comprised of full sample estimates and two sub-sample estimates. This sub-sample analysis has been discussed extensively and revealed that the evolution of the price of gold is better characterised by two different regimes (1970-1991 and 1992-2012) than one regime only.
We have also analysed the residuals, standardised residuals and squared standardised residuals for each estimated model in a post-estimation specification check and found that there is no remaining autocorrelation in the residuals for the second sub-sample but some remaining autocorrelation for the first sub-sample and the full sample period. This result is not surprising given the superior fit of the 1992-2012 data set compared to the 1970-1991 data and the full sample period. Since we have derived the econometric model from a standard theoretical heterogeneous agents model and considered a large set of possible switching variables including specifications with no switching we have not considered alternative econometric models to preserve the one-to-one mapping of the theoretical model with the econometric model.
We have also analysed the robustness of the estimation results with respect to a different funda-23 mental value based on a shorter moving average half-life of 12 months compared to the 24 months used in this paper. The results appear robust to changes in the specification of the fundamental value, i.e. the approximate size, sign and significance of most estimates remain unchanged. The notable differences are that the switching is estimated to be more abrupt and the length over which past performance is evaluated (for the profit switching variables) is increased.
We also considered a higher data frequency, i.e. daily data, but found no significant qualitative differences compared to monthly data. Finally, we analysed alternative data series: silver spot prices and gold futures data at a monthly frequency. For both series the results are qualitatively very similar but the coefficients are generally smaller in absolute terms and the statistical significance is weaker. For example, for silver, the negative autocorrelation in the second sample period is present but less significant and hence it appears that contrarian traders are less active in the silver market. There is also weaker evidence of long-term trend-followers in the silver market. Since anecdotal and econometric evidence suggests that gold is driving the gold-silver relationship, weaker effects for silver should perhaps be expected.

Summary and concluding remarks
In this paper we analysed the price of gold using a pure time-series econometrics approach An asymmetric analysis further reveals that chartists are mostly active in regimes of increasing gold prices which can be explained with significant costs of short selling. This finding also suggests that a correction of a gold price well above the fundamental value occurs only slowly and makes a sudden crash unlikely.
Furthermore, we also find that abrupt and smooth switching depends on the switching vari-    Table 3: Estimation results for no switching, i.e. with W t ≡ 0, 0.5, and 1, for full sample and two sub-sample periods. Significance levels: 1% (***), 5% (**), 10% (*); t-values are denoted in brackets. Model: where W = 1 implies that only chartists (C) are active, W = 0 implies that only fundamentalists (F) are active, W = 0.5 implies that both chartists and fundamentalists are active. A negative (positive) coefficient of φ 1 indicates mean-reversion (explosiveness) associated with real economy factors, a positive (negative) coefficient of φ C and φ F implies trend-following (contrarian) chartists and stabilizing (trend-following) fundamentalists, respectively.
Full sample    (5) for the first sub-sample period . Significance levels: 1% (***), 5% (**), 10% (*); t-values are denoted in brackets. Model: where a negative (positive) coefficient of φ 1 indicates mean-reversion (explosiveness) associated with real economy factors, a positive (negative) coefficient of φ C and φ F implies trend-following (contrarian) chartists and stabilizing (trend-following) fundamentalists, respectively. PD (profit difference) and PDA (risk-adjusted) are strategy-dependent switching variables and STD (volatility), DF (deviation from fundamental) and DFA (risk-adjusted) are market-dependent switching variables. Note that µ s and σ s denote the mean and standard deviation of each switching variable.
First sub-sample    (5) for the second sub-sample periods . Significance levels: 1% (***), 5% (**), 10% (*); t-values are denoted in brackets. Model: where a negative (positive) coefficient of φ 1 indicates mean-reversion (explosiveness) associated with real economy factors, a positive (negative) coefficient of φ C and φ F implies trend-following (contrarian) chartists and stabilizing (trend-following) fundamentalists, respectively. PD (profit difference) and PDA (risk-adjusted) are strategy-dependent switching variables and STD (volatility), DF (deviation from fundamental) and DFA (risk-adjusted) are market-dependent switching variables. Note that µ s and σ s denote the mean and standard deviation of each switching variable.
First sub-sample   Table 9: Asymmetric model: Switching results for the gold price with asymmetric demand for the second sub-sample period . Significance levels: 1% (***), 5% (**), 10% (*); t-values are denoted in brackets. Model: where a negative (positive) coefficient of φ 1 indicates mean-reversion (explosiveness) associated with real economy factors, a positive (negative) coefficient of φ C· and φ F· implies trend-following (contrarian) chartists and stabilizing (trend-following) fundamentalists, respectively. PD (profit difference) and PDA (risk-adjusted) are strategydependent switching variables and STD (volatility), DF (deviation from fundamental) and DFA (risk-adjusted) are market-dependent switching variables. Note that µ s and σ s denote the mean and standard deviation of each switching variable.
Second sub-sample