# Further Experimental Evidence of the _Dead Matter Has Memory_ Conjecture in
Capacitive Devices

Anis Allagui1,2, Di Zhang1 and Ahmed Elwakil3,4, _Senior Member IEEE_ 1Dept.
of Sustainable and Renewable Energy Engineering, University of Sharjah, United
Arab Emirates<EMAIL_ADDRESS>
2Dept. of Mechanical and Materials Engineering, Florida International
University, Miami, FL33174, USA
3Dept. of Electrical Engineering and Computer Science, Khalifa University,
United Arab Emirates<EMAIL_ADDRESS>
4Dept. of Electrical and Software Engineering, University of Calgary, Alberta,
Canada<EMAIL_ADDRESS>
###### Abstract

This study provides new sets of experimental results supporting Westerlund’s
conjecture that _Dead Matter Has Memory_ [1]. Memory effects in the dynamic
response of electric double-layer capacitors (EDLCs) that integrate its prior
history of stimulation and state have been experimentally observed and
reported in a few recent studies. The different excitation signals used to
quantify such effects in these studies aimed at charging a device to the same
voltage value and the exact same accumulated charge level but in different
manners. Having reached the same unique voltage-charge point, it was observed
that different yet repeatable discharge patterns occur, proving the existence
of memory. The aim of this work is to provide further experimental evidence of
the inherent memory effect in EDLCs in response to time-varying stationary
input excitations with different statistical properties. In particular,
different sets of charging voltage waveforms composed of fixed dc values with
superimposed uniformly-distributed random fluctuations of different amplitudes
were created and used to charge the same EDLC device to a unique voltage-
charge point. The duration of these signals was the same but with different
values of variance around the mean value. We observed different time-charge
responses depending on the extent of the noise level in these charging
waveforms. This is interpreted and discussed in the context of inherent memory
using fractional-order voltage-charge equations of non-ideal capacitors.

###### Index Terms:

Double-layer capacitors; Memory effect; Fractional-order capacitors

##  I Introduction

Over 30 years ago, Westerlund [1] highlighted the memory effect in non-ideal
capacitors that follow power-law (dis)charge dynamics giving rise to the
conclusion that dead matter must have memory. In a follow-up article,
Westerlund and Ekstam [2] established the mathematical foundation of capacitor
theory in the context of fractional-order calculus which cannot be avoided for
the accurate modeling of non-ideal capacitive devices. The booming interest in
fractional calculus and fractional-order dynamics has enabled more recent in-
depth studies on the memory effect in dielectrics [3], neuron models [4, 5]
and supercapacitors [6]. The experimental work done using supercapacitors in
particular has provided solid proof of the existence of memory leaving no
doubt to the validity of the _dead matter has memory conjecture_ [7].
Supercapacitors are electrochemical energy storage devices known for their
outstanding power performance, excellent reversibility and long cycle life,
but they are still lagging behind in terms of energy density when compared
with batteries. Their charge storage mechanisms can be either physical, i.e.
purely electrostatic ion adsorption in the electric double-layer at the
electrode/electrolyte interface, or pseudocapacitive via highly reversible and
relatively fast redox reactions, or both. Furthermore, the transport dynamics
in such devices in response to an external excitation is mainly subdiffusive
[8], which can be attributed to several factors including the porous nature of
the electrodes, their fractal geometries and also because of internal friction
forces and continuous scattering of ions diffusing in the supporting
electrolytes and through the wetted pores [9]. In addition, different types of
inter-ion interactions, crowdedness and buffering in narrow pores play a role
in establishing retarded diffusion processes in these devices [8]. From a
system-level perspective, the dynamics of supercapacitors follow a power-law
behavior which can be viewed as the collective result of many coupled
processes with different widely distributed time constants [10]. Multiple time
scale dynamics hint at the existence of memory effects that take into account
the global, non-local time behavior of past activities up to the present time.
This type of behavior can be well described with fractional-order integro-
differential equations [11, 12].

In recent years, there has been an intense effort to experimentally verify and
quantify the memory effect in EDLCs. For example, in [7] it was shown that
discharging a supercapacitor into a constant resistor from the same _voltage
and charge_ point reached using two different charging waveforms (step voltage
and linear voltage ramp) of two different durations leads to two different
responses, mostly in the short term, transient regime. This indicated that
contrary to ideal capacitors, knowledge of the initial condition is not
sufficient to determine the present and future states. In a second study [13],
a quantitative estimate of memory using the voltage memory trace
interpretation of fractional-order dynamics [5] was provided. A follow-up
paper by the same group illustrated the application of the memory effect by
sequentially encoding information into the charging pattern of the device, and
then uniquely retrieving the coded information from the discharge response
[14].

In this work, we further investigate the memory effect of supercapacitors,
albeit in response to time-varying stationary voltage excitations. The input
voltage waveforms are derived from uniform distributions of different sample
ranges, means and variances. It is observed that the extent of the noisy
excitation around the mean value (i.e. the prehistory and features of the
charging sequence) determine the actual response of the device at any given
time. The cross correlation function between charge and voltage shows a
visible degree of correlation, and thus short term memory effects, that fade
out as the time lag is increased. We also allude to the effect of noise
variance on the weighted sum memory trace that takes into account all prior
history of the device. It is worth mentioning that in a recent study [15]
aimed at explaining the _cardiac memory_ where the electrical activity in the
heart depends on the prior history of one or more system state variables the
following was mentioned: _$\ldots$ Memory is represented via capacitive
memory, due to fractional-order that arises due to non-ideal behavior of
membrane capacitance_. Therefore, we believe that studying the memory effect
in capacitive devices is of significant importance.

##  II Theory

Consider a linear capacitive device characterized in the frequency domain
(steady-state condition) by a capacitive system function $C(s)$ ($s=j2\pi f$
with $f$ being the frequency), such that the charge-voltage relationship is
given by:

$Q(s)=C(s)\,V(s)$ (1)

The corresponding time-domain charge-voltage relationship would then be
represented in terms of a hereditary (convolution) integrals as [16, 17]:

$\displaystyle q(t)$
$\displaystyle=\int_{0}^{t}c(t-\tau)v(\tau)d\tau=(c\circledast v)(t)$
$\displaystyle=\int_{0}^{t}v(t-\tau)c(\tau)d\tau=(v\circledast c)(t)$ (2)

where the lower limit of the integrals can also be taken to be $-\infty$ to
reflect infinite past. Here in Eqs. 1 and 2, $f(t)\ext@arrow
9999{\arrowfill@\leftarrow\relbar\rightarrow}{}{\text{\,}}F(s)$ represents the
pair of time-domain function $f(t)$ and its frequency-domain Laplace transform
$F(s)$, assumed to exist, i.e.
$\mathcal{L}\\{f(t)\\}(s)=F(s)=\int_{-\infty}^{\infty}f(t)e^{-st}dt$ and
$\mathcal{L}^{-1}\\{F(s)\\}(t)=f(t)=(2\pi
j)^{-1}\int_{a-j\infty}^{a+j\infty}F(s)e^{st}ds$. Analysis and discussions on
these formulas and others for describing non-ideal capacitive devices can be
found for instance in some of our recent work [18, 19, 20]. The integral in
Eq. 2 indicates that the accumulated charge in the device at an instant $t$
depends on the values of the applied voltage taken at times in the interval
$\tau\in[0,t]$ weighted by the convolution kernel $c(t-\tau)$ characteristic
of the device under study.

For the particular case of an ideal capacitor we write $c(t-\tau)=C_{1}$ where
$C_{1}$ is a constant, independent of time or frequency. Thus, Eq. 2
simplifies to be the well-known relation

$\Delta q(t)=C_{1}\Delta v(t)$ (3)

where $\Delta q(t)$ is evidently equal to $q(t)-q(0)$, where $q(0)$ is an
initial arbitrary charge stored on the device. The same is for the voltage
difference $\Delta v(t)$. Ideal capacitors are therefore said to be memoryless
devices.

However, if the convolution kernel $c(t-\tau)$ is not a constant, then all
events over the history of the device contribute to its current state of
charge. The capacitance of electrochemical capacitors including EDLCs,
pseudocapacitors and hybridized versions of the two cannot be taken as a
constant. This is due to their complex structures, inhomogeneities and
porosities of their electrodes, leading to distributed response times. These
devices have been shown to exhibit fractional-order behavior [3, 6, 12, 21]
that requires for their frequency-domain modeling invoking a fractional-order
impedance function, e.g.:

$Z_{\text{CPE}}=\frac{V(s)}{I(s)}=\frac{1}{C_{\alpha}s^{\alpha}}$ (4)

Note that $s^{\alpha}=\omega^{\alpha}\angle\,\alpha\pi/2$, with
$0<\alpha\leqslant 1$ and $C_{\alpha}$ is in units of F sα-1 [22]. The
fractional-order capacitor is also known as the constant phase element (CPE)
and its impedance reduces to that of an ideal capacitor $1/(C_{1}s)$ when
$\alpha=1$. The use of a fractional-order model indicates a priori that memory
effects should be expected in time-domain experiments. We note in this regards
that the time-domain voltage-current relationship corresponding to Eq. 4 is
given, by inverse Laplace transform, by the integro-differential equation:

$i(t)=C_{\alpha}\,{}_{0}^{C}\mathrm{D}_{t}^{\alpha}v(t)$ (5)

instead of the traditional ODE, $i(t)=C_{1}dv(t)/dt$, known for ideal
capacitors. The operator ${}_{0}^{C}\mathrm{D}_{t}^{\alpha}$ represents here
the right-sided Caputo time fractional derivative of order $\alpha>0$,

${}_{0}^{C}\mathrm{D}_{t}^{\alpha}f(t)=\frac{1}{\Gamma{(m-\alpha)}}\int_{0}^{t}{(t-\tau)^{-\alpha-1+m}}{f^{(m)}(\tau)}d\tau$
(6)

