# New confidence interval methods for Shannon index

Gabriel R. Palma2 Silvio S. Zocchi1 Wesley A.C. Godoy1 Jorge A. Wiendl1

1\. University of São Paulo, Piracicaba, Brazil; 2\. Maynooth University,
Maynooth, Ireland;

## Abstract

  1. 1.

Several factors affect the structure of communities, including biological,
physical and chemical phenomena, impacting the quantification of biodiversity,
measured by diversity indexes such as Shannon’s entropy. Then, once a point
estimate is obtained, confidence intervals methods such as the bootstrap ones
are often used. These methods, however, can have different performances, which
many authors have revealed in the last decade. Furthermore, problems such as
the asymmetry of the distribution of estimates and the possibility of
Shannon’s diversity index estimator bias can lead to incorrect recommendations
to the research community. Thus, we propose two methods and compare them with
seven others using their performances to face these problems.

  2. 2.

The first idea uses the credible interval (CI) method to build a bootstrap
confidence interval. The second one starts by correcting the bias and then
uses an asymptotic approach. We considered $27$ community structures
representing scenarios with high dominance, high codominance or moderate
dominance, the number of species equal to 4, 20 or 80 and 10, 50 or 500
individuals to compare their performances. Then, we generated 1000 samples,
built $95\%$ confidence intervals, and calculated the percentage of times they
included the community diversity index (coverage percentage) for each
community structure.

  3. 3.

Our results showed the feasibility of both proposed methods to estimate
Shannon’s diversity. The simulation study revealed the bootstrap-t technique
had the best performance, i.e., best coverage percentage, compared with the
other methods. Finally, we illustrate the methodology by applying it to an
original aphid and parasitoid species dataset.

  4. 4.

We recommend the bootstrap-t when the community structure analysed is similar
to the simulated ones. Also, the methods provided high performance for the
high dominance scenarios.

Keywords: Diversity, statistical inference and bootstrap methods.

## 1 Introduction

The study of biodiversity involves interdisciplinary approaches aiming to
understand the variety of life (Noss, 1990; O’Connor et al., 2020). These
studies resulted in several applications including biological control and
pollination in agriculture to a clear notion of the ecosystem services that
biodiversity promotes (Godfray, 1994; Williams et al., 1996; Altieri, 1999;
Goodell, 2009; Mitchell and Onstad, 2014). Another aspect that highlights the
importance of biodiversity is the comparison of impacts on natural
communities, such as human impacts and others (Magurran, 2004; Gotelli and
Colwell, 2001; Magurran, 2005, 2010; McGlinn et al., 2019). Researchers can
also obtain measures of biodiversity in different scales depending on the
study. For example, a local scale ($\alpha$ diversity) comprehends a community
in a specific habitat (Magurran, 2004; Gotelli and Colwell, 2001). Also, a
regional scale ($\beta$ diversity) comprise the variety of species in
different geographic areas. Finally, the landscape scale ($\gamma$ diversity)
aim to obtain an overall species diversity within geographic areas (Levin,
2013; Magurran, 2004; Ricklefs, 2016).

The most common indexes used in these different scales comprise Shannon’s,
Simpson’s, and Chao’s index (Magurran, 2004), which appears in many studies as
measures of biodiversity. Among these methods, to study local diversity
($\alpha$), Shannon’s and Pielou’s indices are the most popular ones to obtain
information about the diversity and evenness of natural communities (Magurran,
2004). A single index focus on some aspects of biodiversity. For example,
Shannon’s entropy and Pielou’s index helps to understand some components of a
community related to dominance, richness, diversity and evenness (Zar, 2009;
Magurran, 2004; Levin, 2013). However, simply computing these statistics based
on a sample is not enough to obtain accurate information in a location.

For that, several methods aim to estimate such indices varying in scope from
points to interval estimates. Among the literature of biodiversity, the usage
of interval estimation is a common task including different methods, such as
parametric or non-parametric techniques (Davison and Hinkley, 1997; Carvalho
et al., 2019; Kamiyama et al., 2020; Willett et al., 2020; St Laurent et al.,
2020; Naranjo-Guevara et al., 2020). On the non-parametric approach, the
bootstrap techniques are the most used for this task comprehending multiple
confidence interval methods such as bootstrap t, bias corrected-accelerated,
bias-corrected percentile, percentile, standard percentile and empirical
corrected methods (Fritsch and Hsu, 2000; Pla, 2004; McDonald et al., 2010;
Scherer et al., 2013; Pesenti et al., 2016). Previous studies evaluated the
performance of the bootstrap confidence interval methods to suggest a
recommendation, mainly to estimate Shannon’s diversity, for biologists that
aim the use a quantitative approach to study biodiversity (Pla, 2004; Pesenti
et al., 2016).

To evaluate the performance of confidence interval methods these studies
performed simulations using different community structures. These structures
have distinct species abundance distributions, number of species, and
individuals in a certain location. Thus, they consider the index calculated on
these communities as the parameters target of estimation. Moreover, by taking
samples from them, it is possible to obtain statistics, such as width and
coverage percentage showing the performance of each confidence interval
method. The first statistic is the difference between upper and lower interval
limits and the other is the number of times that the interval contains the
parameter divided by the total number of samples. However, the restricted
number of community structures simulated, can affect the method
recommendations because, as Hutcheson (1970), Shenton et al. (1969), Pla
(2004) and Zhang and Zhang (2012) mentioned, the species abundance
distribution affect the bias of Shannon’s index.

Among these studies, there are several results suggesting gaps in the
literature that requires attention. These gaps include the creation of
simulation studies with communities biologically meaningful. Also, more
studies focused on the bias of Shannon’s index (Shenton et al., 1969;
Hutcheson, 1970; Pla, 2004; Zhang and Zhang, 2012), and alternative methods
that deal with the fact that bootstrap confidence interval methods are
inadequate for situations where there is asymmetry and multimodality in the
distribution of estimates.

Therefore, we propose two new confidence interval methods for Shannon’s index.
The basis of the first one is a bootstrap approach, and the second is an
asymptotic approach. They deal with, respectively, asymmetry (i.e. a
distribution skewed for the right or left) and Shannon’s index bias (i.e.
Point estimation error of the parameter $H$). Also, we aim to compare it with
bootstrap t (t), bias corrected-accelerated (BCA), bias-corrected percentile
(BC), percentile (Perc), standard percentile (SPerc) and empirical corrected
(EC) methods using a simulation study with biological meaningful community
structures. Given that high dominance, moderate dominance and codominance
patterns are commonly encountered in community structures restricted to a
local scale, the simulated scenarios were based on a degree of dominance
according to the codominance and evenness indices (Pielou, 1966; Gray et al.,
2021). Finally, to support our recommendation, we presented a case study of an
aphid monitoring system emphasising the scenarios presented in the simulation
study.

