# An Information Theory Approach to the Stock and Cryptocurrency Market:
A Statistical Equilibrium Perspective

Emanuele Citera  Department of Economics, St. Lawrence University, Canton, NY,
USA.  Francesco De Pretis  Department of Communication and Economics,
University of Modena and Reggio Emilia, Reggio Emilia, Italy.  Department of
Environmental and Occupational Health, School of Public Health, Indiana
University Bloomington, Bloomington, IN, USA.

###### Abstract

We study the stochastic structure of cryptocurrency rates of returns as
compared to stock returns by focusing on the associated cross-sectional
distributions. We build two datasets. The first comprises forty-six major
cryptocurrencies, and the second includes all the companies listed in the S&P
500. We collect individual data from January 2017 until December 2022. We then
apply the Quantal Response Statistical Equilibrium (QRSE) model to recover the
cross-sectional frequency distribution of the daily returns of
cryptocurrencies and S&P 500 companies. We study the stochastic structure of
these two markets and the properties of investors’ behavior over bear and bull
trends. Finally, we compare the degree of informational efficiency of these
two markets.

_JEL codes_ : C18, G12, G14, G15.

_Keywords_ : Market Efficiency, Stock Market, Cryptocurrency Market,
Information Theory, Entropy.

_Acknowledgments_ : This paper was originally presented at the Financial
Economics Meeting (FEM 2023) conference held at The EDC Paris Business School,
Paris (France), June 29-30, 2023. We wish to thank the participants for their
comments and helpful remarks. Errors and omissions are our own.

##  1 Introduction

Information theory has been widely used to address issues of informational
efficiency across different financial markets.

Batra and Taneja (2022) apply information theoretic measures to study the
randomness associations of different financial time series. They study the
level of similarities between information-theoretic measures and the various
tools of regression analysis, such as the total sum of squares of the
dependent variable, relative mutual information and coefficients of
correlation, conditional entropy, and residual sum of squares. They observe
that mutual information and its dynamic extensions provide an alternative
approach with some advantages to studying the association between several
international stock indices. Furthermore, they find mutual information and
conditional entropy to be relatively efficient compared to the measures of
statistical dependence.

Brouty and Garcin (2022) introduce a new perspective on investor behaviors in
financial markets by using Brillouin’s approach to Maxwell’s demon (Brillouin,
1951). Through a simulation of an agent-based model, they demonstrate that an
informed investor using alternative data, which correlates with a financial
asset’s series of prices, can act as Maxwell’s demon in financial markets.
This enables them to engage in statistical arbitrage consistently with the
Adaptive Market Hypothesis (Lo, 2019). In detail, Brouty and Garcin (2022)
develop a statistical test that assesses the amount of information in a time
series using Shannon’s Entropy (1948). Their main finding is the presence of a
recursive cycle between Negentropy (i.e., reverse entropy) and the level of
information in the time series in a market with the investor depicted as
Maxwell’s demon and embedded with the knowledge of alternative data.

Concerning other information-theoretic approaches, Delgado-Bonal (2019) notes
that randomness has been quantified in time series using algorithms such as
Approximate Entropy (ApEn).111Although ApEn can be applied to any time series
as it is independent of any model, it cannot be used directly to compare
financial data series due to the different statistical values observed in the
markets. In their contribution, they extend the use of ApEn to quantify
patterns in evolving data series by defining a measure that enables
comparisons between time series and epochs using a maximum entropy approach.
Delgado-Bonal (2019) applies this methodology to the stock market. This
demonstrates that the number of patterns changed for the six analyzed markets
depending on the economic situation, in agreement with the Adaptive Markets
Hypothesis.

Tran and Leirvik (2019) propose a new measure, the Adaptive Market Information
Measure (AMIM), to quantify market efficiency. This measure applies to
different assets, regions, and data frequencies and allows easy interpretation
and comparison. AMIM ranges between zero and one, with a value closer to one
indicating lower efficiency and values smaller or equal to zero indicating
efficiency. The empirical estimates of AMIM show that markets are often
efficient but can also be significantly inefficient over longer periods. The
study finds that financial markets become less efficient during major economic
events, such as the 2008-09 financial crisis. Overall, Tran and Leirvik (2019)
claims that the AMIM measure is simple to compute, robust, and facilitates
easy comparisons of efficiency levels across different assets and periods.

Finally, Vințe et al. (2021) apply the intrinsic entropy model as an
alternative method to estimate the volatility of stock market indices. Unlike
the widely used volatility models that rely solely on a trading day’s open,
high, low, and close prices (OHLC), the intrinsic entropy model incorporates
the traded volumes during the considered time frame. The authors modify the
intraday intrinsic entropy model for exchange-traded securities to connect
daily OHLC prices with the ratio of the corresponding daily volume to the
overall volume traded in the considered period. The intrinsic entropy
represents the entropic probability or market credence assigned to the
corresponding price level. The intrinsic entropy is calculated using daily
historical data for six traded market indices, including S&P 500, Dow 30, NYSE
Composite, NASDAQ Composite, Nikkei 225, and Hang Seng Index. The results
obtained by the intrinsic entropy model are compared with the volatility
estimates provided by widely used industry estimators. The intrinsic entropy
model consistently generates reliable estimates for different time frames and
exhibits higher values for the coefficient of variation compared to other
advanced volatility estimators. The estimates fall within a significantly
lower interval range than those produced by the other models.

The application of information theory has mostly been restricted to
traditional financial markets. However, no particular attention has been paid
to the cryptocurrency market. In light of these observations, the scope of our
paper is twofold. First, by deploying Shannon’s entropy and statistical
equilibrium, it attempts to analyze the extent to which the cryptocurrency
market can be considered as efficient as the stock market by adopting a cross-
sectional perspective. Cross-sectional studies either attempt to explain the
price differential of Bitcoin across exchanges located in different countries
(Borri and Shakhnov, 2022) or investigate whether conventional cross-sectional
characteristics (beta, size, and momentum) explain cryptocurrency returns
(Günther et al., 2020). On the contrary, we focus on the stochastic structure
of rates of returns.

Second, the model we develop allows for multiple states, meaning we can assess
the extent to which a market can be considered efficient. This is a rather
important feature of the model, especially if we compare it to Brouty and
Garcin (2022), who develop a two-state model (the market is either efficient
or not). Even though the authors acknowledge that including more states makes
it more difficult to link entropy to the notion of market efficiency, the two-
state choice tends to diminish the power of the statistical test, on the one
hand, and lose some information contained in the time series of prices, on the
other.

The structure of the paper is the following. Section 2 describes our
methodology to collect and analyze the data. Section 3 derives the Quantal
Response Statistical Equilibrium model, whereas Section 4 discusses the main
results. Finally, Section 5 concludes and sheds light on future research.

##  2 Data Collection and Analysis

To conduct our analysis, we used two samples spanning six years, from January
1, 2017, to December 31, 2022. The samples started in 2017 since many
important cryptocurrencies were introduced, and data reliability has
significantly increased.

The first data source is a set of cryptocurrencies, whose details are
collected in Appendix A. We collected the respective daily prices from
CoinMarketCap and then computed logarithmic daily returns. We truncate the
series of returns at eight standard deviations from the mean. This allows us,
on the one hand, to account for potential “black swans”, which are defined as
events within three standard deviations from the mean, and, on the other, to
focus on the area where the majority of the information lies. Accordingly, we
ended up with 98,903 observations. On average, our sample covers 78.17% of
aggregate cryptocurrency market capitalization over the period we considered.

To construct our dataset, we followed Bhambhwani et al. (2023), who adopted a
balanced-panel approach due to a large non-random turnover in the universe of
cryptocurrencies.222Currencies with small capitalization rates disappear as
developers abandon the project, miners do not secure their blockchains, or
users stop using them. Additionally, many cryptocurrencies are only introduced
to capitalize on market upswings through “pump and dump” schemes. Finally,
several currencies have been delisted from exchanges due to fraud or price
manipulation. Our sample comprises forty-six cryptocurrencies, which we can
divide into three groups: 11 Proof-of-Work, 7 Non-Proof-of-Work, and 28
additional. Following Bhambhwani et al. (2023), we selected the first two
groups from CoinMetrics, which only reports price data from the most reputable
cryptocurrency exchanges and uses thirty-five criteria to filter out illiquid
or unreliable exchanges. Instead, the remaining 28 cryptocurrencies were
selected from Bittrex, listed as one of the trusted exchanges by Bitwise in
their report to the SEC regarding inflated and wash trading volumes on
exchanges.

The second data set collects daily closing adjusted prices of the companies
listed in the S&P 500, which we retrieved from Yahoo Finance. We compute
logarithmic daily returns at the individual company level and then truncate
the series at eight standard deviations from the mean. Our final dataset is
made of 748,017 observations, which corresponds to 99.87% of the original
sample. Figure 1 compares the pooled distributions of crypto and S&P 500
companies’ daily returns. Table 1 summarizes the main summary statistics and
the four moments of the distributions.

Despite the average return of the two classes of assets is about the same, the
range of variation of cryptocurrencies is as five times as bigger than that of
individual companies. This is not surprising, given that the cryptocurrency
market’s volatility is considerably higher than the stock market. We can also
acknowledge significant differences in the second and fourth moments of the
distributions. In particular, whereas S&P 500 companies’ returns are
negatively skewed, this is not the case for cryptocurrencies. Furthermore, our
cryptocurrency dataset exhibits significantly higher kurtosis than equities’
returns. We attribute the discrepancy to the structural features of the
cryptocurrency market, which is subject to less regulation and an increased
arbitrage across exchanges (Makarov and Schoar, 2020).

To better understand the stochastic behavior of the two classes of financial
assets, we identify the associated bull and bear market trends. We define bear
and bull markets according to the 50-day and 200-day exponential moving
average (EMA) crossover.333Given that we are comparing two markets with
completely different scales of fluctuations, we do not follow the standard
definition provided by the Securities and Exchange Commission, which defines
bear markets as declines of 20% or more over at least two months. In detail,
we have a bull market when the 50-day EMA lies above the 200-day, and a bear
market in the opposite scenario. Subsequently, we construct a cryptocurrency
capitalization-weighted index with daily closing prices and market
capitalization of individual crypto assets. As per the dataset concerning the
companies listed in the S&P 500, we use the closing price of the S&P 500 Total
Return Index. Figure 2 shows the resulting trends in both series. Whereas the
S&P 500 records few instances of bear markets, the cryptocurrency market
generates more occurrences of bear trends over prolonged periods.

Figure 1: Pooled Distributions.

Source: CoinMarketCap and Yahoo Finance.

Table 1: Summary Statistics of Pooled Distributions (%/day). | Min | Mean | Median | StDev | Skew | Kurt | Max
---|---|---|---|---|---|---|---
Cryptocurrencies | -86.33 | 0.04 | -0.09 | 8.56 | 0.58 | 13.27 | 88.87
S&P 500 Companies | -17.99 | 0.05 | 0.09 | 2.11 | -0.14 | 8.41 | 17.98
Figure 2: Crypto Vs S&P 500 Index. (Red bars denote bear markets).

Source: CoinMarketCap and Yahoo Finance.

###  2.1 Stationarity and Reversibility of time-series

To assess whether our two datasets could be assumed to be under statistical
equilibrium, we checked two different types of statistical properties: (a) if
the time series were stationary or trend stationary for given time windows – a
standard approach usually employed in econometrics; (b) if they were an
expression of time-reversible processes. For the latter, we follow Kardar
(2007), who points out that a reversible process can be run backward in time
by simply reversing its inputs and outputs. Such a process is the
thermodynamic equivalent of a frictionless motion in mechanics. Since time
reversibility implies equilibrium, a reversible transformation must be quasi-
static, even if the reverse is not necessarily true. The next subsections
briefly outline some tests we used to check for such properties.

####  2.1.1 Stationarity and trend-stationarity tests

The Augmented Dickey-Fuller (ADF) and Kwiatkowski-Phillips-Schmidt-Shin (KPSS)
tests are commonly used to determine the stationarity or trend-stationarity of
a time series. We detail them below and provide information about the results
obtained over our empirical data.