where $m-1<\alpha\leqslant m$, $m\in\mathbb{N}$, and ${f^{(m)}(\tau)}$ is the
$m^{th}$ derivative of ${f(\tau)}$ (in our case $m=1$). Again, this type of
integrals indicate that all prior history of the function should be accounted
for in order to determine the actual behavior of the device at the present
time $t$. This can also be viewed from the finite difference approximation of
Eq. 6. For $t_{k}=k\Delta t$, $k=0,1,\ldots,K$ and using a time step $\Delta
t=T/K$, then for all $0\leqslant k\leqslant K-1$ we have:

${}_{0}^{C}\mathrm{D}_{t}^{\alpha}$ $\displaystyle
v(t_{k+1})\approx\frac{1}{\Gamma(2-\alpha)}\sum\limits_{j=0}^{k}b_{j}\frac{\left[v(t_{j+1})-v(t_{j})\right]}{\left(\Delta
t\right)^{\alpha}}$ (7)

where $b_{j}=\left[(k+1-j)^{1-\alpha}-(k-j)^{1-\alpha}\right]$, with a
$(2-\alpha)$-order accuracy in time [23]. We can rewrite Eq. 7 as:

${}_{0}^{C}\mathrm{D}_{t}^{\alpha}v(t_{k+1})\approx\frac{(\Delta
t)^{-\alpha}}{\Gamma(2-\alpha)}$
$\displaystyle\left\\{v(t_{k+1})-v(t_{k})\right.+$
$\displaystyle\sum_{j=0}^{k-1}b_{j}\left.\left[v(t_{j+1})-v(t_{j})\right]\right\\}$
(8)

which is the the sum of the immediate past of the voltage (first two terms,
weighted by the Gamma function and the fractional time, $(\Delta t)^{\alpha}$)
and a memory trace [5] (summation term) that contains voltage information
about all previous activity of the device. The memory trace term increases
when the fractional order $\alpha$ in Eq. 8 decreases further away from one
[4, 13]. It is understood that at the limiting case of $\alpha=1$
(corresponding to first order integer derivative), the behavior of the
differentiable function is determined only locally in an infinitesimal
neighborhood of the considered point. In this case, the memory trace part
vanishes, and does not have any effect on the dynamics of the device [4],
which is simply a memoryless capacitor.

Referring back to the convolution integrals and their system function kernels,
the expression of the current represented by Eq. 6 with $m=1$ (i.e.
$0<\alpha\leqslant 1$) can be written as the Laplace convolution:

$i(t)=\frac{C_{\alpha}t^{-\alpha}}{\Gamma{(1-\alpha)}}\circledast\frac{dv(t)}{dt}$
(9)

where the capacitive kernel is the power law function

$c(t)=\frac{C_{\alpha}t^{-\alpha}}{\Gamma{(1-\alpha)}}$ (10)

that tends to zero as $t\to\infty$. The charge-voltage relationship for these
non-ideal capacitive devices in response to a voltage signal $v(t)$ is not
simply $\Delta q(t)=C_{1}\Delta v(t)$ (Eq. 3), but rather:

$q(t)=\frac{C_{\alpha}t^{-\alpha}}{\Gamma{(1-\alpha)}}\circledast{v(t)}$ (11)

or in discrete form:

$\displaystyle\Delta
q(t)=\frac{C_{\alpha}}{\Gamma(1-\alpha)}\sum\limits_{j=0}^{k}(t-t_{j})^{-\alpha}v(t_{j})$
(12)

This relation clearly indicates the presence of a memory effect in these
devices [5].

##  III Experiment

Figure 1: Impedance spectroscopy results of the GHC NanoForce supercapacitor
(rated 1 F, 2.7 V). Measurements were carried out on a Biologic VSP-300
electrochemical station using traditional stepped sine excitations of
frequencies 10 mHz to 100 kHz with an amplitude of 10 mV around a given dc
voltage, and the data were recorded at 10 frequency points per decade.

The device under test for this study is a commercially-available GHC NanoForce
supercapacitor, rated 1 F, 2.7 V, and the electrical measurements were
conducted on a Biologic VSP-300 electrochemical station equipped with an
impedance spectroscopy module111 This instrument has a voltage resolution of
1$\mu$V on 60 mV, voltage accuracy $<\pm$1 mV, and maximum voltage scan rate
of 0.2 V/ms. Its current range is 10 nA to 1 A with lowest accuracy and
resolution of $\pm$100 pA and 0.8 pA, respectively, on a 10 nA scale. .

Before we analyze time-domain data, we first characterized the device by
impedance spectroscopy. The results in terms of Nyquist representation of real
vs. imaginary parts of impedance, and impedance phase angle vs. frequency at
0, 0.9, 1.8 and 2.7 Vdc are shown in Fig. 1. The figure shows a clear
deviation of the spectral impedance of the device from that of an ideal
capacitor. This impedance can be fitted good enough with an $R_{s}$-CPE model
[12, 7, 14], which again suggests memory effects in time-domain measurements.

Figure 2: (a) Applied time-domain voltage signals with a mean value of 0.5 Vdc
and (b) accumulated charge on the GHC NanoForce supercapacitor (rated 1 F, 2.7
V) when excited with these waveforms. (c) The synchronized voltage and charge
vs. time for the last second of the experiment. (d) Plot of the ratio $\Delta
q/\Delta v$ vs. time and (e) plot of $R_{vq}(\tau)$ (Eq. LABEL:eqR) vs. number
of time lags

Secondly, the supercapacitor was charged using excitation voltage signals of
the type

$\displaystyle v(t)=v({t_{0}})H(t)+[v({t_{1}})-v({t_{0}})]H(t-t_{1})+\ldots$
$\displaystyle+[v({t_{j}})-v({t_{j-1}})]H(t-t_{j})$ (13)

where $H(t-t_{k})$ is the Heaviside step function. We used 64 different
settings for $v(t)$ by full factorial of (i) four different voltage mean
values ($V_{dc}=\mu=\text{0.5}$, 1.0, 1.5 and 2.0 V) with (ii) four different
ranges of uniformly-distributed voltage fluctuations (i.e. $\pm$20, $\pm$50,
$\pm$200 and $\pm$500 mV) superposed on the dc values, and (iii) four
different durations ($\Delta t=\text{1}$, 5, 20 and 60 seconds). It is clear
that a uniform noise means the signal consists of values derived from a
uniform distribution of probability density function expressed as