## 2 Methods

In this section we describe the proposed confidence interval methods and
compare them with some traditional bootstrap methods. Let

$\mathbf{x}=\left(\begin{array}[]{cccc}Sp_{1}&Sp_{2}&\ldots&Sp_{k}\\\
n_{1}&n_{2}&\ldots&n_{k}\\\ \end{array}\right)$ (1)

be the observed species frequency distribution in a sample, where: $k$ is the
number of species; $n_{j}$ $\left(j=1,\ldots,k\right)$ is the frequency of
individuals of species $Sp_{j}$ and $n={\sum_{j=1}^{k}n_{j}}$ is the total
number of individuals. Consider that $H$ is the parameter of interest and
$\widehat{H}=-\sum^{k}_{j=1}\frac{n_{j}}{n}\log\frac{n_{j}}{n}$ ($n_{j}\neq
0$) its estimator. Then, as an example, the 7 individuals sample

$\mathbf{x}=\left\\{Sp_{1},Sp_{2},Sp_{2},Sp_{4},Sp_{3},Sp_{2},Sp_{3}\right\\}=\left(\begin{array}[]{cccc}Sp_{1}&Sp_{2}&Sp_{3}&Sp_{4}\\\
1&3&2&1\\\ \end{array}\right)$ (2)

will give the estimate
$\widehat{H}=-\left(\frac{1}{7}\log\frac{1}{7}+\frac{3}{7}\log\frac{3}{7}+\frac{2}{7}\log\frac{2}{7}+\frac{1}{7}\log\frac{1}{7}\right)=1.2770$.

Despite its frequent use, the estimator $\widehat{H}$ generally underestimates
$H$ (Pla, 2004), but, taking into account the 2-nd order series expansion
expressions for the expected bias of $\widehat{H}$ and variance of
$\widehat{H}$, $Var(\widehat{H})$, presented by Hutcheson (1970), Shenton et
al. (1969), Pla (2004) and Zhang and Zhang (2012), an approximately unbiased
estimator of $H$ will be

$\widehat{H}^{\prime}=\widehat{H}+\frac{k-1}{2n}-\frac{1}{12n^{2}}\left(1-\displaystyle\sum^{k}_{j=1}\frac{n}{n_{j}}\right),$
(3)

with approximate variance

$\widehat{Var}(\widehat{H}^{\prime})\approx\frac{1}{n}\left(\displaystyle\sum^{k}_{j=1}\frac{n_{j}}{n}\left(\log{\frac{n_{j}}{n}}\right)^{2}-\widehat{H}^{2}\right)+\frac{k-1}{2n^{2}}.$

Furthermore, according to the authors $\widehat{H}$ is asymptotically normal
distributed and thus, so will be $\widehat{H}^{\prime}$. Then, the proposed
($1-\alpha$)100% asymptotically corrected confidence interval for $H$ will be

$CI_{(1-\alpha)100\%}(H)=\widehat{H}^{\prime}\pm\sqrt{\widehat{Var}(\widehat{H}^{\prime})}~{}t_{\left\\{1-\frac{\alpha}{2},n-1\right\\}},$
(4)

where $t_{\left\\{1-\frac{\alpha}{2},n-1\right\\}}$ is the
($1-\frac{\alpha}{2}$)-th quantile of the $t$ distribution with $n-1$ degrees
of freedom. Now, considering the dataset (2), we will have
$\widehat{H}^{\prime}=1.5233$, $\widehat{Var}(\widehat{H}^{\prime})=0.06020$,
$t_{\left\\{0.975,6\right\\}}=2.4469$ and $CI_{95\%}(H)=(0.9230,2.1237)$,
noticing that for small samples like in this case ($n=7$), the expression (4)
gives only an approximate interval.

Hereinafter, we describe the fundamental idea of bootstrap methodology and how
to use it to build a percentile confidence interval for $H$. The first step is
to extract $B$ random samples with replacement of (1), known as bootstrap
samples (Efron and Tibshirani, 1993; Davison and Hinkley, 1997). Let the
$b$-th bootstrap sample $(b=1,\dots,B)$ be

$\mathbf{x}^{(b)}=\left(\begin{array}[]{cccc}Sp_{1}&Sp_{2}&\ldots&Sp_{k}\\\
n_{1}^{(b)}&n_{2}^{(b)}&\ldots&n_{k}^{(b)}\\\ \end{array}\right),$

where $n^{(b)}_{j}$ is the frequency of species $Sp_{j}$ ($j=1,\dots,{k}$) in
the sample. The following step is to compute the statistic of interest,
$\widehat{H}$, in our case, for each bootstrap sample, named
$\widehat{H}^{(b)}$, forming the set

$(\widehat{H}^{(1)},\widehat{H}^{(2)},\ldots,\widehat{H}^{(B)}).$ (5)

As an example, the $5$-th bootstrap sample extracted from (2) could be

$\mathbf{x}^{(5)}=\left\\{Sp_{3},Sp_{2},Sp_{2},Sp_{3},Sp_{2},Sp_{2},Sp_{3}\right\\}=\left(\begin{array}[]{cccc}Sp_{1}&Sp_{2}&Sp_{3}&Sp_{4}\\\
0&4&3&0\\\ \end{array}\right),\\\ $ (6)

leading to the estimate
$\widehat{H}^{(5)}=-\left(\frac{4}{6}\log\frac{4}{6}+\frac{3}{6}\log\frac{3}{6}\right)=0.6829$.
Now, given the set of bootstrap estimates (5), the percentile bootstrap
$100(1-\alpha)\%$ confidence interval for $H$ is
$CI(H)_{100(1-\alpha)\%}=\left(P_{\frac{\alpha}{2}},P_{1-\frac{\alpha}{2}}\right)$,
where $P_{\frac{\alpha}{2}}$ and $P_{1-\frac{\alpha}{2}}$ are the
$\frac{\alpha}{2}$-th and $(1-\frac{\alpha}{2})$-th percentiles of (5),
respectively.

However, despite the popularity of this and other bootstrap methods in
building confidence intervals, when the distribution of bootstrap estimates is
skewed, the use of credible intervals shall be more appropriate. Essentially,
a one mode $(1-\alpha)100\%$ credible interval (CrI) is the interval with the
smallest width such that the percentage of values of (5) pertaining to it is
greater than or equal to $(1-\alpha)100\%$.

From this point on, we describe the simulation methodology to compare the
performance of the proposed methods, credible interval (CrI) and
asymptotically corrected (AC), with the methods: bootstrap t (t); bias
corrected-accelerated (BCA); bias-corrected percentile (BC); percentile
(Perc); standard percentile (SPerc) and empirical corrected (EC).