Augmented Dickey Fuller (ADF) Test: The ADF test (Dickey and Fuller, 1979,
1981) is a type of unit root test. A unit root test determines how strongly a
trend defines a time series. The ADF test has the null hypothesis that a unit
root is present in a time series sample. If the null hypothesis of the ADF
test cannot be rejected, this suggests that the time series has a unit root,
implying that it is non-stationary. The “augmented” aspect of the test
includes lagged terms of the time series to account for serial correlation. In
this test, the Null Hypothesis (H0) reads that the time series has a unit root
(i.e., non-stationary). In contrast, the Alternative Hypothesis (H1) states
that the time series does not have a unit root (i.e., stationary). If the test
statistic is less than the critical value, we reject the null hypothesis,
suggesting the time series is stationary.

Kwiatkowski-Phillips-Schmidt-Shin (KPSS) Test: The KPSS test (Kwiatkowski et
al., 1992) is another method to test for stationarity, but its hypotheses are
framed differently from the ADF test. The KPSS test has the null hypothesis
that a time series is trend-stationary around a deterministic trend. This
means that the time series can be made stationary by detrending it (removing
the deterministic trend). In this test, the Null Hypothesis (H0) states that
the time series is stationary around a deterministic trend. In contrast, the
Alternative Hypothesis (H1) reads that the time series has a unit root (i.e.,
non-stationary). If the test statistic is greater than the critical value, we
reject the null hypothesis, suggesting the time series is non-stationary.

Often, both ADF and KPSS tests are used together. The reason is that they
complement each other. ADF focuses on the null being a unit root (non-
stationary), while KPSS assumes stationarity as the null. If both tests
indicate stationarity, then the series is stationary. Conversely, if both
tests indicate non-stationarity, then the series is non-stationary.
Eventually, if the results conflict, further diagnostics or considerations
might be necessary.

Figure 3 outlines the results of those tests for the S&P 500 index, where data
appears to be stationary and trend-stationarity up to five trading months (100
days rolling windows). For the cryptocurrency index, we did not find
comparable results in terms of stationarity, probably due to the very nature
of that market, which has different trading volumes and is less mature than
the stock market. Using the latter’s results as our benchmark, we now perform
time-reversible tests.

Figure 3: Stationarity Tests for the S&P 500 Total Return Index.

$p$-values for stationarity tests over different rolling time windows.
Panel (a): ADF stationarity test. Panel (b): KPSS stationarity test.

####  2.1.2 Irreversibility tests

Several irreversibility tests are known in the literature. Zanin and Papo
(2021) has provided an extensive review. We utilize four of the most commonly
used tests for our analysis, detailing their methodology and presenting the
results derived from our data.

Ramsey and Rothman’s Test: Ramsey and Rothman’s irreversibility test (Ramsey
and Rothman, 1996) is a statistical procedure used to detect the presence of
asymmetric adjustments towards long-run equilibrium in economic variables.
This test specifically checks whether positive and negative shocks to a system
have different effects on its return to equilibrium, implying that the system
does not symmetrically revert to the mean. In other words, the test determines
where a system reacts differently when above or below equilibrium, shedding
light on the nature of adjustments and potential policy implications in
various economic contexts. Note that this test employs one degree of freedom,
with $k$ identifying different time lags.

Daw, Finney, and Kennel (DFK) test: The DFK test (Daw et al., 2000) is a
symbolic method designed to measure temporal “irreversibility” in time-series
data. Temporal irreversibility indicates that the dynamics of a system are not
merely Gaussian linear or a static transformation thereof. The DFK test
employs an algorithm named “false flipped symbols” to detect this
irreversibility. This method is favored because of its computational
efficiency, noise resilience, and statistical analysis ease. The test can help
characterize experimental data and is particularly useful for choosing
alternative models. We employ two degrees of freedom in our analysis: $n$, the
number of possible symbols, and $L$, the word length.

Enhanced Visibility Graphs: The enhanced Visibility Graphs (Luque et al.,
2009), specifically the horizontal visibility algorithm as in the version
improved by Zanin and Papo (2021), is a method that transforms time series
data into complex networks. By doing so, one can employ complex network theory
techniques to characterize and understand the nature of the time series. Some
key points about this approach:

Mapping of Random Series: The horizontal visibility algorithm primarily deals
with random series (series made of independent identically distributed random
variables). The algorithm’s properties provide detailed insights into the
topological attributes of graphs associated with these random series, such as
the degree distribution, clustering coefficient, and mean path length.

Discriminating Randomness: A distinct feature of this method is its ability to
distinguish randomness in time series. Specifically, any random series maps
onto a graph where the exponential degree distribution follows
$P(k)=\frac{1}{3}(\frac{2}{3})^{k-2}$. This distribution remains consistent
regardless of the original probability distribution of the series. Hence, any
visibility graph with a different $P(k)$ indicates the presence of non-
randomness in the series.

Distinguishing Chaotic Series: Beyond just random series, the horizontal
visibility algorithm can differentiate between chaotic series and those based
on the independent and identically distributed (i.i.d.) theory. The algorithm
is effective in analyzing (i) noise-free low-dimensional chaotic series, (ii)
noisy low-dimensional chaotic series, even with significant noise, and (iii)
high-dimensional chaotic series, all without requiring additional methods or
noise reduction techniques.

Analysis of Conjectured Sequences: This method also offers heuristic
explanations for the topological properties of chaotic series and can analyze
random series.

Local Clustering Coefficient: The Local Clustering Coefficient test (F.Donges
et al., 2013) is designed to detect time-reversal asymmetry in nonlinear time
series. This asymmetry is a defining characteristic of many nonlinear series,
indicating that the series does not simply reverse when time runs backward.
Key aspects of this method are:

Basis on Visibility Graphs: The test employs standard and horizontal
visibility graphs as foundational tools (as outlined above). These graphs
transform time series data into complex network representations, allowing
analysis using network theory measures.

Time-Directed Network Measures: Central to this method is the comparison of
the distributions of time-directed variants of standard complex network
measures, specifically the degree and local clustering coefficient. When
adjusted to consider the direction of time, these measures can reveal
asymmetry or irreversibility in the series.

No Need for Surrogate Data: One advantage of this test is that it does not
rely on surrogate data. Surrogate data techniques often involve generating
randomized versions of the original time series to test against, which can be
computationally expensive and may not always provide clear contrast.

Applicability to Short Series: This approach can be effectively applied even
to relatively short time series, making it versatile for different datasets.

Figure 4 shows the results for those tests as applied to our cryptocurrency
index and the S&P 500 Total Return Index. As we can see, within the previously
identified window of five trading months, the four trading month window (80
days for the S&P data and 120 days for cryptocurrencies) seems to be a good
candidate for our analysis. Indeed, it provides a balanced horizon between
reversible and irreversible areas, i.e., above and below the significance
level of the tests (red line). Accordingly, we select this time window for our
analysis in the following sections.

Figure 4: Irreversibility tests for cryptocurrency index and S&P 500 Total
Return Index.

$p$-values for irreversibility tests over different rolling time windows.
Panel (a): S&P 500 Total Return Index. Panel (b): Cryptocurrency Index.

##  3 The Quantal Response Statistical Equilibrium Model

The Quantal Response Statistical Equilibrium (QRSE) model, originally put
forward by Scharfenaker and Foley (2017), provides a method to explain the
observed regularities in highly complex systems (see also Zheng (2023)) by
taking into account social interactions between a large number of
heterogeneous individuals and their reactions to the economic variable of
interest (in our case, the rate of return on asset prices). The main objective
is to analyze the market dynamics without relying on ad-hoc assumptions.

In the QRSE model, equilibrium takes the form of an information-theoretic
probability distribution representing all possible states of the system. By
adopting the Maximum Entropy Principle (Jaynes, 2003) as a method of
inference, which we discuss in more detail in Appendix B, the model introduces
a general framework where the conventional general equilibrium outcome exists
just as a special and highly unlikely state of the economic systems.The
underlying logic of the model is based on classical political economic theory
(Smith, 1776), and we apply it to the rate of return on asset prices as
follows.

Investors seeking above-average returns from their transactions generate a
“tendential gravitation” around a certain rate as an unintentional result of
their interactions with other actors. Therefore, their decisions to compete
for higher expected returns determine, at any point in time, the change in
price level, thus creating an average rate of price change in the market as a
whole. This process, which can be interpreted as the statistical equalization
of returns, generates statistical regularities observed in the fat-tailed,
single-peaked distributions characterizing stock returns over different time
horizons.

If we relate our model’s logic to the behavior of financial markets, we can
identify three components of crucial importance. First, investors’ alertness
to excess returns is an important determinant of the market’s volatility.
Second, the unintended feedback of transactions on returns dictates how
trading impacts liquidity, affecting variations in the return level. Third,
investors’ expectations determine whether transactions occur, thus relating
individual beliefs to market outcomes. The QRSE model can help explain the
above features by accounting for (1) the assumption of quantal response
behavior of the market participants, (2) the negative feedback mechanism
(representing the impact of individual actions on social outcomes), (3) the
role of expectations. Let us now turn to analyze each concept in more detail.

###  3.1 The Behavioral Constraint

The first component of the model represents a behavioral theory of the typical
agent in terms of the probability that they will choose a particular action,
$a=\\{sell,buy\\}$, conditional on the variable $r$, the rate of return, and
is expressed in the conditional distribution $f[a|r]$. This conditional
distribution expresses the response probabilities over the action set given
$r$, and quantifies the impact of $r$ on the individual action frequencies.
Its functional form, whose analytical derivation is shown in Appendix C, is
the logit quantal response distribution (with $\beta=\frac{1}{T}$):

$\displaystyle f[buy|r]$ $\displaystyle=\frac{1}{1+e^{\frac{u[a,r]}{T}}}$
$\displaystyle f[sell|r]$ $\displaystyle=\frac{1}{1+e^{-\frac{u[a,r]}{T}}}$
(1)

The parameter $T$ represents the attentiveness of the typical agent. As Figure
5 shows, the lower the $T$, the more alert the individual is to differences in
payoff, and the more closely the action approximates the unconstrained payoff-
maximizing outcome.

Figure 5: Logit Quantal Response Conditional Probabilities.

The functions are plotted for different values of $T$, while holding $\mu=0$.

While entropy-constrained behavior is a generalization of rational choice
theory, there are several significant differences with crucial implications
(Faynzilberg, 1996). We show them in Figure 6(c), and explain them in what
follows.

In the limiting case where $T\to 0$ (Figure 6(a)), the behavior of the agent
becomes completely deterministic, meaning that agents will always choose to
sell an asset whenever $r>\mu$ and to buy it whenever $r<\mu$. In turn, the
conditional distribution $f[a|r]$ approaches the Heavyside step function, and
the QRSE distribution ($\hat{f}[r])$ approximates a single-peaked Laplace
distribution.

When $T>0$, individual agents’ preferences no longer satisfy the assumptions
of consistency and completeness, and there is a positive probability for each
action an individual will make. In this case, $\hat{f}[r]$ will exhibit fat-
tails similar to a Student’s T distribution (Figure 6(b)).

Finally, as $T\to\infty$ the actions are random and conditionally independent
of the outcome $r$, and therefore $f[a|r]\to f[a]$. As a result, the QRSE
marginal distribution $\hat{f}[r]$ converges to a Normal distribution, as
shown in Figure 6(c).

Figure 6: Relationship between $T$ and QRSE Distribution ($\hat{f}[r]$).

(a) $\mu=0,\,T=0.0001$.

(b) $\mu=0,\,T=1$.

(c) $\mu=0,\,T=1000$.

In terms of investors’ behavior, the above results have two implications.
First, they dovetail with some behavioral theories, such as the Adaptive
Market Hypothesis (Lo, 2019), which calls for adaptive and evolutionary
investors’ behavior as market conditions change. In our framework, this can be
captured by changes in the degree of attentiveness, which allows for
heterogeneous behaviors. Second, a characteristic of logistic behavior models
is that the log odds of making two decisions are equal to the ratio of the
expected utility of the two decisions, which implies:

$\log\left[\frac{f[buy|r]}{f[sell|r]}\right]=\frac{r-\mu}{T}\,.$ (2)

The above equation tells us something about the risk propensity of the agent.
Indeed, since the parameter $T$ denotes the standard deviation of the Sigmoid
function (Equation 1), the higher the $T$, the higher the risk a trader is
willing to accept in making investment decisions, and vice versa.

###  3.2 The Feedback Constraint

Economic variables that exhibit statistical regularities, such as a central
moment and stable endogenous fluctuations, can be considered in equilibrium
precisely because there are negative forces that stabilize the distribution.
Indeed, whereas payoff maximizing agents are seeking rates of return above
their expected fundamental valuation of the asset to sell, buyers look for
stocks whose returns are below their expected fundamental rate of price
increase. Unintentionally, sellers’ actions cause a decline in stock returns,
while buyers’ behavior causes an increase. Accordingly, the second component
of the model reflects the impact of the action on the outcome variable,
$f[r|a]$.

The conditional distribution $f[r|a]$ expresses a theory of the formation of
social outcomes. If the actions of individual participants had no impact on
the outcome, then $f[r|a]=f[a]$, as in the standard general equilibrium
framework. However, in light of our previous discussion, we assume that
actions impact outcomes, which implies that buying/selling a stock tends to
increase/decrease its rate of return.

Given that statistical equilibrium in the joint distribution, $f[a,r]$,
implies that $r$ is statistically regulated by $a$ through a negative feedback
mechanism, the buying and selling actions tend to push the market outcomes
around a certain level of return, which we denote with $\alpha$. Accordingly,
we can write this condition as follows:

$\int f[buy,r]r\,dr\leq\alpha\leq\int f[sell,r]r\,dr\\\ $ (3)

Then, we have:

$\displaystyle\begin{split}&\int f[sell,r](r-\alpha)\,dr-\int
f[buy,r](r-\alpha)\,dr\\\
=&f[sell]\mathbb{E}[(r-\alpha)|sell]-f[buy]\mathbb{E}[(r-\alpha)|buy]\\\
=&\int(f[sell|r]-f[buy|r])f[r](r-\alpha)\,dr\\\
=&\int\left(\frac{1}{1+e^{-\frac{u[a,r]}{T}}}-\frac{1}{1+e^{\frac{u[a,r]}{T}}}\right)f[r](r-\alpha)\,dr\\\
=&\int\left(\frac{1-e^{-\frac{u[a,r]}{T}}}{1+e^{-\frac{u[a,r]}{T}}}\right)f[r](r-\alpha)\,dr\\\
=&\int\tanh\left[\frac{r-\mu}{2T}\right]f[r](r-\alpha)\,dr\geq 0\end{split}$
(4)

Note that if there were no impact of the actions on the outcome, the
expectation of stock returns conditional on the buying action would tend to be
higher than the expectation conditional on the selling action. However, the
presence of negative feedback tends to constrain this difference to a positive
but finite value $\delta$, implying that:

$\int f[sell,r](r-\alpha)\,dr-\int f[buy,r](r-\alpha)\,dr\leq\delta$ (5)

The parameter $\delta$ is an indirect measure of the dependence of $a$ on $r$.
The smaller the $\delta$, the stronger the actions in changing the outcome.
When $\delta=0$, we have:

$\int f[sell,r]r\,dr=\int f[buy,r]r\,dr=\alpha\,.$

In this case, the actions have an infinite effect on stabilizing the outcome
at the $\alpha$ level of stock return. As a result, the marginal and joint
frequency distribution, $\hat{f}[r]$ and $f[a,r]$, become increasingly
leptokurtic. Figure 7 shows the effect of the negative feedback through
variations in $\delta$.

Even though the feedback from agents’ actions to the outcome is one of the
foundational blocks of reflexivity theory (Soros, 2013), negative feedback can
be somehow questionable within financial markets. Indeed, asset bubble
episodes are normally explained as positive feedback mechanisms that unfold
through strategic complementarities. Despite Soros himself acknowledging
negative feedback as the mechanism aligning individual beliefs with objective
reality, in our model, it has a different implication, which concerns the
liquidity effect.

If too many agents adopt the same trading strategy, they effectively reduce
the overall profitability of that strategy, generating a crowding-out effect.
Accordingly, this endogenous process tends to push the market outcome towards
a conventional rate of return, which satisfies investors’ behavior, thus
explaining the observed peakedness in the distribution of rates of return.

Figure 7: The negative feedback mechanism.

###  3.3 The Role of Expectations

The perception of the social outcome determines agents’ actions through their
estimated fundamentals $\mu$. Because their actions determine the outcome $r$,
if individual expectations are self-fulfilling, that is to say, they are
aligned with the central tendency of the outcome ($\bar{r}$), then
$\mu=\bar{r}$. However, agents’ expectations about their fundamental valuation
do not necessarily need to be correct. Accordingly, when $\mu\neq\bar{r}$,
expectations are unfulfilled, and this provides an incentive for agents to
reassess their estimate of the fundamentals through some market-based
punishment for acting in a contrarian fashion with the market. On the
contrary, when expectations are fulfilled ($\mu=\bar{r}$), there are no
market-based incentives for agents to change their estimate of $\mu$ (Foley,
2020a).

An important implication of the degree of expectation fulfillment is that
whenever agents have mistaken beliefs, the resulting statistical equilibrium
distribution of social outcomes becomes asymmetric. Our model captures
skewness by the relation between $\mu$ and $\alpha$. When $\mu=\alpha$,
meaning that the fundamental valuation coincides with the level of returns
towards which the buying and selling actions push the market outcomes, the
resulting marginal distribution is symmetric. On the contrary, when
$\mu\neq\alpha$, then we can either have positive ($\mu<\alpha$) or negative
($\mu>\alpha$) skewness. Accordingly, we can distinguish between three
different cases:

  * •

$\mu>\alpha\Rightarrow\,\bar{r}>\alpha$

  * •

$\mu=\alpha\Rightarrow\,\bar{r}=\alpha$

  * •

$\mu<\alpha\Rightarrow\,\bar{r}<\alpha$

We can prove this by considering Equation 2:

$\log{\left[\frac{f[buy|r]}{f[sell|r]}\right]}=\frac{r-\mu}{T}$

Since, in statistical equilibrium, for a given $\overline{r}$,
$f[buy|\overline{r}]=f[sell|\overline{r}]$, then we have:

$\log{[1]}=0=\frac{\overline{r}-\mu}{T}\Rightarrow\overline{r}=\mu$

With this equilibrium condition in mind, we can derive the three above cases.

By comparing $\mu$ with $\alpha$ we are effectively analyzing the deviations
of a subjective valuation from a “conventional” rate of return, resulting from
the unintended consequences of investors’ behavior. In particular, if
$\mu=\alpha=\bar{r}$, then the center of gravitation around which market
returns fluctuate is the same as the average rate of return. Therefore, our
model allows us to quantify the deviation of agents’ expectations about
fundamentals from the actual location of the market as follows:

$\zeta=\mu-\alpha$ (6)

This implies that we can think of $\zeta$ as a measure of expectation
fulfillment, which allows us to compare actual market outcomes with the
Efficient Market Hypothesis (EMH) proposition (Fama, 1965). Indeed, since the
EMH assumes rational (self-fulfilling) expectations, which means $\zeta=0$, we
can detect the presence of “bubbles” in the sense of divergences of actual
market values from fundamentals and thus provide an assessment of the EMH.

Figure 8(c) shows the marginal, joint, and conditional probability
distributions for fulfilled and unfulfilled expectations. As we can see,
positive skewness can be interpreted as a “market punishment for buyers”,
meaning that they are buying at a higher price increase as compared to the
conventional market valuation. On the contrary, negative skewness denotes a
“market punishment for sellers”, whose willingness to sell declines as they
expect a rate of return above the average. An important implication of this
process is that it imposes costly market punishment mechanisms associated with
the correction of expectations, which leads to inertia in the adjustment of
the system (as opposed to the rational expectations hypothesis, which assumes
that such adjustments are instantaneous and costless).

Figure 8: Marginal, conditional, and joint frequency distributions for
fulfilled and unfulfilled expectations.

(a) Positive skewness: $\zeta<0$ ($\mu=-2,\,T=1,\,\alpha=0$).

(b) Symmetry: $\zeta=0$ ($\mu=\alpha=0,\,T=1$).

(c) Negative skewness: $\zeta>0$ ($\mu=2,\,T=1,\,\alpha=0$).

##  4 Discussion of Results

In what follows, we fit the QRSE model to the cross-sectional distribution of
returns over four trading months rolling windows (80 days for the S&P 500
companies data, 120 days for cryptocurrencies). Table 2 summarizes the main
results of the model over bull and bear markets.

Table 2: Summary of Model Estimates (%/day).

|  | ID | $\mu$ | $T$ | $\alpha$ | $S$ | $\bar{r}$ | $\zeta$ | $\delta$
---|---|---|---|---|---|---|---|---|---
S&P 500 | Bull | 0.0099 | 0.3063 | 1.0574 | -0.1592 | 1.6907 | 0.0407 | 0.4655 | 0.9297
| (0.0029) | (0.2319) | (0.3929) | (0.2988) | (0.6877) | (0.0979) | (0.5149) | (0.4366)
Bear | 0.0092 | 0.1709 | 1.3817 | 0.0283 | 1.9603 | 0.0891 | 0.1427 | 1.0832
|  | (0.0009) | (0.2602) | (0.3826) | (0.2714) | (0.4841) | (0.1284) | (0.4775) | (0.2888)
Crypto | Bull | 0.1391 | -0.0738 | 2.1997 | 0.0131 | 7.0157 | 0.1930 | -0.0869 | 5.0012
| (0.0261) | (0.7184) | (1.5311) | (1.1933) | (1.5406) | (0.7227) | (1.8040) | (1.9376)
Bear | 0.1322 | 0.2234 | 2.3296 | -0.5803 | 5.8279 | -0.2274 | 0.8037 | 3.6391
|  | (0.0410) | (0.3879) | (0.6872) | (0.8071) | (0.8856) | (0.4195) | (1.1102) | (0.6821)

Average values of parameters and associated standard deviations (in
parenthesis).

As we can see, the goodness of fit, as captured by the Soofi ID, is better for
the S&P 500 data than cryptocurrencies. This is not surprising, given the
bigger sample size. The same reasoning applies to the standard deviation of
the estimates. We now focus our attention on the major parameters of the
model: $\zeta$ (which captures the deviation between $\mu$ and $\alpha$), $T$,
and $S$ (the inverse of the Lagrangian multiplier of the feedback
constraint)444See Appendix D for further details., and $\delta$.

Figure 9 shows the estimates of $\zeta$ for both the S&P 500 and the
cryptocurrencies’ cross-sectional distributions. Recall that $\zeta$ is
inversely related to the empirical cross-sectional skewness. In both cases, we
can observe a decreasing trend in the degree of unfulfilled expectations
preceding bear markets followed by a subsequent increase. This results from
the correction of expectations of excessively buoyant investors, who buy at a
higher rate of return ($\mu$) compared to the conventional valuation of the
market ($\alpha$), in light of changes in realized outcomes. However, this
trend is more irregular for cryptocurrencies, which denotes prolonged periods
of bear markets. In this case, we witness an increase in the range of
variations of $\zeta$ and faster adjustments to market changes. We attribute
this to the distinctive nature of the cryptocurrency market, which trades
twenty-four hours a day over the entire week.

We can acknowledge two other distinguishing features of the markets. First,
the cross-sectional distribution of the S&P 500 companies is mostly negatively
skewed, as opposed to the bulk of the cryptocurrencies’ distribution, which
lies in the negative quadrant. This features the structural differences
between the two markets. Second, there is a higher degree of mean reversion
towards zero in the cryptocurrency market than in the stock market. This
implies, according to our analysis, a more efficient market. Indeed, the
average value of $\zeta$ for cryptocurrency over the entire sample is
0.27%/day, as opposed to 0.42%/day for the S&P 500. This is due to a more
intense arbitrage activity across cryptocurrency exchanges, on the one hand,
and the associated lack of regulatory measures, on the other (Makarov and
Schoar, 2020).