$f(x)=\left\\{\begin{aligned} &\frac{1}{b-a},\;\;a\leqslant x\leqslant b&\\\
&0,\;\;\text{elsewhere}&\end{aligned}\right.$ (14)

with variance $\sigma^{2}=(b-a)^{2}/12$ taking the values of (0.13, 0.83,
13.3, and 83.3)$\times$10-3 V2 for the ranges $\pm$20, $\pm$50, $\pm$200 and
$\pm$500 mV, respectively. Each signal consisted of $N=\text{1000}$ points
equispaced in time with a time step of $\Delta t=T/N$. Prior to each applied
excitation, the supercapacitor was discharged down to 5 mV using a 10 $\Omega$
resistor.

##  IV Results and Discussion

Typical results depicting the memory effect observed with the GHC NanoForce
supercapacitor are shown in Fig. 2, corresponding to 20-seconds long, 0.5 V
mean value voltage excitations with four different superposed uniformly-
distributed fluctuations (see Fig. 2(a)). The last value of each charging
sequence is appended to 0.5 V. The results obtained with the other dc voltage
values and other time durations are similar to those in Fig. 2, and not shown
here to preserve space. The accumulated charges in mA.h in response to the
voltage excitations of Fig. 2(a) are shown in Fig. 2(b). The overall trends of
the curves start first with a relatively quick power-law growth of the
accumulated charge followed by an asymptotic limit as the charging time is
increased [14]. We also observe from this quasi-stationary signal that in
response to a sudden change of a voltage stimulus, the device responds
accordingly with relatively large change in the instantaneous charge, followed
by slower adaptation until the next change in voltage input (see Fig. 2(c)).
The overall extent of change in the accumulated charge superposed on the
general trend is accentuated by the increase in variance of the input voltage
signal (Fig. 2(b) and Fig. 2(c)). This leads to the primary important
conclusion that the device’s accumulated charge adapts to changes in the
stimulus statistics, not only in terms of its mean value but also in its
variance.

Plots of the point-by-point ratios of charge to voltage are shown in Fig.
2(d). These results show also that by the end of the charging period, the
overall accumulated charges are different from each other even though the last
value of voltage was set to 0.5 V in all cases222The same is observed for the
other tested scenarios, i.e. with different mean values and different
excitation durations..

In Fig. 2(e), plots of normalized cross-correlations between voltage and
charge for the different levels of noise used are shown. The cross-correlation
is defined as $R_{vq}(\tau)=E\left\\{v(t)\,q(t+\tau)\right\\}$ where
$E\left\\{\cdot\right\\}$ denotes the expected value. The charge-voltage
correlation as a function of time lag when the dc voltage input signal is
superposed with the highly fluctuating signal of
$\sigma^{2}=\text{83.3}\times\text{10}^{-3}$ V2 always shows lower values
compared to the cases with lower variance values. This indicates a lack of
correlation between the two variables and thus the invalidity of the
constitutive relation $\Delta q(t)=C_{1}\Delta v(t)$, which applies for the
case of ideal capacitors only [19]. Furthermore, the correlation coefficient
defined as $\rho_{vq}={\mathrm{Cov}\\{v,q\\}}/{{\sigma_{v}\sigma_{q}}}$ where
$\mathrm{Cov}\left\\{\cdot\right\\}$ denotes the covariance between $v$ and
$q$ are found to be -0.0491, -0.0297, 0.0684 and 0.2141 for the four different
superposed signals respectively. The highest value of $\rho_{vq}$ goes with
the highest variance of noise. This is an indicator that the device remembers
the extent of the noise level.

Figure 3: Discrete-time Fourier transform (DTFT) of the applied charging
voltage excitations depicted in Fig. 2(a)

In connection with Eq. 12 which indicates that the memory trace term is more
pronounced when the value of $\alpha$ decreases, we note that the magnitude of
non-dc frequency components of the voltage input $v(t)$ increase with the
increase of variance of the uniform noise (see DTFT of voltage excitations in
Fig. 3). The stronger high-frequency components in the excitation signal are
directly related to the increase of impedance phase angle in the device (i.e.
lower value for $\alpha$), as depicted in Fig. 1(b). Hence, the higher are the
magnitudes of these frequency components, the stronger is the effect of the
memory trace term in Eq. 12. To further verify this point, Eq. 12 was
numerically executed with the same voltage signals applied experimentally on
the supercapacitor device (Fig. 2(a)), and with $C_{\alpha}$ and $\alpha$
being 0.660 F secα-1 and 0.905, respectively. These values are estimates of
the CPE model parameters used to fit the impedance data measured at different
dc voltage biases. The normalized cross-correlations between these voltage
signals and their corresponding charges obtained via Eq. 12 are plotted in
Fig. 4, and show similar trends to the experimental results (see Fig. 2(e)).

Figure 4: Normalized cross-correlations between voltage and charge vs. number
of time lags. The charge is obtained using Eq. 12 with $C_{\alpha}=\text{0.660
F\,sec}^{\alpha-1}$, $\alpha=\text{0.905}$, and with the same voltage signals
applied experimentally on the supercapacitor device as depicted in Fig. 2(a)

##  V Conclusion

In summary, we have provided further experimental evidence of the inherent
memory effect in EDLCs which results from the complex multi-time scale
dynamics of their internal microscopic structure and mechanisms. These
results, in conjunction with those previously reported in [14], show that it
is possible to encode information in the statistical distribution of the
random noise signal superimposed on the dc step charging voltage of a device.
From the fractional calculus modeling point of view, the memory effect in
these devices is attributed to stronger higher frequency harmonics of the
input signal, and as a consequence to the extent of deviation of the device
from ideality. In other words, high variance fluctuations make the device
operate in a less capacitive, more resistive mode with lower values of the
fractional coefficient $\alpha$, and thus with a stronger memory trace that
integrates all past values of its state. We believe that there is no further
doubt regarding the validity of the ”dead matter has memory” conjecture [1].

## References

  * [1] S. Westerlund, “Dead matter has memory!” _Phys. Scr._ , vol. 43, no. 2, p. 174, 1991.
  * [2] S. Westerlund and L. Ekstam, “Capacitor theory,” _IEEE Transactions on Dielectrics and Electrical Insulation_ , vol. 1, no. 5, pp. 826–839, 1994.
  * [3] V. Uchaikin, R. Sibatov, and D. Uchaikin, “Memory regeneration phenomenon in dielectrics: the fractional derivative approach,” _Physica Scripta_ , vol. 2009, no. T136, p. 014002, 2009.
  * [4] W. W. Teka, R. K. Upadhyay, and A. Mondal, “Fractional-order leaky integrate-and-fire model with long-term memory and power law dynamics,” _Neural Netw._ , vol. 93, pp. 110–125, 2017.
  * [5] W. Teka, T. M. Marinov, and F. Santamaria, “Neuronal spike timing adaptation described with a fractional leaky integrate-and-fire model,” _PLOS Comput. Biol._ , vol. 10, no. 3, p. e1003526, 2014.
  * [6] V. Uchaikin, A. Ambrozevich, R. Sibatov, S. Ambrozevich, and E. Morozova, “Memory and nonlinear transport effects in charging–discharging of a supercapacitor,” _Technical Physics_ , vol. 61, no. 2, pp. 250–259, 2016\.
  * [7] A. Allagui, D. Zhang, and A. S. Elwakil, “Short-term memory in electric double-layer capacitors,” _Appl. Phys. Lett._ , vol. 113, pp. 253 901–5, 2018.
  * [8] R. Metzler and J. Klafter, “The random walk’s guide to anomalous diffusion: a fractional dynamics approach,” _Phys. Rep._ , vol. 339, no. 1, pp. 1–77, 2000.
  * [9] H. Ribeiro and F. Potiguar, “Active matter in lateral parabolic confinement: From subdiffusion to superdiffusion,” _Physica A_ , vol. 462, pp. 1294–1300, 2016.
  * [10] A. Allagui and H. Benaoum, “Power-law charge relaxation of inhomogeneous porous capacitive electrodes,” _J. Electrochem. Soc._ , vol. 169, p. 040509, 2022.
  * [11] M. Du, Z. Wang, and H. Hu, “Measuring memory with the order of fractional derivative,” _Sci. Rep._ , vol. 3, p. 3431, 2013.
  * [12] M. E. Fouda, A. Allagui, A. S. Elwakil, S. Das, C. Psychalinos, and A. G. Radwan, “Nonlinear charge-voltage relationship in constant phase element,” _AEU - International Journal of Electronics and Communications_ , vol. 117, p. 153104, 2020.
  * [13] A. Allagui, D. Zhang, I. Khakpour, A. S. Elwakil, and C. Wang, “Quantification of memory in fractional-order capacitors,” _J. Phys. D_ , vol. 53, no. 02LT03, 2020.
  * [14] A. Allagui and A. S. Elwakil, “Possibility of information encoding/decoding using the memory effect in fractional-order capacitive devices,” _Sci. Rep._ , vol. 11, no. 1, pp. 1–7, 2021.
  * [15] T. Comlekoglu and S. H. Weinberg, “Memory in a fractional-order cardiomyocyte model alters properties of alternans and spontaneous activity,” _Chaos_ , vol. 27, no. 9, p. 093904, 2017.
  * [16] R. Nigmatullin, “On the theory of relaxation for systems with “remnant” memory,” _physica status solidi (b)_ , vol. 124, no. 1, pp. 389–393, 1984\.
  * [17] D. Baleanu, A. K. Golmankhaneh, A. K. Golmankhaneh, and R. R. Nigmatullin, “Newtonian law with memory,” _Nonlinear Dynamics_ , vol. 60, no. 1, pp. 81–86, 2010.
  * [18] A. Allagui, A. S. Elwakil, and C. Wang, “Time-domain and frequency-domain mappings of voltage-to-charge and charge-to-voltage in capacitive devices,” _IEEE Trans. Circuits Syst. II Express Briefs_ , vol. 70, no. 2, pp. 801–805, 2023.
  * [19] A. Allagui, A. S. Elwakil, and M. E. Fouda, “Revisiting the time-domain and frequency-domain definitions of capacitance,” _IEEE Trans. Electron Devices_ , vol. 68, no. 6, 2021.
  * [20] A. Allagui and M. E. Fouda, “Inverse problem of reconstructing the capacitance of electric double-layer capacitors,” _Electrochim. Acta_ , p. 138848, 2021\.
  * [21] A. S. Elwakil, A. Allagui, and C. Psychalinos, “On the equivalent impedance of two-impedance self-similar ladder networks,” _IEEE Trans. Circuits Syst. II Express Briefs_ , vol. 68, no. 7, pp. 2685–2689, 2021.
  * [22] A. M. AbdelAty, A. S. Elwakil, A. G. Radwan, C. Psychalinos, and B. J. Maundy, “Approximation of the fractional-order laplacian $s^{\alpha}$ as a weighted sum of first-order high-pass filters,” _IEEE Trans. Circuits Syst. II Express Briefs_ , vol. 65, no. 8, pp. 1114–1118, 2018.
  * [23] Y. Lin and C. Xu, “Finite difference/spectral approximations for the time-fractional diffusion equation,” _J. Comput. Phys._ , vol. 225, no. 2, pp. 1533–1552, 2007.


Figgie is a card game that approximates open-outcry commodities trading. We design strategies for Figgie and study their performance and the resulting market behavior. To do this, we develop a flexible agent-based discrete-event market simulation in which agents operating under our strategies can play Figgie. Our simulation builds upon previous work by simulating latencies between agents and the market in a novel and efficient way. The fundamentalist strategy we develop takes advantage of Figgie's unique notion of asset value, which allows different traders to have different but equally valid estimates of value. We find that the fundamentalist strategy is,and is, on average, the profit-maximizing strategy in all combinations of agent strategies tested. We develop a strategy, the “bottom-feeder”, which estimates value by observing orders sent by other agents, and find that it limits the success of fundamentalists. We also find that chartist strategies implemented, including one from the literature, fail by going into feedback loops in the small Figgie market. Positive auto-correlation in the returns in at least one strategy combination indicates that a more robust chartist strategy could be successful in Figgie. We further develop a bootstrap method for statistically comparing strategies in a zero-sum game. Our results demonstrate the wide-ranging applicability of agent-based discrete-event simulations in studying markets.

§ INTRODUCTION

Until 2019, there were “no broadly available high-fidelity market simulation environments” [1], preventing research into the interaction of agents like the high-frequency traders of May 6, 2010 Flash Crush. Agent-based simulations like ABIDES [1] (in which traders interact by placing buy and sell orders on a market) are useful in helping to understand the interactions between traders. They also provide a space to examine strategies in which—unlike when historical data is used—implementing a strategy affects the market.

Existing research on trader interaction has focused on how different proportions of different simplified types of traders affect the behavior of prices [2], and how simulating trades between these types of agents can recreate various statistical properties of real markets [3][6]. This research has shown the effectiveness of agent-based modeling when applied to markets.

Figgie is a card game that simulates a market with just 4 assets and 4 traders [5]. We develop trading strategies for this simple version of a market and study how they perform in simulations, grounding our work in similar simulations of real markets. Expanding on previous work, we examine not just the resulting behavior of the market, but the performance of different strategies under different simulation settings.

We discuss multiple analogues of real trading strategies as applied to Figgie, including fundamentalists, chartists, noise traders, and a social trading strategy based on the completely transparent market of Figgie.

§ METHODS

§.§ Simulation

The simulation is an agent-based, discrete-event simulation. Every trader in the market is represented as a separate agent in the simulation, and an event can happen at any time in $\mathbb{R}^+$. There are two kinds of events that can occur:

* Consideration event. In this event, an agent takes a look at the market, and either decides to make an order, in which case an Add Order event is added to the queue, or decides to not make an order, in which case a new Consideration event is added to the queue. When a new Consideration event is being created for agent $i$, its time is $t_0 + X$, where $X\sim \text{Exp}(C_i)$ and $E(X)=1/C_i$. $t_0$ is the current simulation time and $C_i$ is the agent's consideration rate.

* Add Order event. In this event, a buy/sell order for asset $j$ is added to the corresponding buy/sell queue in asset $j$. Since this is the only time that asset $j$'s order book can change, this is also when asset $j$'s order-matching mechanism functions. Once the Add Order event finishes, a new Consideration event is created for the agent. Thus the assumption is that agents will only be willing to start considering making a trade again once their order has entered the order book.

The event-handling behavior is implemented efficiently in the simulation by storing events in a min-heap ordered by event time. This makes the time complexity of finding the next event $\Theta(1)$ and that of adding an event $O(\log n)$, where $n$ is the number of events in the heap [4].

Order-matching mechanism
Every time an Add Order event occurs, the order-matching mechanism for the corresponding asset runs. It fulfills matching buy and sell orders and removes them from the order book.

Get the lowest buy order $b$ and the highest sell order $s$, set $b_p$ and $s_p$ to their prices respectively
$b_p\geq s_p$
Set $v$ = min(buy volume, sell volume, seller inventory)
Subtract $v$ from the seller's inventory and add it to the buyer's
Subtract $v\times b_p$ from the buyer's cash and add it to the seller

No trade happens
b or s has not been fully fulfilled by the tradeadd the unfulfilled order back to the order book with the remaining volume to be fulfilled
Get the lowest buy order $b$ and the highest sell order $s$, set $b_p$ and $s_p$ to their prices respectively

Add $b$ and $s$ back to the order book
Order-matching mechanism

Algorithm <ref> is implemented efficiently in the simulation by storing the buy and sell orders in min-heaps and max-heaps respectively. As in the event handler, this gives $\Theta(1)$ time complexity for finding the next order to check and $O(\log n)$ time complexity for adding an order, where $n$ is the number of orders in the order book [4].

Latency Latency is the difference in time between when the buyer/seller sends order and the order book receives it. The simulation can handle latencies between trader agents and the market. Unlike ABIDES, which implements a latency matrix containing latencies between every pair of agents [1], this means that market information does not need to be passed in messages between the exchange and the traders, as seeing time-delayed information is easily simulated.

Consider an agent $a$ with a latency of $\Lambda$ which is considering making a trade at time $t_0$. $a$ should see the market as it was at time $t_0-\Lambda$, and, if it decides to add an order, the order will be added to the order book at time $t_0+\Lambda$. There are two ways to implement this:

* Give $a$ a consideration event at time $t_0$, letting it see historical market data from $t_0-\Lambda$. This would require storing a copy of all of the order books or a data structure that could generate past order books.

* Give $a$ a consideration event at time $t_0-\Lambda$, letting it see the market at that time, and delay the add order event by $2\Lambda$ instead of $\Lambda$. In practice, this means that $a$ uses market data from time $t_0-\Lambda$ to come up with an order that is added at time $t_0+\Lambda$, which is exactly the desired result.

These two methods are illustrated in Figure <ref>. (a) was considered but determined to be too inefficient due to the storage of intermediate market data, so (b) is used in the simulation.

[market] (m1)market;
[market] (m2) [right of=m1, xshift=1.5cm]market;
[market] (m3) [right of=m2, xshift=1.5cm]market;
[data] (d1) [below of=m1, yshift=-0.5cm]stored data;
[data] (d2) [below of=m2, yshift=-0.5cm]stored data;
(t1) [above of=m1] $t=t_0-\Lambda$;
(t2) [above of=m2] $t=t_0$;
(t2) [above of=m3] $t=t_0+\Lambda$;

[agent] (a2) [below of=d2, yshift=-0.5cm] agent;

[arrow] (m1) – (d1) node[midway,left] data;
[arrow] (d2) – (a2) node[midway,left] data;
[arrow] (a2) to  [out=0, in=270] (m3) node[midway,below right, xshift=4.5cm, yshift=-2.5cm] order;

[arrow] (d1) – (d2);

Inefficient latency simulation. Market data from
$t_0-\Lambda$ must be stored or recreated for use at $t_0$.

[market] (m1)market;
[market] (m2) [right of=m1, xshift=1.5cm]market;
[market] (m3) [right of=m2, xshift=1.5cm]market;
(t1) [above of=m1] $t=t_0-\Lambda$;
(t2) [above of=m2] $t=t_0$;
(t2) [above of=m3] $t=t_0+\Lambda$;
[agent] (a1) [below of=m1, yshift=-2cm] agent;

[arrow] (m1) – (a1) node[midway,left] data;
[arrow] (a1) – (m3) node[midway,below right] order;

Efficient latency simulation. Same outcome as (a), but market data from $t_0-\Lambda$ is accessed directly.

Comparison of latency simulation methods (a) and (b).

§.§ Figgie Rules and Modifications [5]

Figgie is a trading card game meant to model open-outcry commodities trading.  In practice, either 4 or 5 players can participate in a game, but for the purposes of this paper we only consider the case of 4 player gameplay.

In Figgie, a card deck consists of 40 cards, with each of the cards being one of 4 suits: spades, clubs, hearts or diamonds.  The composition of the deck, however, varies between games, with the only constraint being that one suit must have 12 cards, another must have 8, and the remaining two must have 10.  There are thus 12 possible decks, which are shown in Table <ref>.  Prior to the start of the game, no player has any information on the composition of the deck.

For a given deck composition, the suit consisting of 12 cards is the common suit.  The suit which is of the same color as the common suit, but not the common suit itself, is the goal suit (note that, as in a traditional 52 card deck, hearts and diamonds are both red while spades and clubs are black).  The only cards which give any payoff are those of the goal suit (detailed further below).  Apart from their suit however, individual cards are indistinguishable from each other.

At the start of the game, each player is given 350 chips to make trades with. Each round, each player must ante 50 chips to form the pot (for a 200 chip pot in total) and then a randomly chosen deck is selected, from which each player is dealt 10 cards. Throughout the round, players negotiate prices with each other to trade chips for cards, with the goal of making as much money as possible.  There are 2 ways of making money:

* Profiting off of the trades themselves (sell off your initial cards or resell cards for prices higher than you purchased them)

* Collecting goal suit cards

Each round lasts for 4 minutes, and at the end of the round, the goal suit is revealed, and each player receives 10 chips from the pot for each goal suit card which they possess.  Additionally, the player with the majority of the goal suit cards receives the rest of the pot, which works out to 100 chips when the goal suit consists of 10 cards and 120 chips when the goal suit consists of 8 cards.  In the case of ties for majority, the remainder of the pot is instead split.

In the case of our simulation, we have made some slight modifications to the game:

* Agents trade in continuous amounts of cash rather than chips

* Rather than lasting 4 minutes, games last 10000 events (detailed in the simulation framework description previously)

* Rather than running consecutive rounds where agents have a running total of cash, in each iteration of gameplay an agent starts off with the same amount of cash so that consecutive runs of gameplay can be more easily compared

§.§ Agent Strategies

In our model, we formulated three different kinds of agents that use different algorithms to perform trades in Figgie. All of the trading strategies implement the same trading algorithm based on a calculated expected value for an asset, as demonstrated in Algorithm 2 below, similar to [2] but without considering risk, as we assume the goal of the agents is to maximize their expected return.

Spades     Clubs     Hearts     Diamonds     Majority     Payoff

Deck 0       12     8     10     10     5     120

Deck 1       12     10     8     10     6     100

Deck 2       12     10     10     8     6     100

Deck 3       8     12     10     10     5     120

Deck 4       10     12     8     10     6     100

Deck 5       10     12     10     8     6     100

Deck 6       8     10     12     10     6     100

Deck 7       10     8     12     10     6     100

Deck 8       10     10     12     8     5     120

Deck 9       8     10     10     12     6     100

Deck 10      10     8     10     12     6     100

Deck 11      10     10     8     12     5     120

Composition of each of the 12 possible compositions of a Figgie card deck, as well as the number of suits required to reach a majority and the associated payoff for doing so.  Note that for each deck, the yellow highlighted suit corresponds to the common suit while the green highlighted suit corresponds to the goal suit.

Get two expected values $p_b$ and $p_s$, for buying and selling asset $j$ respectively.
Randomly choose to buy or sell, with probability 0.5
Get a price $p$ according to Uniform$(0,p_b)$
Let $s$ be the lowest sell order price in the market for asset $j$
Send a limit buy order for asset $j$ with price $\min(p,s)$

Get a price $p$ according to Uniform$(p_s,2p_s)$
Let $b$ be the highest buy order price in the market for asset $j$
Send a limit sell order for asset $j$ with price $\max(p,b)$

Order-sending based on expected value for asset $j$

Note that, for all trading strategies designed but the fundamentalist, $p_b=p_s$.

Noise Trader

The noise trader simply computes its expected value for an asset according to:

\[p^*_j = b_j e^Z, \quad Z\sim N(0, \sigma^2)\]

Where $p^*_j$ is its expected value for asset $j$, $b_j$ is the price of the highest-price buy order in asset $j$'s order book, and $\sigma^2$ is the noise trader's variance factor, a parameter of trader that is set to $1$ by default.

This agent uses different expected values dependent on whether it is to buy or sell a card, and determines these values by calculating a posterior distribution given the total number of distinct cards it has seen throughout the game as well as the number of cards of each suit it currently possesses. Algorithm <ref> describes how a fundamentalist can keep track of the number of distinct cards seen of a particular suit.

At the beginning of each game, this agent initializes a four element list for each agent to keep track of the total number of distinct cards which it knows each agent possesses for each suit.  The values for each suit are set to 0 for all lists except its own, for which the number corresponding to each suit is initialized as the number of cards it is initially dealt of said suit.  Then, each time an agent goes to place an order, it will look at each trade in the trade book since the last time it checked, and for each transaction it will increment the value corresponding to the traded suit by 1 for the agent which bought said suit, while for the agent which sold the suit it will decrement its respective suit value by 1 unless the value is already 0, at which point it would stay 0.

Set $n$ to how many units of asset $j$ you are initially dealt
Each agent has a unique number associated with it between 0 and 3 inclusive
Initialize a 4 element list $L$, such that for $x$ = self.num we set $L[x] = n$, and all other elements of $L$ are 0
Let $T$ be the list of trades for asset $j$, ordered by time
$i\gets 0$ $|T|-1$
Since $T$ only grows, in practice we can store the data persistently and just run the for-loop for the new trades in $T$.
Let $b$ be the buyer in trade $T[i]$, and $s$ be the seller
Let $v$ be the volume
$L[s$.num $] < v$
Add $v$ to $L[b.$num$]$
Set $L[s$.num$]$ to 0

Add $v$ to $L[b.$num$]$
Subtract $v$ from $L[s$.num$]$

Return $L$
Card-counting method for asset $j$, returning a list of known asset cards each agent holds

Note how the expected values change over time, particularly during the second half of the simulation. For this reason, clearing trades which no longer accurately reflect the expected value is essential to prevent the agent from performing poorly

Using these tallies for each agent, the fundamentalist can then add the values of a given suit for each agent together to get the total number of distinct cards which it has seen throughout the whole game for each distinct suit.  Then, given this collection of cards, the agent calculates the total number of possible combinations by which it could be formed for each of the 12 decks.  Finally, a distribution of likelihoods for the possible deck is computed by dividing each of these numbers by their total sum, and the multinomial distribution $m$ is represented as follows:

\[ [m_0, m_1, m_2, m_3, m_4, m_5, m_6, m_7, m_8, m_9, m_{10}, m_{11}]\]

where $m_i$ is the probability that the deck being used in the game is deck $i$ as described in Table 1.

Unlike other traders, the fundamentalist agent has two different expected values for an asset - one for buying and one for selling.  Intuitively this makes sense, as the number of cards a player possesses ultimately affects the value of each card individually.  As an example, if a player possesses 6 spades, the most they can expect to gain from the purchase of an additional spade is 10 as they already are guaranteed a majority, while the sale of a spade could cost them up to 60 (loss of half the pot) plus an additional 10 in the event that spades is the goal suit.  Likewise, if a player possessed only 4 spades, they would be willing to buy at a higher price than if they possessed 6 (i.e. already were guaranteed a majority).  Thus, the expected value of a card must depend both on whether the agent is buying or selling that particular suit, as well as the number of cards of said suit it possesses.

We next introduce some notation.  Allowing spades, clubs, hearts, and diamonds to be labelled as assets 0, 1, 2 and 3 respectively, we have that given any suit $j$ that decks $3j$, $3j+1$, and $3j+2$ are the only ones in which the suit is the goal suit.  We define expected value functions $e_b(j, j_n, m)$ and $e_s(j, j_n, m)$ representing the expected values for buying and selling a suit $j$ respectively, given that the agent currently possesses $j_n$ cards of that suit and the probability distribution for the deck in play is $m$, as follows:

\[ e_b(j, j_n, m) = \sum_{i=0}^{11} m_iv(i, j, j_n)\]

\[ e_s(j, j_n, m)= e_b(j, j_n - 1, m)\]

where $v(i, j, j_n)$ is a measure of the value of purchasing a card of suit $j$ assuming the deck in play is play $i$ and you have $j_n$ cards of suit $j$ in your hand.  Furthermore, $e_s$ is calculated as above due to the fact that intuitively, the expected value one gains by purchasing a card of a suit one possesses $j_n$ cards of is equivalent to the expected value one loses by selling a card of said suit when one possesses $j_n+1$ of these cards.  Calculating $v(i, j, j_n)$ is done as follows:

\[v(i, j, j_n) =
\begin{cases}
0 & \text{if } i \neq \ 3j, 3j+1, 3j+2  \\
10 + v_m(i, j_n) & \text{if } i = \ 3j, 3j+1, 3j+2 \\
\end{cases}
\]

where $v_m$ is the portion of a card's value arising from the final payout by way of possessing majorities (or tying for majority), which is given by:

\[v_m(i, j_n) =
\begin{cases}
\frac{p_i(1 - r)}{1 - r^{x_i}}r^{j_n} & \text{if } j_n < x_i\\
0 & \text{if } j_n \geq x_i\\
\end{cases}
\]

where $x_i$ represents the number of goal suit cards needed to guarantee a majority for deck $i$, and $p_i$ represents the payout for doing so.  The constant $r$ is a parameter that is agent specific, and is such that if the price of purchasing a certain card of a suit $j$ when an agent possesses 0 cards of this suit is $a_i$, then the value towards obtaining a majority of purchasing a card of this suit given the agent currently possesses $n$ such cards is $a_ir^n$ for some $r >1$ when $n < x_i$, and is 0 otherwise. The reason this valuation was decided upon was due to the fact that as an agent gets closer to reaching a majority, the more likely they will be able to successfully be able to obtain it, and hence the more they should be willing to spend in doing so.

The value of $a_i$ is computed for each deck $i$ such that:

\[ p_i = a_{i} + a_{i}r + \ldots + a_ir^{x_i-1}\]

This way, the portion of the expected value associated with buying each card, assuming an agent started with 0, would sum to the total value gained from the payout for a majority.  Solving for $a_i$, we find that:

\[ a_i = \frac{p_i(1 - r)}{1 - r^{x_i}}\]

as desired.

Using the above equations, the algorithm which the fundamentalist agent uses is shown in Algorithm <ref> below.

Let $m$ be the multinomial distribution obtained by card counting and the methods detailed above
Initialize a two element list $L = [ e_b(j, j_n, m), e_s(j, j_n, m)]$
Let $O_b$ and $O_s$ be the agent's own order books for buy and sell orders respectively for asset $j$
$i\gets 0$ $|O_b|-1$
Let $o$ be the order $O_b[i]$
Let $o$.deleted be $True$

$i\gets 0$ $|O_s|-1$
Let $o$ be the order $O_b[i]$
Let $o$.deleted be $True$

Return $L$
Fundamentalist trading algorithm for asset $j$

Note that upon each iteration, all orders currently in the market that no longer agree with the agent's expected values are cleared by way of lazy deletion.  Each agent has an associated order book for buy orders as well as an associated order book for sell orders for each asset which contains the orders which it has placed.  Lazy deletion allows for efficient deletion of these orders (as compared to removing them from the min and max-heaps directly).  Furthermore, doing so is necessary, as the agent's expected values can fluctuate significantly throughout the game, as seen in Figure <ref> below, due to the fact that the price is a reflection not only of the belief state of the deck, but of the cards the player currently possesses.

Bottom-Feeder The bottom-feeder is a social trader. It calculates its expected value for an asset by estimating that of other agents (its “prey”) from their order histories, and averaging them. When looking at an agent, it looks at its past $k$ buy order prices and past $k$ sell order prices and computes their mean. In our model, we used $k=4$. Effectively, the bottom-feeder calculates the expected value for asset $j$ according to:

\[p_j^* = \frac{1}{|A|}\sum_{i\in A} \frac{1}{2}\left(\frac{1}{k} \sum_{p_b \in B_{ji}(k)}p_b+\frac{1}{k} \sum_{p_s \in S_{ji}(k)}p_s\right),\]

where $p_j^*$ is the bottom-feeders expected value for asset $j$, $A$ is the set of prey, $k$ is how many buy and sell orders the bottom-feeder will examine for each agent, and $B_{ji}(k)$ and $S_{ji}(k)$ are sets of the $k$ most recent buy and sell orders respectively of agent $i$ for asset $j$. This strategy produces good estimates of an agent's expected value for an asset under the assumption that their buy and sell orders are, on average, the same distance from the agent's expected value. Note that, in practice, if an agent the bottom-feeder is looking at has not sent $k$ buy orders and $k$ sell orders for an asset, it is not included in $A$.

The chartist trader only looks at the price series data to estimate an expected value for an asset. It does this by estimating the average rate of return of an asset and assuming that it will continue. For example, if the average rate of return is high, then the chartist will be willing to buy the asset for a high price as the price in the future should be even higher.

There are several ways to estimate an expected return. Chiarella et. al. give the following formula [2]:

\[\bar{r}_t^i = \frac{1}{\tau^i}\sum_{j=1}^{\tau^i}r_{t-j}=\frac{1}{\tau^i}\sum_{j=1}^{\tau^i}\ln\frac{p_{t-j}}{p_{t-j-1}},\]

where $\bar{r}_t^i$ is the average spot return, $\tau^i$ the chartist's time horizon (i.e. how far back in the data the chartist will look), $r_{t-j}$ is the spot return at time $t-j$, and $p_{t-j}$ is the price at time $t-j$. The estimated future value using this method is then $p_t\exp(\bar{r}_t^i \tau^i)$ [2]. Note that the logarithm telescopes such that:

\begin{align}\bar{r}_t^i &= \frac{1}{\tau^i}\sum_{j=1}^{\tau^i}\ln\frac{p_{t-j}}{p_{t-j-1}} = \frac{1}{\tau^i}\sum_{j=1}^{\tau^i}\ln(p_{t-j})-\ln(p_{t-j-1}) \nonumber\\
\bar{r}_t^i &= \frac{1}{\tau^i} \ln \frac{p_{t-1}}{p_{t-\tau^i-1}},\end{align}

making the formula effectively discount all of the data between the current price and the price at the beginning of the time horizon.

Another option is to compute a linear regression on a part of the time series, according to the model:

\begin{equation}\label{chartist2}
\ln(p_t) = y_t = \beta_0 + \beta_1 t + \epsilon,
\end{equation}

on a set of times and their associated prices within the time horizon of the chartist. The estimated future value is then $\hat{p_t} = \exp(\hat\beta_0 + \hat\beta_1t)$.

§ RESULTS

In this section, we are going to demonstrate the performance of our agents and evaluate our model using statistics. Note all bar graphs in this section use the same bar color and labeling for each kind of agent:

* Fundamentalist: blue bars with label (f, f0, f1, ...)

* Bottom-feeder: orange bars with label (b, b0, b1, ...)

* Noise trader: green bars with label (n, n0, n1, ...)

§.§ Strategy performance

We run the simulation 100 times for each possible combination of the three types of agents. The hight of a bar is average final gain of an agent with the line in the middle of each bar representing mean final cash. Bars are $\pm$2SE, with the grey ones being the standard error of the mean cash and the black ones being the error of the final gain. The grey dotted line represents beginning cash level ($\$350$ per agent) and the black dotted line ($ \$400$) is the average bonus of the game (since each player put $\$50$ into the pot at the beginning of each round) When there is only one kind of trader in the market, their relative performances are even. However, when more than one type of agents exist in the market, more variability is introduced. We observe that noise trader's overall performance is worse than the other two in any simulation setup.

Fundamentalist When there are only fundamentalists and noise traders involved in the simulation (see Figure <ref>, we observe the fundamentalists earn more, on average, compared to noise traders. Rather than trading cards based on prices in the markets, the fundamentalists acquire information and process them to make judgements when it trades. We observe the fundamentalist also have a much higher standard deviation than the noise trader, mainly due to unsuccessful guesses of the actual goal suit in some rounds. However, the overall performance of fundamentalists is much better than noise traders, with the general trend that the more fundamentalists exist in a game the less the average gain is per fundamentalist due to increased market competition between themselves.

tick align=outside,
tick pos=left,
x grid style=white!69.0196078431373!black,
xmin=-0.59, xmax=3.59,
xtick style=color=black,
y grid style=white!69.0196078431373!black,
ylabel=Mean cash+payout,
ymin=0, ymax=700,
ytick style=color=black
[draw=black,fill=color0] (axis cs:-0.4,0) rectangle (axis cs:0.4,560.827464238735);
[draw=black,fill=color1] (axis cs:0.6,0) rectangle (axis cs:1.4,275.678587219141);
[draw=black,fill=color1] (axis cs:1.6,0) rectangle (axis cs:2.4,293.410060108814);
[draw=black,fill=color1] (axis cs:2.6,0) rectangle (axis cs:3.4,270.08388843331);
[draw=black,fill=color0] (axis cs:-0.4,560.827464238735) rectangle (axis cs:0.4,659.327464238735);
[draw=black,fill=color1] (axis cs:0.6,275.678587219141) rectangle (axis cs:1.4,311.878587219141);
[draw=black,fill=color1] (axis cs:1.6,293.410060108814) rectangle (axis cs:2.4,326.210060108814);
[draw=black,fill=color1] (axis cs:2.6,270.08388843331) rectangle (axis cs:3.4,302.58388843331);
[draw=white!50.1960784313725!black, semithick]
(axis cs:0,516.70959360209)
–(axis cs:0,604.94533487538);

[draw=white!50.1960784313725!black, semithick]
(axis cs:1,244.670242463879)
–(axis cs:1,306.686931974402);

[draw=white!50.1960784313725!black, semithick]
(axis cs:2,270.887704658008)
–(axis cs:2,315.932415559621);

[draw=white!50.1960784313725!black, semithick]
(axis cs:3,243.922319166524)
–(axis cs:3,296.245457700096);

[draw=black, semithick]
(axis cs:0,643.379110091676)
–(axis cs:0,675.275818385793);

[draw=black, semithick]
(axis cs:1,300.979853347722)
–(axis cs:1,322.777321090559);

[draw=black, semithick]
(axis cs:2,315.972560414065)
–(axis cs:2,336.447559803564);

[draw=black, semithick]
(axis cs:3,292.582388545793)
–(axis cs:3,312.585388320827);

[semithick, white!50.1960784313725!black, mark=-, mark size=5, mark options=solid, only marks]
0 516.70959360209
1 244.670242463879
2 270.887704658008
3 243.922319166524
[semithick, white!50.1960784313725!black, mark=-, mark size=5, mark options=solid, only marks]
0 604.94533487538
1 306.686931974402
2 315.932415559621
3 296.245457700096
[semithick, black, mark=-, mark size=5, mark options=solid, only marks]
0 643.379110091676
1 300.979853347722
2 315.972560414065
3 292.582388545793
[semithick, black, mark=-, mark size=5, mark options=solid, only marks]
0 675.275818385793
1 322.777321090559
2 336.447559803564
3 312.585388320827
[semithick, white!50.1960784313725!black, dashed]
-0.59 350
3.59 350
[semithick, black, dashed]
-0.59 400
3.59 400

tick align=outside,
tick pos=left,
x grid style=white!69.0196078431373!black,
xmin=-0.59, xmax=3.59,
xtick style=color=black,
y grid style=white!69.0196078431373!black,
ymin=0, ymax=700,
ytick style=color=black
[draw=black,fill=color0] (axis cs:-0.4,0) rectangle (axis cs:0.4,502.243444038788);
[draw=black,fill=color0] (axis cs:0.6,0) rectangle (axis cs:1.4,498.809267721344);
[draw=black,fill=color1] (axis cs:1.6,0) rectangle (axis cs:2.4,202.669833794141);
[draw=black,fill=color1] (axis cs:2.6,0) rectangle (axis cs:3.4,196.277454445726);
[draw=black,fill=color0] (axis cs:-0.4,502.243444038788) rectangle (axis cs:0.4,563.943444038788);
[draw=black,fill=color0] (axis cs:0.6,498.809267721344) rectangle (axis cs:1.4,562.309267721344);
[draw=black,fill=color1] (axis cs:1.6,202.669833794141) rectangle (axis cs:2.4,236.269833794141);
[draw=black,fill=color1] (axis cs:2.6,196.277454445726) rectangle (axis cs:3.4,237.477454445726);
[draw=white!50.1960784313725!black, semithick]
(axis cs:0,475.981643752754)
–(axis cs:0,528.505244324823);

[draw=white!50.1960784313725!black, semithick]
(axis cs:1,474.578261651598)
–(axis cs:1,523.04027379109);

[draw=white!50.1960784313725!black, semithick]
(axis cs:2,173.443784150446)
–(axis cs:2,231.895883437836);

[draw=white!50.1960784313725!black, semithick]
(axis cs:3,172.900458058793)
–(axis cs:3,219.654450832659);

[draw=black, semithick]
(axis cs:0,548.399815118874)
–(axis cs:0,579.487072958703);

[draw=black, semithick]
(axis cs:1,546.80862257348)
–(axis cs:1,577.809912869208);

[draw=black, semithick]
(axis cs:2,225.658443687279)
–(axis cs:2,246.881223901003);

[draw=black, semithick]
(axis cs:3,225.814590303501)
–(axis cs:3,249.140318587951);

[semithick, white!50.1960784313725!black, mark=-, mark size=5, mark options=solid, only marks]
0 475.981643752754
1 474.578261651598
2 173.443784150446
3 172.900458058793
[semithick, white!50.1960784313725!black, mark=-, mark size=5, mark options=solid, only marks]
0 528.505244324823
1 523.04027379109
2 231.895883437836
3 219.654450832659
[semithick, black, mark=-, mark size=5, mark options=solid, only marks]
0 548.399815118874
1 546.80862257348
2 225.658443687279
3 225.814590303501
[semithick, black, mark=-, mark size=5, mark options=solid, only marks]
0 579.487072958703
1 577.809912869208
2 246.881223901003
3 249.140318587951
[semithick, white!50.1960784313725!black, dashed]
-0.59 350
3.59 350
[semithick, black, dashed]
-0.59 400
3.59 400

tick align=outside,
tick pos=left,
x grid style=white!69.0196078431373!black,
xmin=-0.59, xmax=3.59,
xtick style=color=black,
y grid style=white!69.0196078431373!black,
ymin=0, ymax=700,
ytick style=color=black
[draw=black,fill=color0] (axis cs:-0.4,0) rectangle (axis cs:0.4,443.457580821169);
[draw=black,fill=color0] (axis cs:0.6,0) rectangle (axis cs:1.4,423.217412462928);
[draw=black,fill=color0] (axis cs:1.6,0) rectangle (axis cs:2.4,443.320618047619);
[draw=black,fill=color1] (axis cs:2.6,0) rectangle (axis cs:3.4,90.0043886682843);
[draw=black,fill=color0] (axis cs:-0.4,443.457580821169) rectangle (axis cs:0.4,480.557580821169);
[draw=black,fill=color0] (axis cs:0.6,423.217412462928) rectangle (axis cs:1.4,495.117412462928);
[draw=black,fill=color0] (axis cs:1.6,443.320618047619) rectangle (axis cs:2.4,494.220618047619);
[draw=black,fill=color1] (axis cs:2.6,90.0043886682843) rectangle (axis cs:3.4,130.104388668284);
[draw=white!50.1960784313725!black, semithick]
(axis cs:0,423.642269846524)
–(axis cs:0,463.272891795814);

[draw=white!50.1960784313725!black, semithick]
(axis cs:1,405.335647240982)
–(axis cs:1,441.099177684874);

[draw=white!50.1960784313725!black, semithick]
(axis cs:2,425.069015313276)
–(axis cs:2,461.572220781962);

[draw=white!50.1960784313725!black, semithick]
(axis cs:3,60.3708070310662)
–(axis cs:3,119.637970305502);

[draw=black, semithick]
(axis cs:0,467.660154721361)
–(axis cs:0,493.455006920977);

[draw=black, semithick]
(axis cs:1,479.33464971365)
–(axis cs:1,510.900175212206);

[draw=black, semithick]
(axis cs:2,479.903928486131)
–(axis cs:2,508.537307609106);

[draw=black, semithick]
(axis cs:3,119.737151813654)
–(axis cs:3,140.471625522914);

[semithick, white!50.1960784313725!black, mark=-, mark size=5, mark options=solid, only marks]
0 423.642269846524
1 405.335647240982
2 425.069015313276
3 60.3708070310662
[semithick, white!50.1960784313725!black, mark=-, mark size=5, mark options=solid, only marks]
0 463.272891795814
1 441.099177684874
2 461.572220781962
3 119.637970305502
[semithick, black, mark=-, mark size=5, mark options=solid, only marks]
0 467.660154721361
1 479.33464971365
2 479.903928486131
3 119.737151813654
[semithick, black, mark=-, mark size=5, mark options=solid, only marks]
0 493.455006920977
1 510.900175212206
2 508.537307609106
3 140.471625522914
[semithick, white!50.1960784313725!black, dashed]
-0.59 350
3.59 350
[semithick, black, dashed]
-0.59 400
3.59 400

100 simulations each for 3 setups of fundamentalists against noise traders.

Bottom-Feeder In our model, the bottom-feeder chooses one or more  agents as its prey. We discover that when all bottom-feeders choose other bottom-feeders as its prey, it will not make any trade. Bottom-feeders only make trade after observing its prey's trade, when all bottom-feeders are looking after each other, no trade will be made. Thus, we will only consider the cases when at least one bottom-feeder chooses another type of agent as prey.

When bottom-feeder is added into the fundamentalist - noise trader system, results are pretty different depending on its prey. When using the fundamentalist as its prey (see Figure <ref> and Figure <ref>, the bottom-feeder outperform the noise trader, but gains less on average than the fundamentalist. Since the bottom-feeder is only following the fundamentalist, it is always one step slower. Thus, the resulting average cash and payout for the fundamentalist in this case is actually higher than a fundamentalist in two-fundamentalist-two-noise-trader case shown in Figure <ref>.

One bottom-feeder with all fundamentalists in the game as preys. (We discovered there is no statistical significance between using one fundamentalist as prey or all fundamentalists in the game as prey, so only demonstrating one case here.)

Two bottom-feeders with all  fundamentalists in the game as preys.

When the bottom-feeder uses the noise trader as its prey, it gains similar average cash but more bonus than the noise trader. By investigating trades made in the simulation Since the bottom-feeder tries to follow its prey's expectations, we expect it perform a little worse than its prey. However, when put into three-bottom-feeder-one-noise-trader system (see Figure<ref>) with the noise trader as its prey, the bottom-feeders actually outperforms the noise trader.

Three bottom-feeders with the left using noise trader as prey and right using itself as prey (Ex: b0 is using b0 as prey and b1 is using b1 as prey).

Three bottom-feeders with the left using fundamentalist as prey and right using itself as prey.

Neither of the algorithms implemented for the chartist's estimation of future expected value functioned within the simulation framework. Both produced estimates extreme enough to be too large to store in double-precision floating point numbers. The reasons for this will be discussed later.

Standard deviations of Noise, Fundamentalist, and Bottom-feeder strategy final wealth in $n=100$ games each where all 4 players are of one strategy. All one-tailed tests between standard deviations of each category have $p<10^{-5}$, except that the standard deviation of the fundamentalists' payouts are greater than that of the noise traders with $p=0.013$Variance of noise traders is greater than that of fundamentalists with $p=1.20\times 10^{-102}$, and greater than that of bottom-feeders with $p=2.08\times 10^{-138}$. Variance of fundamentalists is greater than that of bottom-feeders with $p=9.95 \times 10^{-7}$

Strategy      Final payout     Cash     Bonus
Noise     201.04     188.52     61.36

Fundamentalist     61.75     33.11     68.62

Bottom-feeder     48.63     0     48.63

Homogeneous set-ups
When the simulation is run with all agents being of one type with the same parameters, the final payoff, cash, and bonus for each agent are $400, $350, and $50 respectively. This is obvious, as agents with identical strategies cannot, on average, outperform each other. But what is not obvious is how much variability there is in the overall payout, cash, and bonus of each agent in these homogeneous simulations. Table <ref> describes the standard deviations of the three. The standard deviation on the bottom-feeders' cash is 0 because, in a game with four bottom-feeders, no trades occur as their trading behavior requires observing trades, as mentioned in the bottom-feeder paragraph in this section.

§.§ Expectations

An agent's expectation of an asset during one round of Figgie is determined by its algorithm as introduced in Section 2.3. Since the noise trader's expectation is random, we will focus only on the fundamentalist and bottom-feeder in this section. Theoretically, the fundamentalist should have a guess on the goal suit after a few trades have been made, therefore its expectation for all other three suits will drop to zero except for the potential goal suit, as shown in Figure <ref>. In this round of simulation, the fundamentalist correctly guessed the goal suit. Its expected buy price rose to over 80 because the fifth goal suit card will not only bring the $10 bonus, but also the $100 extra bonus at the end. After that peak , the expected buy price for the fundamentalist dropped to $10, which is exactly what the fundamentalist can get out of this additional goal suit card. Notice the expected sell price for the goal suit card skyrocketed to over $80 for the fundamentalist at the same time as the peak in buying price, because selling that additional goal suit card (the sixth one) means the fundamentalist has the potential to lose half the $100 bonus. The selling price remaining high represents the fundamentalist ending up with exactly five goal suit cards until the end of this game. Otherwise the price would drop since the seventh card is not worth as much to the fundamentalist as the sixth card because of the majority rule in Figgie. In this round of simulation, the bottom-feeder's prey is the fundamentalist so that we can better observe the relationship between the two agents' expectations. We can observe that the bottom-feeder 's expected price for suit 2 rise after the sudden peak of the fundamentalist's expectations. By investigating all the trades made in this simulation, we can see that the fundamentalist bought suit 2 three times at a relatively high price, above $10. Notice since $10 is the bonus for owning one goal suit card, buying a card at prices above $10 means this agent is pretty confident that this suit is the goal suit. After observing the fundamentalist's actions, the bottom-feeder's expected price also rises to about $10 (see Figure <ref>).

Agents' Expectations of Each Suit Over Time

Agents' Expectations of Each Suit Over Time

§.§ Latencies

As discribed in Section 2.1, to test the effect of latencies on agents' performance, we run a homogeneous simulation filled with fundamentalists and give one of them (fast) a latency of 0 and three (slow, slow1 and slow2) a latency of 100. The results are displayed in Figure <ref>, which displays the rewards, and Table <ref>, which displays confidence intervals. Note that the confidence intervals are bootstrapped intervals of the difference between two means. The bootstrap is used because:

* Figgie is a zero-sum game, so agents' wealth, cash, and payout are not independent. This precludes tests that identify whether two sets of independent variables have different means.

* We find that the distributions of wealth, cash, payout, and of their differences between agents, are bimodal. This again makes it difficult to conduct standard statistical tests.

Cash+payout of agents with different latencies

tick align=outside,
tick pos=left,
x grid style=white!69.0196078431373!black,
xmin=-0.59, xmax=3.59,
xtick style=color=black,
y grid style=white!69.0196078431373!black,
ylabel=Mean cash+payout,
ymin=0, ymax=700,
ytick style=color=black
[draw=black,fill=color0] (axis cs:-0.4,0) rectangle (axis cs:0.4,303.890487351668);
[draw=black,fill=color0] (axis cs:0.6,0) rectangle (axis cs:1.4,365.769941408004);
[draw=black,fill=color0] (axis cs:1.6,0) rectangle (axis cs:2.4,364.664793941895);
[draw=black,fill=color0] (axis cs:2.6,0) rectangle (axis cs:3.4,365.674777298433);
[draw=black,fill=color0] (axis cs:-0.4,303.890487351668) rectangle (axis cs:0.4,380.990487351668);
[draw=black,fill=color0] (axis cs:0.6,365.769941408004) rectangle (axis cs:1.4,405.794941408004);
[draw=black,fill=color0] (axis cs:1.6,364.664793941895) rectangle (axis cs:2.4,403.814793941895);
[draw=black,fill=color0] (axis cs:2.6,365.674777298433) rectangle (axis cs:3.4,409.399777298433);
[draw=white!50.1960784313725!black, semithick]
(axis cs:0,301.410942210574)
–(axis cs:0,306.370032492761);

[draw=white!50.1960784313725!black, semithick]
(axis cs:1,363.493957215721)
–(axis cs:1,368.045925600287);

[draw=white!50.1960784313725!black, semithick]
(axis cs:2,362.44232112074)
–(axis cs:2,366.887266763051);

[draw=white!50.1960784313725!black, semithick]
(axis cs:3,363.551597513044)
–(axis cs:3,367.797957083821);

[draw=black, semithick]
(axis cs:0,372.683809315292)
–(axis cs:0,389.297165388043);

[draw=black, semithick]
(axis cs:1,400.037121182433)
–(axis cs:1,411.552761633576);

[draw=black, semithick]
(axis cs:2,398.210976046924)
–(axis cs:2,409.418611836867);

[draw=black, semithick]
(axis cs:3,403.464817841958)
–(axis cs:3,415.334736754907);

[semithick, white!50.1960784313725!black, mark=-, mark size=5, mark options=solid, only marks]
0 301.410942210574
1 363.493957215721
2 362.44232112074
3 363.551597513044
[semithick, white!50.1960784313725!black, mark=-, mark size=5, mark options=solid, only marks]
0 306.370032492761
1 368.045925600287
2 366.887266763051
3 367.797957083821
[semithick, black, mark=-, mark size=5, mark options=solid, only marks]
0 372.683809315292
1 400.037121182433
2 398.210976046924
3 403.464817841958
[semithick, black, mark=-, mark size=5, mark options=solid, only marks]
0 389.297165388043
1 411.552761633576
2 409.418611836867
3 415.334736754907
[semithick, white!50.1960784313725!black, dashed]
-0.59 350
3.59 350
[semithick, black, dashed]
-0.59 400
3.59 400

Cash and payout of one fast ($\lambda=0$) and three slow ($\lambda=100$) agents. All are fundamentalists. The fast agent tends to finish with less cash than the others, but appears to receive slightly more of the payout on average. We speculate that is because the fast agent made several unsuccessful trades at the beginning of the simulation.

2c$\Delta$Wealth     2c$\Delta$Cash     2c$\Delta$Payout

Competitor      2.5%     97.5%     2.5%     97.5%     2.5%     97.5%
slow0     15.67     38.44     58.14     65.84     -46.75     -22.95

slow1     11.63     33.99     57.22     64.83     -49.77     -26.35

slow2     17.98     40.74     58.30     65.82     -44.35     -20.32

Bootstrapped 95% confidence intervals on the mean difference between fast and its competitors' wealth, cash, and payout and. Positive values indicate that the competitor had more than fast. In all but payout, the slower agents, on average, receive more than fast. In payout, fast tends to receive more.

§.§ Simulation statistics

Autocorrelation of returns with different time period lengths

Autocorrelation of the returns from 100 simulations, each of which is represented by a grey line. Taken from simulations with one fundamentalist and three noise traders. Autocorrelations are centered around 0, getting more extreme with longer time period lengths.

The auto-correlation function is often used on the series of returns of a particular asset, where a return is the ratio of the closing price of one trading day to that on the previous trading day. Since our simulation has no concept of trading periods, we can arbitrarily set periods and observe the behavior of the autocorrelation. The autocorrelation of the return series for some time periods is shown in Figure <ref>. Figure <ref> shows the autocorrelation of the entire return series, without setting any time periods.

Autocorrelation of the returns from 100 simulations, each of which is represented by a grey line. Taken from simulations with one fundamentalist and three noise traders

§ DISCUSSION

Success in simulating the fundamentalist Fundamentalist trades according to its own expected value of the asset, and we have successfully implemented the card-counting method for each asset for the fundamentalist such that its overall performance is satisfying. When put into a market with other kinds of traders, as shown in Figures <ref>, <ref>, and <ref> in the results section, it can always land in at least the same average cash level as the beginning cash ($350), and its ending bonus is also higher than both the noise trader and the bottom-feeder. The average cash for the fundamentalist of all cases shown in the result section is $407.5 and average bonus is $75.43.

Possible Improvements for the bottom-feeder Currently our bottom-feeder's prey is manually chosen before the start of each simulation, thus its according performance will totally based on its prey. In future development of this model, we plan to add an algorithm that enables the bottom-feeders to pick its own prey based on each agent's performance it observes in one game. This is challenging since the total time of the game is relatively short, thus not much data is collected. But if the model is expanded and the time for each round is extended, this will be a meaningful improvement.

Failure of chartist trading strategies
There are two key differences between our market model as applied to Figgie and previous work that, combined, may be the reason for the failure of chartist strategies.

* Small market: Figgie is, by nature, a very small game. It contains just four traders and four assets, and trades happen on the order of dozens or hundreds, not thousands or millions. This means that, if the chartist is using Equation (<ref>), it is likely that the current price is the price of the chartist's most recent buy order. If a chartist slightly over-estimates the asset's value, and then uses that over-estimate again to define the most recent price and calculate a new estimate, the new estimate will be even higher. This can evidently go on until the estimated value becomes absurd. The linear regression model in Equation (<ref>) is slightly more robust, as it takes into account all of the recent prices, but overestimates create orders which create outliers in the price series, which then increase the estimates, etc.

* Risk ignored: As agents are trying to maximize their average returns, risk is ignored by the agents in our simulation. This removes one method through which chartists' price estimates are moderated downwards, exacerbating the problem of an overestimation feedback loop.

It is unclear how to make a chartist trading strategy that ignores risk and functions in a small market without creating extreme estimates. One option is to have it exclude its own orders when calculating the current price. However, this may not work, as noise traders' orders will follow the market price, which, for a small moment, is set by the chartist. Note also that, in line with previous work, the chartists did increase volatility in the market. But the volatility induced by a single chartist in the small market was too great for the limitations of double-precision floating-point numbers.

When arbitrarily setting time periods, Figure <ref> shows that the autocorrelation of the returns is centered around 0. This indicates that a chartist strategy, even if a robust one were created, would not be able to generate returns if splitting the data into periods. Figure <ref> also shows that the autocorrelation gets more extreme as the lengths of the time periods ($\Delta t$) increase. This is likely a result of an increase in $\Delta t$ reducing the number of time periods when holding the duration of the simulation constant. With just a few points in the series of returns, it is more likely for there to be a spurrious correlations between returns at various lags.

When not splitting time periods, as in Figure <ref>, the autocorrelation of the returns is generally above 0 and decreases towards 0 as the lag increases. This indicates that there is room for a chartist strategy to exploit this correlation and generate returns, as seeing a positive/negative return would tell it that the next return is likely to be positive/negative, and it send make buy and sell orders accordingly. However, as noted above, the chartist strategies tested failed in Figgie due to feedback loops, so a more robust strategy would need to be developed to exploit this pattern.

As shown in Table <ref>, a lower latency relative to other fundamentalists decreases a fundamentalist's mean cash and wealth, but might increase its mean payout. The increase in mean payout is to be expected, as a trader with lower latency should be better able to acquire cards of the goal suit, and always trades with slightly more recent information about which suit might be the goal suit. The result that mean cash and wealth decrease is surprising, as the low-latency trader should be able to make the best possible trades as it always sees the current market prices. One possible explanation for this is that a lower latency means a higher trading frequency, because in the simulation agents will only start considering making a trade again after their order is added to the order book. This might make the trader make more unfavourable trades in the beginning of the game, when its estimated asset values fluctuate rapidly (see, for example, Figure <ref>).

Table <ref> also demonstrates the robustness of our simulation and of the effectiveness of the bootstrap method. The confidence intervals on the differences in wealth, cash, and payout between fast and slow0, slow1, and slow2 are very close for all of fast's competitors. This shows that different instantiations of identical agents in our simulation do indeed perform the same, on average. The similarity of the confidence intervals also shows that the bootstrap method, even with just 100 simulations, can be used to statistically compare strategies in Figgie.

§ CONCLUSION

In this paper, we have developed a general agent-based discrete-event simulation for modelling trading dynamics in a market.  Our simulation is flexible enough to extend far beyond the Figgie setting, allowing for various market conditions including number of traders, assets, and latencies to be set as parameters and the easy user testing of new trading algorithms.  One innovation of our simulation is the efficient implementation of latencies between traders and the market. While this method is unable to simulate latencies between traders, it is enough to capture a market where traders do not directly communicate with each other.

We have designed and implemented a few different trading strategies for Figgie, with our fundamentalist strategy taking advantage of its unique payout structure and our “bottom-feeder” strategy taking advantage of its nature as a market where everything is visible. We have also implemented a chartist trading strategy from the literature and designed our own. The failure of the chartist strategies demonstrates that, if chartists ignore risk and operate in a sufficiently small market, they may enter a feedback loop where high estimates cause high prices, which cause even higher estimates, etc. We recommend further research into the design of robust chartist trading strategies which do not fall into feedback loops, as well as the exact conditions required for feedback loops to occur.

We have demonstrated the utility of the bootstrap procedure in statistically comparing the outcomes of strategies in zero-sum games, in which traditional statistical tests fail due to the nonstandard distributions that arise and the dependence of outcomes between agents.

The discrete-event nature of our simulation allows us to study how the autocorrelation of an asset's returns differs when setting different trading period lengths and when not using periods at all. This ability demonstrates an advantage of discrete-event simulation over market simulations where time passes in fixed steps.

the fast one loses cash and it is unclear why that is happening

for the autocorrelation the idea there is that normally the autocorrelation is within certain trading periods, and you can see that in figure 11 it is very flat - centered around 0.  A charist strategy that technically worked wouldnt work if

[1]
David Byrd, Maria Hybinette, and Tucker Hybinette Balch.
Proceedings of the 2020 ACM SIGSIM Conference on Principles of
Advanced Discrete Simulation, Jun 2020.

[2]
Carl Chiarella, Giulia Iori, and Josep Perelló.
The impact of heterogeneous trading rules on the limit order book and
order flows.
Journal of Economic Dynamics and Control, 33(3):525–537, Mar

[3]
Luisanna Cocco, Roberto Tonelli, and Michele Marchesi.
An agent-based artificial market model for studying the bitcoin
IEEE Access, 7:42908–42920, 2019.

[4]
Thomas H Cormen, Charles E Leiserson, and Ronald L Rivest.
Introduction to algorithms.
Mit Press ; New York, 1990.

[5]
Jane Street.

[6]
Tommi A. Vuorenmaa and Liang Wang.
An agent-based model of the flash crash of may 6, 2010, with policy
SSRN Electronic Journal, 2013.