The first step is to set the number of species in the community, $K$,
considered here, equal to $4$, $20$, or $80$. Low numbers of species $(K<30)$
are common in community structures of agricultural landscapes, which exhibits
low number of pests in response to poor diversity of host plants (Guo et al.,
2019). In larger areas with an heterogeneity old-growth rainforest, though, a
larger number of species, e.g. $K=80$, are more likely to occur (Vanclay,
1989; Ojo and Ola-Adams, 1996; Mulder et al., 2004; Wubs and Bezemer, 2018).

Given $K$, the following step is to set the relative abundance of species,
$Sp_{j}$ ($j=1,2,\ldots,K$), in these community structures, given by

$p_{j}=\frac{1}{100K}+\frac{99}{100}\frac{j^{-\nu}}{\sum_{j=1}^{K}j^{-\nu}}~{}~{}~{}~{}(j=1,\ldots,K),$

where $\nu\geq 0$ is a parameter that is related to the level of dominance and
codominance in the community (Table 1). Note that
$p_{1}>p_{2}>\cdots>p_{K-1}>p_{K}>\frac{1}{100K}$, $\sum_{j=1}^{K}p_{j}=1$ and
$\frac{1}{100K}$ is the minimum detection probability of any species. The
choice of $\nu$ was set for three different scenarios: 1. high dominance; 2.
high codominance and 3. moderate dominance. Given $K$, the values of $\nu$ for
the first and third scenarios were the ones that the Pielou´s evenness index,
$J=\frac{H}{\log{K}}$, where 0.15 and 0.9, respectively. On the other hand,
given $K$, the chosen $\nu$ value for the second scenario was the one that
maximized the codominance index by Gray et al. (2021),

$C_{k_{c}}=\frac{k_{c}}{\displaystyle\sum_{j=1}^{k_{c}}\frac{1}{p_{j}}}-p_{k_{c}+1}$

where $2\leq k_{c}<K$ is the number of codominance species, considered here
equal to 2, that is

$C_{k_{c}}=C_{2}=\frac{2}{\frac{1}{p_{1}}+\frac{1}{p_{2}}}-p_{3}.$

$C_{2}$ is, then, the difference between the harmonic mean of $p_{1}$ and
$p_{2}$, and $p_{3}$.

Table 1: Chosen values of $\nu$ and values of Pielou’s evenness index, $J$,
Shannon’s diversity index, $H$ and codominance index, $C_{2}$, for three
different scenarios: 1. high dominance; 2. high codominance and 3. moderate
dominance, given the number of species in the community, $K$.

Parameters Scenarios $K$ $\nu$ $J$ $H$ $C_{2}$ 4 4.9618 0.15 0.21 0.0574 1\.
High dominance 20 3.7901 0.15 0.45 0.1079 80 3.2263 0.15 0.66 0.1399 4 1.8480
0.69 0.96 0.2029 2\. High codominance 20 2.1700 0.42 1.27 0.1811 80 2.2250
0.30 1.34 0.1788 4 0.9913 0.90 1.25 0.1577 3\. Moderate dominance 20 0.8210
0.90 2.70 0.0687 80 0.7612 0.90 3.94 0.0367

For each community structure, i.e., combination of scenario and value of $K$,
presented on Table 1, we extracted $N=1000$ random samples with size $n=10$,
50 or 500 individuals and for each generated sample, $95\%$ confidence
intervals for $H$ were built based on the described methods. Note that for
bootstrap methods, we used $B=1000$ bootstrap samples. Also, we assumed that
missing species in samples of community structures and bootstrap samples are
not considered for computing Shannon’s index. The equation
LABEL:shannon_example shows an example of it.

Then, in order to compare their performances, for each set of $N=1000$
confidence intervals, we computed the coverage percentage, i.e., the
percentage of times that $H$ belongs to the confidence interval and the
average width, i.e., the mean of the widths of the 1000 confidence intervals.
It is expected that a good method will produce a coverage percentage close to
95% and a narrow average width.

## 3 Results

Table 2:  Coverage percentages and average widths (between parenthesis) for
different 95% confidence interval methods for $H$, considering: scenarios
(Scen.) with 1. high dominance, 2. high codominance or 3. moderate dominance;
different sample sizes, $n=10$, 50 or 500 and different community number of
species, $K=4$, 20 or 80. The results were based on 1000 samples, 1000
bootstrap samples (for bootstrap methods) and 25 subsamples of bootstrap
samples for the $t$ method. Note: $\bar{k}$ is the average number of species
in the samples.