Figure 9: Cross-sectional Estimates of $\zeta$.

(a) S&P 500 Companies.

(b) Cryptocurrencies.

Red shaded denote bear markets. Estimates are shown over four-month rolling
windows.

An interesting feature of the QRSE model is that it allows us to retrieve the
trading frequencies, $f[buy]$ and $f[sell]$, by integrating the joint
frequency distribution $f[a,r]$ over the rate or return $r$ as follows:

$\displaystyle\begin{split}f[a]&=\int f[a,r]\,dr\\\ &=\int
f[a|r]f[r]\,dr\end{split}$ (7)

Figure 10 shows the implied trading frequency retrieved by the model and the
relationship to the degree of expectation fulfillment for the cross-sectional
distributions of the S&P 500 companies, top panes, and the set of
cryptocurrencies, bottom panes, respectively.555The symmetry between the
buying and selling action is due to the property of the conditional frequency
distribution, $f[a|r]$, which is symmetric around $\mu$.

In terms of trading frequencies (top and bottom left panes), our results show
a general decreasing trend in the buying frequencies before a bear market
which is common to both asset classes. However, the intensity of trading is
more remarkable in the cryptocurrency market, though bounded within a narrower
range of values. This could be explained by a different degree of
attentiveness of cryptocurrency investors to variations in price changes.
Furthermore, the lack of a proper fundamental value for crypto assets,
generates sudden reversals in trading activities.

If we relate the trading frequency to the degree of expectation fulfillment
(top and bottom right panes), we acknowledge a direct relationship between the
two variables. In detail, our results show a higher trading activity for
positive values of $\zeta$ in the case of the S&P 500 companies, whereas the
opposite is true for the cryptocurrency market.

Figure 10: Trading Frequencies ($f[a]$) and Degree of Expectation Fulfillment
($\zeta$).

(a) S&P 500 Companies: $f[a]$.

(b) S&P 500 Companies: $f[a]$, $\zeta$.

(c) Cryptocurrencies: $f[a]$.

(d) Cryptocurrencies: $f[a]$, $\zeta$.

Red shaded areas denote bear markets.

Figure 11 shows the cross-sectional estimates of $T$, left panes, and $S$,
right panes, for the S&P 500 companies and cryptocurrency data, respectively,
along with the observed cross-sectional average ($\bar{r}$) and standard
deviation ($\sigma(r)$) of the rate of return. $T$ is the microscopic
parameter that captures the alertness of investors to variations in returns,
whereas $S$, is a macroscopic parameter reflecting the aggregate fluctuation
of the market.

Figure 11: $T$ and $S$.

(a) S&P 500 Companies: $T$, $\bar{r}$.

(b) S&P 500 Companies: $S$, $\sigma(r)$.

(c) Cryptocurrencies: $T$, $\bar{r}$.

(d) Cryptocurrencies: $S$, $\sigma(r)$.

The dashed line shows the average value of the estimated parameter. Red-shaded
areas denote bear markets.

Focusing on $T$, we can see that the range of variation is much wider for the
S&P 500 companies as opposed to cryptocurrencies. This captures the randomness
in the behavior of cryptocurrency investors, who strongly overreact to
variation in returns’ differentials. Indeed, the average $T$ for the
cryptocurrency cross-section is twice as big as the S&P 500 companies. This
implies, in terms of our analysis, that investors’ actions are less
predictable. We attribute this feature to the lack of a proper fundamental
value for crypto assets, which is replaced by the “madness of mobs”. On the
contrary, equity traders tend to rely on more solid conventions and anchor
their expectations to stable patterns. We can verify this by comparing the
time series of $T$ to the average cross-sectional return (brown line). For the
S&P 500 companies, the relation between the two is more stable, whereas it is
hard to identify a specific trend in the cryptocurrency dataset. However, we
can detect a common pattern across the two asset classes. Right before a bear
market, $T$ suddenly declines and slowly reverts to its previous trend. This
testifies to investors’ panic right before a market collapse, which translates
to an increased reaction to capital losses.

A similar argument can be made for $S$, on the right-hand pane of Figure 11.
For both datasets, we can see that this parameter properly tracks the observed
cross-sectional volatility (blue line). Since the QRSE model provides a better
fit for the S&P 500 data, the estimated value of the parameter replicates
almost exactly the empirical standard deviation.

We now turn to analyze $\delta$, which captures the effectiveness of the
feedback constraint. As previously argued, the lower the $\delta$, the
stronger the buying and selling actions in changing realized rates of return.
In other words, $\delta$ gives an approximate measure of liquidity and the
effectiveness of arbitrage in a market. Given that variations in $\delta$ are
reflected in the kurtosis, Figure 12 shows the relation between $\delta$ and
the observed kurtosis of the cross-sectional distribution of the S&P 500
companies, top pane, and the S&P 500, bottom pane.

Both stock and cryptocurrency data confirm the negative relation between the
two variables. However, we can appreciate the intensity of the negative
feedback and the degree of competition in the stock market. This reflects
differences in the structural features of the two markets, namely the degree
of regulation and the role of arbitrage, that we discussed earlier. However,
it is interesting to note how, for the S&P 500 results, the majority of the
estimates lie within a narrow range of values, at the bottom of the
distribution, whereas for the cryptocurrency data, results are more spread out
across the entire range of $\delta$.

Figure 12: Relation between $\delta$ and Cross-sectional Kurtosis.

(a) S&P 500 Companies.

(b) Cryptocurrencies.

Red dots denote bear trends, blue dots bull trends.

##  5 Conclusions

The purpose of this paper is to shed light on the stochastic structure of the
cryptocurrency and the stock market. By applying the notion of informational
entropy, along with statistical equilibrium theory, we develop a model which
allows us to study the cross-sectional distribution of daily returns of the
companies listed in the S&P 500 and a set of forty-eight cryptocurrencies.

On the one hand, our analysis confirms the differences in the structural
features of the two markets. This is reflected both at the microscopic and the
macroscopic level. Indeed, we can acknowledge the idiosyncratic features of
equity and cryptocurrency traders in their alertness to variations in price
changes. On the other, it quantifies the degree of unfulfilled expectations
over time, thus providing a benchmark against the EMH. In this respect, our
results show that the cryptocurrency market is more efficient than the stock
market.

From a theoretical standpoint, a crucial implication of statistical
equilibrium theory, as applied to financial markets, is that it explains how
randomness in asset prices is not an accident of nature, but the unintended
consequence of the action of market participants to profit from their
information. If we relate this to the EMH, we can immediately acknowledge how
it is possible to explain the same market outcome with completely different
theoretical foundations. Whereas the EMH needs to resort to “smart investors”
to justify the stabilizing impact of speculation, the QRSE model tells us that
the system can spontaneously converge towards a market convention, without
implying agents’ expectations to be fulfilled.

In addition to this, a constrained-entropy framework, combined with
statistical equilibrium, allows us to infer how different types of frequency
distributions generate regular patterns in financial time series, that the
QRSE model can capture through interactions of its parameters. In this
respect, understanding unfulfilled expectations might require the introduction
of prior probabilities in the behavioral constraint (Evans and Prokopenko,
2021), asymmetries in the conditional action of buying and selling (Blackwell,
2018), and the presence of multiple classes of market actors with
heterogeneous beliefs (Scharfenaker and Foley, 2023). These implementations
will be the object of further research.

## Appendix A. Cryptocurrency Dataset

Our sample comprises forty-six cryptocurrencies:

  * •

11 Proof-of-Work (PoW);

  * •

7 Non-Proof-of-Work (Non PoW);

  * •

28 additional ones (Extra).

Table 3: List of Cryptocurrencies.

| Cryptocurrency | Average Daily Volume | Average Daily Market Cap
---|---|---|---
PoW | Bitcoin | 22,569,282,367.78 | 326,685,866,829.99
Dash | 343,331,104.28 | 1,492,295,764.57
Decred | 5,531,245.04 | 544,304,232.87
DigyBite | 18,936,982.50 | 312,951,299.64
Dogecoin | 870,544,228.14 | 6,844,697,073.31
Ethereum | 11,139,327,488.14 | 114,716,785,900.87
Ethereum Classic | 910,448,838.03 | 2,187,290,290.74
Litecoin | 2,055,950,930.04 | 5,796,974,190.01
Monero | 234,450,259.05 | 2,318,921,931.86
Vertcoin | 1,829,479.19 | 36,946,526.26
Zcash | 284,065,262.62 | 887,309,845.33
Non PoW | Augur | 19,975,554.40 | 211,247,559.15
Lisk | 18,980,592.85 | 388,741,327.48
MadeSafeCoin | 1,050,644.33 | 134,416,818.31
NEM | 58,441,058.61 | 1,385,764,250.65
Stellar | 381,139,618.13 | 3,549,309,781.56
Waves | 115,061,196.54 | 682,943,285.98
XRP | 2,256,248,787.44 | 20,545,797,410.92
Extra | Aeon | 62,217.50 | 10,997,964.15
Ardor | 9077770.48 | 167042607.80
BitShares | 15,525,158.95 | 195,030,928.48
Curecoin | 30,313.25 | 2,726,203.82
DigitalNote | 1,284,092.42 | 18,331,653.67
Einsteinium | 3,300,422.78 | 23,644,520.33
Expanse | 211,259.62 | 4,983,012.67
GameCredits | 779,839.16 | 37,581,204.06
Groestlcoin | 7,779,924.51 | 34,103,913.36
Memetic/PepeCoin | 272,306.74 | 1,781,065.27
MonaCoin | 4,705,228.86 | 100,184,067.73
MUNT | 100,505.42 | 14,416,092.92
Myriad | 88,776.17 | 4,484,131.87
Navcoin | 1,121,789.19 | 24,709,864.60
Neo | 329,434,192.41 | 1,670,353,730.08
Nexus | 1,032,469.22 | 43,424,690.22
Okcash | 468,809.03 | 4,802,979.06
Pinkcoin | 90,107.89 | 2,817,292.73
PIVX | 1,770,047.05 | 72,180,506.34
ReddCoin | 2,228,406.67 | 62,810,490.26
SaluS | 489,235.82 | 11,825,518.51
Signum | 39,649.36 | 11,699,222.57
Steem | 13,153,654.79 | 206,545,056.59
Steem Dollars | 6,481,324.82 | 22,062,800.04
Syscoin | 5,930,384.51 | 113,568,709.63
Validity | 772,715.76 | 9,863,786.05
Verge | 20,556,005.91 | 237,864,938.25
Viacoin | 886,564.72 | 14,481,368.84

## Appendix B. The Maximum Entropy Principle

The Maximum Entropy Principle (Jaynes, 2003) postulates the maximization of
the entropy of an unknown and underdetermined distribution subject to
constraints, expressing whatever information from observation or theory is
relevant. Due to the strict concavity of the entropy function, as long as the
constraints describing the available information represent a non-empty convex
set in the space of distributions, the maximum entropy program will define
some maximizing distribution that is a candidate statistical equilibrium of
the model. The substantive interest of the resulting maximum entropy
distribution depends on the information the constraints express.

Generally speaking, maximizing entropy maximizes the uncertainty of the system
and gets the least informative state with no additional assumptions other than
the existing knowledge of the researcher and observed data. However,
constrained maximum entropy can be used either as a method of “rational
inference” (Golan, 2017), where maximization of entropy resolves the residual
uncertainty once the relevant information has been introduced via constraints,
or as a “statistical equilibrium theory”, which assumes that a system is
observed in a state of equilibrium characterized by the decay of transients
and is reaching a state of maximum entropy subject to constraints. Even though
the formalism is the same for both methods, the interpretation of the results
can be rather different. In our case, we deploy the maximum entropy principle
as a statistical equilibrium theory.

