We first consider a Spot market whose prices are represented by a Geometric Brownian Motion:
\(\Delta S_t = \mu \Delta t + \sigma \epsilon \sqrt{\Delta t}\)
Here \(S_t\) is the stock price at timestep \(t\), \(\mu\) is a constant ‘drift’ parameter, and \(\sigma\) is a constant volatility parameter. \(\Delta S_t\) is the increment or decrement applied to the current spot price at time \(t\) to generate the spot price at \(t+1\).
Next, we consider a Perp market derived from this spot market, with 200 traders. At any time \(t\), the entire history of both the Spot market and Perp market prices for the time interval \((1,2...t)\) are visible to the traders in the perp market. Pricing decisions are entirely based on forecasts using past information.
The \(Premium\) at any time \(t\) is defined as:
\(Premium_t = Perp\ price_t - Spot\ price_t\)
Figure 1: Results of a simulation run with \(\mu = 1\), \(\sigma = 0.5\) and \(S_0 = 100\). On the left we see the Spot Prices vs the Perp Prices. The ‘peg’ is clearly holding, with the Perp prices in green tracking the spot prices in red. On the right we see a chart of the premium, the difference between the Perp and Spot prices over time.
The behavior of the traders is entirely determined by these two price signals, and the following parameters:
\(\sigma_f\): The weightage given by a trader to fundamentalist strategies. This is set to \(0\) as discussed in the methods section above.
\(\sigma_c\): The weightage given by a trader to chartist strategies
\(\sigma_n\): The weightage given by a trader to noise strategies
\(\sigma_\epsilon\): A volatility parameter used by the noise strategy to produce forecasts
\(l_{min}, l_{max}\): The time horizon used by the Chartist strategy to generate forecasts
\(k_{max}\): The range above and below the forecast price from which the trader selects their Bid and Ask prices
\(bias\): Modulates the tendency for a trader to prefer positional or basis trading startegies based on whether they are trading long or short.
\(exit_{probability}\): The probability of exiting the market at each timestep
\(\tau\): all Bids and Asks more than \(\tau\) before the latest Bid or Ask are expired
\(cohort_{size}\): The number of randomly drawn traders who participate in trading at each timestep
We start by exploring the effect of varying the strategy-weighting parameters on the ‘peg’ of the Perp price to the Spot price. This is done first to identify suitable relative weights of trader strategies, enabling us to fix them and therafter examine the effects of the other parameters on Market dynamics. As discussed in the methods section, the fundamental strategy has zero weight, because it has no meaning in the Perpetual Futures context. This leaves the relative weights of Chartist and Noise traders to consider. By keeping the chartist weight constant at \(10\) and varying the Noise weight from \(1\) to \(10\), we can see a range of regimes where the Noise trader is \(\frac{1}{10}\) of the Chartist trader to the Noise trader being equally weighted compared to the Chartist.
Figure 2: Parameter sweep of the relative weights of Chartist vs Noise traders. Here we see the results of Chartist:Noise weights from 10:0 to 10:10 in increments of 2. The price ‘peg’ of the Perp to the underlying Spot is not very sensitive to the trading strategies adopted by traders in this market, suggesting the funding rate mechanism is effective in maintaining the price correlation in a wide range of market conditions
Varying the relative weight of Chartist and Noise strategies appears to have little impact on the sensitivity of the peg. This appears to echo the results of the original paper which found that varying the strategy weights produced results that remain ‘qualitatively the same’ (Chiarella et al, 2002). Further, with only noise traders present, we find that the peg appears to hold, but with greater variation than if Chartist traders are also present. This also echoes the findings of Chiarella et al.(2002), which suggests that the presence of both types of traders is necessary to produce more realistic simulations. It should be noted that this result is sensitive to \(\sigma_\epsilon\), which is the volatility parameter used by the noise trader to produce random forecasts. Varying \(\sigma_\epsilon\) does vary the error represented by the Premium, but is not of primary interest in examining the properties of the simulation.
Figure 3: If only Noise traders are present with a \(\sigma_\epsilon = 0.05\), the peg still holds, but with greater deviation than if Chartist traders are also present.
This prima-facie exploration suggests that to explore the market dynamics represented by the other parameters, we can utilize equal weights of Chartist and Noise traders to provide an unbiased basis for exploring the other parameters. The remaining simulation runs in the paper will utilize equally-weighted Chartist and Noise traders.
To analyse the properties of the peg, we use Shewhart Charts - a line graph representing a measure over time, with bounds representing an upper and lower control limit typically set at \(\pm3\) standard deviations from the mean. In the case of Perpetual Future Premiums, this represents the Spot Price at time \(t\), as the \(Premium_t\) is the deviation of the Perp price from the spot price at time \(t\).
Figure 4: The control chart for a simulation run with \(\mu = 1, \sigma = 0.5, S_0 = 100, \sigma_c = 10, \sigma_n = 10\). The upper and lower control limits are \(8.5\) and \(-5.7\) respectively, with the center of the distribution at \(1.4\), slightly above the expected \(0\). The number of ‘violations’ - Premiums greater than 3 standard deviations from the center - are \(89\), marked in Red. Finally, the number violating runs is \(148\) - this is a count of the number of consecutive premiums that are continuously increasing or decreasing away from the center - an indication of the process deviating from the norm (in Orange).
To see if there is a lag in ‘catching up’ with the Spot price signal, we use a Pearson’s cross-correlation between the Perp and Spot prices to see that the two signals are highly correlated, with a maximum correlation at a lag of \(2\) for the sample simulation run above.
Figure 5: Cross correlation of Perp prices with Spot prices, for a simulation run with \(\mu = 1, \sigma = 0.5, S_0 = 100, \sigma_c = 10, \sigma_n = 10\). The highest correlation is at a lag of \(2\).
Using these two methods, we next analyse the effect of changing the time horizon used by the Chartist strategy to make price forecasts on the Simulation. While the previous runs were exploratory in nature, to establish general bounds within which to perform the simulation, we will perform a Monte Carlo simulation to examine the effect of varying the Chartist time horizon under a variety of Spot Price signals (the only exogenous variable) to arrive at a robust estimate of the models response.