Bootstrap method Scen. $n$ $K$ $\bar{k}$ Perc BCA t BC SPerc EC Crl AC 4 1.40
36 (0.24) 98 (0.65) 99 (1.08) 36 (0.20) 36 (0.31) 30 (0.31) 36 (0.23) 36
(0.37) 10 20 1.78 64 (0.45) 99 (0.69) 99 (0.98) 64 (0.40) 64 (0.55) 60 (0.55)
64 (0.43) 63 (0.65) 80 2.15 44 (0.60) 38 (0.67) 96 (1.27) 43 (0.54) 78 (0.70)
70 (0.70) 44 (0.56) 75 (0.82) 4 2.25 87 (0.31) 99 (0.37) 99 (0.60) 65 (0.29)
87 (0.33) 85 (0.33) 87 (0.29) 87 (0.34) 1 50 20 3.42 80 (0.47) 83 (0.49) 99
(0.68) 78 (0.47) 84 (0.48) 84 (0.48) 77 (0.45) 84 (0.49) 80 4.21 75 (0.53) 81
(0.52) 95 (0.70) 78 (0.52) 76 (0.54) 84 (0.53) 74 (0.51) 85 (0.55) 4 3.81 93
(0.13) 96 (0.14) 98 (0.15) 94 (0.13) 93 (0.14) 95 (0.14) 92 (0.13) 94 (0.14)
500 20 8.90 91 (0.19) 93 (0.19) 96 (0.21) 93 (0.19) 91 (0.19) 93 (0.19) 90
(0.18) 93 (0.19) 80 12.45 83 (0.21) 87 (0.21) 94 (0.23) 89 (0.21) 83 (0.21) 94
(0.21) 82 (0.21) 90 (0.21) 4 2.92 62 (0.78) 72 (0.68) 86 (1.10) 71 (0.68) 72
(0.84) 77 (0.84) 60 (0.68) 85 (0.97) 10 20 3.40 43 (0.88) 44 (0.71) 94 (1.35)
43 (0.71) 45 (0.93) 73 (0.93) 44 (0.77) 79 (1.09) 80 3.43 17 (0.88) 42 (0.71)
96 (1.37) 37 (0.71) 42 (0.94) 75 (0.94) 25 (0.79) 80 (1.11) 4 3.92 90 (0.45)
90 (0.44) 95 (0.53) 90 (0.43) 91 (0.46) 89 (0.46) 90 (0.44) 91 (0.47) 2 50 20
7.35 70 (0.63) 84 (0.62) 93 (0.78) 80 (0.59) 72 (0.63) 86 (0.63) 72 (0.62) 85
(0.65) 80 7.71 58 (0.64) 80 (0.63) 90 (0.80) 76 (0.61) 60 (0.65) 84 (0.65) 58
(0.64) 82 (0.67) 4 4.00 95 (0.15) 96 (0.15) 96 (0.15) 95 (0.14) 95 (0.15) 95
(0.15) 95 (0.14) 95 (0.15) 500 20 16.74 89 (0.24) 94 (0.24) 96 (0.26) 94
(0.24) 90 (0.24) 93 (0.24) 88 (0.24) 94 (0.24) 80 23.80 73 (0.26) 89 (0.26) 92
(0.29) 87 (0.26) 74 (0.26) 92 (0.26) 73 (0.26) 89 (0.26) 4 3.50 54 (0.72) 49
(0.47) 88 (1.04) 49 (0.49) 56 (0.77) 85 (0.76) 54 (0.62) 96 (0.88) 10 20 7.07
0 (0.80) 0 (0.14) 72 (0.96) 0 (0.14) 0 (0.82) 69 (0.82) 0 (0.74) 60 (1.02) 80
8.74 0 (0.74) 0 (0.03) 0 (0.84) 0 (0.02) 0 (0.77) 0 (0.77) 0 (0.69) 0 (1.00) 4
4.00 91 (0.31) 92 (0.27) 93 (0.33) 91 (0.26) 94 (0.31) 89 (0.31) 92 (0.29) 93
(0.32) 3 50 20 16.28 4 (0.47) 23 (0.20) 91 (0.51) 20 (0.20) 7 (0.47) 78 (0.47)
6 (0.46) 89 (0.49) 80 30.53 0 (0.45) 0 (0.01) 26 (0.50) 0 (0.00) 0 (0.46) 70
(0.46) 0 (0.45) 17 (0.49) 4 4.00 94 (0.09) 95 (0.09) 96 (0.10) 95 (0.09) 95
(0.09) 94 (0.09) 94 (0.09) 96 (0.09) 500 20 20.00 83 (0.14) 94 (0.14) 96
(0.15) 94 (0.13) 86 (0.15) 90 (0.15) 84 (0.14) 95 (0.15) 80 77.05 3 (0.19) 31
(0.07) 95 (0.20) 32 (0.07) 4 (0.19) 57 (0.19) 4 (0.18) 95 (0.19)

The simulation results are presented in Table 2. We expected that the coverage
percentages would be close to 95$\%$ and considered here, as acceptable,
values greater or equal to 80$\%$. Following this consideration, the bootstrap
t, AC, bootstrap BCA, bootstrap EC, bootstrap Perc, bootstrap SPerc and Crl
methods have acceptable coverage percentages in 89, 74, 63, 59, 41, 41 and
37$\%$ of the 27 considered community structures, respectively. Based on these
results, we recommend the bootstrap t.

Now, considering communities with a high dominance scenario, though, the best
two methods were the bootstrap t and BCA (100 and 89$\%$ of the 9 simulated
community structures with acceptable coverage percentages, respectively).
Moreover, for the communities with a high codominance scenario, the best two
were bootstrap t and AC (100 and 89$\%$ of the 9 simulated community
structures with acceptable coverage percentages, respectively). Finally, for
the moderate dominance scenario, the bootstrap t and the AC (both with 67$\%$
of the 9 simulated community structures with acceptable coverage percentages)
were the best two methods.

Table 3: Abundances of parasitoids and wheat crop aphids in three periods in a
monitoring programme at Area II ($710~{}m$ altitude,
$28^{\circ}~{}11^{\prime}~{}42.8^{\prime\prime}$ S and
$52^{\circ}~{}19^{\prime}~{}30.6^{\prime\prime}W$) of the Embrapa Trigo
experimental station, located in Coxilha, RS, Brazil.

Species 20-26/08/14 22-28/01/16 02-08/04/18 Parasitoids Aphidius rhopalosiphi
(DeStefani, 1902) 2 0 0 Aphidius platensis (Brãthes, 1913) 1 0 3 Diaeretiella
rapae (Mc’Intosh, 1855) 1 0 1 Aphids Metapolophium dirhodum (Walker, 1849) 0 1
0 Rhopalosiphum padi (Linnaeus, 1758) 6 387 0 Rhopalosiphum maidis (Luzhetzki,
1960) 0 0 1 Rhopalosiphum rufiabdominalis (Sasaki, 1899) 0 1 0 Sitibion avenae
(Fabricius, 1775) 0 10 1 $~{}~{}~{}~{}n$ 10 399 6 $~{}~{}~{}~{}\widehat{H}$
1.09 0.15 1.24 $~{}~{}~{}~{}\widehat{J}=\displaystyle\frac{\widehat{H}}{\log
k}$ 0.79 0.11 0.90 $~{}~{}~{}~{}\widehat{C}_{2}$ 0.20 0.046 0.083

As an example, we will now calculate the confidence intervals of $H$ for a
community of parasitoids and wheat crop aphids presented in Table 3. As the
statistics, $k$, $\widehat{H}$, $\widehat{J}$ and $\widehat{C}_{2}$,
calculated for the samples collected during the three periods were similar to
the ones presented in the simulation study, the bootstrap t method was
selected. The first period shows a high codominance of species Rhopalosiphum
padi and Aphidius rhopalosiphi and $CI_{95\%}(H)=(0.73,2.32)$. The second, a
high dominance of Rhopalosiphum padi and $CI_{95\%}(H)=(0.09,0.25)$. The last,
a moderate dominance and $CI_{95\%}(H)=(1.12,3.12)$.

## 4 Discussion

We proposed the credible interval (CrI) and an asymptotically corrected (AC)
method to estimate confidence intervals for Shannon’s index. Also, we compared
them with commonly used methods for interval estimation of this diversity
index. Therefore, the recommended method was the bootstrap-t.

The example presented showed how to use the results obtained from the
simulated scenarios in real-world data. These scenarios reflect real
conditions of aphids exploring wheat culture (Muller et al., 1999; von Burg et
al., 2011) because our simulation uses the degree of dominance as conditions
to generate community structures. It is emphasised by the fact that
environments with lower resource heterogeneity tend to present community
structure with high dominance or codominance (Wilsey and Polley, 2002;
Tsakalakis et al., 2020; Chaves and Smith, 2021). These patterns are not
restricted to the presented taxa, and they could be observed in other insect
orders, such as Fruit Flyes and Dung insect communities (Hanski, 2014; de
Araujo et al., 2021).