The foundational concept in information theory is informational, or Shannon
(1948) entropy. In economic applications of information theory, entropy is
most often described as a measure of uncertainty, but it is more helpful to
think of entropy as the lack of predictability. Given a random variable $x\in
X$, with probability distribution $f(x)$, the Shannon entropy,
$\mathcal{H}[x]$ is defined as follows:

$\mathcal{H}[x]=\mathbb{E}[-\log[f[x]]=-\sum_{x\in X}f[x]\log[f[x]]$ (8)

There are two reasons why we adopt this specific form of entropy. First, it is
not a parametric measure, unlike Rényi (1961) entropy and Tsallis (1988)
entropy, which are parametric and attach completely different weights to
extremely rare and regular events. As suggested by Batra and Taneja (2020),
they might not be appropriate for analyzing financial data series. Second,
Shannon entropy has been most successful in treating equilibrium systems,
which is why it is adequate to deal with statistical equilibrium.

Let the rate of return on an asset be $r\in\mathbb{R}$ and $a\in\mathbb{A}$
the set of quantal actions of selling and buying stocks, $a=\\{sell,buy\\}$,
respectively. Our objective is to determine the equilibrium joint distribution
$f[a,r]$ with the marginal and conditional frequencies $f[r]$, $f[a]$,
$f[a|r]$, $f[r|a]$ such that:

$f[r]=\sum_{a}{f[a,r]}\,,\quad f[a]=\int_{r}f[a,r]\,dr\,;$
$f[a|r]=\frac{f[a,r]}{f[r]}\,\,\text{if}\,f[r]>0\,,\quad
f[r|a]=\frac{f[a,r]}{f[a]}\,\,\text{if}\,f[a]>0.$

We write sums over outcomes, $r$, as integrals with the understanding that $r$
is treated as real-valued in theoretical applications. In empirical
applications, however, measurements will inevitably be coarse-grained in a
finite number of bins. We also omit the limits on integrals with the
understanding that the sums are over the range of $r$.

If we were to maximize the entropy of the joint distribution
$\mathcal{H}[f[a,r]]$, without the introduction of any constraint (except the
normalization of the sum of the joint frequencies to unity), we would find
that the entropy is maximized when the aggregate outcome $r$ is independent of
the individual actions $a$. Since this result sheds no light on the process
through which actions determine the outcome (it just returns the information
already known through the observation of $f[r]$), we need to construct a
theory of investors’ behavior and how it impacts the social outcome by
expressing it in terms of moment constraints.

## Appendix C. Derivation of Investor’s Behavior

Let us assume that the typical agent’s response probability $f[a|r]$ depends
on the payoff $u$ for choosing an action, which is the difference between the
expected outcome variable $r$ and the agent’s expected average payoff or
fundamental valuation of $r$, which we call $\mu$, such that we can write the
payoff function as $u[a,r]=r-\mu$.

If an investor chooses a mixed strategy
$f[a|r]:\mathbb{A}\times\mathbb{R}\rightarrow(0,1)$ to maximize the expected
payoff $\sum_{a}{f[a|r]u[a,r]}$, then the informational entropy is:

$\mathcal{H}[f[a|r]]=-\sum_{a}f[a|r]\log[f[a|r]]$ (9)

The entropy maximization program reads:

$\displaystyle\begin{split}\underset{f[a|r]\geq
0}{\text{Max}}-&\sum_{a}f[a|r]\log[f[a|r]]\\\ \text{subject to
}&\sum_{a}f[a|r]=1\\\ &\sum_{a}f[a|r]u[a,r]\geq U_{min}\end{split}$ (10)

Here, we are imposing a constraint on our uncertainty of $f[a|r]$ for a set of
agents subject to the condition that individuals have a minimum expected
payoff for acting (a sort of “satisficing” behavior _a $l\grave{a}$_ Simon
(1955)). The associated Lagrangian has the following form:

$\mathcal{L}=-\sum_{a}f[a|r]\log[f[a|r]]-\lambda\left(\sum_{a}f[a|r]-1\right)+\beta\left(\sum_{a}f[a|r]u[a,r]-U_{min}\right)$
(11)

The solution to this program gives the maximum entropy distribution, which
turns out to be the logit quantal response distribution (with
$\beta=\frac{1}{T}$):666It is important to note that there are other ways to
derive the above result through entropy maximization, and this is just one of
them. Foley (2020b) thoroughly analyzes entropy-constrained behavior and its
applications to economic theory.

$\displaystyle f[buy|r]$ $\displaystyle=\frac{1}{1+e^{\frac{u[a,r]}{T}}}$
$\displaystyle f[sell|r]$ $\displaystyle=\frac{1}{1+e^{-\frac{u[a,r]}{T}}}$
(12)

Our assumption about the agents’ behavior implies that choice decisions are
best described as a probabilistic phenomenon as opposed to the deterministic
rational theory of choice, which assumes choices are always associated with
probabilities equal to unity. In this sense, an interesting feature of the
informational entropy-constrained model is that it gives meaning to the
observed dispersion of behavior as the relative payoff of different actions,
thus generating an “entropy-constrained behavior”. Interestingly, entropy-
constrained behavior leads to the logit quantal response distribution without
imposing any prior distributional assumption on the errors affecting the
decision-making process.

## Appendix D. Model Derivation and Inference

The maximum entropy problem that incorporates the behavioral and feedback
constraints on the joint distributions reads as follows:

$\displaystyle\begin{split}\underset{f[a,r]\geq
0}{\text{Max}}\mathcal{H}[a,r]=-&\int\sum_{a}f[a,r]\log[f[a,r]]\,dr\\\ \text{
subject to }&\int\sum_{a}f[a,r]\,dr=1\\\
&\int\tanh\left[\frac{r-\mu}{2T}\right]\left(r-\alpha\right)f[r]\,dr\leq\delta\end{split}$
(13)

To solve this maximum entropy problem, it is convenient to write the joint
entropy as the entropy of the marginal distribution plus the average entropy
of the conditional distribution and solve for $f[r]$:

$\displaystyle\begin{split}\mathcal{H}[a,r]=&-\mathcal{H}[r]+\int
f[r]\mathcal{H}_{T,\mu}[r]\,dr\\\ =&-\int f[r]\log[f[r]]dr+\int
f[r]\sum_{a}f[a|r]\log[f[a|r]]\,dr\end{split}$ (14)

where $\mathcal{H}_{T,\mu}[r]$ denotes the binary entropy function:

$\mathcal{H}_{T,\mu}[r]=-\sum_{a}f[a|r]\log[f[a|r]]=-\left(\frac{1}{1+e^{-\frac{r-\mu}{2T}}}\log\left[\frac{1}{1+e^{-\frac{r-\mu}{2T}}}\right]+\frac{1}{1+e^{\frac{r-\mu}{2T}}}\log\left[\frac{1}{1+e^{\frac{r-\mu}{2T}}}\right]\right)$

The final maximum entropy program reads:

$\displaystyle\begin{split}\underset{f[r]\geq
0}{\text{Max}}&-\mathcal{H}[r]+\int f[r]\mathcal{H}_{T,\mu}[r]\,dr\\\ \text{
subject to }&\int f[r]\,dr=1\\\
&\int\tanh\left[\frac{r-\mu}{2T}\right]\left(r-\alpha\right)f[r]\,dr\leq\delta\end{split}$
(15)

This programming problem has the following associated Lagrangian:

$\displaystyle\begin{split}\mathcal{L}[f[r],\lambda,\gamma]&=-\mathcal{H}[r]+\int
f[r]\mathcal{H}_{T,\mu}[r]dr-\lambda\left(\int f[r]\,dr-1\right)+\\\
&\quad-\gamma\left(\int\tanh\left[\frac{r-\mu}{2T}\right]\left(r-\alpha\right)f[r]\,dr-\delta\right)\end{split}$
(16)

If we express $\gamma=\dfrac{1}{S}$, so we have an analog of the behavioral
temperature for the feedback constraint, the first-order conditions for
maximizing the entropy of the joint and conditional frequencies require:

$\frac{\partial{\mathcal{L}}}{\partial{f[r]}}=-\log[f[r]]-1-\lambda+\mathcal{H}_{T,\mu}[r]-\tanh\left[\frac{r-\mu}{2T}\right]\left(\frac{r-\alpha}{S}\right)=0$
(17)

The solution to this maximum entropy problem gives the most probable
distribution of outcomes, that is, the marginal distribution $\hat{f}[r]$,
that satisfies the constraints and has the following form:

$\hat{f}[r]=\frac{e^{\mathcal{H}_{T,\mu}[r]-\tanh\left[\frac{r-\mu}{2T}\right]\left(\frac{r-\alpha}{S}\right)}}{\int
e^{\mathcal{H}_{T,\mu}[r]-\tanh\left[\frac{r-\mu}{2T}\right]\left(\frac{r-\alpha}{S}\right)}\,dr}$
(18)

The predicted marginal distribution $\hat{f}[r]$ from Equation (18) is a
Kernel to the maximum entropy program, and together with the parameters $\mu$,
$T$, $\alpha$, and $S$ provides a multinomial distribution for the model. From
a Bayesian perspective, the empirical marginal distribution, $\bar{f}[r]$ can
be thought of as a sample of a multinomial model with frequencies $f[r]$
determined by Equation (18). We use the Kullback-Leibler (KL) divergence as an
approximation to the log posterior probability for the multinomial model since
it allows us to make posterior inferences about the parameter estimates
(Scharfenaker and Foley, 2017, p. 15).

The KL divergence measures the discrepancy between the empirical marginal
frequencies, $\bar{f}[r]$, and the predicted marginal frequencies
$\hat{f}[r;\mu,T,\alpha,S]$, inferred from the maximum entropy Kernel as:

$D_{KL}[\hat{f}[r]||\bar{f}[r]]=\sum{\hat{f}[r]\log\left[\frac{\hat{f}[r]}{\bar{f}[r]}\right]}$
(19)

As a result, the KL divergence provides us with a tool to compare the observed
marginal frequency distribution with the predicted marginal distribution. If
$\hat{f}[r]=\bar{f}[r]$, the $D_{KL}$ becomes zero indicating that the two
distributions are the same. Therefore, the smaller the KL divergence, the
closer the observed distribution to the predicted one, and the better the fit
is.

The set of parameters $\theta=\\{\mu,T,\alpha,S\\}$ are estimated jointly by
minimizing the KL divergence.777The optimization algorithm for the KL
minimization is the Broyden-Fletcher-Goldfarb-Shanno (BFGS) algorithm, with
the following initial conditions for the parameters: $\mu=0$, $T=1$,
$\alpha=0$, $S=1$. To measure the closeness of the model fit, we use the
information distinguishability criteria (ID) introduced by Soofi and Retzer
(2002). The ID measure shows approximately how much of the informational
content of the observed frequencies is captured from the results of the
maximum entropy program and is defined as follows:

$ID[\hat{f}[r]:\bar{f}[r]]=1-e^{-D_{KL}[\hat{f}[r]||\bar{f}[r]]}$ (20)

## References

  * Batra and Taneja [2020] L. Batra and H. Taneja.  Evaluating volatile stock markets using information theoretic measures.  _Physica A: Statistical Mechanics and its Applications_ , 537:122711, Jan. 2020.  doi: 10.1016/j.physa.2019.122711.  URL https://doi.org/10.1016/j.physa.2019.122711.
  * Batra and Taneja [2022] L. Batra and H. C. Taneja.  Comparison between information theoretic measures to assess financial markets.  _FinTech_ , 1(2):137–154, May 2022.  doi: 10.3390/fintech1020011.  URL https://doi.org/10.3390/fintech1020011.
  * Bhambhwani et al. [2023] S. M. Bhambhwani, S. Delikouras, and G. M. Korniotis.  Blockchain characteristics and cryptocurrency returns.  _Journal of International Financial Markets, Institutions and Money_ , 86:101788, 2023.  ISSN 1042-4431.  doi: https://doi.org/10.1016/j.intfin.2023.101788.  URL https://www.sciencedirect.com/science/article/pii/S1042443123000562.
  * Blackwell [2018] K. Blackwell.  _Entropy Constrained Behavior in Financial Markets. A Quantal Response Statistical Equilibrium Approach to Financial Modeling_.  PhD thesis, The New School, 2018.
  * Borri and Shakhnov [2022] N. Borri and K. Shakhnov.  The Cross-Section of Cryptocurrency Returns.  _The Review of Asset Pricing Studies_ , 12(3):667–705, 03 2022.  ISSN 2045-9920.  doi: 10.1093/rapstu/raac007.  URL https://doi.org/10.1093/rapstu/raac007.
  * Brillouin [1951] L. Brillouin.  Maxwell's demon cannot operate: Information and entropy. i.  _Journal of Applied Physics_ , 22(3):334–337, Mar. 1951.  doi: 10.1063/1.1699951.  URL https://doi.org/10.1063/1.1699951.
  * Brouty and Garcin [2022] X. Brouty and M. Garcin.  Maxwell’s Demon and Information Theory in Market Efficiency: A Brillouin’s Perspective.  _Physical Sciences Forum_ , 5(1):23, Dec. 2022\.  doi: 10.3390/psf2022005023.  URL https://doi.org/10.3390/psf2022005023.
  * Daw et al. [2000] C. S. Daw, C. E. A. Finney, and M. B. Kennel.  Symbolic approach for measuring temporal “irreversibility”.  _Physical Review E_ , 62(2):1912–1921, Aug. 2000\.  doi: 10.1103/physreve.62.1912.  URL https://doi.org/10.1103/physreve.62.1912.
  * Delgado-Bonal [2019] A. Delgado-Bonal.  Quantifying the randomness of the stock markets.  _Scientific Reports_ , 9(1), Sept. 2019.  doi: 10.1038/s41598-019-49320-9.  URL https://doi.org/10.1038/s41598-019-49320-9.
  * Dickey and Fuller [1979] D. A. Dickey and W. A. Fuller.  Distribution of the estimators for autoregressive time series with a unit root.  _Journal of the American Statistical Association_ , 74(366):427, June 1979.  doi: 10.2307/2286348.  URL https://doi.org/10.2307/2286348.
  * Dickey and Fuller [1981] D. A. Dickey and W. A. Fuller.  Likelihood ratio statistics for autoregressive time series with a unit root.  _Econometrica_ , 49(4):1057, July 1981.  doi: 10.2307/1912517.  URL https://doi.org/10.2307/1912517.
  * Evans and Prokopenko [2021] B. P. Evans and M. Prokopenko.  A maximum entropy model of bounded rational decision-making with prior beliefs and market feedback.  _Entropy_ , 23(6), 2021.  ISSN 1099-4300.  doi: 10.3390/e23060669.  URL https://www.mdpi.com/1099-4300/23/6/669.
  * Fama [1965] E. F. Fama.  Random walks in stock market prices.  _Financial Analysts Journal_ , 21(5):55–59, 1965\.  ISSN 0015198X.  URL http://www.jstor.org/stable/4469865.
  * Faynzilberg [1996] P. S. Faynzilberg.  Statistical mechanics of choice: MaxEnt estimation of population heterogeneity.  _Annals of Operations Research_ , 68(1):161–180, Mar. 1996.  doi: 10.1007/bf02205453.  URL https://doi.org/10.1007/bf02205453.
  * F.Donges et al. [2013] J. F.Donges, R. V. Donner, and J. Kurths.  Testing time series irreversibility using complex network methods.  _EPL (Europhysics Letters)_ , 102(1):10004, Apr. 2013.  doi: 10.1209/0295-5075/102/10004.  URL https://doi.org/10.1209/0295-5075/102/10004.
  * Foley [2020a] D. K. Foley.  _Unfulfilled Expectations: One Economist’s History_.  Springer International Publishing, Cham, 2020a.  ISBN 978-3-030-41357-6.  doi: 10.1007/978-3-030-41357-6˙1.  URL https://doi.org/10.1007/978-3-030-41357-6_1.
  * Foley [2020b] D. K. Foley.  Information theory and behaviors.  _European Physical Journal Special Topics_ , 229:1591–1602, 2020b.
  * Golan [2017] A. Golan.  _Foundations of Info-Metrics: Modeling, Inference, and Imperfect Information_.  Oxford University Press, 12 2017.  ISBN 9780199349524.  doi: 10.1093/oso/9780199349524.001.0001.  URL https://doi.org/10.1093/oso/9780199349524.001.0001.
  * Günther et al. [2020] S. Günther, C. Fieberg, and T. Poddig.  The cross-section of cryptocurrency risk and return.  _Vierteljahrshefte zur Wirtschaftsforschung_ , 89:7–28, 10 2020.  doi: 10.3790/vjh.89.4.7.  URL https://doi.org/10.3790/vjh.89.4.7.
  * Jaynes [2003] E. T. Jaynes.  _Probability theory: The logic of science_.  Cambridge University Press, 2003.
  * Kardar [2007] M. Kardar.  _Statistical Physics of Particles_.  Cambridge University Press, June 2007.  doi: 10.1017/cbo9780511815898.  URL https://doi.org/10.1017/cbo9780511815898.
  * Kwiatkowski et al. [1992] D. Kwiatkowski, P. C. Phillips, P. Schmidt, and Y. Shin.  Testing the null hypothesis of stationarity against the alternative of a unit root.  _Journal of Econometrics_ , 54(1-3):159–178, Oct. 1992.  doi: 10.1016/0304-4076(92)90104-y.  URL https://doi.org/10.1016/0304-4076(92)90104-y.
  * Lo [2019] A. W. Lo.  _Adaptive Markets: Financial Evolution at the Speed of Thought_.  Princeton University Press, 2019.  ISBN 9780691196800.  doi: doi:10.1515/9780691196800.  URL https://doi.org/10.1515/9780691196800.
  * Luque et al. [2009] B. Luque, L. Lacasa, F. Ballesteros, and J. Luque.  Horizontal visibility graphs: Exact results for random time series.  _Physical Review E_ , 80(4), Oct. 2009.  doi: 10.1103/physreve.80.046103.  URL https://doi.org/10.1103/physreve.80.046103.
  * Makarov and Schoar [2020] I. Makarov and A. Schoar.  Trading and arbitrage in cryptocurrency markets.  _Journal of Financial Economics_ , 135(2):293–319, 2020.  ISSN 0304-405X.  doi: https://doi.org/10.1016/j.jfineco.2019.07.001.  URL https://www.sciencedirect.com/science/article/pii/S0304405X19301746.
  * Ramsey and Rothman [1996] J. B. Ramsey and P. Rothman.  Time irreversibility and business cycle asymmetry.  _Journal of Money, Credit and Banking_ , 28(1):1, Feb. 1996.  doi: 10.2307/2077963.  URL https://doi.org/10.2307/2077963.
  * Rényi [1961] A. Rényi.  On measures of entropy and information.  In _Proceedings of the Fourth Berkeley Symposium on Mathematical Statistics and Probability, Volume 1: Contributions to the Theory of Statistics_ , pages 547–561. University of California Press, 1961.
  * Scharfenaker and Foley [2017] E. Scharfenaker and D. Foley.  Quantal response statistical equilibrium in economic interactions: Theory and estimation.  _Entropy_ , 19(9):444, Aug. 2017.  doi: 10.3390/e19090444.  URL https://doi.org/10.3390/e19090444.
  * Scharfenaker and Foley [2023] E. Scharfenaker and D. K. Foley.  The neutrality of money reconsidered: A statistical equilibrium model of the labor market.  2023\.  URL https://EconPapers.repec.org/RePEc:uta:papers:2023_02.
  * Shannon [1948] C. E. Shannon.  A mathematical theory of communication.  _Bell System Technical Journal_ , 27(3):379–423, July 1948.  doi: 10.1002/j.1538-7305.1948.tb01338.x.  URL https://doi.org/10.1002/j.1538-7305.1948.tb01338.x.
  * Simon [1955] H. A. Simon.  A behavioral model of rational choice.  _The Quarterly Journal of Economics_ , 69(1):99–118, 02 1955.  ISSN 0033-5533.  doi: 10.2307/1884852.
  * Smith [1776] A. Smith.  _An Inquiry into the Nature and Causes of the Wealth of Nations_.  McMaster University Archive for the History of Economic Thought, 1776\.
  * Soofi and Retzer [2002] E. Soofi and J. Retzer.  Information indices: unification and applications.  _Journal of Econometrics_ , 107(1):17–40, 2002\.  ISSN 0304-4076.  doi: https://doi.org/10.1016/S0304-4076(01)00111-7.  URL https://www.sciencedirect.com/science/article/pii/S0304407601001117.  Information and Entropy Econometrics.
  * Soros [2013] G. Soros.  Fallibility, reflexivity, and the human uncertainty principle.  _Journal of Economic Methodology_ , 20(4):309–329, 2013.  doi: 10.1080/1350178X.2013.859415.
  * Tran and Leirvik [2019] V. L. Tran and T. Leirvik.  A simple but powerful measure of market efficiency.  _Finance Research Letters_ , 29:141–151, June 2019.  doi: 10.1016/j.frl.2019.03.004.  URL https://doi.org/10.1016/j.frl.2019.03.004.
  * Tsallis [1988] C. Tsallis.  Possible generalization of boltzmann-gibbs statistics.  _Journal of Statistical Physics_ , 52(1-2):479–487, July 1988.  doi: 10.1007/bf01016429.  URL https://doi.org/10.1007/bf01016429.
  * Vințe et al. [2021] C. Vințe, M. Ausloos, and T. F. Furtună.  A volatility estimator of stock market indices based on the intrinsic entropy model.  _Entropy_ , 23(4):484, Apr. 2021.  doi: 10.3390/e23040484.  URL https://doi.org/10.3390/e23040484.
  * Zanin and Papo [2021] M. Zanin and D. Papo.  Algorithmic approaches for assessing irreversibility in time series: Review and comparison.  _Entropy_ , 23(11):1474, Nov. 2021.  doi: 10.3390/e23111474.  URL https://doi.org/10.3390/e23111474.
  * Zheng [2023] X. Zheng.  Complex behavior of individuals and collectives in a social system: An introduction to exploratory computational experimental methodology based on multi-agent modeling.  _Annals of Operations Research_ , May 2023.  doi: 10.1007/s10479-023-05388-1.  URL https://doi.org/10.1007/s10479-023-05388-1.


11institutetext: Lehrstuhl für Astronomie, University of Würzburg, Am Hubland,
D-97074 Würzburg

# Modelling the variability of 1ES1218+30.4

M. Weidinger 11 F. Spanier 11<EMAIL_ADDRESS>
(Received 22 February 2010 / Accepted 6 April 2010)

###### Abstract

Context. The blazar 1 ES 1218+30.4 has been previously detected by the VERITAS
and MAGIC telescopes in the very high energies. The new detection of VERITAS
from December 2008 to April 2009 proves that 1 ES 1218+30.4 is not static, but
shows short-time variability.

Aims. We show that the time variability may be explained in the context of a
self-consistent synchrotron-self Compton model, while the long time
observation do not necessarily require a time-resolved treatment.

Methods. The kinetic equations for electrons and photons in a plasma blob are
solved numerically including Fermi acceleration for electrons as well as
synchrotron radiation and Compton scattering.

Results. The light curve observed by VERITAS can be reproduced in our model by
assuming a changing level of electron injection compared to the constant state
of 1 ES 1218+30.4 . The multiwavelength behaviour during an outburst becomes
comprehensible by the model.

Conclusions. The long time measurements of VERITAS are still explainable via a
constant emission in the SSC context, but the short outbursts each require a
time-resolved treatment.

###### Key Words.:

galaxies: jets - relativistic processes - radiation mechanisms: non-thermal -
BL Lacertae objects: individual: 1 ES 1218+30.4 \- galaxies: active

††offprints: F. Spanier,

##  1 Introduction

Blazars are a special class of active galactic nuclei (AGN) exhibiting a
spectral energy distribution (SED) that is strongly dominated by nonthermal
emission across a wide range of wavelengths, from radio waves to gamma rays,
and rapid, large-amplitude variability. The source of this emission is
presumably the relativistic jet emitted at a narrow angle to the line of sight
to the observer.
In high-peaked BL Lac objects (HBLs) the SED shows a double hump structure as
the most notable feature with the first hump in the UV- to X-ray regime and
the second hump in the gamma-ray regime. Indeed, a substantial fraction of the
known nearby HBLs have already been discovered with Cherenkov telescopes like
H.E.S.S., MAGIC or VERITAS. The origin of the first hump is mostly undisputed:
nonthermal, relativistic electrons in the jet are emitting synchrotron
radiation. The origin of the second hump is still controversially debated. Up
to now two kinds of models are discussed: leptonic (e.g. Maraschi et al.,
1992) and hadronic (e.g. Mannheim, 1993) ones, which are mostly applied for
other subclasses of blazars.
Another important feature of AGNs in general and HBLs in particular is their
strong variability. The dynamical timescale may range from minutes to years.
This requires complex models, which obviously have to include time dependence,
but this gives us also the chance to understand the mechanisms that drive
AGNs. We will apply a self-consistent leptonic model to new data observed for
the source 1 ES 1218+30.4 , because those are the ones favoured for HBLs.

The source HBL 1 ES 1218+30.4 has been discovered as a candidate BL Lac object
on the basis of its X-ray emission and has been identified with the X-ray
source 2A 1219+30.5 (Wilson et al., 1979; Ledden et al., 1981). For the first
time, 1 ES 1218+30.4 has been observed at VHE energies using the MAGIC
telescope in January 2005 (Albert et al., 2006) and later from VERITAS
(Acciari et al., 2009). Coverage of the optical/X-ray regime is provided by
BeppoSAX (Donato et al., 2005) and SWIFT (Tramacere et al., 2007),
unfortunately the data are not always simultaneous. During the observations
from December 2008 to April 2009 VERITAS also observed 1 ES 1218+30.4 showing
a time-variability (the VERITAS collaboration et al., 2010). The observations
from the MAGIC telescope have previously been modelled by Rüger et al. (2010).
the VERITAS collaboration et al. (2010) claim that their new observations
exhibiting variability challenge the previous models. We will show that a
timedependent model using a self-consistent treatment of electron acceleration
is able to model the new VERITAS data.

We present the kinetic equation, which we solve numerically, describing the
synchrotron-self Compton emission (Sect. 2). In Sect. 3 we apply our code to 1
ES 1218+30.4 , taking the VERITAS data into account and give a set of physical
parameters for the most acceptable fit. Finally, we discuss our results in the
light of particle acceleration theory and the multiwavelength features.

##  2 Model

Here we will give a brief description of the model used, for a complete
overview see (Weidinger et al., 2010; Weidinger & Spanier, 2010).
We start with the relativistic Vlasov equation (see e.g. Schlickeiser, 2002)
in the one dimensional diffusion approximation (e.g. Schlickeiser, 1984), here
the relativistic approximation $p\approx\gamma mc$ is used. This kinetic
equation will then be solved time-dependently in two spatially different
zones, the smaller acceleration zone and the radiation zone, which are assumed
to be spherical and homogeneous. Both contain isotropically distributed
electrons and a randomly oriented magnetic field as common for these models.
All calculations are made in the rest frame of the blob.
Electrons entering the acceleration zone (radius $R_{\text{acc}}$) from the
upstream of the jet are continuously accelerated through diffusive shock
acceleration. This extends the model of Kirk et al. (1998) with a stochastic
part. The energy gain due to the acceleration is balanced by radiative
(synchrotron) and escape losses, the latter scaling with $t_{\text{esc}}=\eta
R_{\text{acc}}/c$ with $\eta=10$ as an empirical factor reflecting the
diffusive nature of particle loss. Escaping electrons completely enter the
radiation zone (radius $R_{\text{rad}}$) downstream of the acceleration zone.
Here the electrons are suffering synchrotron losses as in the acceleration
zone and also inverse-Compton losses, but they do not undergo acceleration.
Pair production and other contributions do not alter the SED in typical SSC
conditions and are neglected (Chiang & Böttcher, 2002). The SED in the
observer’s frame is calculated by boosting the selfconsistently calculated
photons towards the observer’s frame and correcting for the redshift $z$:
$I_{\nu_{\text{obs}}}=\delta^{3}h\nu_{\text{obs}}/(4\pi)N_{\text{ph}}$ with
$\nu_{\text{obs}}=\delta/(1+z)\nu$. The acceleration zone will have no
contribution to $I_{\text{obs}}$ directly, due to the $R_{\text{i}}^{2}$
dependence of the observed flux at a distance $r$
($F_{\nu_{\text{obs}}}(r)=\pi I_{\nu_{\text{obs}}}R_{\text{rad}}^{2}r^{-2}$)
and the small size of the acceleration zone. The kinetic equation in the
acceleration zone is

$\displaystyle\frac{\partial n_{e}(\gamma,t)}{\partial t}=$
$\displaystyle\frac{\partial}{\partial\gamma}\left[(\beta_{s}\gamma^{2}-t_{\text{acc}}^{-1}\gamma)\cdot
n_{e}(\gamma,t)\right]+$
$\displaystyle\frac{\partial}{\partial\gamma}\left[[(a+2)t_{\text{acc}}]^{-1}\gamma^{2}\frac{\partial
n_{e}(\gamma,t)}{\partial\gamma}\right]+$
$\displaystyle+Q_{0}(\gamma-\gamma_{0})-t_{\text{esc}}^{-1}n_{e}(\gamma,t)\leavevmode\nobreak\
\text{.}$ (1)

The injected electrons at $\gamma_{0}$, as the blob propagates through the
jet, are considered via
$Q_{\text{inj}}(\gamma,t):=Q_{0}\delta(\gamma-\gamma_{0})$. The synchrotron
losses are calculated using Eq. (2).

$\displaystyle P_{s}(\gamma)$
$\displaystyle=\frac{1}{6\pi}\frac{\sigma_{\text{T}}B^{2}}{mc}\gamma^{2}=\beta_{s}\gamma^{2}$
(2)

with the Thomson cross-section $\sigma_{\text{T}}$. The characteristic
timescale for the acceleration
$t_{\text{acc}}=\left(v_{s}^{2}/(4K_{||})+2v_{A}^{2}/(9K_{||})\right)^{-1}$ of
the system is found by comparing Eq. (2) with Schlickeiser (1984) with the
parallel spatial diffusion coefficient $K_{||}$ not depending on $\gamma$ when
using the hard sphere approximation. The characteristic timescale has an
additional factor ($\propto v_{A}^{2}$) arising from the Fermi-II processes
compared to shock acceleration by itself. The stochastic part of the
acceleration also gives rise to the second row in Eq. (2), while the first row
mainly depends on Fermi-I processes. This dependence of $t_{\text{acc}}$ is
important for the interpretation of the resulting electron spectra, e.g. of
their slopes (depending on $t_{\text{acc}}/t_{\text{esc}}$) or the maximum
energies (depending on $1/(t_{\text{acc}}\beta_{s})$), see Weidinger et al.
(2010) for details. For modelling SEDs and lightcurves it is primary important
to ensure sensible values for $t_{\text{acc}}$. Unlike in Drury et al. (1999),
the energy-dependence of the escape losses is also neglected because we do not
expect a pileup as suggested in Schlickeiser (1984) at typical SSC conditions.
$v_{s},v_{A}$ are the shock and Alfvén speed respectively. Hence $a$ in Eq.
(2) measures the efficiency of the shock acceleration compared to stochastic
processes. Setting $v_{A}=0$, i.e. $a\rightarrow\infty$, will result in a
shock-only model like Kirk et al. (1998).

This model takes account of a much more confined shock region. Fermi-I
acceleration will probably not occur over the whole blob when considering a
real blazar but rather at a small region in the blob’s front. Neglecting
acceleration simplifies the kinetic equation in the radiation zone to

$\displaystyle\frac{\partial N_{e}(\gamma,t)}{\partial t}=$
$\displaystyle\frac{\partial}{\partial\gamma}\left[\left(\beta_{s}\gamma^{2}+P_{\text{IC}}(\gamma)\right)\cdot
N_{e}(\gamma,t)\right]$
$\displaystyle-\frac{N_{e}(\gamma,t)}{t_{\text{rad,esc}}}+\left(\frac{R_{\text{acc}}}{R_{\text{rad}}}\right)^{3}\frac{n_{e}(\gamma,t)}{t_{\text{esc}}}\leavevmode\nobreak\
\text{.}$ (3)

$P_{\text{IC}}$ accounts for the inverse-Compton losses of the electrons
additionally occurring (beside the synchrotron losses) (e.g. Schlickeiser,
2002):

$\displaystyle P_{\text{IC}}(\gamma)$
$\displaystyle=m^{3}c^{7}h\int_{0}^{\alpha_{max}}{d\alpha\alpha\int_{0}^{\infty}{d\alpha_{1}N_{\text{ph}}(\alpha_{1})\frac{dN(\gamma,\alpha_{1})}{dtd\alpha}}}\leavevmode\nobreak\
\text{.}$ (4)

The photon energies are rewritten in terms of the electron rest mass,
$h\nu=\alpha mc^{2}$ for the scattered photons and $h\nu=\alpha_{1}mc^{2}$ for
the target photons respectively. Equation (4) is solved numerically using the
full Klein-Nishina cross-section for a single electron scattering off a photon
field (see e.g. Jones, 1968). Here $\alpha_{max}$ accounts for the kinematic
restrictions on IC scattering. In analogy to the acceleration zone the
catastrophic losses are considered via $t_{\text{esc,rad}}=\eta
R_{\text{rad}}/c$ with $\eta=10$. $t_{\text{esc,rad}}$ is the responding
timescale of the electron system, which is proportional to the variability
timescale in the observer’s frame (see e.g. Kerrick et al., 1995):

$\displaystyle
t_{\text{var}}\propto\frac{t_{\text{esc,rad}}}{\delta}\leavevmode\nobreak\ .$
(5)

To determine the time-dependent model SED of blazars the partial differential
equation for the differential photon number density has to be solved time-
dependently, which can be done numerically. The PDE (6) can be obtained from
the radiative transfer equation making use of the isotropy of the blob

$\displaystyle\frac{\partial N_{\text{ph}}(\nu,t)}{\partial t}$
$\displaystyle=R_{s}-c\alpha_{\nu}N_{\text{ph}}(\nu,t)+R_{c}-\frac{N_{\text{ph}}(\nu,t)}{t_{\text{ph,esc}}}\leavevmode\nobreak\
\text{,}$ (6)

where $R_{s}$ and $R_{c}$ are the production rates for synchrotron photon and
the inverse-Compton respectively. $R_{s}$ is calculated using the well known
Melrose approximation and the inverse-Compton production rate $R_{c}$ is
treated in the most exact way, i.e. using the full Klein-Nishina cross
section, see Weidinger et al. (2010). Below a critical energy the obtained
spectrum is self-absorbed due to synchrotron self-absorption, which is
described by $\alpha_{\nu}$ (Weidinger et al., 2010; Rüger et al., 2010). The
photon-loss rate is set to be the light-crossing time.

##  3 Results

Using the parameters summed up in Table 1 we were able to fit the emission of
1 ES 1218+30.4 as a steady state with our SSC model, see Fig. 1. We used all
the archival data from BeppoSAX, SWIFT in the X-ray band and the MAGIC 2006,
VERITAS 2009 as well as the new released VERITAS 2010 data in the VHE to model
the SED of 1 ES 1218+30.4 (Donato et al., 2005; Tramacere et al., 2007; Albert
et al., 2006; Acciari et al., 2009; the VERITAS collaboration et al., 2010).
The derived SED is absorbed in the VHE using the EBL model of Primack et al.
(2005) for the corresponding redshift of 1 ES 1218+30.4 .
The parameters of our SSC model are well winthin the standard SSC parameter
region with an equipartition parameter of $0.02$. Even though PIC and MHD
simulations suggest a higher magnetic field compared to particle energy (in
the range of 0.1), this is a common assumption in SSC models, but has to be
kept in mind with regard e.g. the stability of the blob. If one wishes to
enforce higher equipartition parameters one could to use the model of
Schlickeiser & Lerche (2007). In order to allow strong shocks to form
$v_{A}<v_{S}$ must be fulfilled, which is the case for $a=10$.

Due to relatively small deviation (within the error margins) between the MAGIC
2005/VERITAS 2008 and the averaged VHE data from the VERITAS 2009 campaign we
find a steady state the most plausible way to model the emission, i.e. the
small fluctuations (see the overall lightcurve in the VERITAS collaboration et
al. (2010)) are not contributing significantly to the averaged observed SEDs.
In the Fermi LAT energy regime our model yields a photon index of
$\alpha_{\text{Fer}}=-1.69$, whichagrees well with the Fermi measurement of
$-1.63\pm 0.12$ (Abdo et al., 2009).

Table 1: Model parameters for the low-state SED, basis to model the outburst
by varying $Q_{0}$.
$Q_{0}(\text{cm}^{-3})$ | $B(\text{G})$ | $R_{\text{acc}}(\text{cm})$ | $R_{\text{rad}}(\text{cm})$ | $t_{\text{acc}}/t_{\text{esc}}$ | $a$ | $\delta$
---|---|---|---|---|---|---
$6.25\cdot 10^{4}$ | $0.12$ | $6.0\cdot 10^{14}$ | $3.0\cdot 10^{15}$ | $1.11$ | $10$ | $44$

The lightcurve of the VERITAS collaboration et al. (2010) shows a relatively
strong outburst at $\approx$ MJD54861. Starting with the steady state emission
(solid line, Fig. 1; parameters: Table 1) we injected more electrons $Q_{0}$
into the emission region at low $\gamma_{0}\approx 3$. As the blob evolves in
time the emission in the model at higher energies rises and drops off again
when the injected electrons finally relax to the initial $Q_{0}$. This process
can be explained as density fluctuations along the jet axis and finally fits
the flare.

Figure 1: Model SED of 1 ES 1218+30.4 (black solid line) as derived using the
described model (see Sect. 2) and the parameters shown in Table 1. The VHE
parts of the model SEDs have been absorbed using the EBL model of Primack et
al. (2005). The BeppoSAX data are from Donato et al. (2005), SWIFT from
Tramacere et al. (2007), MAGIC from Albert et al. (2006), VERITAS 2009 from
Acciari et al. (2009) and the blue dots are the new VERITAS 2010 data from the
VERITAS collaboration et al. (2010). The dashed red curve shows the time
integrated SED over the strong outburst shown in Fig. 2, as measured by
VERITAS in 2009.

We found that nearly doubling the injected electron number density in a
$Q_{0}(t)=1+b(t/t_{\text{e,var}})^{3}$ way with a timescale
$t_{\text{e,var}}\approx 1.5$ days (as measured in the observer’s frame) and
then decreasing them to the initial $Q_{0}$ in an almost linear way on the
same timescale fits the strong outburst of 1 ES 1218+30.4 . The corresponding
lightcurve of the model as well as the observed one are summarized in Fig. 2
3.

Figure 2: Lightcurve of the photon flux above $200$ GeV as measured by the
VERITAS collaboration et al. (2010) (inset of their figure) in January 2009 to
February 2009 and our model (red solid line). The outburst was modelled by
injecting more electrons into the blob by varying $Q_{0}$ at a timescale of
$\approx 1.5$ days (see text for details).

Figure 3 shows a more detailed view of the lightcurve in the VHE (above $200$
GeV) as well as the corresponding lightcurves in the X-Ray (between $1.2$ keV
and $11$ keV) regime of BeppoSAX/SWIFT and the lower tail of the Fermi LAT
energy range (between $0.2$ GeV and $22$ GeV) as predicted by our model. The
latter two have been scaled down to the flux level of the VERITAS measurement,
see Fig. 3, because the real fluxes are higher than the VHE flux. The model
predicts the peak of the lightcurve in the Fermi regime to be $1.26$ hours
ahead of the VHE one, where the X-ray regime is delayed by $0.97$ hours for 1
ES 1218+30.4 . The delay of the X-ray band can be used to verify the model
when multiwavelength data of the flaring behaviour of 1 ES 1218+30.4 is
available, while the derivation of the $0.2$ GeV to $22$ GeV lightcurve is
beyond the resolution of Fermi for this source.

Figure 3: Detailed view of the high outburst shown already in Fig. 2 as well
as the behaviour of 1 ES 1218+30.4 in the lower Fermi LAT energy band and the
synchrotron regime, measurable by BeppoSAX/SWIFT during such a flare.

Additionally we plotted the time averaged SED (over the outburst from MJD54860
until MJD54864) into the SED of 1 ES 1218+30.4 , Fig. 1 (dashed red line). As
one can see only when separately considering the strongest outburst of 1 ES
1218+30.4 within the VERITAS campaign in 2009 the aberration from a presumed
steady state is significant. In contrast an average over the whole observation
of the VERITAS collaboration et al. (2010), which is low-state most of the
time, will result in a steady state as shown here or in Rüger et al. (2010).
For the IC photon index $\alpha$ ($\nu F_{\nu}\propto\nu^{\alpha+2}$) above
$200$ GeV we get $\alpha_{\text{VHE}}=-3.53$ for the low-state (solid curve in
Fig. 1), which slightly softens to $\alpha_{\text{VHE}}=-3.56$ when
considering the high-state as the time-average over the single outburst shown
in the lightcurve, Fig. 2 in the VERITAS range. Note that the photon index and
its behaviour during an outburst in this energy range is very sensitive to the
EBL absorption and thus to the EBL model used and shows a strong dependency on
the considered energy range. With our model we are able to compute the
spectral behaviour in the X-Ray energy range of the BeppoSAX/SWIFT satellites
(i.e. $1.2$ keV $<$ E $<$ $11$ keV). The model predicts the source to be
spectrally steady in this regime with a photon index
$\alpha_{\text{xray}}=-2.68$ for outbursts on timescales of days. Considering
shorter averaging timescales of the outburst of 1 ES 1218+30.4 , e.g. the
first or last two hours, two hours around the peak in the lightcurve, the
maximum derivation from $\alpha_{\text{xray}}$ $(\alpha_{\text{VHE}})$
predicted by the model is $\pm 0.05$ $(-0.07)$, which could not be measured
with current experiments and thus is considered as spectrally steady in this
case.

##  4 Discussion

Our results clearly show that the latest observations from the VERITAS
telescope for 1 ES 1218+30.4 still agree with a constant (steady state)
emission from a SSC model when averaged over a long observation period. This
is due to the relatively moderate variability of 1 ES 1218+30.4 compared to
the observation time.
The variability may be well explained in the context of the self-consistent
treatment of acceleration of electrons in the jet. We are aware that an
outburst of the timescale of roughly five days as measured from 1 ES 1218+30.4
does not necessarily require a shock in jet model, which scales down to a few
minutes depending on the SSC parameters (Weidinger & Spanier, 2010), but may
also be explained as e.g. different accretion states. Nevertheless the
fundamental statement remains the same: long time observation of slightly
variable blazars will result in a steady state emission, while an average over
a single outburst will, of course, result in a significantly different SED for
the source. We are not yet able to rule out different emission models or even
complex geometries of the emitting region. But we are able to model the
influence of short outbursts of a source on the SED and the lightcurves in the
different energy bands selfconsistently.
The VERITAS collaboration only shows an integrated spectrum for 1 ES 1218+30.4
, which is due to the low flux of the source and the photon index behaviour of
the combined high-states. This integrated spectrum does not show strong
variations with regard to the known low-state observed by MAGIC. Our model now
predicts a clear change in the spectrum, which is indicated by the dashed line
in Fig. 1, which shows the average over one outburst with a slight, currently
not detectable spectral softening in the VHE range, while the synchrotron peak
in the BeppoSAX/SWIFT regime remains spectrally constant. This situation
changes for shorter and/or stronger outbursts of an overall timescale of
hours, which will result in measurable spectral evolutions in all energy
regimes when considered with the presented model. Furthermore the time-
resolved SEDs during a flare are comprehensible with our model. Hence with
better time-resolved spectra or/and better multiwavelength coverage it should
be possible to prove this model, and if the model is indeed applicable it will
be a good tool to investigate the whole SED during an outburst without having
all energy regimes observationally covered.
Acknowledgments MW wants to thank the Elitenetzwerk Bayern and GK1147 for
their support. FS acknowledges support from the DFG through grant SP 1124/1.

## References

  * Abdo et al. (2009) Abdo, A. A., Ackermann, M., Ajello, M., et al. 2009, Astrophys. J., 707, 1310
  * Acciari et al. (2009) Acciari, V. A., Aliu, E., Arlen, T., et al. 2009, Astrophys. J., 695, 1370
  * Albert et al. (2006) Albert, J., Aliu, E., Anderhub, H., et al. 2006, Astrophys. J., Lett., 642, L119
  * Chiang & Böttcher (2002) Chiang, J. & Böttcher, M. 2002, Astrophys. J., 564, 92
  * Donato et al. (2005) Donato, D., Sambruna, R. M., & Gliozzi, M. 2005, Astron. Astrophys., 433, 1163
  * Drury et al. (1999) Drury, L. O., Duffy, P., Eichler, D., & Mastichiadis, A. 1999, Astron. Astrophys., 347, 370
  * Jones (1968) Jones, F. C. 1968, Physical Review, 167, 1159
  * Kerrick et al. (1995) Kerrick et al. 1995, Astrophys. J., Lett., 438, L59
  * Kirk et al. (1998) Kirk, J. G., Rieger, F. M., & Mastichiadis, A. 1998, Astron. Astrophys., 333, 452
  * Ledden et al. (1981) Ledden, J. E., Odell, S. L., Stein, W. A., & Wisniewski, W. Z. 1981, Astrophys. J., 243, 47
  * Mannheim (1993) Mannheim, K. 1993, Astron. Astrophys., 269, 67
  * Maraschi et al. (1992) Maraschi, L., Ghisellini, G., & Celotti, A. 1992, Astrophys. J., Lett., 397, L5
  * Primack et al. (2005) Primack, J. R., Bullock, J. S., & Somerville, R. S. 2005, in American Institute of Physics Conference Series, Vol. 745, High Energy Gamma-Ray Astronomy, ed. F. A. Aharonian, H. J. Völk, & D. Horns, 23–33
  * Rüger et al. (2010) Rüger, M., Spanier, F., & Mannheim, K. 2010, Mon. Not. R. Astron. Soc., 401, 973
  * Schlickeiser (1984) Schlickeiser, R. 1984, Astron. Astrophys., 136, 227
  * Schlickeiser (2002) Schlickeiser, R. 2002, Cosmic ray astrophysics (Astronomy and Astrophysics Library; Physics and Astronomy Online Library. Berlin: Springer. ISBN 3-540-66465-3, 2002, XV + 519 pp.)
  * Schlickeiser & Lerche (2007) Schlickeiser, R. & Lerche, I. 2007, A&A, 476, 1
  * the VERITAS collaboration et al. (2010) the VERITAS collaboration, Acciari, V. A., Aliu, E., et al. 2010, ASTROPHYSICAL JOURNAL LETTERS, 709, L163
  * Tramacere et al. (2007) Tramacere, A., Giommi, P., Massaro, E., et al. 2007, Astron. Astrophys., 467, 501
  * Weidinger et al. (2010) Weidinger, M., Rüger, M., & Spanier, F. 2010, Astrophysics and Space Sciences Transactions, 6, 1
  * Weidinger & Spanier (2010) Weidinger, M. & Spanier, F. 2010, in Int. J. Mod. Phys. D, Vol. (subm.), HEPRO II conference proceedings, ed. G. Romero, F. Aharonian, & J. Paredes
  * Wilson et al. (1979) Wilson, A. S., Ward, M. J., Axon, D. J., Elvis, M., & Meurs, E. J. A. 1979, Mon. Not. R. Astron. Soc., 187, 109