Now, by analysing papers similar to ours, we found that Pesenti et al. (2016)
have used the average width and computational speed as a criterion of method
selection. They concluded that the bootstrap percentile must be recommended
based on their simulation study. Table 2 shows that if we use their criteria
and compare the bootstrap percentile, bias-corrected, bias-corrected
accelerated and t, we agree with their conclusions. However, by introducing
the other methods in the comparison, the proposed asymptotic corrected method
has better performance because it is $4053$ times faster than the bootstrap
percentile.

Moreover, wide or fewer intervals are not necessarily the best ones as they
may not contain the community index. Is more important than the produced
intervals contain most of the times this index, which is evaluated through the
percentage of coverage. Given that said, table 2 shows a clear example of it
considering the second scenario with $n=10$. The methods with higher average
width contain Shannon’s index in the community more times than the ones with
wide intervals.

Finally, our findings also suggest that the community structure can influence
the selection of methods for the construction of confidence intervals for
Shannon’s index. Our main contribution is an innovative approach to provide
recommendations for naturalists studying local diversity. Also, our simulation
study helps the selection of appropriate confidence interval methods to
estimate Shannon’s index, and this approach can be extended to any diversity
index. However, the limitations of our work rely on the restricted simulated
scenarios leading us to produce limited recommendations for community
structures. So, in future work, we will explore more biological scenarios.

## 5 Conclusion

The simulation study showed that the bootstrap-t method produced a superior
performance for $88\%$ of the simulated dataset for Shannon’s diversity, $H$,
indicating its superior overall performance as compared to the others and,
thus, we recommend it when the community structure analysed is similar to the
ones that we simulated. Finally, the methods provided more accurate
estimations of Shannon’s diversity for the high dominance scenario.

## Literature Cited

  * Altieri (1999) Altieri, M. A. (1999).  The ecological role of biodiversity in agroecosystems.  Agriculture, Ecosystems & Environment 74(1), 19–31.
  * Carvalho et al. (2019) Carvalho, F., D. Santana, and M. Sampaio (2019, 11).  Modeling overdispersion, autocorrelation, and zero-inflated count data via generalized additive models and bayesian statistics in an aphid population study.  Neotropical Entomology 49, 40–51.
  * Chaves and Smith (2021) Chaves, F. A. and M. D. Smith (2021, OCT).  Resources do not limit compensatory response of a tallgrass prairie plant community to the loss of a dominant species.  JOURNAL OF ECOLOGY 109(10), 3617–3633.
  * Davison and Hinkley (1997) Davison, A. C. and D. V. Hinkley (1997).  Bootstrap Methods and Their Application.  Cambrige, UK: Cambridge University Press.
  * de Araujo et al. (2021) de Araujo, M. R., D. d. S. Martins, M. J. Fornazier, K. Uramoto, P. S. Ferreira, R. A. Zucchi, and W. A. Godoy (2021).  Long-term fruit fly monitoring and impact of the systems approach on richness and abundance.  The Canadian Entomologist 153(6), 682–701.
  * Efron and Tibshirani (1993) Efron, B. and R. J. Tibshirani (1993).  An Introduction to the Bootstrap.  Number 57 in Monographs on Statistics and Applied Probability. Boca Raton, Florida, USA: Chapman Hall & CRC.
  * Fritsch and Hsu (2000) Fritsch, K. and J. Hsu (2000, 01).  Multiple comparison of entropies with application to dinosaur biodiversity.  Biometrics 55, 1300–1305.
  * Godfray (1994) Godfray, C. (1994, 12).  Parasitoids: Behavioral and Evolutionary Ecology.  William Street, Princeton, New Jersey, US: Princeton University Press.
  * Goodell (2009) Goodell, P. (2009, 12).  Fifty years of the integrated control concept: The role of landscape ecology in ipm in san joaquin valley cotton.  Pest management science 65, 1293–1297.
  * Gotelli and Colwell (2001) Gotelli, N. J. and R. K. Colwell (2001).  Quantifying biodiversity: procedures and pitfalls in the measurement and comparison of species richness.  Ecology letters 4(4), 379–391.
  * Gray et al. (2021) Gray, J. E., K. J. Komatsu, and M. D. Smith (2021).  Defining codominance in plant communities.  New Phytologist 230, 1–15.
  * Guo et al. (2019) Guo, Q., S. Fei, K. M. Potter, A. M. Liebhold, and J. Wen (2019).  Tree diversity regulates forest pest invasion.  PNAS 116(15), 7382–7386.
  * Hanski (2014) Hanski, I. (2014).  The dung insect community.  In Dung beetle ecology, pp. 5–21. Princeton University Press.
  * Hutcheson (1970) Hutcheson, K. (1970).  A test for comparing diversities based on the shannon formula.  Journal of Theoretical Biology 29, 151–154.
  * Kamiyama et al. (2020) Kamiyama, M., B. Bradford, R. Groves, and C. Guedot (2020, 04).  Degree day models to forecast the seasonal phenology of Drosophila suzukii in tart cherry orchards in the midwest us.  PLOS ONE 15, 1–13.
  * Levin (2013) Levin, S. A. (2013).  Encyclopedia of Biodiversity (2nd ed.).  London, UK: Academic Press.
  * Magurran (2004) Magurran, A. E. (2004).  Measuring Biological Diversity.  Main Street, Malden, USA: Blackwell publishing.
  * Magurran (2005) Magurran, A. E. (2005).  Biological diversity.  Current biology 15(4), 116–119.
  * Magurran (2010) Magurran, A. E. (2010).  Open access q & a : What is biodiversity?  BMC Biology 8(145), 1–4.
  * McDonald et al. (2010) McDonald, C., R. Smith, M. Scot, and J. Dick (2010, 06).  Using indices to measure biodiversity change through time.  In 5th METMA Santiago de Compostela, Spain, June-July 2010, pp. 1–5. International Workshop on Spatial-Temporal Modeling.
  * McGlinn et al. (2019) McGlinn, D. J., X. Xiao, F. May, N. J. Gotelli, T. Engel, S. A. Blowes, T. M. Knight, O. Purschke, J. M. Chase, and B. J. McGill (2019).  Measurement of biodiversity (mob): A method to separate the scale-dependent effects of species abundance distribution, density, and aggregation on diversity change.  Methods in Ecology and Evolution 10(2), 258–269.
  * Mitchell and Onstad (2014) Mitchell, P. and D. Onstad (2014, 01).  Insect Resistance Management: Biology, Economics, and Prediction.  Cambridge, Massachusetts, US: Academic Press.
  * Mulder et al. (2004) Mulder, C. P. H., E. Bazeley-White, P. G. Dimitrakopoulos, A. Hector, M. Scherer-Lorenzen, and B. Schmid (2004).  Species evenness and productivity in experimental plant communities.  Oikos 107(1), 50–63.
  * Muller et al. (1999) Muller, C., I. Adriaanse, R. Belshaw, and H. Godfray (1999).  The structure of an aphid–parasitoid community.  Journal of Animal Ecology 68(2), 346–370.
  * Naranjo-Guevara et al. (2020) Naranjo-Guevara, N., L. Santos, N. Barbosa, A. Castro, and O. Fernandes (2020, 01).  Long-term mass rearing impacts performance of the egg parasitoid Telenomus remus (hymenoptera: Platygastridae).  Journal of Entomological Science 55, 69–86.
  * Noss (1990) Noss, R. F. (1990).  Indicators for monitoring biodiversity: A hierarchical approach.  Conservation Biology 4(4), 355–364.
  * O’Connor et al. (2020) O’Connor, B., S. Bojinski, C. Röösli, and M. E. Schaepman (2020).  Monitoring global changes in biodiversity and climate essential as ecological crisis intensifies.  Ecological Informatics 55, 1–8.
  * Ojo and Ola-Adams (1996) Ojo, L. and B. Ola-Adams (1996).  Measurement of tree diversity in the nigerian rainforest.  Biodiversity & Conservation 5(10), 1253–1270.
  * Pesenti et al. (2016) Pesenti, N., P. Quatto, and E. Ripamonti (2016, 10).  Bootstrap confidence intervals for biodiversity measures based on gini index and entropy.  Quality Quantity 51, 847–858.
  * Pielou (1966) Pielou, E. C. (1966).  The measurement of diversity in different types of biological collections.  Journal of Theoretical Biology 13, 131–144.
  * Pla (2004) Pla, L. (2004, 03).  Bootstrap confidence intervals for the shannon biodiversity index: A simulation study.  Journal of Agricultural Biological and Environmental Statistics 9, 42–56.
  * Ricklefs (2016) Ricklefs, R. E. (2016).  Ecology: The Economy of Nature (7 ed.).  New York, US: W. H. Freeman.
  * Scherer et al. (2013) Scherer, R., F. Schaarschmidt, S. Prescher, and K. U. Priesnitz (2013, 03).  Simultaneous confidence intervals for comparing biodiversity indices estimated from overdispersed count data.  Biometrical journal 55, 246–26.
  * Shenton et al. (1969) Shenton, L., K. Bowman, and K. Hutcheson (1969).  Comments on the distribution of indices of diversity.  In International Symposium of Statistical Ecology, pp. 315–359.
  * St Laurent et al. (2020) St Laurent, R., C. Mielke, D. Herbin, K. Dexter, and A. Kawahara (2020, 01).  A new target capture phylogeny elucidates the systematics and evolution of wing coupling in sack‐bearer moths.  Systematic Entomology 45, 653–669.
  * Tsakalakis et al. (2020) Tsakalakis, I., B. Blasius, and A. Ryabov (2020, JUN).  Resource competition and species coexistence in a two-patch metaecosystem model.  THEORETICAL ECOLOGY 13(2), 209–221.
  * Vanclay (1989) Vanclay, J. K. (1989).  A growth model for north queensland rainforests.  Forest Ecology and Management 27(3-4), 245–271.
  * von Burg et al. (2011) von Burg, S., F. J. van Veen, F. Álvarez-Alfageme, and J. Romeis (2011).  Aphid–parasitoid community structure on genetically modified wheat.  Biology Letters 7(3), 387–391.
  * Willett et al. (2020) Willett, D., C. Filgueiras, J. Nyrop, and B. Nault (2020, 04).  Field monitoring of onion maggot (Delia antiqua) fly through improved trapping.  Journal of Applied Entomology 144(5), 382–387.
  * Williams et al. (1996) Williams, P., C. Humphries, D. Vane-Wright, and K. Gaston (1996).  Value in biodiversity, ecological services and consensus.  Trends in Ecology & Evolution 11(9), 385.
  * Wilsey and Polley (2002) Wilsey, B. J. and H. W. Polley (2002).  Reductions in grassland species evenness increase dicot seedling invasion and spittle bug infestation.  Ecology Letters 5(5), 676–684.
  * Wubs and Bezemer (2018) Wubs, E. R. J. and T. M. Bezemer (2018).  Plant community evenness responds to spatial plant–soil feedback heterogeneity primarily through the diversity of soil conditioning.  Functional Ecology 32(2), 509–521.
  * Zar (2009) Zar, J. H. (2009).  Biostatistical analysis ($5^{th}$ ed.).  Upper Suddle River, New Jersey, USA: Prentice Hall.
  * Zhang and Zhang (2012) Zhang, Z. and X. Zhang (2012, 05).  A normal law for the plug-in estimator of entropy.  IEEE Transactions on Information Theory - TIT 58, 2745–2747.


# Liquidity Provision Payoff on Automated Market Makers

Jin Hong Kuan 1 E-mail address<EMAIL_ADDRESS>East Rock Labs

##  1 Abstract

The standard approach for compensating liquidity providers on many
decentralized exchanges (DEX) for serving as counter-party to swaps is through
charging a small percentage of fees. The expected payoff from the cash flow of
this mode of market making has yet to be mathematically formulated in terms of
volatility in the existing literature. We provide here a preliminary
derivation of the payoff formula, by making the standard set of assumptions
for efficient markets, namely geometric Brownian price movements and zero
arbitrage. Trading volume, conventionally taken as an exogenous variable for
fees calculation, becomes a function of volatility and available liquidity in
this formulation. In doing so, we show that it is a near-linear function of
the volatility of the underlying risky asset. Since hedging instruments with
such a property is highly sought after, we discuss the potential of
securitizing the cash flow of liquidity fees to serve as a volatility product
in its own right.

##  2 Derivations

We model here the relationship between the cash flow from liquidity fees with
the relative price movements between two tokens $(a,b)$ in a constant product
market maker (CPMM). To standardize calculations, all transactions are
notarized in units of $a$, and we assume that fees will always be paid in that
token. Moreover, all the liquidity is assumed to be unchanged in all
calculations below, i.e. no liquidity provision takes place. Let the reserve
of each token be denoted by $r_{a},r_{b}$ respectively. The initial liquidity
$L^{2}$, a quantity that remains invariant after each swap is then defined as
follows:

$\displaystyle L^{2}$ $\displaystyle=r_{a,0}\cdot r_{b,0}$

The relative price in a CPMM is fixed as the ratio between the respective
reserves of each token:

$\displaystyle P_{t}$ $\displaystyle=\frac{r_{b,t}}{r_{a,t}}$
$\displaystyle=\frac{L^{2}}{r^{2}_{a,t}}$

Since a percentage fee $\gamma$ is charged for each transaction and deposited
into the fees vault, the change in fees collected $dF$ is proportional to the
inflow and outflow of token $a$. While each market makers may differ slightly
in implementation, we capture this commission-based revenue model with a
simple model:

$\displaystyle dF$ $\displaystyle=\gamma\lvert dr_{a}\rvert$ (1)

The absolute operator is included since a positive amount of fee is collected
regardless of the direction of the swap.

### Instantaneous Payoff Rate.

We now attempt to derive $dr_{a}$, which we know to be dependent on price.
Specifically, manipulating the algebraic relationship defined above between
price and token reserve, we obtain

$\displaystyle r_{a,t}$ $\displaystyle=LP_{t}^{-1/2}$ (2)

Suppose that the relative price follows a geometric Brownian process, commonly
assumed for asset price movements in the extensive continuous-time financial
modeling literature [2]:

$\displaystyle dP_{t}$ $\displaystyle=\mu P_{t}dt+\sigma P_{t}dz$ (3)

where $dz=\epsilon\sqrt{dt}$ is the stochastic term, and
$\epsilon\sim\mathcal{N}(0,1)$ is a standard Wiener process. Note that the
volatility term can be interpreted as the gross volatility resulting from
reaction to market events as well as noise trades. We make no distinction
between informed and uninformed trades.

In a well-arbitraged market, future price drift is priced in, thus we can
assume $P_{t}$ to be a martingale, and $\mu=0$. Combining eq. 3 with eq. 2 in
accordance to Itô’s lemma allows us to then derive the stochastic process
governing $dr_{a}$:

$\displaystyle dr_{a}$ $\displaystyle=\left(\frac{\partial r_{a}}{\partial
t}+\mu\frac{\partial r_{a}}{\partial
P}+\frac{\sigma^{2}}{2}\frac{\partial^{2}r_{a}}{\partial
P^{2}}\right)dt+\sigma\frac{\partial r_{a}}{\partial P}dz$
$\displaystyle=\left(0-\frac{\mu}{2}LP^{-3/2}+\frac{3\sigma^{2}}{4}LP^{-5/2}\right)dt-\frac{\sigma}{2}LP^{-3/2}dz$
$\displaystyle=LP^{-3/2}\left(\frac{3\sigma^{2}}{4P}dt-\frac{\sigma}{2}dz\right)$
(4)

And consequently, the expected payoff rate per unit of liquidity (i.e. divided
by total $L$), which we henceforth will refer to as payoff rate, is a price-
dependent stochastic differential:

$\displaystyle dF(P)/L$ $\displaystyle=\gamma\lvert dr_{a}(P)\rvert/L$
$\displaystyle=\gamma
P^{-3/2}\bigg{\lvert}\frac{3\sigma^{2}}{4P}dt-\frac{\sigma}{2}dz\bigg{\rvert}$
(5)

Given a particular $P$, the payoff rate is the first moment of the above
equation:

$\displaystyle E[dF(P)/L]$ $\displaystyle=\gamma
P^{-3/2}\int_{-\infty}^{\infty}\bigg{\lvert}\frac{3\sigma^{2}}{4P}dt-\frac{\sigma\epsilon}{2}\sqrt{dt}\bigg{\rvert}\phi(\epsilon)d\epsilon$

where $\phi(\cdot)$ is the probability density function of a unit normal
distribution.

We solve the integration by comparison. For any constant $A,B$, it can be
shown that

$\displaystyle\int_{-\infty}^{\infty}\lvert
A-B\epsilon\rvert\phi(\epsilon)d\epsilon=\sqrt{\pi}\left[2A\phi\left(\frac{B}{A}\right)+2B\Phi\left(\frac{B}{A}\right)-B\right]$

where $\Phi$ is the cumulative density function of a unit normal distribution.
Hence, we have

$\displaystyle E[dF(P)/L]$ $\displaystyle=\frac{\gamma}{\sqrt{\pi
P^{3}}}\left[2A\phi\left(\frac{B}{A}\right)+2B\Phi\left(\frac{B}{A}\right)-B\right]$
(6) $\displaystyle A$ $\displaystyle=\frac{3dt}{4P}\sigma^{2}$ $\displaystyle
B$ $\displaystyle=\frac{\sqrt{dt}}{2}\sigma$

One notable property about the expected payoff function is that it can be
shown to be _almost linear_ to volatility $\sigma$ within the reasonable range
of the parameter. This hints at the potential utility of liquidity swaps as
direct volatility hedge or bet.

To show this, we first take the derivatives of each term with respect to
$\sigma$. We separate out the constant coefficients, such that
$A=\alpha\sigma^{2}$, $B=\beta\sigma$ and $\lambda=\beta/\alpha$:

$\begin{aligned} \partial_{\sigma}A&=2\alpha\sigma\\\
\partial_{\sigma}B&=\beta\end{aligned}\qquad\begin{aligned}
\left.\partial_{\sigma}\Phi\right|_{\frac{\lambda}{\sigma}}&=-\lambda\phi\left(\frac{\lambda}{\sigma}\right)\\\
\left.\partial_{\sigma}\phi\right|_{\frac{\lambda}{\sigma}}&=\lambda\sigma\phi\left(\frac{\lambda}{\sigma}\right)\end{aligned}$

Applying a series of chain rules on eq. 6, we obtain

$\displaystyle\partial_{\sigma}E[dF(P)/L]=\sigma\alpha\phi\left(\frac{\lambda}{\sigma}\right)+\beta\Phi(\frac{\lambda}{\sigma})$
(7)

This measure is commonly known as vega, which stands for the sensitivity of
returns to volatility. For $\frac{\lambda}{\sigma}\gg 1,\phi(x)\approx
0,\Phi(x)\approx 1$, the second term dominates. Thus, $\partial
E/\partial\sigma\approx\beta$ and the payoff rate of liquidity is almost
linear to volatility. Moreover, since $\beta$ does not depend on price, this
implies that payoff rate should remain relatively constant at all prices when
volatility is low. On the contrary, in high volatility regimes where
$\frac{\lambda}{\sigma}$ is close to zero, the first term becomes increasingly
prominent and $\partial E/\partial\sigma\approx\alpha\sigma$. In this case,
the payoff rate of liquidity swaps becomes _quadratic_ to volatility.

It is imperative to point out that $\lambda\rightarrow\infty$ as
$dt\rightarrow 0$, which in theory renders any consideration of the
$\sigma\alpha$ term moot. An intuitive explanation of this phenomenon is that
since the stochastic term dominates the drift term in infinitesimally short
time intervals, a sign switch is applied by the absolute value operator about
half the time, causing the drift terms to cancel each other out when summed.
However this assumes a perfectly smooth stochastic process and near-instant
arbitrage, which does not realistically represent the market. Hence, we keep
all relevant terms and assume a non-trivial $\Delta t$ when numerically
simulating our model below.

Figure 1: The predicted payoff rate (orange) with $\Delta t=0.25,P=1$ as
compared with the empirical average of 10,000 sample trajectories (blue).
Linearity is observed within a reasonable range of volatility, with nonlinear
effects becoming more prominent at $\sigma>1$.

### Temporal Evolution of Payoff Rate.

The analysis thus far concerns payoff rate at a single slice of time in which
an initial price is assumed. To examine how payoff rate varies over time, we
must consider the ensemble of price trajectories. This endeavor is made simple
by the fact that price movement is stationary and Markovian (according to our
model), so the ensemble average of the payoff rate at time $t$ is nothing but
the average of the rate at all prices, weighted by the probability that price
$P_{t}$ is reached at that time:

$\displaystyle d\tilde{F}(t)$ $\displaystyle:=E_{P_{t}}[dF(P_{t})]$ (8)

Let $p(P,t)$ be the time-dependent probability density function of prices.
Since $P_{t}$ is described by the stochastic differential equation eq. 3,
$p(P,t)$ can be obtained with the corresponding Fokker-Planck equation:

$\displaystyle\partial_{t}p(P,t)$
$\displaystyle=-\partial_{P}[\mu(P,t)p(P,t)]+\frac{1}{2}\partial_{P}^{2}[\sigma^{2}(P,t)p(P,t)]$
(9)

The analytical solution to eq. 9 is obtained in [3] by using the Laplace-
Mellin transform method. We present here the particular solution where
$\mu=\sigma^{2}/2$ and $p(P,0)=\delta_{P_{0}}$, where
$\delta_{P_{0}}(P_{0})=1$ and $0$ elsewhere:

$\displaystyle p(P,t)=\frac{1}{P\sigma\sqrt{2\pi
t}}\exp\left(-\frac{\log^{2}\frac{P}{P_{0}}}{2\sigma^{2}t}\right)$ (10)

We can now solve for eq. 8, by integrating over $P$. Again, we scale by one
over liquidity to standardize comparison:

$\displaystyle E[d\tilde{F}(t)/L]$
$\displaystyle=\frac{\gamma}{\sigma\sqrt{2\pi
t}}\int_{0}^{\infty}P^{-5/2}\left[2A\phi\left(\frac{B}{A}\right)+2B\Phi\left(\frac{B}{A}\right)-B\right]\exp\left(-\frac{\log^{2}\frac{P}{P_{0}}}{2\sigma^{2}t}\right)dP$
(11)

To calculate the total payoff over time, we integrate over eq. 11:

$\displaystyle E[\tilde{F}(T)/L]$
$\displaystyle=\int_{0}^{T}E[d\tilde{F}(\tau)/L]d\tau$ (12)

The final formulation is unruly and thus is not included. Note that when
volatility is within a manageable range, the nonlinear terms vanish, allowing
eq. 12 to simplify to just $\gamma\beta T$.

Figure 2: The expected payoff trajectory (black) from integrating over eq. 12
with $\Delta t=0.25,T=3.0,P_{0}=1$, incorporating price diffusion through
adaptive-rejection sampling of $p(P,t)$. In expectation the total payoff
remains relatively linear over time, although each stochastic realization
(blue) may vary greatly around the mean due to multiplicative noise added to
price.

Despite the noisiness of realized trajectories, the stationarity of the
underlying price movements implies that total payoff, being a sum of
stationary mapping (ref. eq. 6) of prices over time, is governed by the
Central Limit Theorem. Hence, reasonable bounds can be derived for the
variance of total payoff.

##  3 Discussions

There is strong demand for volatility derivatives, whose payoff is a measure
of the volatility of an underlying asset. Such instruments are useful as hedge
when market sentiment is uncertain, as they help manage vega exposure in a
portfolio. For instance, volatility swap is an over-the-counter contract
whereby the long position holder is entitled to a payoff linear to realized
volatility over a period of time, in exchange for paying a pre-determined
premium to the seller at maturity. Since 2003, the Chicago Board Options
Exchange (CBOE) introduced an exchanged-traded derivative of its volatility
index VIX tracking the volatility of S&P 500, which has since blossomed into
the second most liquid market on the exchange [1].

The volatility derivative market is still nascent in the crypto market, due in
part to the difficulty of implementation and the lack of liquidity. We
discussed above the intriguing discovery that fees from liquidity provision, a
well-adopted and familiar practice in the crypto space, is in theory almost
linear to the underlying volatility. Moreover, since the payoff rate responds
to instantaneous volatility changes, the provider can benefit from dynamic
hedging of risk. Hence, there is significant market potential in isolating the
fees cash flow and packaging it into a volatility product.

To this end, we propose the creation of a derivative market consisting of two
parties: buyers and sellers of fees cash flow, and refer to the new derivative
as _liquidity fees swap_. Sellers of liquidity fees swap lock away an agreed
amount of the underlying tokens in a designated automated market maker for a
fixed duration. Instead of collecting the liquidity fees for themselves, they
instead sell it to buyers, who pay an upfront premium in exchange for rights
to future cash flow.

The seller thus takes on a straddle-like position where any price drift
negatively affects their final payoff, whereas the buyers gains a positive
cash flow with near-constant vega and near-zero delta. Unlike conventional
volatility products between two parties, the payoffs from liquidity fees swap
is not net-zero, as fees will be extracted from noise traders through
liquidity provision. Excess volatility from uninformed and non-directional
traders contributes directly to the payoff of swap buyers, without affecting
the payoff of the sellers.

Additionally, we speculate that such a market will have a stabilizing effect
on the primary market between the underlying assets. Any marginal increase in
volatility will increase the demand for liquidity fees swap, which in turn
raises the premium offered to sellers, drawing in liquidity to buffer against
further price movements. If price drift were to manifest from the increased
volatility (e.g. in the event that a future announcement has either positive
or negative effects on price), sellers with accurate private information
regarding the future relative price can profit from the excess premium
provided that they hedged their impermanent loss appropriately. All in all, we
believe that the introduction of this crypto-native volatility product will
help accelerate the maturation of primary and derivative crypto markets.

## References

  * [1] Peter Carr and Roger Lee  “Volatility Derivatives”  In _Annual review of financial economics_ DOI: 10.1146/annurev.financial.050808.114304
  * [2] Stephen A. Ross and Robert C. Merton  “continuous time finance”  In _Journal of Finance_ , 1991  DOI: 10.2307/2328875
  * [3] Viktor Stojkoski et al.  “Generalised Geometric Brownian Motion: Theory and Applications to Option Pricing.”  In _Entropy_ 22.12, 2020, pp. 1432  DOI: 10.3390/e22121432