area, which we define below. We note that a preliminary version of the results
in this section were first presented in the doctoral thesis [26].

######  Definition B.1.

Over an interval $[s,t]$, the space-space-time Lévy area $L_{s,t}$ of a
standard Brownian motion is defined as

$\displaystyle L_{s,t}$
$\displaystyle:=\frac{1}{6}\bigg{(}\int_{s}^{t}\int_{s}^{u}\int_{s}^{v}\circ\,dW_{r}\circ
dW_{v}\,du-2\int_{s}^{t}\int_{s}^{u}\int_{s}^{v}\circ\,dW_{r}\,dv\circ dW_{u}$
$\displaystyle\hskip 42.67912pt+\int_{s}^{t}\int_{s}^{u}\int_{s}^{v}dr\circ
dW_{v}\circ dW_{u}\bigg{)}.$

######  Remark B.2.

Along with the path increment $W_{s,t}\hskip 0.7113pt$, the Lévy areas
$H_{s,t}$ and $L_{s,t}$ are sufficient to construct the iterated integrals
appearing in the stochastic Taylor expansion (16), up to order 2 for SDEs
satisfying the commutativity condition (2).

The key difference between the integral estimators defined in this section and
those derived in [29], is that we shall additionally use the following random
variable.

######  Definition B.3.

The space-time Lévy swing222Side With INtegral Greater. of Brownian motion
over $[s,t]$ is defined as

$\displaystyle n_{s,t}:=\mathrm{sgn}\big{(}H_{s,u}-H_{u,t}\big{)},$

where $u:=\frac{1}{2}(s+t)$ is the interval’s midpoint.

Figure 8: Space-time Lévy swing gives the side where the path has greater
space-time Lévy area.

Similar to [29], we propose approximating $L_{s,t}$ using its conditional
expectation. That is, we would like to derive a closed-form expression for
$\mathbb{E}\big{[}L_{s,t}\hskip 0.7113pt|\hskip 0.7113ptW_{s,t}\hskip
0.7113pt,H_{s,t}\hskip 0.7113pt,n_{s,t}\big{]}$. In addition, we shall derive
the conditional variance of $L_{s,t}$ as it gives the $L^{2}(\mathbb{P})$
error.

In this section, we focus on the case where Brownian motion is one-dimensional
and leave the general case, a matrix of space-space-time Lévy areas, as future
work. However, the off-diagonal terms in this matrix will have zero
expectation due to the independence and symmetry of the $d$ coordinate
processes of the Brownian motion. Therefore, we may construct a high order
multidimensional splitting path simply by taking independent copies of the
paths detailed in Section 4. That said, as discussed in Section 5, we would
lose optimality due to “cross” iterated integrals such as (44).

######  Theorem B.4 (An optimal unbiased estimator of space-space-time Lévy
area).

Let $H_{s,t}$ and $L_{s,t}$ be the previously defined Lévy areas of Brownian
motion and time. Let $n_{s,t}:=\mathrm{sgn}(H_{s,u}-H_{u,t})$ denote the
space-time Lévy swing given by definition B.3. Then the conditional mean and
variance of $L_{s,t}$ given the information $(W,H,n)_{s,t}$ is

(58) $\displaystyle\mathbb{E}\big{[}L_{s,t}\,|\,W_{s,t}\hskip
0.7113pt,H_{s,t}\hskip 0.7113pt,n_{s,t}\big{]}$
$\displaystyle=\frac{1}{30}h^{2}+\frac{3}{5}hH_{s,t}^{2}-\frac{1}{8\sqrt{6\pi}}n_{s,t}h^{\frac{3}{2}}W_{s,t}\hskip
0.7113pt,$ (59)
$\displaystyle\operatorname{Var}\big{(}L_{s,t}\,|\,W_{s,t}\hskip
0.7113pt,H_{s,t}\hskip 0.7113pt,n_{s,t}\big{)}$
$\displaystyle=\frac{11}{25200}h^{4}+\Big{(}\frac{1}{720}-\frac{1}{384\pi}\Big{)}h^{3}W_{s,t}^{2}+\frac{1}{700}h^{3}H_{s,t}^{2}$
$\displaystyle\hskip
28.45274pt-\frac{1}{320\sqrt{6\pi}}n_{s,t}h^{\frac{7}{2}}W_{s,t}\hskip
0.7113pt.$

######  Proof B.5.

We first note by applying [29, Theorem 3.10] on $[s,u]$ and $[u,t]$, we have

$\displaystyle\mathbb{E}\big{[}L_{s,u}\,|\,W_{s,u}\hskip
0.7113pt,H_{s,u}\big{]}$
$\displaystyle=\frac{1}{120}h^{2}+\frac{3}{10}hH_{s,u}^{2}\hskip 0.7113pt,$
$\displaystyle\operatorname{Var}\big{(}L_{s,u}\,|\,W_{s,u}\hskip
0.7113pt,H_{s,u}\big{)}$
$\displaystyle=\frac{11}{403200}h^{4}+h^{3}\Big{(}\frac{1}{5760}W_{s,u}^{2}+\frac{1}{5600}H_{s,u}^{2}\Big{)},$
$\displaystyle\mathbb{E}\big{[}L_{u,t}\,|\,W_{u,t}\hskip
0.7113pt,H_{u,t}\big{]}$
$\displaystyle=\frac{1}{120}h^{2}+\frac{3}{10}hH_{u,t}^{2}\hskip 0.7113pt,$
$\displaystyle\operatorname{Var}\big{(}L_{u,t}\,|\,W_{u,t}\hskip
0.7113pt,H_{u,t}\big{)}$
$\displaystyle=\frac{11}{403200}h^{4}+h^{3}\Big{(}\frac{1}{5760}W_{u,t}^{2}+\frac{1}{5600}H_{u,t}^{2}\Big{)}.$

To utilise the above expectations, we will “expand” the following integrals
over $[s,t]$.

(60) $\displaystyle\int_{s}^{t}W_{s,r}\,dr$
$\displaystyle=\int_{s}^{u}W_{s,r}\,dr+\int_{u}^{t}W_{s,r}\,dr$
$\displaystyle=\int_{s}^{u}W_{s,r}\,dr+\frac{1}{2}hW_{s,u}+\int_{u}^{t}W_{u,r}\,dr,$
(61) $\displaystyle\int_{s}^{t}W_{s,r}^{2}\,dr$
$\displaystyle=\int_{s}^{u}W_{s,r}^{2}\,dr+\int_{u}^{t}W_{s,r}^{2}\,dr$
$\displaystyle=\int_{s}^{u}W_{s,r}^{2}\,dr+\frac{1}{2}hW_{s,u}^{2}+2\hskip
0.7113ptW_{s,u}\int_{u}^{t}W_{u,r}\,dr+\int_{u}^{t}W_{u,r}^{2}\,dr.$

By [29, Theorem 3.9], which follows from integration by parts, we have that,
for $u\leq v$,

(62) $\displaystyle\int_{u}^{v}W_{v,r}\,dr$
$\displaystyle=\frac{1}{2}(v-u)W_{u,v}+(v-u)H_{u,v}\hskip 0.7113pt,$ (63)
$\displaystyle\int_{u}^{v}W_{u,r}^{2}\,dr$
$\displaystyle=\frac{1}{3}(v-u)W_{u,v}^{2}+(v-u)W_{u,v}H_{u,v}+2L_{u,v}\hskip
0.7113pt.$

From the decomposition (60) and identity (62) on $[s,u]$ and $[u,t]$, it
follows that

(64)
$H_{s,t}=\frac{1}{4}\big{(}W_{s,u}-W_{u,t}\big{)}+\frac{1}{2}\big{(}H_{s,u}+H_{u,t}\big{)}\hskip
0.7113pt.$

We now define the following random variables:

(65) $\displaystyle Z_{s,u}$
$\displaystyle:=\frac{1}{8}\big{(}W_{s,u}-W_{u,t}\big{)}-\frac{3}{4}\big{(}H_{s,u}+H_{u,t}\big{)}\hskip
0.7113pt,$ (66) $\displaystyle N_{s,t}$ $\displaystyle:=H_{s,u}-H_{u,t}\hskip
0.7113pt.$

Since $W_{a,b}\sim\mathcal{N}(0,(b-a))$ and
$H_{a,b}\sim\mathcal{N}\big{(}0,\frac{1}{12}(b-a)\big{)}$ are independent, we
see that $W_{s,t}\hskip 0.7113pt,H_{s,t}\hskip 0.7113pt,Z_{s,u}\hskip
0.7113pt,N_{s,t}$ are jointly normal, uncorrelated and therefore also
independent. From (65) and (66), it directly follows that
$Z_{s,u}\sim\mathcal{N}\big{(}0,\frac{1}{16}h\big{)}$ and
$N_{s,t}\sim\mathcal{N}\big{(}0,\frac{1}{12}h\big{)}$. In addition, by
rearranging the above expressions for these random variables, we have

(67) $\displaystyle W_{s,u}$
$\displaystyle=\frac{1}{2}W_{s,t}+\frac{3}{2}H_{s,t}+Z_{s,u}\hskip 0.7113pt,$
(68) $\displaystyle W_{u,t}$
$\displaystyle=\frac{1}{2}W_{s,t}-\frac{3}{2}H_{s,t}-Z_{s,u}\hskip 0.7113pt,$
(69) $\displaystyle H_{s,u}$
$\displaystyle=\frac{1}{4}H_{s,t}-\frac{1}{2}Z_{s,u}+\frac{1}{2}N_{s,t}\hskip
0.7113pt,$ (70) $\displaystyle H_{u,t}$
$\displaystyle=\frac{1}{4}H_{s,t}-\frac{1}{2}Z_{s,u}-\frac{1}{2}N_{s,t}\hskip
0.7113pt.$

Putting all of this together, and using the independence of Brownian
increments, gives

$\displaystyle\mathbb{E}\bigg{[}\int_{s}^{t}W_{s,r}^{2}\,dr\,\Big{|}\,W_{s,u}\hskip
0.7113pt,H_{s,u}\hskip 0.7113pt,W_{u,t}\hskip 0.7113pt,H_{u,t}\bigg{]}$
$\displaystyle\hskip
14.22636pt=\mathbb{E}\bigg{[}\int_{s}^{u}W_{s,r}^{2}\,dr\,\Big{|}\,W_{s,u}\hskip
0.7113pt,H_{s,u}\bigg{]}+\frac{1}{2}hW_{s,u}^{2}+2\hskip
0.7113ptW_{s,u}\int_{u}^{t}W_{u,r}\,dr$ $\displaystyle\hskip
42.67912pt+\mathbb{E}\bigg{[}\int_{u}^{t}W_{u,r}^{2}\,dr\,\Big{|}\,W_{u,t}\hskip
0.7113pt,H_{u,t}\bigg{]}$ $\displaystyle\hskip
14.22636pt=\frac{1}{6}hW_{s,u}^{2}+\frac{1}{2}hW_{s,u}H_{s,u}+2\hskip
0.7113pt\mathbb{E}\big{[}L_{s,u}\,|\,W_{s,u}\hskip
0.7113pt,H_{s,u}\big{]}+\frac{1}{2}hW_{s,u}^{2}+\frac{1}{2}hW_{s,u}W_{u,t}$
$\displaystyle\hskip
42.67912pt+hW_{s,u}H_{u,t}+\frac{1}{6}hW_{u,t}^{2}+\frac{1}{2}hW_{u,t}H_{u,t}+2\hskip
0.7113pt\mathbb{E}\big{[}L_{u,t}\,|\,W_{u,t}\hskip 0.7113pt,H_{u,t}\big{]}$
$\displaystyle\hskip
14.22636pt=\frac{1}{6}hW_{s,u}^{2}+\frac{1}{2}hW_{s,u}H_{s,u}+\frac{3}{5}hH_{s,u}^{2}+\frac{1}{60}h^{2}+\frac{1}{2}hW_{s,u}^{2}+\frac{1}{2}hW_{s,u}W_{u,t}$
$\displaystyle\hskip
42.67912pt+hW_{s,u}H_{u,t}+\frac{1}{6}hW_{u,t}^{2}+\frac{1}{2}hW_{u,t}H_{u,t}+\frac{3}{5}hH_{u,t}^{2}+\frac{1}{60}h^{2}$
$\displaystyle\hskip
14.22636pt=\frac{1}{3}hW_{s,t}^{2}+hW_{s,t}H_{s,t}+\frac{6}{5}hH_{s,t}^{2}+\frac{1}{30}h^{2}$
$\displaystyle\hskip
42.67912pt+\frac{1}{5}hH_{s,t}Z_{s,u}-\frac{1}{4}hW_{s,t}N_{s,t}+\frac{2}{15}hZ_{s,u}^{2}+\frac{3}{10}hN_{s,t}^{2}\hskip
0.7113pt,$

where the last line was obtained by substituting (67) – (70) into the previous
line. Since $n_{s,t}:=\mathrm{sgn}(N_{s,t})$ and
$N_{s,t}\sim\mathcal{N}\big{(}0,\frac{1}{12}h\big{)}$, it follows that
$|N_{s,t}|$ has a half-normal distribution and is independent of
$n_{s,t}\hskip 0.7113pt$. Moreover, this implies that its moments are

(71) $\displaystyle\mathbb{E}\big{[}N_{s,t}\,\big{|}\,n_{s,t}\big{]}$
$\displaystyle=\frac{1}{\sqrt{6\pi}}n_{s,t}h^{\frac{1}{2}},$
$\displaystyle\mathbb{E}\big{[}N_{s,t}^{3}\,\big{|}\,n_{s,t}\big{]}$
$\displaystyle=\frac{1}{6\sqrt{6\pi}}n_{s,t}h^{\frac{3}{2}},$ (72)
$\displaystyle\mathbb{E}\big{[}N_{s,t}^{2}\,\big{|}\,n_{s,t}\big{]}$
$\displaystyle=\frac{1}{12}h\hskip 0.7113pt,$
$\displaystyle\mathbb{E}\big{[}N_{s,t}^{4}\,\big{|}\,n_{s,t}\big{]}$
$\displaystyle=\frac{1}{48}h^{2}.$

Explicit formulae for the first four central moments of the half-normal
distribution are given in [24, Equation (16)]. Since $W_{s,t}\hskip
0.7113pt,H_{s,t}\hskip 0.7113pt,Z_{s,u}\hskip 0.7113pt,N_{s,t}$ are
independent, we have

$\displaystyle\mathbb{E}\bigg{[}\int_{s}^{t}W_{s,r}^{2}\,dr\,\Big{|}\,W_{s,t}\hskip
0.7113pt,H_{s,t}\hskip 0.7113pt,n_{s,t}\hskip 0.7113pt\bigg{]}$
$\displaystyle\hskip
14.22636pt=\mathbb{E}\bigg{[}\mathbb{E}\bigg{[}\int_{s}^{t}W_{s,r}^{2}\,dr\,\Big{|}\,W_{s,t}\hskip
0.7113pt,H_{s,t}\hskip 0.7113pt,Z_{s,u}\hskip 0.7113pt,N_{s,t}\hskip
0.7113pt\bigg{]}\,\bigg{|}\,W_{s,t}\hskip 0.7113pt,H_{s,t}\hskip
0.7113pt,n_{s,t}\hskip 0.7113pt\bigg{]}.$

As $\big{(}W_{s,t}\hskip 0.7113pt,H_{s,t}\hskip 0.7113pt,Z_{s,u}\hskip
0.7113pt,N_{s,t}\big{)}$ and $\big{(}W_{s,u}\hskip 0.7113pt,H_{s,u}\hskip
0.7113pt,W_{u,t}\hskip 0.7113pt,H_{u,t}\big{)}$ encode the same information,
we have

$\displaystyle\mathbb{E}\bigg{[}\int_{s}^{t}W_{s,r}^{2}\,dr\,\Big{|}\,W_{s,t}\hskip
0.7113pt,H_{s,t}\hskip 0.7113pt,n_{s,t}\hskip 0.7113pt\bigg{]}$
$\displaystyle=\frac{1}{3}hW_{s,t}^{2}+hW_{s,t}H_{s,t}+\frac{6}{5}hH_{s,t}^{2}+\frac{1}{30}h^{2}$
$\displaystyle\hskip
42.67912pt+\frac{1}{5}hH_{s,t}\mathbb{E}\big{[}Z_{s,u}\big{]}-\frac{1}{4}hW_{s,t}\mathbb{E}\big{[}N_{s,t}\hskip
0.7113pt|\hskip
0.7113ptn_{s,t}\big{]}+\frac{2}{15}h\mathbb{E}\big{[}Z_{s,u}^{2}\big{]}+\frac{3}{10}h\mathbb{E}\big{[}N_{s,t}^{2}\hskip
0.7113pt|\hskip 0.7113ptn_{s,t}\big{]}$
$\displaystyle=\frac{1}{3}hW_{s,t}^{2}+hW_{s,t}H_{s,t}+\frac{1}{15}h^{2}+\frac{6}{5}hH_{s,t}^{2}-\frac{1}{4\sqrt{6\pi}}\hskip
0.7113ptn_{s,t}\hskip 0.7113pth^{\frac{3}{2}}W_{s,t}\hskip 0.7113pt,$

where we used the moments $\mathbb{E}\big{[}Z_{s,u}\big{]}=0$, $\hskip
0.7113pt\mathbb{E}\big{[}Z_{s,u}^{2}\big{]}=\frac{1}{16}h$ as well as (71) and
(72). The condition expectation (58) now follows by applying equation (63) to
the above.

We employ a similar strategy to compute the conditional variance (59) of
$L_{s,t}\hskip 0.7113pt$. Using the decomposition (61) and independence of
$\big{(}W_{s,u}\hskip 0.7113pt,H_{s,u}\hskip 0.7113pt,W_{u,t}\hskip
0.7113pt,H_{u,t}\big{)}$, we have

$\displaystyle\operatorname{Var}\bigg{(}\int_{s}^{t}W_{s,r}^{2}\hskip
0.7113ptdr\,\Big{|}\,W_{s,u}\hskip 0.7113pt,W_{u,t}\hskip
0.7113pt,H_{s,u}\hskip 0.7113pt,H_{u,t}\bigg{)}$ $\displaystyle\hskip
14.22636pt=\operatorname{Var}\bigg{(}\int_{s}^{u}W_{s,r}^{2}\,dr+\frac{1}{2}hW_{s,u}^{2}$
$\displaystyle\hskip 102.42992pt+2\hskip
0.7113ptW_{s,u}\int_{u}^{t}W_{u,r}\,dr+\int_{u}^{t}W_{u,r}^{2}\,dr\,\Big{|}\,W_{s,u}\hskip
0.7113pt,W_{u,t}\hskip 0.7113pt,H_{s,u}\hskip 0.7113pt,H_{u,t}\bigg{)}$
$\displaystyle\hskip
14.22636pt=\operatorname{Var}\bigg{(}\int_{s}^{u}W_{s,r}^{2}\hskip
0.7113ptdr\,\Big{|}\,W_{s,u}\hskip
0.7113pt,H_{s,u}\bigg{)}+\operatorname{Var}\bigg{(}\int_{u}^{t}W_{u,r}^{2}\hskip
0.7113ptdr\,\Big{|}\,W_{u,t}\hskip 0.7113pt,H_{u,t}\bigg{)}.$

Therefore, by (63) and the formulae for the condition variances of $L_{s,u}$
and $L_{u,t}\hskip 0.7113pt$,

$\displaystyle\operatorname{Var}\bigg{(}\int_{s}^{t}W_{s,r}^{2}\hskip
0.7113ptdr\,\Big{|}\,W_{s,u}\hskip 0.7113pt,W_{u,t}\hskip
0.7113pt,H_{s,u}\hskip 0.7113pt,H_{u,t}\bigg{)}$ $\displaystyle\hskip
14.22636pt=\frac{11}{50400}h^{4}+h^{3}\Big{(}\frac{1}{1440}W_{s,u}^{2}+\frac{1}{1440}W_{u,t}^{2}+\frac{1}{1400}H_{s,u}^{2}+\frac{1}{1400}H_{u,t}^{2}\Big{)}.$

By plugging in (67) – (70), we can rewrite this in terms of $W_{s,t}\hskip
0.7113pt,H_{s,t}\hskip 0.7113pt,Z_{s,u}\hskip 0.7113pt,N_{s,t}\hskip
0.7113pt$.

$\displaystyle\operatorname{Var}\bigg{(}\int_{s}^{t}W_{s,r}^{2}\hskip
0.7113ptdr\,\Big{|}\,W_{s,u}\hskip 0.7113pt,W_{u,t}\hskip
0.7113pt,H_{s,u}\hskip 0.7113pt,H_{u,t}\bigg{)}$ $\displaystyle\hskip
7.11317pt=\frac{11}{50400}h^{4}+h^{3}\Big{(}\frac{1}{1440}W_{s,u}^{2}+\frac{1}{1440}W_{u,t}^{2}+\frac{1}{1400}H_{s,u}^{2}+\frac{1}{1400}H_{u,t}^{2}\Big{)}$
$\displaystyle\hskip
7.11317pt=\frac{11}{50400}h^{4}+h^{3}\bigg{(}\frac{1}{2880}\hskip
0.7113ptW_{s,t}^{2}+\frac{9}{2800}\hskip
0.7113ptH_{s,t}^{2}+\frac{2}{525}\hskip
0.7113ptH_{s,t}Z_{s,u}+\frac{11}{6300}\hskip
0.7113ptZ_{s,u}^{2}+\frac{1}{2800}\hskip 0.7113ptN_{s,t}^{2}\bigg{)}.$

The second conditional moment of the iterated integral can be directly
calculated as

$\displaystyle\mathbb{E}\bigg{[}\bigg{(}\int_{s}^{t}W_{s,r}^{2}\,dr\bigg{)}^{2}\,\Big{|}\,W_{s,u}\hskip
0.7113pt,W_{u,t}\hskip 0.7113pt,H_{s,u}\hskip 0.7113pt,H_{u,t}\hskip
0.7113pt\bigg{]}$
$\displaystyle=\mathbb{E}\bigg{[}\int_{s}^{t}W_{s,r}^{2}\,dr\hskip
0.7113pt\Big{|}\hskip 0.7113ptW_{s,u}\hskip 0.7113pt,W_{u,t}\hskip
0.7113pt,H_{s,u}\hskip
0.7113pt,H_{u,t}\bigg{]}^{2}+\operatorname{Var}\bigg{(}\int_{s}^{t}W_{s,r}^{2}\hskip
0.7113ptdr\hskip 0.7113pt\Big{|}\hskip 0.7113ptW_{s,u}\hskip
0.7113pt,W_{u,t}\hskip 0.7113pt,H_{s,u}\hskip 0.7113pt,H_{u,t}\bigg{)}.$

Therefore, by substituting the expressions for the above conditional moments,
we have

$\displaystyle\mathbb{E}\bigg{[}\bigg{(}\int_{s}^{t}W_{s,r}^{2}\,dr\bigg{)}^{2}\,\Big{|}\,W_{s,u}\hskip
0.7113pt,W_{u,t}\hskip 0.7113pt,H_{s,u}\hskip 0.7113pt,H_{u,t}\hskip
0.7113pt\bigg{]}$ $\displaystyle\hskip
14.22636pt=\Big{(}\frac{1}{3}hW_{s,t}^{2}+hW_{s,t}H_{s,t}+\frac{6}{5}hH_{s,t}^{2}+\frac{1}{30}h^{2}$
$\displaystyle\hskip
42.67912pt+\frac{1}{5}hH_{s,t}Z_{s,u}-\frac{1}{4}hW_{s,t}N_{s,t}+\frac{2}{15}hZ_{s,u}^{2}+\frac{3}{10}hN_{s,t}^{2}\Big{)}^{2}+\frac{11}{50400}h^{4}$
$\displaystyle\hskip 42.67912pt+h^{3}\bigg{(}\frac{1}{2880}\hskip
0.7113ptW_{s,t}^{2}+\frac{9}{2800}\hskip
0.7113ptH_{s,t}^{2}+\frac{2}{525}\hskip
0.7113ptH_{s,t}Z_{s,u}+\frac{11}{6300}\hskip
0.7113ptZ_{s,u}^{2}+\frac{1}{2800}\hskip 0.7113ptN_{s,t}^{2}\bigg{)}.$

Expanding the bracket and collecting terms yields

$\displaystyle\mathbb{E}\bigg{[}\bigg{(}\int_{s}^{t}W_{s,r}^{2}\,dr\bigg{)}^{2}\,\Big{|}\,W_{s,u}\hskip
0.7113pt,W_{u,t}\hskip 0.7113pt,H_{s,u}\hskip 0.7113pt,H_{u,t}\hskip
0.7113pt\bigg{]}$
$\displaystyle=\frac{67}{50400}h^{4}+\frac{1}{9}h^{2}W_{s,t}^{4}+\frac{36}{25}h^{2}H_{s,t}^{4}+\frac{4}{225}h^{2}Z_{s,u}^{4}+\frac{9}{100}h^{2}N_{s,t}^{4}+\frac{9}{5}h^{2}W_{s,t}^{2}H_{s,t}^{2}$
$\displaystyle\hskip
7.11317pt+\frac{4}{45}h^{2}W_{s,t}^{2}Z_{s,u}^{2}+\frac{21}{80}h^{2}W_{s,t}^{2}N_{s,t}^{2}+\frac{9}{25}h^{2}H_{s,t}^{2}Z_{s,u}^{2}+\frac{18}{25}h^{2}H_{s,t}^{2}N_{s,t}^{2}+\frac{2}{25}h^{2}Z_{s,u}^{2}N_{s,t}^{2}$
$\displaystyle\hskip
7.11317pt+\frac{13}{576}h^{3}W_{s,t}^{2}+\frac{233}{2800}h^{3}H_{s,t}^{2}+\frac{67}{6300}h^{3}Z_{s,u}^{2}+\frac{57}{2800}h^{3}N_{s,t}^{2}+\frac{1}{15}h^{3}W_{s,t}H_{s,t}$
$\displaystyle\hskip
7.11317pt-\frac{1}{60}h^{3}W_{s,t}N_{s,t}+\frac{3}{175}h^{3}H_{s,t}Z_{s,u}+\frac{2}{3}h^{2}W_{s,t}^{3}H_{s,t}-\frac{1}{10}h^{2}W_{s,t}H_{s,t}Z_{s,u}N_{s,t}$
$\displaystyle\hskip
7.11317pt-\frac{1}{6}h^{2}W_{s,t}^{3}N_{s,t}+\frac{12}{5}h^{2}W_{s,t}H_{s,t}^{3}-\frac{3}{20}h^{2}W_{s,t}N_{s,t}^{3}+\frac{12}{25}h^{2}H_{s,t}^{3}Z_{s,u}+\frac{4}{75}h^{2}H_{s,t}Z_{s,u}^{3}$
$\displaystyle\hskip
7.11317pt+\frac{2}{15}h^{2}W_{s,t}^{2}H_{s,t}Z_{s,u}-\frac{1}{2}h^{2}W_{s,t}^{2}H_{s,t}N_{s,t}+\frac{2}{5}h^{2}W_{s,t}H_{s,t}^{2}Z_{s,u}+\frac{4}{15}h^{2}W_{s,t}H_{s,t}Z_{s,u}^{2}$
$\displaystyle\hskip
7.11317pt+\frac{3}{5}h^{2}W_{s,t}H_{s,t}N_{s,t}^{2}-\frac{3}{5}h^{2}W_{s,t}H_{s,t}^{2}N_{s,t}-\frac{1}{15}h^{2}W_{s,t}Z_{s,u}^{2}N_{s,t}+\frac{3}{25}h^{2}H_{s,t}Z_{s,u}N_{s,t}^{2}\hskip
0.7113pt.$

By taking the expectation of the above terms conditional on
$\big{(}W_{s,t}\hskip 0.7113pt,H_{s,t}\hskip 0.7113pt,n_{s,t}\big{)}$ and
substituting in the moments of $N_{s,t}\,|\,n_{s,t}$ given by (71) and (72),
it follows that

$\displaystyle\mathbb{E}\bigg{[}\bigg{(}\int_{s}^{t}W_{s,r}^{2}\,dr\bigg{)}^{2}\,\Big{|}\,W_{s,t}\hskip
0.7113pt,H_{s,t}\hskip 0.7113pt,n_{s,t}\hskip 0.7113pt\bigg{]}$
$\displaystyle\hskip
14.22636pt=\mathbb{E}\bigg{[}\mathbb{E}\bigg{[}\bigg{(}\int_{s}^{t}W_{s,r}^{2}\,dr\bigg{)}^{2}\,\Big{|}\,W_{s,u}\hskip
0.7113pt,W_{u,t}\hskip 0.7113pt,H_{s,u}\hskip 0.7113pt,H_{u,t}\hskip
0.7113pt\bigg{]}\,\bigg{|}\,W_{s,t}\hskip 0.7113pt,H_{s,t}\hskip
0.7113pt,n_{s,t}\hskip 0.7113pt\bigg{]}$ $\displaystyle\hskip
14.22636pt=\frac{13}{2100}h^{4}+\frac{1}{9}h^{2}W_{s,t}^{4}+\frac{36}{25}h^{2}H_{s,t}^{4}+\frac{9}{5}h^{2}W_{s,t}^{2}H_{s,t}^{2}+\frac{1}{20}h^{3}W_{s,t}^{2}+\frac{29}{175}h^{3}H_{s,t}^{2}$
$\displaystyle\hskip
42.67912pt+\frac{2}{15}h^{3}W_{s,t}H_{s,t}+\frac{12}{5}h^{2}W_{s,t}H_{s,t}^{3}+\frac{2}{3}h^{2}W_{s,t}^{3}H_{s,t}$
$\displaystyle\hskip
42.67912pt-\frac{1}{\sqrt{6\pi}}n_{s,t}h^{\frac{5}{2}}\bigg{(}\frac{1}{6}W_{s,t}^{3}+\frac{11}{240}hW_{s,t}+\frac{1}{2}W_{s,t}^{2}H_{s,t}+\frac{3}{5}W_{s,t}H_{s,t}^{2}\bigg{)}\hskip
0.7113pt.$

Thus, we can compute the required conditional variance using the following
identity:

$\displaystyle\operatorname{Var}\bigg{(}\int_{s}^{t}W_{s,r}^{2}\,dr\,\Big{|}\,W_{s,t}\hskip
0.7113pt,H_{s,t}\hskip 0.7113pt,n_{s,t}\hskip 0.7113pt\bigg{)}$
$\displaystyle\hskip
14.22636pt=\mathbb{E}\bigg{[}\bigg{(}\int_{s}^{t}W_{s,r}^{2}\,dr\bigg{)}^{2}\,\Big{|}\,W_{s,t}\hskip
0.7113pt,H_{s,t}\hskip 0.7113pt,n_{s,t}\hskip
0.7113pt\bigg{]}-\bigg{(}\mathbb{E}\bigg{[}\int_{s}^{t}W_{s,r}^{2}\,dr\,\Big{|}\,W_{s,t}\hskip
0.7113pt,H_{s,t}\hskip 0.7113pt,n_{s,t}\hskip 0.7113pt\bigg{]}\bigg{)}^{2}.$

Plugging in the expressions for these conditional moments and simplifying
terms gives

$\displaystyle\operatorname{Var}\bigg{(}\int_{s}^{t}W_{s,r}^{2}\,dr\,\Big{|}\,W_{s,t}\hskip
0.7113pt,H_{s,t}\hskip 0.7113pt,n_{s,t}\hskip 0.7113pt\bigg{)}$
$\displaystyle\hskip
14.22636pt=\frac{13}{2100}h^{4}+\frac{1}{9}h^{2}W_{s,t}^{4}+\frac{36}{25}h^{2}H_{s,t}^{4}+\frac{9}{5}h^{2}W_{s,t}^{2}H_{s,t}^{2}+\frac{1}{20}h^{3}W_{s,t}^{2}+\frac{29}{175}h^{3}H_{s,t}^{2}$
$\displaystyle\hskip 42.67912pt\hskip
14.22636pt+\frac{2}{15}h^{3}W_{s,t}H_{s,t}+\frac{12}{5}h^{2}W_{s,t}H_{s,t}^{3}+\frac{2}{3}h^{2}W_{s,t}^{3}H_{s,t}$
$\displaystyle\hskip 42.67912pt\hskip
14.22636pt-\frac{1}{\sqrt{6\pi}}n_{s,t}h^{\frac{5}{2}}\bigg{(}\frac{1}{6}W_{s,t}^{3}+\frac{11}{240}hW_{s,t}+\frac{1}{2}W_{s,t}^{2}H_{s,t}+\frac{3}{5}W_{s,t}H_{s,t}^{2}\bigg{)}$
$\displaystyle\hskip 42.67912pt\hskip
14.22636pt-\bigg{(}\frac{1}{3}hW_{s,t}+hW_{s,t}H_{s,t}+\frac{1}{15}h^{2}+\frac{6}{5}hH_{s,t}^{2}-\frac{1}{4\sqrt{6\pi}}\hskip
0.7113ptn_{s,t}\hskip 0.7113pth^{\frac{3}{2}}W_{s,t}\bigg{)}^{2}$
$\displaystyle\hskip
14.22636pt=\frac{11}{6300}h^{4}+\Big{(}\frac{1}{180}-\frac{1}{96\pi}\Big{)}h^{3}W_{s,t}^{2}+\frac{1}{175}h^{3}H_{s,t}^{2}-\frac{1}{80\sqrt{6\pi}}\hskip
0.7113ptn_{s,t}\hskip 0.7113pth^{\frac{7}{2}}W_{s,t}\hskip 0.7113pt.$

The result now follows as, by (63), the above is the conditional variance of
$2L_{s,t}$.

In the construction of the piecewise linear paths defined by (28) and (32),
there are two distinct solutions which result in paths with the required
iterated integrals. To decide on the solution, we consider the “space-time-
time” Lévy area of the path. Whilst this quantity is Gaussian for Brownian
motion and can be exactly generated, it is asymptotically smaller than space-
space-time Lévy area, and so less impactful. Therefore, we propose using the
expectation of space-time-time Lévy area conditional on $\big{(}W_{s,t}\hskip
0.7113pt,H_{s,t}\hskip 0.7113pt,n_{s,t}\big{)}$ and choosing the path $\gamma$
which best matches this approximation.

######  Definition B.6.

The rescaled space-time-time Lévy area of Brownian motion over an interval
$[s,t]$ is defined as

$\displaystyle K_{s,t}$
$\displaystyle:=\frac{1}{h^{2}}\int_{s}^{t}\bigg{(}W_{s,u}-\frac{u-s}{h}\,W_{s,t}\bigg{)}\bigg{(}\frac{1}{2}h-(u-s)\bigg{)}du\hskip
0.7113pt.$

Figure 9: Space-time-time Lévy area corresponds to a cubic approximation of
the Brownian arch (which is a Brownian motion conditioned on having zero
increment and space-time Lévy area [29]).

Since $W_{s,t}\hskip 0.7113pt,H_{s,t}$ and $K_{s,t}$ can be identified with
coefficients from a polynomial expansion of Brownian motion, it is
straightforward to establish their independence. However, $K_{s,t}$ is not
independent of $n_{s,t}$ and we can compute the following moments:

######  Theorem B.7.

The space-time-time Lévy area $K_{s,t}$ is independent of $(W_{s,t}\hskip
0.7113pt,H_{s,t})$ and has the following distribution and conditional moments,

(73) $\displaystyle\hskip 3.55658ptK_{s,t}$
$\displaystyle\sim\mathcal{N}\Big{(}0,\frac{1}{720}h\Big{)},$ (74)
$\displaystyle\mathbb{E}\big{[}K_{s,t}\,|\,n_{s,t}\big{]}$
$\displaystyle=\frac{1}{8\sqrt{6\pi}}\hskip
0.7113ptn_{s,t}h^{\frac{1}{2}}\hskip 0.7113pt,\hskip 3.55658pt$ (75)
$\displaystyle\mathbb{E}\big{[}K_{s,t}^{2}\,|\,n_{s,t}\big{]}$
$\displaystyle=\frac{1}{720}h\hskip 0.7113pt.\hskip 3.55658pt$

######  Proof B.8.

It was shown in [29, Theorem 2.2], that for a Brownian bridge $B$ on $[0,1]$
and certain orthogonal polynomials $e_{1}$ and $e_{2}\hskip 0.7113pt$, we have

$\displaystyle I_{1}$
$\displaystyle:=\int_{0}^{1}B_{t}\cdot\frac{e_{1}(t)}{t(1-t)}\hskip
0.7113ptdt\hskip 8.53581pt\text{and}\hskip
7.8245ptI_{2}:=\int_{0}^{1}B_{t}\cdot\frac{e_{2}(t)}{t(1-t)}\hskip 0.7113ptdt$

are independent random variables with
$I_{1}\sim\mathcal{N}\big{(}0,\frac{1}{2}\big{)}$ and
$I_{1}\sim\mathcal{N}\big{(}0,\frac{1}{6}\big{)}$. Moreover, by Theorems 2.7
and 2.8 in [29], the orthogonal polynomials $e_{1}$ and $e_{2}$ are given by

$\displaystyle e_{1}(t)$ $\displaystyle=\sqrt{6}\hskip 0.7113ptt(t-1),$
$\displaystyle e_{2}(t)$ $\displaystyle=\sqrt{30}\hskip 0.7113ptt(t-1)(2t-1).$

Thus $I_{1}=\sqrt{6}\int_{0}^{1}B_{t}\hskip 0.7113ptdt$ and
$I_{2}=2\sqrt{30}\int_{0}^{1}B_{t}(t-\frac{1}{2})\hskip 0.7113ptdt$. It
therefore follows that

$\displaystyle\int_{0}^{1}B_{t}\hskip
0.7113ptdt\sim\mathcal{N}\Big{(}0,\frac{1}{12}\Big{)}\hskip
8.53581pt\text{and}\hskip
7.11317pt\int_{0}^{1}B_{t}\Big{(}\frac{1}{2}-t\Big{)}\hskip
0.7113ptdt\sim\mathcal{N}\Big{(}0,\frac{1}{720}\Big{)}$

are independent. By the standard Brownian scaling, this implies
$H_{s,t}\sim\mathcal{N}\big{(}0,\frac{1}{12}h\big{)}$ and
$K_{s,t}\sim\mathcal{N}\big{(}0,\frac{1}{720}h\big{)}$ are independent.
Moreover, since $H_{s,t}$ and $K_{s,t}$ are functions of the Brownian bridge
$\big{\\{}W_{s,u}-\frac{u-s}{h}W_{s,t}\big{\\}}_{u\in[s,t]}\hskip 0.7113pt$,
they are also independent of $W_{s,t}$. We will now compute the expectation of
$K_{s,t}$ conditional on $(W_{s,u}\hskip 0.7113pt,W_{u,t}\hskip
0.7113pt,H_{s,u}\hskip 0.7113pt,H_{u,t}\hskip 0.7113pt)$.

$\displaystyle h^{2}\hskip
0.7113pt\mathbb{E}\Big{[}K_{s,t}\,\big{|}\,W_{s,u}\hskip
0.7113pt,W_{u,t}\hskip 0.7113pt,H_{s,u}\hskip 0.7113pt,H_{u,t}\hskip
0.7113pt\Big{]}$ $\displaystyle\hskip
14.22636pt=\mathbb{E}\bigg{[}\int_{s}^{t}\bigg{(}W_{s,r}-\frac{r-s}{h}\,W_{s,t}\bigg{)}\bigg{(}\frac{1}{2}h-(r-s)\bigg{)}dr\hskip
0.7113pt\Big{|}\,W_{s,u}\hskip 0.7113pt,W_{u,t}\hskip 0.7113pt,H_{s,u}\hskip
0.7113pt,H_{u,t}\hskip 0.7113pt\bigg{]}$ $\displaystyle\hskip
14.22636pt=\frac{1}{2}h\int_{s}^{t}W_{s,r}\,dr-\mathbb{E}\bigg{[}\int_{s}^{t}W_{s,r}(r-s)\hskip
0.7113ptdr\hskip 0.7113pt\Big{|}\,W_{s,u}\hskip 0.7113pt,W_{u,t}\hskip
0.7113pt,H_{s,u}\hskip 0.7113pt,H_{u,t}\hskip
0.7113pt\bigg{]}+\frac{1}{12}h^{2}W_{s,t}$ $\displaystyle\hskip
14.22636pt=\frac{1}{3}h^{2}W_{s,t}+\frac{1}{2}h^{2}H_{s,t}-\mathbb{E}\bigg{[}\int_{s}^{u}W_{s,r}(r-s)\hskip
0.7113ptdr\hskip 0.7113pt\Big{|}\,W_{s,u}\hskip 0.7113pt,H_{s,u}\hskip
0.7113pt\bigg{]}-W_{s,u}\int_{u}^{t}(r-s)\hskip 0.7113ptdr$
$\displaystyle\hskip
42.67912pt-\mathbb{E}\bigg{[}\int_{u}^{t}W_{u,r}(r-s)\hskip 0.7113ptdr\hskip
0.7113pt\Big{|}\,W_{u,t}\hskip 0.7113pt,H_{u,t}\hskip 0.7113pt\bigg{]}$
$\displaystyle\hskip
14.22636pt=\frac{1}{3}h^{2}W_{s,t}+\frac{1}{2}h^{2}H_{s,t}-\int_{s}^{u}\mathbb{E}\big{[}W_{s,r}\hskip
0.7113pt\big{|}\,W_{s,u}\hskip 0.7113pt,H_{s,u}\hskip
0.7113pt\big{]}(r-s)\hskip 0.7113ptdr-\frac{3}{8}h^{2}W_{s,u}$
$\displaystyle\hskip 42.67912pt-\int_{u}^{t}\mathbb{E}\big{[}W_{u,r}\hskip
0.7113pt\big{|}\,W_{u,t}\hskip 0.7113pt,H_{u,t}\hskip
0.7113pt\big{]}(r-u)\hskip 0.7113ptdr-\int_{u}^{t}W_{u,r}(u-s)\hskip
0.7113ptdr.$

In [29], it was shown that $\mathbb{E}\big{[}W_{s,r}\hskip
0.7113pt|\,W_{s,t}\hskip 0.7113pt,H_{s,t}\hskip
0.7113pt\big{]}=\frac{r-s}{t-s}\hskip
0.7113ptW_{s,t}+\frac{6(r-s)(t-r)}{(t-s)^{2}}\hskip 0.7113ptH_{s,t}$ for
$r\in[s,t]$. Therefore, plugging this into the previous equation gives

$\displaystyle h^{2}\hskip
0.7113pt\mathbb{E}\Big{[}K_{s,t}\,\big{|}\,W_{s,u}\hskip
0.7113pt,W_{u,t}\hskip 0.7113pt,H_{s,u}\hskip 0.7113pt,H_{u,t}\hskip
0.7113pt\Big{]}$
$\displaystyle=\frac{1}{3}h^{2}W_{s,t}+\frac{1}{2}h^{2}H_{s,t}-\frac{1}{12}h^{2}W_{s,u}-\frac{1}{8}h^{2}H_{s,u}-\frac{3}{8}h^{2}W_{s,u}$
$\displaystyle\hskip
14.22636pt-\frac{1}{12}h^{2}W_{u,t}-\frac{1}{8}h^{2}H_{u,t}-\frac{1}{2}h\bigg{(}\frac{1}{4}hW_{u,t}+\frac{1}{2}hH_{u,t}\bigg{)}$
$\displaystyle=\frac{1}{2}h^{2}H_{s,t}-\Big{(}\frac{1}{4}h^{2}H_{s,u}+\frac{1}{4}h^{2}H_{u,t}+\frac{1}{8}h^{2}W_{u,t}-\frac{1}{8}h^{2}W_{s,u}\Big{)}+\frac{1}{8}h^{2}H_{s,u}-\frac{1}{8}h^{2}H_{u,t}\hskip
0.7113pt.$

By equation (64) in the previous proof, we see that the first two terms
cancel. Thus

$\mathbb{E}\big{[}K_{s,t}\,\big{|}\,W_{s,u}\hskip 0.7113pt,W_{u,t}\hskip
0.7113pt,H_{s,u}\hskip 0.7113pt,H_{u,t}\hskip
0.7113pt\big{]}=\frac{1}{8}N_{s,t}\hskip 0.7113pt,$

and so the desired result (74) now follows as

$\displaystyle\mathbb{E}\big{[}K_{s,t}\,|\,W_{s,t}\hskip
0.7113pt,H_{s,t}\hskip 0.7113pt,n_{s,t}\hskip 0.7113pt\big{]}$
$\displaystyle=\mathbb{E}\big{[}\mathbb{E}\big{[}K_{s,t}\,\big{|}\,W_{s,u}\hskip
0.7113pt,W_{u,t}\hskip 0.7113pt,H_{s,u}\hskip 0.7113pt,H_{u,t}\hskip
0.7113pt\big{]}\,|\,W_{s,t}\hskip 0.7113pt,H_{s,t}\hskip
0.7113pt,n_{s,t}\hskip 0.7113pt\big{]}$ $\displaystyle=\frac{1}{8}\hskip
0.7113pt\mathbb{E}\big{[}N_{s,t}\,|\,W_{s,t}\hskip 0.7113pt,H_{s,t}\hskip
0.7113pt,n_{s,t}\hskip 0.7113pt\big{]}$
$\displaystyle=\frac{1}{8\sqrt{6\pi}}n_{s,t}h^{\frac{1}{2}}\hskip 0.7113pt,$

by the independence of $\big{(}W_{s,t}\hskip 0.7113pt,H_{s,t}\hskip
0.7113pt,N_{s,t}\big{)}$ and equation (71), which were established in the
proof of Theorem B.4. Finally, we note that $K_{s,t}^{2}$ does not change if
$W$ is replaced by $-W$, whereas $n_{s,t}$ changes sign when the Brownian
motion is “flipped”. So by the symmetry of $W$, the random variables
$K_{s,t}^{2}$ and $n_{s,t}$ are uncorrelated. Thus

$\displaystyle\underbrace{\mathbb{E}\big{[}K_{s,t}^{2}n_{s,t}\big{]}}_{=\,0}$
$\displaystyle=\frac{1}{2}\hskip 0.7113pt\mathbb{E}\big{[}K_{s,t}^{2}\hskip
0.7113pt|\hskip 0.7113ptn_{s,t}=1\hskip 0.7113pt\big{]}+\frac{1}{2}\hskip
0.7113pt\mathbb{E}\big{[}-K_{s,t}^{2}\hskip 0.7113pt|\hskip
0.7113ptn_{s,t}=-1\big{]},$
$\displaystyle\underbrace{\mathbb{E}\big{[}K_{s,t}^{2}\big{]}}_{=\,\frac{1}{720}h}$
$\displaystyle=\frac{1}{2}\hskip 0.7113pt\mathbb{E}\big{[}K_{s,t}^{2}\hskip
0.7113pt|\hskip 0.7113ptn_{s,t}=1\hskip 0.7113pt\big{]}+\frac{1}{2}\hskip
0.7113pt\mathbb{E}\big{[}K_{s,t}^{2}\hskip 0.7113pt|\hskip
0.7113ptn_{s,t}=-1\hskip 0.7113pt\big{]},$

gives the desired conditional moment (75).

Finally, using these optimal estimators for $L_{s,t}$ and $K_{s,t}\hskip
0.7113pt$, we give the theoretical justification for the choices of piecewise
linear paths previously used in (28) and (32). These paths match
$\mathbb{E}\big{[}L_{s,t}\hskip 0.7113pt|\hskip 0.7113ptW_{s,t}\hskip
0.7113pt,H_{s,t}\hskip 0.7113pt,n_{s,t}\big{]}$ and correlate with
$\mathbb{E}\big{[}K_{s,t}\hskip 0.7113pt|\hskip 0.7113ptW_{s,t}\hskip
0.7113pt,H_{s,t}\hskip 0.7113pt,n_{s,t}\big{]}$.

######  Theorem B.9.

Consider the $(W_{s,t}\hskip 0.7113pt,H_{s,t}\hskip
0.7113pt,n_{s,t})$-measurable piecewise linear paths
$\gamma=(\gamma^{\tau},\gamma^{\hskip
0.7113pt\omega}):[0,1]\rightarrow\mathbb{R}^{2}\hskip 0.7113pt$, $\hskip
0.7113pt\widetilde{\gamma}=(\widetilde{\gamma}^{\tau},\widetilde{\gamma}^{\hskip
0.7113pt\omega}):[0,1]\rightarrow\mathbb{R}^{2}\hskip 0.7113pt$ given by
$\hskip 0.7113pt\gamma_{0}=\widetilde{\gamma}_{0}=(s,W_{s})\hskip 0.7113pt$
and

(76) $\displaystyle\gamma_{r_{i},r_{i+1}}$
$\displaystyle:=\begin{cases}\big{(}0,A_{s,t}\big{)},&\text{if
}\,i=0\\\\[6.0pt] \big{(}h,B_{s,t}\big{)},&\text{if }\,i=1\\\\[6.0pt]
\big{(}0,W_{s,t}-A_{s,t}-B_{s,t}\big{)},&\text{if }\,i=2,\end{cases}$ (77)
$\displaystyle\widetilde{\gamma}_{r_{i},r_{i+1}}$
$\displaystyle:=\begin{cases}\big{(}0,C_{s,t}\big{)},&\text{if
}\,i=0\\\\[6.0pt] \big{(}\frac{1}{2}h,0\big{)},&\text{if }\,i=1\\\\[6.0pt]
\big{(}0,D_{s,t}\big{)},&\text{if }\,i=2\\\\[6.0pt]
\big{(}\frac{1}{2}h,0\big{)},&\text{if }\,i=3\\\\[6.0pt]
\big{(}0,W_{s,t}-C_{s,t}-D_{s,t}\big{)},&\text{if }\,i=4,\end{cases}$

where $h=t-s$ and

$\displaystyle\big{(}A_{s,t}\hskip 0.7113pt,B_{s,t}\big{)}$
$\displaystyle=\operatorname*{arg\,min}_{\begin{subarray}{c}(A,\hskip
0.7113ptB)\hskip 0.7113pt\in\hskip
0.7113pt\mathbb{R}^{2}\,\text{s.t.~{}constraints}\\\\[3.0pt]
(\ref{eq:constraint1}),\,(\ref{eq:constraint2}),\,(\ref{eq:constraint3})\text{
hold}\end{subarray}}\,\bigg{|}\int_{0}^{1}\gamma_{0,r}^{\tau}\hskip
0.7113pt\gamma_{0,r}^{\hskip
0.7113pt\omega}\,d\gamma^{\tau}_{r}-\mathbb{E}\bigg{[}\int_{s}^{t}(u-s)W_{s,u}\hskip
0.7113ptdu\,\Big{|}\,W_{s,t},H_{s,t},n_{s,t}\bigg{]}\bigg{|}\hskip 0.7113pt,$
$\displaystyle\big{(}C_{s,t}\hskip 0.7113pt,D_{s,t}\big{)}$
$\displaystyle=\operatorname*{arg\,min}_{\begin{subarray}{c}(C,\hskip
0.7113ptD)\hskip 0.7113pt\in\hskip
0.7113pt\mathbb{R}^{2}\,\text{s.t.~{}constraints}\\\\[3.0pt]
(\ref{eq:constraint1}),\,(\ref{eq:constraint2}),\,(\ref{eq:constraint3})\text{
hold}\end{subarray}}\,\bigg{|}\int_{0}^{1}\widetilde{\gamma}_{0,r}^{\tau}\hskip
0.7113pt\widetilde{\gamma}_{0,r}^{\hskip 0.7113pt\omega}\,d\hskip
0.7113pt\widetilde{\gamma}^{\tau}_{r}-\mathbb{E}\bigg{[}\int_{s}^{t}(u-s)W_{s,u}\hskip
0.7113ptdu\,\Big{|}\,W_{s,t},H_{s,t},n_{s,t}\bigg{]}\bigg{|}\hskip 0.7113pt.$

with the constraints (78), (79) and (80) for the paths $\gamma$ and
$\widetilde{\gamma}$ given by

(78) $\displaystyle\gamma_{1}^{\hskip 0.7113pt\omega}-\gamma_{0}^{\hskip
0.7113pt\omega}$ $\displaystyle=\widetilde{\gamma}_{1}^{\hskip
0.7113pt\omega}-\widetilde{\gamma}_{0}^{\hskip 0.7113pt\omega}=W_{s,t}\hskip
0.7113pt,$ (79) $\displaystyle\int_{0}^{1}\big{(}\gamma^{\hskip
0.7113pt\omega}_{r}-\gamma^{\hskip 0.7113pt\omega}_{0}\big{)}\hskip
0.7113ptd\gamma^{\tau}_{r}$
$\displaystyle=\int_{0}^{1}\big{(}\widetilde{\gamma}^{\hskip
0.7113pt\omega}_{r}-\widetilde{\gamma}^{\hskip
0.7113pt\omega}_{0}\big{)}\hskip 0.7113ptd\hskip
0.7113pt\widetilde{\gamma}^{\tau}_{r}=\int_{s}^{t}W_{s,u}\hskip
0.7113ptdu\hskip 0.7113pt,$ (80)
$\displaystyle\int_{0}^{1}\big{(}\gamma^{\hskip
0.7113pt\omega}_{r}-\gamma^{\hskip 0.7113pt\omega}_{0}\big{)}^{2}\hskip
0.7113ptd\gamma^{\tau}_{r}$
$\displaystyle=\int_{0}^{1}\big{(}\widetilde{\gamma}^{\hskip
0.7113pt\omega}_{r}-\widetilde{\gamma}^{\hskip
0.7113pt\omega}_{0}\big{)}^{2}\hskip 0.7113ptd\hskip
0.7113pt\widetilde{\gamma}^{\tau}_{r}=\mathbb{E}\bigg{[}\int_{s}^{t}W_{s,u}^{2}\hskip
0.7113ptdu\,\Big{|}\,W_{s,t}\hskip 0.7113pt,H_{s,t}\hskip
0.7113pt,n_{s,t}\bigg{]}.$

Then the first increments, $A_{s,t}$ and $C_{s,t}$ , of the piecewise linear
paths $\gamma$ and $\widetilde{\gamma}$ are

$\displaystyle A_{s,t}$
$\displaystyle:=\frac{1}{2}W_{s,t}+H_{s,t}-\frac{1}{2}B_{s,t}\hskip 0.7113pt,$
$\displaystyle C_{s,t}$
$\displaystyle:=\frac{1}{2}W_{s,t}+H_{s,t}-\frac{1}{2}D_{s,t}\hskip 0.7113pt,$

where the second increments, $B_{s,t}$ and $D_{s,t}$ , of the paths are given
by the formulae

$\displaystyle B_{s,t}$
$\displaystyle:=\epsilon_{s,t}\bigg{(}W_{s,t}^{2}+\frac{12}{5}H_{s,t}^{2}+\frac{4}{5}h-\frac{3}{\sqrt{6\pi}}h^{\frac{1}{2}}n_{s,t}W_{s,t}\bigg{)}^{\frac{1}{2}},$
$\displaystyle D_{s,t}$
$\displaystyle:=\epsilon_{s,t}\bigg{(}\frac{1}{3}W_{s,t}^{2}+\frac{4}{5}H_{s,t}^{2}+\frac{4}{15}h-\frac{1}{\sqrt{6\pi}}n_{s,t}h^{\frac{1}{2}}W_{s,t}\bigg{)}^{\frac{1}{2}},$
$\displaystyle\epsilon_{s,t}$
$\displaystyle:=\mathrm{sgn}\bigg{(}W_{s,t}-\frac{3}{\sqrt{24\pi}}h^{\frac{1}{2}}n_{s,t}\bigg{)}.$

######  Proof B.10.

Since $\gamma$ and $\widetilde{\gamma}$ are piecewise linear, it is simple to
compute the integrals

$\displaystyle\int_{0}^{1}(\gamma_{r}^{\hskip
0.7113pt\omega}-\gamma_{0}^{\hskip 0.7113pt\omega})\hskip
0.7113ptd\gamma^{\tau}_{r}$
$\displaystyle=h\Big{(}A_{s,t}+\frac{1}{2}B_{s,t}\Big{)},$
$\displaystyle\int_{0}^{1}(\gamma_{r}^{\hskip
0.7113pt\omega}-\gamma_{0}^{\hskip 0.7113pt\omega})^{2}\hskip
0.7113ptd\gamma^{\tau}_{r}$
$\displaystyle=h\Big{(}A_{s,t}^{2}+A_{s,t}B_{s,t}+\frac{1}{3}B_{s,t}^{2}\Big{)},$
$\displaystyle\int_{0}^{1}(\widetilde{\gamma}_{r}^{\hskip
0.7113pt\omega}-\widetilde{\gamma}_{0}^{\hskip 0.7113pt\omega})\hskip
0.7113ptd\hskip 0.7113pt\widetilde{\gamma}^{\tau}_{r}$
$\displaystyle=h\Big{(}C_{s,t}+\frac{1}{2}D_{s,t}\Big{)},$
$\displaystyle\int_{0}^{1}(\widetilde{\gamma}_{r}^{\hskip
0.7113pt\omega}-\widetilde{\gamma}_{0}^{\hskip 0.7113pt\omega})^{2}\hskip
0.7113ptd\hskip 0.7113pt\widetilde{\gamma}^{\tau}_{r}$
$\displaystyle=h\Big{(}C_{s,t}^{2}+C_{s,t}D_{s,t}+\frac{1}{2}D_{s,t}^{2}\Big{)}.$

It follows from the constraints (79) and (80) with equations (62) and (63)
that

$\displaystyle h\Big{(}A_{s,t}+\frac{1}{2}B_{s,t}\Big{)}$
$\displaystyle=\frac{1}{2}hW_{s,t}+hH_{s,t}\hskip 0.7113pt,$ $\displaystyle
h\Big{(}A_{s,t}^{2}+A_{s,t}B_{s,t}+\frac{1}{3}B_{s,t}^{2}\Big{)}$
$\displaystyle=\frac{1}{3}hW_{s,t}^{2}+hW_{s,t}H_{s,t}+2\hskip
0.7113pt\mathbb{E}\big{[}L_{s,t}\,\big{|}\,W_{s,t}\hskip
0.7113pt,H_{s,t}\hskip 0.7113pt,n_{s,t}\big{]},$ $\displaystyle
h\Big{(}C_{s,t}+\frac{1}{2}D_{s,t}\Big{)}$
$\displaystyle=\frac{1}{2}hW_{s,t}+hH_{s,t}\hskip 0.7113pt,$ $\displaystyle
h\Big{(}C_{s,t}^{2}+C_{s,t}D_{s,t}+\frac{1}{2}D_{s,t}^{2}\Big{)}$
$\displaystyle=\frac{1}{3}hW_{s,t}^{2}+hW_{s,t}H_{s,t}+2\hskip
0.7113pt\mathbb{E}\big{[}L_{s,t}\,\big{|}\,W_{s,t}\hskip
0.7113pt,H_{s,t}\hskip 0.7113pt,n_{s,t}\big{]},$

So by Theorem B.4, substituting in the formula for the conditional expectation
yields

$\displaystyle A_{s,t}+\frac{1}{2}B_{s,t}$
$\displaystyle=\frac{1}{2}W_{s,t}+H_{s,t}\hskip 0.7113pt,$ $\displaystyle
A_{s,t}^{2}+A_{s,t}B_{s,t}+\frac{1}{3}B_{s,t}^{2}$
$\displaystyle=\frac{1}{3}W_{s,t}^{2}+W_{s,t}H_{s,t}+\frac{1}{15}h+\frac{6}{5}H_{s,t}^{2}-\frac{1}{4\sqrt{6\pi}}n_{s,t}h^{\frac{1}{2}}W_{s,t}\hskip
0.7113pt,$ $\displaystyle C_{s,t}+\frac{1}{2}D_{s,t}$
$\displaystyle=\frac{1}{2}W_{s,t}+H_{s,t}\hskip 0.7113pt,$ $\displaystyle
C_{s,t}^{2}+C_{s,t}D_{s,t}+\frac{1}{2}D_{s,t}^{2}$
$\displaystyle=\frac{1}{3}W_{s,t}^{2}+W_{s,t}H_{s,t}+\frac{1}{15}h+\frac{6}{5}H_{s,t}^{2}-\frac{1}{4\sqrt{6\pi}}n_{s,t}h^{\frac{1}{2}}W_{s,t}\hskip
0.7113pt,$

Since
$a^{2}+ab+\frac{1}{3}b^{2}=\big{(}a+\frac{1}{2}b\big{)}^{2}+\frac{1}{12}b^{2}$
and
$c^{2}+cd+\frac{1}{3}d^{2}=\big{(}c+\frac{1}{2}d\big{)}^{2}+\frac{1}{4}d^{2}$,
this gives

$\displaystyle\frac{1}{12}B_{s,t}^{2}$
$\displaystyle=\frac{1}{3}W_{s,t}^{2}+W_{s,t}H_{s,t}+\frac{1}{15}h+\frac{6}{5}H_{s,t}^{2}-\frac{1}{4\sqrt{6\pi}}n_{s,t}h^{\frac{1}{2}}W_{s,t}-\Big{(}\frac{1}{2}W_{s,t}+H_{s,t}\Big{)}^{2},$
$\displaystyle\frac{1}{4}D_{s,t}^{2}$
$\displaystyle=\frac{1}{3}W_{s,t}^{2}+W_{s,t}H_{s,t}+\frac{1}{15}h+\frac{6}{5}H_{s,t}^{2}-\frac{1}{4\sqrt{6\pi}}n_{s,t}h^{\frac{1}{2}}W_{s,t}-\Big{(}\frac{1}{2}W_{s,t}+H_{s,t}\Big{)}^{2},$

and so there are two possible values of $B_{s,t}$ and $D_{s,t}$ where (79) and
(80) hold,

$\displaystyle B_{s,t}$
$\displaystyle=\pm\sqrt{W_{s,t}^{2}+\frac{12}{5}H_{s,t}^{2}+\frac{4}{5}h-\frac{3}{\sqrt{6\pi}}n_{s,t}h^{\frac{1}{2}}W_{s,t}}\,,$
$\displaystyle D_{s,t}$
$\displaystyle=\pm\sqrt{\frac{1}{3}W_{s,t}^{2}+\frac{4}{5}H_{s,t}^{2}+\frac{4}{15}h-\frac{1}{\sqrt{6\pi}}n_{s,t}h^{\frac{1}{2}}W_{s,t}}\,.$

Thus, if equations (79) and (80) are satisfied, we have

$\displaystyle\int_{0}^{1}(\gamma_{r}^{\tau}-\gamma_{0}^{\tau})(\gamma_{r}^{\hskip
0.7113pt\omega}-\gamma_{0}^{\hskip 0.7113pt\omega})\hskip
0.7113ptd\gamma^{\tau}_{r}$
$\displaystyle=\frac{1}{2}h^{2}A_{s,t}+\frac{1}{3}h^{2}B_{s,t}$
$\displaystyle=\frac{1}{4}h^{2}W_{s,t}+\frac{1}{2}h^{2}H_{s,t}\pm\frac{1}{12}h^{2}\sqrt{W_{s,t}^{2}+\frac{12}{5}H_{s,t}^{2}+\frac{4}{5}h-\frac{3}{\sqrt{6\pi}}n_{s,t}h^{\frac{1}{2}}W_{s,t}}\hskip
0.7113pt,$
$\displaystyle\int_{0}^{1}(\widetilde{\gamma}_{r}^{\tau}-\widetilde{\gamma}_{0}^{\tau})(\widetilde{\gamma}_{r}^{\hskip
0.7113pt\omega}-\widetilde{\gamma}_{0}^{\hskip 0.7113pt\omega})\hskip
0.7113ptd\hskip 0.7113pt\widetilde{\gamma}^{\tau}_{r}$
$\displaystyle=\frac{1}{2}h^{2}C_{s,t}+\frac{3}{8}h^{2}D_{s,t}$
$\displaystyle=\frac{1}{4}h^{2}W_{s,t}+\frac{1}{2}h^{2}H_{s,t}\pm\frac{1}{8}h^{2}\sqrt{\frac{1}{3}W_{s,t}^{2}+\frac{4}{5}H_{s,t}^{2}+\frac{4}{15}h-\frac{1}{\sqrt{6\pi}}n_{s,t}h^{\frac{1}{2}}W_{s,t}}\hskip
0.7113pt.$

Using Theorem B.7, we can estimate the corresponding integral of Brownian
motion.

$\displaystyle\mathbb{E}\bigg{[}\int_{s}^{t}(u-s)W_{s,u}\hskip
0.7113ptdu\,\Big{|}\,W_{s,t}\hskip 0.7113pt,H_{s,t}\hskip
0.7113pt,n_{s,t}\bigg{]}$ $\displaystyle\hskip 14.22636pt\hskip
28.45274pt=\mathbb{E}\bigg{[}\frac{1}{2}h\int_{s}^{t}W_{s,u}\,du-\int_{s}^{t}\frac{u-s}{h}\,W_{s,t}\bigg{(}\frac{1}{2}h-(u-s)\bigg{)}du\,\Big{|}\,W_{s,t}\hskip
0.7113pt,H_{s,t}\hskip 0.7113pt,n_{s,t}\bigg{]}$ $\displaystyle\hskip
42.67912pt\hskip
28.45274pt-\mathbb{E}\bigg{[}\int_{s}^{t}\bigg{(}W_{s,u}-\frac{u-s}{h}\,W_{s,t}\bigg{)}\bigg{(}\frac{1}{2}h-(u-s)\bigg{)}du\,\Big{|}\,W_{s,t}\hskip
0.7113pt,H_{s,t}\hskip 0.7113pt,n_{s,t}\bigg{]}$ $\displaystyle\hskip
14.22636pt\hskip
28.45274pt=\frac{1}{3}h^{2}W_{s,t}+\frac{1}{2}h^{2}H_{s,t}-h^{2}\hskip
0.7113pt\mathbb{E}\big{[}K_{s,t}\,|\,n_{s,t}\big{]}$ $\displaystyle\hskip
14.22636pt\hskip
28.45274pt=\frac{1}{3}h^{2}W_{s,t}+\frac{1}{2}h^{2}H_{s,t}-\frac{1}{8\sqrt{6\pi}}\hskip
0.7113ptn_{s,t}h^{\frac{5}{2}}.$

Taking the difference between these integrals gives

$\displaystyle\Bigg{|}\int_{0}^{1}(\gamma_{r}^{\tau}-\gamma_{0}^{\tau})(\gamma_{r}^{\hskip
0.7113pt\omega}-\gamma_{0}^{\hskip 0.7113pt\omega})\hskip
0.7113ptd\gamma^{\tau}_{r}-\mathbb{E}\bigg{[}\int_{s}^{t}(u-s)W_{s,u}\hskip
0.7113ptdu\,\Big{|}\,W_{s,t}\hskip 0.7113pt,H_{s,t}\hskip
0.7113pt,n_{s,t}\bigg{]}\Bigg{|}$ $\displaystyle=\Bigg{|}\hskip
0.7113pt-\frac{1}{12}h^{2}W_{s,t}+\frac{1}{8\sqrt{6\pi}}\hskip
0.7113ptn_{s,t}h^{\frac{5}{2}}\pm\frac{1}{12}h^{2}\sqrt{W_{s,t}^{2}+\frac{12}{5}H_{s,t}^{2}+\frac{4}{5}h-\frac{3}{\sqrt{6\pi}}n_{s,t}h^{\frac{1}{2}}W_{s,t}}\,\hskip
0.7113pt\Bigg{|}\hskip 0.7113pt,$

and

$\displaystyle\Bigg{|}\int_{0}^{1}(\widetilde{\gamma}_{r}^{\tau}-\widetilde{\gamma}_{0}^{\tau})(\widetilde{\gamma}_{r}^{\hskip
0.7113pt\omega}-\widetilde{\gamma}_{0}^{\hskip 0.7113pt\omega})\hskip
0.7113ptd\hskip
0.7113pt\widetilde{\gamma}^{\tau}_{r}-\mathbb{E}\bigg{[}\int_{s}^{t}(u-s)W_{s,u}\hskip
0.7113ptdu\,\Big{|}\,W_{s,t}\hskip 0.7113pt,H_{s,t}\hskip
0.7113pt,n_{s,t}\bigg{]}\Bigg{|}$ $\displaystyle=\Bigg{|}\hskip
0.7113pt-\frac{1}{12}h^{2}W_{s,t}+\frac{1}{8\sqrt{6\pi}}\hskip
0.7113ptn_{s,t}h^{\frac{5}{2}}\pm\frac{1}{8}h^{2}\sqrt{\frac{1}{3}W_{s,t}^{2}+\frac{4}{5}H_{s,t}^{2}+\frac{4}{15}h-\frac{1}{\sqrt{6\pi}}n_{s,t}h^{\frac{1}{2}}W_{s,t}}\,\hskip
0.7113pt\Bigg{|}\hskip 0.7113pt.$

Since we would like the path $\gamma$ to minimise this quantity, the optimal
choice of sign for the square root term is
$\epsilon_{s,t}:=\mathrm{sgn}\big{(}W_{s,t}-\frac{3}{\sqrt{24\pi}}h^{\frac{1}{2}}n_{s,t}\big{)}$,
and the result follows.

##  Appendix C Conditional moments of proposed CIR splitting method

In this section, we will compute the conditional mean and variance of the
proposed splitting method (5.1) for the CIR model (36). Recall that this
method is given by

$\displaystyle Y_{k}^{(1)}$
$\displaystyle:=e^{-\frac{3-\sqrt{3}}{6}ah}Y_{k}+\widetilde{b}\big{(}1-e^{-\frac{3-\sqrt{3}}{6}ah}\big{)},$
$\displaystyle Y_{k}^{(2)}$
$\displaystyle:=\bigg{(}\sqrt{Y_{k}^{(1)}}+\frac{\sigma}{2}\Big{(}\frac{1}{2}W_{k}+\sqrt{3}H_{k}\Big{)}\bigg{)}^{2},$
$\displaystyle Y_{k}^{(3)}$
$\displaystyle:=e^{-\frac{\sqrt{3}}{3}ah}Y_{k}^{(2)}+\widetilde{b}\big{(}1-e^{-\frac{\sqrt{3}}{3}ah}\big{)},$
$\displaystyle Y_{k}^{(4)}$
$\displaystyle:=\bigg{(}\sqrt{Y_{k}^{(3)}}+\frac{\sigma}{2}\Big{(}\frac{1}{2}W_{k}-\sqrt{3}H_{k}\Big{)}\bigg{)}^{2},$
(81) $\displaystyle Y_{k+1}$
$\displaystyle:=e^{-\frac{3-\sqrt{3}}{6}ah}Y_{k}^{(4)}+\widetilde{b}\big{(}1-e^{-\frac{3-\sqrt{3}}{6}ah}\big{)}.$

######  Theorem C.1.

The numerical solution given by (C) has the following moments:

(82) $\displaystyle\mathbb{E}[Y_{k+1}|Y_{k}]$
$\displaystyle=e^{-ah}Y_{k}+b\big{(}1-e^{-ah}\big{)}+R_{k}^{E}\hskip
0.7113pt,$ (83) $\displaystyle\operatorname{Var}(Y_{k+1}|Y_{k})$
$\displaystyle=\frac{\sigma^{2}}{a}\big{(}e^{-ah}-e^{-2ah}\big{)}Y_{k}+\frac{b\sigma^{2}}{2a}\big{(}1-e^{-ah}\big{)}^{2}+R_{k}^{V}\hskip
0.7113pt,$

where the remainder terms $R^{E}$ and $R_{k}^{V}$ are given by

$\displaystyle R_{k}^{E}$
$\displaystyle:=\frac{1}{4}\sigma^{2}\bigg{(}\frac{1}{2}\big{(}e^{-\frac{3+\sqrt{3}}{6}ah}+e^{-\frac{3-\sqrt{3}}{6}ah}\big{)}h-\frac{1-e^{-ah}}{a}\bigg{)},$
$\displaystyle R_{k}^{V}$
$\displaystyle:=\sigma^{2}\bigg{(}\frac{1}{2}\big{(}e^{-\frac{9+\sqrt{3}}{6}ah}+e^{-\frac{9-\sqrt{3}}{6}ah}\big{)}h-\frac{1}{a}\big{(}e^{-ah}-e^{-2ah}\big{)}\bigg{)}Y_{k}$
$\displaystyle\hskip 14.22636pt+\frac{1}{2}\hskip 0.7113pt\widetilde{b}\hskip
0.7113pt\sigma^{2}\Big{(}\big{(}e^{-\frac{3+\sqrt{3}}{3}ah}+e^{-\frac{3-\sqrt{3}}{3}ah}-e^{-\frac{9+\sqrt{3}}{6}ah}-e^{-\frac{9-\sqrt{3}}{6}ah}\big{)}h-\frac{1}{a}\big{(}1-e^{-ah}\big{)}^{2}\Big{)}$
$\displaystyle\hskip
14.22636pt+\frac{1}{8}\sigma^{4}\bigg{(}\frac{1}{2}\Big{(}e^{-ah}+\frac{1}{2}\big{(}e^{-\frac{3+\sqrt{3}}{3}ah}+e^{-\frac{3-\sqrt{3}}{3}ah}\big{)}\Big{)}h^{2}-\frac{1}{a^{2}}\big{(}1-e^{-ah}\big{)}^{2}\bigg{)},$

which can be estimated as $\hskip
0.7113pt\|R_{n}^{E}\|_{L^{2}(\mathbb{P})}\hskip
0.7113pt,\|R_{n}^{V}\|_{L^{2}(\mathbb{P})}\sim O(h^{5})\hskip 0.7113pt$ for
sufficiently small $h$.

######  Proof C.2.

We first note that $\frac{1}{2}W_{k}+\sqrt{3}H_{k}$ and
$\frac{1}{2}W_{k}-\sqrt{3}H_{k}$ are jointly normal and

$\displaystyle\mathbb{E}\Big{[}\Big{(}\frac{1}{2}W_{k}+\sqrt{3}H_{k}\Big{)}\Big{(}\frac{1}{2}W_{k}-\sqrt{3}H_{k}\Big{)}\Big{]}=\frac{1}{4}\cdot
h-3\cdot\frac{1}{12}h=0.$

It thus follows that $\frac{1}{2}W_{k}+\sqrt{3}H_{k}$ and
$\frac{1}{2}W_{k}-\sqrt{3}H_{k}$ are independent random variables. Therefore,
we see that in (C), the term $Y_{k}^{(3)}$ is independent of
$\frac{1}{2}W_{k}-\sqrt{3}H_{k}$ and so

$\displaystyle\mathbb{E}\big{[}\hskip 0.7113ptY_{k}^{(4)}\hskip
0.7113pt|\,Y_{k}\big{]}$ $\displaystyle=\mathbb{E}\big{[}\hskip
0.7113ptY_{k}^{(3)}\hskip 0.7113pt|\,Y_{k}\big{]}+\sigma\hskip
0.7113pt\mathbb{E}\Big{[}\big{(}Y_{k}^{(3)}\big{)}^{\frac{1}{2}}|\hskip
0.7113ptY_{k}\Big{]}\mathbb{E}\Big{[}\frac{1}{2}W_{k}-\sqrt{3}H_{k}|\hskip
0.7113ptY_{k}\Big{]}+\frac{1}{8}\sigma^{2}h$
$\displaystyle=\mathbb{E}\big{[}\hskip 0.7113ptY_{k}^{(3)}\hskip
0.7113pt|\,Y_{k}\big{]}+\frac{1}{8}\sigma^{2}h,$
$\displaystyle\mathbb{E}\Big{[}\big{(}Y_{k}^{(4)}\big{)}^{2}\hskip
0.7113pt|\,Y_{k}\Big{]}$
$\displaystyle=\mathbb{E}\Big{[}\big{(}Y_{k}^{(3)}\big{)}^{2}\hskip
0.7113pt|\,Y_{k}\Big{]}+\frac{3}{64}\sigma^{4}h^{2}+2\sigma\hskip
0.7113pt\mathbb{E}\Big{[}\big{(}Y_{k}^{(3)}\big{)}^{\frac{3}{2}}\hskip
0.7113pt|\,Y_{k}\Big{]}\mathbb{E}\Big{[}\frac{1}{2}W_{k}-\sqrt{3}H_{k}\Big{]}$
$\displaystyle\hskip 14.22636pt+\frac{3}{4}\sigma^{2}h\hskip
0.7113pt\mathbb{E}\big{[}\hskip 0.7113ptY_{k}^{(3)}\hskip
0.7113pt|\,Y_{k}\big{]}+\frac{1}{2}\sigma^{3}\hskip
0.7113pt\mathbb{E}\Big{[}\big{(}Y_{k}^{(3)}\big{)}^{\frac{1}{2}}|\hskip
0.7113ptY_{k}\Big{]}\mathbb{E}\Big{[}\Big{(}\frac{1}{2}W_{k}-\sqrt{3}H_{k}\Big{)}^{3}\,\Big{]}$
$\displaystyle=\mathbb{E}\Big{[}\big{(}Y_{k}^{(3)}\big{)}^{2}\hskip
0.7113pt|\,Y_{k}\Big{]}+\frac{3}{4}\sigma^{2}h\hskip
0.7113pt\mathbb{E}\big{[}\hskip 0.7113ptY_{k}^{(3)}\hskip
0.7113pt|\,Y_{k}\big{]}+\frac{3}{64}\sigma^{4}h^{2}.$

Using $\operatorname{Var}\big{(}Y_{k}^{(4)}\hskip
0.7113pt|\,Y_{k}\big{)}=\mathbb{E}\big{[}\big{(}Y_{k}^{(4)}\big{)}^{2}\hskip
0.7113pt|\,Y_{k}\big{]}-\big{(}\mathbb{E}\big{[}\hskip
0.7113ptY_{k}^{(4)}\hskip 0.7113pt|\,Y_{k}\big{]}\big{)}^{2}$, the conditional
variance is

$\displaystyle\operatorname{Var}\big{(}Y_{k}^{(4)}\hskip
0.7113pt|\,Y_{k}\big{)}$
$\displaystyle=\operatorname{Var}\big{(}Y_{k}^{(3)}\hskip
0.7113pt|\,Y_{k}\big{)}+\frac{1}{2}\sigma^{2}h\hskip
0.7113pt\mathbb{E}\big{[}\hskip 0.7113ptY_{k}^{(3)}\hskip
0.7113pt|\,Y_{k}\big{]}+\frac{1}{32}\sigma^{4}h^{2}.$

Similarly, by the same calculation, we also have that

$\displaystyle\mathbb{E}\big{[}\hskip 0.7113ptY_{k}^{(2)}\hskip
0.7113pt|\,Y_{k}\big{]}$ $\displaystyle=\mathbb{E}\big{[}\hskip
0.7113ptY_{k}^{(1)}\hskip 0.7113pt|\,Y_{k}\big{]}+\frac{1}{8}\sigma^{2}h,$
$\displaystyle\operatorname{Var}\big{(}Y_{k}^{(2)}\hskip
0.7113pt|\,Y_{k}\big{)}$
$\displaystyle=\operatorname{Var}\big{(}Y_{k}^{(1)}\hskip
0.7113pt|\,Y_{k}\big{)}+\frac{1}{2}\sigma^{2}h\hskip
0.7113pt\mathbb{E}\big{[}\hskip 0.7113ptY_{k}^{(1)}\hskip
0.7113pt|\,Y_{k}\big{]}+\frac{1}{32}\sigma^{4}h^{2}.$

Using the above, it is straightforward to compute the conditional expectation
of $Y_{k+1}\hskip 0.7113pt$.

$\displaystyle\mathbb{E}\big{[}\hskip 0.7113ptY_{k+1}\hskip
0.7113pt|\,Y_{k}\big{]}$ $\displaystyle=e^{-\frac{3-\sqrt{3}}{6}ah}\hskip
0.7113pt\mathbb{E}\big{[}\hskip 0.7113ptY_{k}^{(4)}\hskip
0.7113pt|\,Y_{k}\big{]}+\widetilde{b}\big{(}1-e^{-\frac{3-\sqrt{3}}{6}ah}\big{)}$
$\displaystyle=e^{-\frac{3-\sqrt{3}}{6}ah}\hskip
0.7113pt\mathbb{E}\big{[}\hskip 0.7113ptY_{k}^{(3)}\hskip
0.7113pt|\,Y_{k}\big{]}+\frac{1}{8}\sigma^{2}e^{-\frac{3-\sqrt{3}}{6}ah}+\widetilde{b}\big{(}1-e^{-\frac{3-\sqrt{3}}{6}ah}\big{)}$
$\displaystyle=e^{-\frac{3+\sqrt{3}}{6}ah}\hskip
0.7113pt\mathbb{E}\big{[}\hskip 0.7113ptY_{k}^{(2)}\hskip
0.7113pt|\,Y_{k}\big{]}+\widetilde{b}\big{(}1-e^{-\frac{3+\sqrt{3}}{6}ah}\big{)}+\frac{1}{8}\sigma^{2}he^{-\frac{3-\sqrt{3}}{6}ah}$
$\displaystyle=e^{-\frac{3+\sqrt{3}}{6}ah}\hskip
0.7113pt\mathbb{E}\big{[}\hskip 0.7113ptY_{k}^{(1)}\hskip
0.7113pt|\,Y_{k}\big{]}+\widetilde{b}\big{(}1-e^{-\frac{3+\sqrt{3}}{6}ah}\big{)}+\frac{1}{8}\sigma^{2}h\hskip
0.7113pt\big{(}e^{-\frac{3+\sqrt{3}}{6}ah}+e^{-\frac{3-\sqrt{3}}{6}ah}\big{)}$
$\displaystyle=e^{-ah}Y_{k}+\widetilde{b}\big{(}1-e^{-ah}\big{)}+\frac{1}{8}\sigma^{2}h\hskip
0.7113pte^{-\frac{3+\sqrt{3}}{6}ah}+\frac{1}{8}\sigma^{2}h\hskip
0.7113pte^{-\frac{3-\sqrt{3}}{6}ah}.$

Thus we obtain equation (82) as $\widetilde{b}=b-\frac{\sigma^{2}}{4a}$.
Taylor expanding the above terms gives

$\displaystyle\frac{1}{2}\big{(}e^{-\frac{3+\sqrt{3}}{6}ah}+e^{-\frac{3-\sqrt{3}}{6}ah}\big{)}h$
$\displaystyle\hskip 14.22636pt=\frac{1}{2}\Big{(}1-\frac{3+\sqrt{3}}{6}\hskip
0.7113ptah+\frac{2+\sqrt{3}}{12}\hskip
0.7113pt(ah)^{2}-\frac{9+5\sqrt{3}}{216}\hskip
0.7113pt(ah)^{3}+O(h^{4})\Big{)}h$ $\displaystyle\hskip
42.67912pt+\frac{1}{2}\Big{(}1-\frac{3-\sqrt{3}}{6}\hskip
0.7113ptah+\frac{2-\sqrt{3}}{12}\hskip
0.7113pt(ah)^{2}-\frac{9-5\sqrt{3}}{216}\hskip
0.7113pt(ah)^{3}+O(h^{4})\Big{)}h$ $\displaystyle\hskip
14.22636pt=h-\frac{1}{2}\hskip 0.7113ptah^{2}+\frac{1}{6}\hskip
0.7113pta^{2}h^{3}-\frac{1}{24}\hskip 0.7113pta^{3}h^{4}+O(h^{5})$
$\displaystyle\hskip 14.22636pt=\frac{1-e^{-ah}}{a}+O(h^{5}),$

which is the required estimate for $R_{k}^{E}\hskip 0.7113pt$. Similarly, we
compute the variance of $Y_{k+1}$ as

$\displaystyle\operatorname{Var}\big{(}Y_{k+1}\hskip 0.7113pt|\,Y_{k}\big{)}$
$\displaystyle\hskip
14.22636pt=e^{-\frac{3-\sqrt{3}}{3}ah}\operatorname{Var}\big{(}Y_{k}^{(4)}\hskip
0.7113pt|\,Y_{k}\big{)}$ $\displaystyle\hskip
14.22636pt=e^{-\frac{3-\sqrt{3}}{3}ah}\operatorname{Var}\big{(}Y_{k}^{(3)}|\hskip
0.7113ptY_{k}\big{)}+\frac{1}{2}\sigma^{2}e^{-\frac{3-\sqrt{3}}{3}ah}h\hskip
0.7113pt\mathbb{E}\big{[}\hskip 0.7113ptY_{k}^{(3)}\hskip
0.7113pt|\,Y_{k}\big{]}+\frac{1}{32}\sigma^{4}h^{2}\hskip
0.7113pte^{-\frac{3-\sqrt{3}}{3}ah}$ $\displaystyle\hskip
14.22636pt=e^{-\frac{3+\sqrt{3}}{3}ah}\operatorname{Var}\big{(}Y_{k}^{(2)}|\hskip
0.7113ptY_{k}\big{)}+\frac{1}{2}\sigma^{2}h\hskip 0.7113pte^{-ah}\hskip
0.7113pt\mathbb{E}\big{[}\hskip 0.7113ptY_{k}^{(2)}\hskip
0.7113pt|\,Y_{k}\big{]}+\frac{1}{2}\hskip 0.7113pt\widetilde{b}\hskip
0.7113pt\sigma^{2}h\hskip
0.7113pt\big{(}e^{-\frac{3-\sqrt{3}}{3}ah}-e^{-ah}\big{)}$
$\displaystyle\hskip 42.67912pt+\frac{1}{32}\sigma^{4}h^{2}\hskip
0.7113pte^{-\frac{3-\sqrt{3}}{3}ah}$ $\displaystyle\hskip
14.22636pt=e^{-\frac{3+\sqrt{3}}{3}ah}\operatorname{Var}\big{(}Y_{k}^{(1)}\hskip
0.7113pt|\,Y_{k}\big{)}+\frac{1}{2}\sigma^{2}h\hskip
0.7113pte^{-\frac{3+\sqrt{3}}{3}ah}\hskip 0.7113pt\mathbb{E}\big{[}\hskip
0.7113ptY_{k}^{(1)}\hskip
0.7113pt|\,Y_{k}\big{]}+\frac{1}{32}\sigma^{4}h^{2}\hskip
0.7113pte^{-\frac{3+\sqrt{3}}{3}ah}$ $\displaystyle\hskip
42.67912pt+\frac{1}{2}\sigma^{2}h\hskip 0.7113pte^{-ah}\hskip
0.7113pt\mathbb{E}\big{[}\hskip 0.7113ptY_{k}^{(1)}\hskip
0.7113pt|\,Y_{k}\big{]}+\frac{1}{16}\sigma^{4}h^{2}\hskip
0.7113pte^{-ah}+\frac{1}{2}\hskip 0.7113pt\widetilde{b}\hskip
0.7113pt\sigma^{2}h\hskip
0.7113pt\big{(}e^{-\frac{3-\sqrt{3}}{3}ah}-e^{-ah}\big{)}$
$\displaystyle\hskip 42.67912pt+\frac{1}{32}\sigma^{4}h^{2}\hskip
0.7113pte^{-\frac{3-\sqrt{3}}{3}ah},$

and therefore

$\displaystyle\operatorname{Var}\big{(}Y_{k+1}\hskip 0.7113pt|\,Y_{k}\big{)}$
$\displaystyle=\frac{1}{2}\sigma^{2}h\big{(}e^{-\frac{9+\sqrt{3}}{6}ah}+e^{-\frac{9-\sqrt{3}}{6}ah}\big{)}Y_{k}$
$\displaystyle\hskip 14.22636pt+\frac{1}{2}\hskip 0.7113pt\widetilde{b}\hskip
0.7113pt\sigma^{2}h\hskip
0.7113pt\big{(}e^{-\frac{3+\sqrt{3}}{3}ah}+e^{-\frac{3-\sqrt{3}}{3}ah}-e^{-\frac{9+\sqrt{3}}{6}ah}-e^{-\frac{9-\sqrt{3}}{6}ah}\big{)}$
$\displaystyle\hskip
14.22636pt+\frac{1}{16}\sigma^{4}h^{2}\Big{(}e^{-ah}+\frac{1}{2}\big{(}e^{-\frac{3+\sqrt{3}}{3}ah}+e^{-\frac{3-\sqrt{3}}{3}ah}\big{)}\Big{)}.$

Just as for $e^{-\frac{3+\sqrt{3}}{6}ah}+e^{-\frac{3-\sqrt{3}}{6}ah}$, we will
consider Taylor expansions of these terms.

$\displaystyle\frac{1}{2}\Big{(}e^{-\frac{3+\sqrt{3}}{3}ah}+e^{-\frac{3-\sqrt{3}}{3}ah}\Big{)}h$
$\displaystyle=\frac{1-e^{-2ah}}{2a}+O(h^{5}),$
$\displaystyle\frac{1}{2}\Big{(}e^{-\frac{9+\sqrt{3}}{6}ah}+e^{-\frac{9-\sqrt{3}}{6}ah}\Big{)}h$
$\displaystyle=e^{-ah}\Big{(}\frac{1-e^{-ah}}{a}\Big{)}+O(h^{5})$
$\displaystyle=\frac{1}{a}\big{(}e^{-ah}-e^{-2ah}\big{)}+O(h^{5}),$
$\displaystyle\frac{1}{2}\Big{(}e^{-ah}+\frac{1}{2}\big{(}e^{-\frac{3+\sqrt{3}}{3}ah}+e^{-\frac{3-\sqrt{3}}{3}ah}\big{)}\Big{)}h^{2}$
$\displaystyle=\frac{1}{2}\Big{(}1-ah+\frac{1}{2}(ah)^{2}+O(h^{3})\Big{)}h^{2}$
$\displaystyle\hskip
28.45274pt+\frac{1}{2}\Big{(}1-ah+\frac{2}{3}(ah)^{2}+O(h^{3})\Big{)}h^{2}$
$\displaystyle=h^{2}-ah^{3}+\frac{7}{12}a^{2}h^{4}+O(h^{5})$
$\displaystyle=\frac{1}{a^{2}}\big{(}1-e^{-ah}\big{)}^{2}+O(h^{5}),$
$\displaystyle\frac{1}{2}\Big{(}e^{-\frac{3+\sqrt{3}}{3}ah}+e^{-\frac{3-\sqrt{3}}{3}ah}-e^{-\frac{9+\sqrt{3}}{6}ah}-e^{-\frac{9-\sqrt{3}}{6}ah}\Big{)}h$
$\displaystyle=\frac{1-e^{-2ah}}{2a}-e^{-ah}\Big{(}\frac{1-e^{-ah}}{a}\big{)}+O(h^{5})$
$\displaystyle=\frac{1}{2a}\big{(}1-e^{-ah}\big{)}^{2}+O(h^{5}).$

The result (83) follows from the above along with the finite second moment of
$Y_{k}\hskip 0.7113pt$.


# Brazilian COVID-19 data streaming

Nívea B. da Silva  Federal University of Bahia, Department of Statistics,
Salvador, Bahia, 40170-110, Brazil.  Luis Iván O. Valencia  Center for Data
and Knowledge Integration for Health (CIDACS), Instituto Gonçalo Moniz,
Fundação Oswaldo Cruz
Bahia, 40196-710, Brazil.  Fábio M. H. S. Filho  Fundação Oswaldo Cruz -
Rondônia, Porto Velho, Rondônia, 76812-245, Brazil  Andressa C. S. Ferreira
Center for Data and Knowledge Integration for Health (CIDACS), Instituto
Gonçalo Moniz, Fundação Oswaldo Cruz
Bahia, 40196-710, Brazil.  Felipe A. C. Pereira  Center for Data and Knowledge
Integration for Health (CIDACS), Instituto Gonçalo Moniz, Fundação Oswaldo
Cruz
Bahia, 40196-710, Brazil.  Guilherme L. de Oliveira  Center for Data and
Knowledge Integration for Health (CIDACS), Instituto Gonçalo Moniz, Fundação
Oswaldo Cruz
Bahia, 40196-710, Brazil.  Federal Center for Technological Education of Minas
Gerais, Belo Horizonte, Minas Gerais, 30510-000, Brazil.  Paloma F. Oliveira
Center for Data and Knowledge Integration for Health (CIDACS), Instituto
Gonçalo Moniz, Fundação Oswaldo Cruz
Bahia, 40196-710, Brazil.  Moreno S. Rodrigues  Fundação Oswaldo Cruz -
Rondônia, Porto Velho, Rondônia, 76812-245, Brazil  Pablo I. P. Ramos  Center
for Data and Knowledge Integration for Health (CIDACS), Instituto Gonçalo
Moniz, Fundação Oswaldo Cruz
Bahia, 40196-710, Brazil.  Juliane F. Oliveira  Center for Data and Knowledge
Integration for Health (CIDACS), Instituto Gonçalo Moniz, Fundação Oswaldo
Cruz
Bahia, 40196-710, Brazil.  Centre of Mathematics of the University of Porto
(CMUP), Department of Mathematics, Porto, 4169-007, Portugal.

###### Abstract

We collected individualized (unidentifiable) and aggregated openly available
data from various sources related to suspected/confirmed SARS-CoV-2
infections, vaccinations, non-pharmaceutical government interventions, human
mobility, and levels of population inequality in Brazil. In addition, a data
structure allowing real-time data collection, curation, integration, and
extract-transform-load processes for different objectives was developed. The
granularity of this dataset (state- and municipality-wide) enables its
application to individualized and ecological epidemiological studies,
statistical, mathematical, and computational modeling, data visualization as
well as the scientific dissemination of information on the COVID-19 pandemic
in Brazil.

## Background & Summary

December 2021 marks two years since the first cases of SARS-CoV-2 were
reported. For the first time in history, nearly real-time data on cases,
deaths, vaccination administration, etc. has become available from multiple
sources to describe the most important pandemic in the last century[1, 2, 3].
While this information can help evaluate the dynamics of the pandemic, to
better measure the impact of SARS-CoV-2 transmission, clinical and
epidemiological information is required on patients suffering from COVID-19,
as well as other aspects related to health systems and surveillance, human
culture, behavior and mobility and social inequalities. More than ever,
innovative data access processes and methods have become essential to
understanding, managing and mitigating the effects of a pandemic in any region
of the world[4].

Our objective was to provide users with essential data, updated in real-time,
required to track the evolution of the COVID-19 pandemic in Brazil. Our
approach compiled data available from open access platforms, including Google
Mobility[5], the Brazilian Institute of Geography and Statistics (IBGE)[6, 7],
the Brazilian Unified Health System (SUS) OpenData platform[8, 9, 10], The
Platform for Analytical Models in Epidemiology (PAMEpi) via cooperation with
legal information start-up JusBrasil[11, 12] and the Brazilian Deprivation
Index (BDI, developed by CIDACS/Fiocruz and the University of Glasgow)[13,
14]. The OpenData SUS platform provides individualised (unidentifiable) data
on patients with suspected and confirmed SARS-CoV-2 infection, as well as
information on populational coverage of the Brazilian vaccination campaign.
Additionally, we have aggregated information on human mobility (using as data
sources Google Mobility and IBGE), deprivation levels (BDI) and non-
pharmaceutical interventions (PAMEpi - JusBrasil).

Motivated by the urgent need to support a rapid response to the COVID-19
pandemic, our team created The Platform for Analytical Models in Epidemiology
(PAMEpi)[11]. This platform aims to provide a user-friendly interface,
enabling researchers and policymakers to assess the impact of the spread of
(emerging) infectious diseases in their respective areas of interest. To this
end, the project has five main objectives: 1) Allow users to identify
infectious disease threats; 2) Perform data collection that can provide users
with the information needed to answer real-world questions; 3) Perform data
curation and ETL (Extract, Transform, Load) processed; 4) Develop and apply
data analysis and modelling scenarios; 5) Provide users with scientific
information to communicate to stakeholders and the public in general (Figure
1). By integrating these five objectives, we can harness the power of health
data analytics to respond to COVID-19 and other disease outbreaks or future
pandemics, as well as address health challenges, including conducting research
on prevention, transmission and control.

Figure 1: The objectives of the Platform for Analytical Models in Epidemiology
(PAMEpi).

Due to the continental size of Brazil, which ranks among the countries with
the highest numbers of reported COVID-19 cases and deaths, the collection and
curation of primary data on health, human mobility and non-pharmaceutical
interventions, as well as information on the social and economic conditions of
the population are challenging tasks. PAMEpi’s aims includes disease modeling,
dissemination of scientific information on the COVID-19 pandemic at individual
or aggregated levels and the promotion of multi-national cooperative studies,
for which clean, harmonised and normalised data is a fundamental resource[15,
16]. Considering the relevance of open science, the dataset we produced is
essential to inform timely policy responses and aid in the understanding of
the pandemic’s impact on other outcomes. In addition, this data architecture
offers great potential for reuse by Brazilians and the international
community, enabling comparative studies.

## Methods

We collected individualized and aggregated openly available data from various
sources related to suspected/confirmed SARS-CoV-2 infections, vaccinations,
non-pharmaceutical government interventions, human mobility and deprivation
index values.

All individualized and unidentifiable information related to suspected and
confirmed SARS-CoV-2 infections and vaccinations (Vacdb) is available via the
OpenData SUS system, provided by the Brazilian Ministry of Health (MoH)[8, 9,
10]. SARS-CoV-2 infections are notified via two databases: the Flu Syndrome
Database (FSdb), which contains all suspected and confirmed mild-to-moderate
COVID-19 cases, and the Severe Acute Respiratory Syndrome Database (SARSdb),
containing cases of severe-to-critical infection. FSdb, SARSdb and Vacdb are
licensed under a Creative Commons Attribution License (CC BY v4.0) and no
ethical approval by an institutional review board was required to use this
data (Brazilian National Health Council Resolutions 466/2012 and 510/2016,
Article 1, Sections III and V). All data can be freely downloaded directly at
the OpenData SUS website[8, 10, 9] or our Python algorithm can be used to
download all data documented in this manuscript. It is important to mention
that, in accordance with the Brazilian General Data Protection Law –
13.709/2018 (LGPD), some personally identifiable information has been
suppressed from the datasets provided by the OpenData SUS portal, which
reduces the total number of variables described in the respective data
dictionaries.

With regard to aggregated data, Google Mobility enables users to access
information on daily human mobility patterns at grocery stores and pharmacies,
parks, transit stations, retail and recreation entities, residences and
workplaces. In addition, historical series detailing average human flows on
roads, rivers and via air are made freely available by the IBGE[6, 7]. Other
collected aggregated information was provided through a cooperative agreement
with legal information start-up JusBrasil[12], which allowed automatic
retrieval of Brazilian decrees describing non-pharmaceutical measures enacted
by state or municipal governments to contain the pandemic. This database was
obtained as raw text files and were subjected to human curation within PAMEpi,
with enriched output made freely available as text and stringency values
representing government containment efforts at state or municipal levels.
Lastly, we also gathered information on community-level deprivation measures
to assess socioeconomic inequalities.

Together, this collected data forms what we call the Brazilian COVID-19 Data
Lake. Figure 2 schematically illustrates the data sources and their respective
characteristics.

Figure 2: Schematic overview of the Brazilian COVID-19 Data Lake.

For the creation of the data lake, all raw data was obtained in its original
file format (usually CSV text files). Deprivation index and intercity mobility
datasets are static, with updates expected only following census tabulation.
Data from the other sources may be updated daily, weekly or monthly depending
on the respective source. Scripts in Python language were elaborated to create
and update the data lake automatically[17]. Users can download and organize
data locally, on an isolated partition or in an online repository, and can run
these tasks manually or schedule them as system tasks. Due to the large volume
of individualized information stored across several databases, an API
available from the OpenData SUS portal can be used to update the information
in the data lake.

The next step involves data curation. For this, we 1) examine field names,
variable types and categorical values (if applicable) and compare them to
previous versions of the data at each moment of data updating; 2) perform
semantic enrichment, data harmonization and cleaning to facilitate the use of
information from multiple databases; 3) normalize data, to better structure
the dataset by reducing data redundancy and improving data integrity; 4)
generate metadata. The environment used to load and process these datasets was
built using Python (PySpark tool) and all codes to perform these tasks are
available from PAMEpi GitHub code repository[17].

The last stage involves formatting data for analysis and modelling. Both
individualised and aggregated data analyses can be performed according to the
goals of each researcher. As standard practice, we generate datasets
aggregated at state, health region and municipal levels throughout Brazil.
This comprises one of the most important outputs of our data architecture,
which facilitates epidemiological studies, data visualization, health
surveillance, etc. Figure 3 details the data collection, curation and ETL
operations of the PAMEpi data architecture.

Figure 3: Data lake framework for Brazilian COVID-19 big data architecture

## Data Records

In the following two sections, we describe key information about the datasets
that comprise the Brazilian COVID-19 Data Lake. Although the PAMEpi data
architecture utilizes a limited number of datasets, the structure described is
adaptable and can integrate any other datasets needed to address public health
challenges.

All generated metadata and dataset descriptions are freely available via our
online platform (https://pamepi.rondonia.fiocruz.br/en/data_en.html). To
facilitate visualisation, we have provided a data explorer that allows users
to view the first rows of each dataset along with metadata, including column
descriptions, variable type, and variable harmonisation where applicable. This
also allows broader re-use of this dataset, particularly since the original
descriptors and data dictionaries are usually only available in Portuguese.

### Individualized COVID-19 data

#### 1\. Flu Syndrome (FS) and Severe Acute Respiratory Syndrome (SARS)
databases

The advent of the COVID-19 pandemic in March 2020 prompted the MoH to
implement a scheme to report mild-to-moderate suspected cases of COVID-19,
denominated the Flu Syndrome database (FSdb). The MoH characterizes a patient
as suspected of having influenza syndrome (IS) if at least two of the
following symptoms are present: fever (measured or reported), chills, sore
throat, headache, cough, runny nose, olfactory or taste abnormalities. In
children, nasal congestion is another condition warranting consideration. In
elderly individuals, syncope, mental confusion, excessive drowsiness,
irritability, and loss of appetite may also constitute relevant symptoms[18].

The Severe Acute Respiratory Syndrome (SARS) database (SARSdb) was created by
the MoH through the Health Surveillance Secretariat after the last influenza
virus subtype A (H1N1) pandemic in 2009. This database contains reports of
influenza and other respiratory viruses, which were previously recorded only
via influenza syndrome sentinel surveillance. After March 2020, severe-to-
critical COVID-19 cases also began to be integrated into this database.
According to the MoH, cases are reported in SARSdb if one of the following
symptoms is present in addition to two other IS symptoms: shortness of
breath/breathing difficulties, persistent chest discomfort or pain, O2
saturation <95%, or bluish discolouration (cyanosis) of the lips or face. In
addition, tachypnea, hypoxemia, cyanosis, intercostal retraction, dehydration,
and loss of appetite are relevant symptoms among children. In the elderly,
anosmia, ageusia, diarrhea, abdominal pain, myalgia or symptoms of exhaustion
may warrant consideration in determining inclusion in SARSdb[18]. Importantly,
all cases reported in SARSdb required hospitalization due to disease severity.

A COVID-19 case can be diagnosed via three methods: clinical-epidemiological
investigation, laboratory testing or by imaging. Clinical-epidemiological
diagnosis is based on a patient’s clinical manifestations and possible contact
with other infected individuals 14 days prior to the onset of symptoms;
laboratory diagnosis can be confirmed by molecular testing (real-time PCR),
serology (ELISA, CLIA or ECLIA) or by rapid tests; imaging by high resolution
computed tomography can also provide evidence of COVID-19 disease[18].

FSdb and SARSdb contain information provided by private and public health
institutions, which report suspected and confirmed cases via the e-SUS
NOTIFICA system. FSdb is organized according to each federal unit (i.e.,
state) of the Brazilian federation, while SARSdb files are organized annually
(one per year). FSdb is available in .csv format, with a total of 30 variables
and a size of around 15 GB in December 2021. In turn, SARSdb, also available
in .csv format, contains 161 variables and a size of around 2 GB in December
2021. Variables provide spatial and temporal information on reported cases, as
well as patient clinical (symptoms, comorbidities, etc.) and demographic (age,
municipality of residence, etc.) data (Figure 4). Additionally, SARSdb also
contains each patient’s vaccination status against influenza or COVID-19
(vaccination cycle, type of vaccine, etc.) and hospitalization information
(clinical ward or intensive care unit). FSdb and SARSdb are updated weekly
with newly included case information.

Figure 4: Schematic diagram of main variables in FSdb and SARSdb.

As of November 2021, more than 21% of the cases registered in FSdb were
confirmed as COVID-19 (13,895,387 registries), with more than 67% resulting in
cure and less than 1% in deaths (Figure 5). By contrast, SARSdb contained
reports of more than two million suspected severe-to-critical cases. Of these,
66.1% were confirmed to be COVID-19, with 32.4% being admitted to an ICU and a
resulting death rate >50%. Among patients who were hospitalized but not
admitted to ICU, 17.5% died from COVID-19, and more than 74% achieved cure
(Figure 5).

Figure 5: Cases reported in FSdb and SARSdb with corresponding final
diagnostic classification, hospitalization status and clinical outcome
information.

Assigning a definitive classification to cases of suspected SARS-CoV-2
infection remains a challenge for Brazilian health authorities, as evidenced
by high percentages of indeterminate cases in FSdb and SARSdb (Figure 5). As
is typical for other diseases in Brazil (such as arboviruses and leprosy)[19,
20], many cases go undetected, and those reported in health databases are
usually not updated with a final classification due to the huge number of
registered patients and lack of laboratory facilities and testing. This
limitation affects the estimation of true disease prevalence and the
implementation of appropriate control measures. Under this scenario,
mathematical, statistical and computational methodologies have been
extensively employed to better understand the reality reflected by the
information contained in Brazilian databases to address deficiencies, and
provide more reliable estimates of true disease prevalence by inferring
diagnosis status for cases not definitively classified in the database
records[21, 20, 22].

#### 3\. Vaccination database - Vacdb

The Brazilian national vaccination campaign against COVID-19 started in
January 2021. The National Vaccination Operational Plan (NVOP)[23], elaborated
by the MoH, laid out the strategy necessary to vaccinate Brazil’s population
as quickly as possible. Vaccination began incrementally based on priority
groups as defined by the NVOP. All vaccines introduced by the Brazilian
Unified Health System underwent technical evaluations and were approved by the
Brazilian Health Regulatory Agency (Anvisa) for emergency use. Currently,
AZD1222 Vaxzevria (Astrazeneca/Oxford/Fiocruz), COVID-19 Vaccine (Vero Cell),
Inactivated/Coronavac (Sinovac/Butantan), BNT162b2/COMIRNATY Tozinameran (INN)
(Pfizer/BioNTech/Wyeth) and Ad26.COV2.S (Janssen/Johnson & Johnson) vaccines
are included in the National Immunization Program (PNI)[24, 23].

All data related to the vaccination campaign are made available by the MoH
through the National Immunization Program’s information system. The Opendata
SUS Vacdb provides information on the doses administered (vaccine type,
patient vaccination status) as well as patient demographic characteristics.
Additional information related to administrative codes (system patient
identifiers, IBGE or vaccine manufacturer) is also present. The data set,
available in .csv format, contains 30 variables, is updated weekly, and, as of
December 2021, had a total size around 80 GB. Table 1 lists the main variables
contained in Vacdb.

Table 1: Description of main variables in Vacdb. Field name (in original db) | Field label | Type | Description
---|---|---|---
paciente_id | Identifier | String | A randomly generated unique identifier for the patient.
paciente_idade | Age | Integer | Patient age
paciente_dataNascimento | Birth date | Date | Patient’s date of birth
paciente_enumSexoBiologico | Sex | String | Biological sex of the patient
paciente_racaCor_valor | Self-reported skin color | String | Patient’s race/skin color
paciente_endereco_nmMunicipio | Municipality of residence | String | Patient’s municipality of residence
paciente_endereco_uf | State of residence | String | Patient’s state of residence
vacina_nome | Vaccine name | String | Vaccine name
vacina_dataAplicacao | Vaccine application date | Date | Vaccine application date
vacina_descricao_dose | Dose description | String | Description of the dose (1st, 2nd, booster, etc.)

From the start of the NVOP campaign until November 22, 2021, 154,007,191
people in the country had received an initial dose, representing 72.2% of the
population, while 58.1% (123,912,270) of the population had a complete
vaccination schedule (2nd dose or single dose), and approximately 6.5% had
received a booster dose.

### Aggregated data

#### 1\. Human Mobility

Google has provided a Community Mobility Report[5] to assess how human
mobility has been affected by the spread of COVID-19 since February 2020[25,
21, 26]. The report compares the median attendance of people at a given
location and day to the median attendance value at the same location for that
day of the week, calculated for the pre-pandemic period from January 3 through
February 6, 2020 (these values are defined as a baseline). The resulting
metric, available for each country and regions within, reflects the percentage
change in the number of people who visited grocery stores or pharmacies,
parks, transit stations, retail and recreation entities, residences, and
workplaces compared to the same period defined before. Google’s mobility
database contains 15 variables and is updated daily. The information available
is based on a sample of users who have allowed the company to track their
location history, which may introduce bias depending on the analysis
performed.

In addition, IBGE provides information on the flow of people between Brazilian
cities on roads, rivers and via air. Air mobility data indicates the average
number of people travelling between the country’s airports[7] for the years
2010, 2019 and 2020. Another report contains data on intercity vehicle (bus)
transport via roads or rivers estimated for 2016[6]. Figure 6 illustrates the
Brazilian interstate and intercity flow network (via air, road and river).

Figure 6: a) Illustration of annual traffic flows among Brazilian states via
air/road/river networks (2010 data). State and flow colors are for
identification purposes only. b) Estimation of average daily traffic between
state capitals (shown as red dots) and inland cities in each Brazilian federal
unit (2016 data).

It is important to note that the IBGE databases do not indicate the direction
of flow. Therefore, it is impossible to discern whether planes/vehicles are
arriving or leaving a given city by air/road/river. Moreover, the road/river
mobility data only considers the average number of vehicles per week, and does
not specify vehicle occupancy rates.

#### 2\. Population inequality

The Brazilian Deprivation Index (BDI)[13, 14] is a composite measure of health
and social vulnerability, and represents the most up-to-date area-based
measures of deprivation in Brazil, allowing to estimate socioeconomic
inequalities at multiple scales ranging from census tracts, municipalities,
states, macrorregions, or the entire country. The BDI combines information on
the income, education and household conditions in a given region to measure
social inequalities. The index combines the z-scores of three factors: the
percentage of families with per capita incomes less than half the minimum wage
( US$117); and the percentage of illiterates older than seven years; the
percentage of people without adequate access to potable water, sanitation,
garbage disposal, bathroom or shower.

Limitations of using this metric exist, since it comprises three dimensions of
deprivation, excluding others such as employment, crime, health, education,
and access to public services. Comparisons over time are also not possible
since the data that compose the index were gathered from the 2010 Brazilian
census. Because of this, the measure does not need to be frequently updated on
our data lake. Still, the BDI contributes to essential insights on
characterising the impact of the COVID-19 spread on the Brazilian
population[27].

The BDI database we collect measures deprivation at the municipal level. It
has 15 variables, 5,566 registers (rows) and is currently 734 Kb in size. The
data is shared under a Creative Commons Share-Alike license, with copyright
owned by the author’s institutions (CIDACS/Fiocruz-Bahia and the University of
Glasgow). The database, along with its extensive documentation, can be
accessed at https://researchdata.gla.ac.uk/980/ or
https://cidacs.bahia.fiocruz.br/ibp/painel-en/.

#### 3\. Non-pharmaceutical interventions

Like most countries, as the epidemic unfolded the Brazilian government began
to enact non-pharmaceutical interventions (NPIs) to mitigate the effects of
COVID-19, specially the surge in hospitalization of COVID-19 patients. Some of
these NPI were lifted over time following declines in number of cases and
deaths between each infection wave. Several studies reported the effects of
NPIs on the incidence of COVID-19[25, 21, 26], highlighting how, coupled with
human mobility patterns, they can be applied to gauge the intensity of
government stringency needed to achieve control of viral transmission
rates[28]. The governmental decrees that have been issued during this period
can be extracted from state- and federal-level Official Bulletins (in
Portuguese, Diário Oficial). Although the federal-level bulletin can be bulk
downloaded in computer-readable XML format (https://www.in.gov.br/acesso-a-
informacao/dados-abertos/base-de-dados), the same is not possible for state-
level bulletins, which are decentralized and usually do not permit automatic
data query or retrieval, which also occurs with municipality-level decrees.

As a result of a collaboration agreement with legal information start-up
JusBrasil (http://jusbrasil.com.br), we accessed state and city level text
files describing NPIs enacted during COVID-19 issued by governments through
JusBrasil’s proprietary Application Programming Interface, allowing fast
retrieval of COVID-19-related legislation during the period. The automatic
retrieval was followed by manual human curation, when each decree was read,
categorized, and multiple meta-data were systematically derived, including the
geographic coverage of the measures and the validity period of the decree.
Based on the type of measure processed, a metric was created, defined as the
stringency index [25], which combines the different enacted laws to summarize
the level of governmental strictness over any given period of the pandemic.
The contents of evaluated decrees (in Portuguese) and the resulting stringency
index over time are freely available and regularly updated within the PAMepi
platform at https://pamepi.rondonia.fiocruz.br/en/decree_en.html.

### Data stream limitations

In an attempt to enhance our understanding of the spread of respiratory
disease in Brazil, particularly the COVID-19 pandemic, our data lake
incorporates multiple databases that can be accessed, downloaded and routinely
updated via automated scripts. However, as changes in disease status occur due
to human interventions (e.g., changes in mobility patterns, non-pharmaceutical
interventions, vaccine campaigns), the source databases may add or remove
variables (or even include additional categories within variables). For
example, this was observed in SARSdb and Vacdb when new variables were added
to account for individuals infected with SARS-CoV-2 who were vaccinated, as
well as to incorporate the administration of additional doses during the
ongoing national vaccination campaign, respectively. Therefore, regular
monitoring of data sources, which we perform, is necessary to update the
automated script used to execute data lake updates.

### Relationships between files

We created datasets containing community-level aggregated information
extracted from the variables in the source databases. The integration of
variables from different sources facilitates data analysis and epidemiological
study, since the resulting aligned dataset contains relevant datapoints
collected since the beginning of the pandemic in Brazil, as well as prior to
the pandemic. For example, users can analyze a daily time series of mild-to-
moderate cases resulting from the FSdb, or hospital occupancy and death rates
from the SARSdb, in addition to daily vaccine doses administered, among other
variables. The dataset enables real-time assessment of the pandemic in each
Brazilian municipality through the lens of data visualization, which is
essential to fostering community involvement during local and world health
challenges[1, 3, 2, 11]. Finally, the dataset metadata we provide also
facilitates federated data access and analytics, which are important for
future integrative research and preparedness for the next pandemic.

Users can access the updated dataset using a data explorer and dictionary,
which are available at
https://pamepi.rondonia.fiocruz.br/en/aggregated_en.html. In addition, all
codes used to create the dataset are freely available from our GitHub
repository[11].

## Technical Validation

After performing pre-processing and data curation, the databases directly
related to COVID-19 information (FSdb, SARSdb and Vacdb) were verified through
exploratory analyses to ascertain the technical quality of the databases.
Verification consisted of evaluating the completeness of the main variables
contained in these databases, while checking for inconsistencies in date-type
variables. To assess the completeness of a given variable, we constructed a
new column termed ‘indeterminate’ that served to quantify the amount of
missing and incompatible data. Accordingly, database completeness is
represented by the percentage of completion of variables, varying from poorly
filled (0%) to well-filled (100%).

Completeness was evaluated by selecting key variables from each database. More
extensive descriptions of completeness are provided for each individualised
database as Supplementary material. These reports include initial exploratory
analyses in both table and plot format. The period considered for this
evaluation was between January 1, 2020 and November 22, 2021.

FSdb and SARSdb do not contain individual identification codes. Therefore, no
procedure to identify duplicate records was carried out. We then labelled
categorical variables and categorised age variables into groups to evaluate
completeness. The spatial unit used for this analysis was the state in which
cases were notified. The completeness analysis in FSdb examined the following
demographic and clinical variables: sex, age group, final classification, case
evolution, symptoms, test result and test type. For SARSdb, we assessed the
completeness of sex, age group, scholarity, residential area (urban or rural),
date of hospitalisation, ICU admission, case evolution, final classification
and symptoms (each is represented by a variable in SARSdb), such as fever,
cough, throat pain, dyspnea, respiratory discomfort, saturation, diarrhea,
vomiting, abdominal pain and fatigue. We also explored the completeness of the
symptoms variable using cross-tabulations of final classification, case
evolution, mortality and COVID-19 case distribution by age group.

Vacdb contains an identification code for each individual, as one person can
receive more than one vaccine dose. Considering the data available to date,
the maximum number of duplicate records for each subject should be three
(first/single dose, second and third/booster dose). Therefore, we normalized
Vacdb to identify each individual in a row versus the type of dose applied, as
the original database is organized[11]. We then evaluated the completeness of
first dose, second dose, third dose/reinforce, single-dose and single-
dose/reinforce variables across Brazil, and in each state by age and
ethnicity.

Table 2 details completeness information for FSdb, SARSdb and Vacdb at a
national level. Age group, sex and symptoms presented the highest completeness
in FSdb (>99%), while final classification and evolution were lower (47.14%
and 33.34%, respectively). For SARSdb, 63.88% of the records contained
indeterminate information on scholarity. The lowest percentage of completeness
was found for the sex variable. Among symptoms, the variables dyspnea and
cough showed higher completeness, while fatigue and abdominal pain were lower
(Table 2). Completeness for all vaccination dose types in Vacdb by age group
reached over 99% (Table 2). Sex by all vaccination dose types achieved almost
100% completeness. Ethnicity by all vaccination dose types attained around 75%
completeness (see Completeness data analyses available at
https://pamepi.rondonia.fiocruz.br/en/data_en.html).

Table 2: Completeness information for FSdb, SARSdb and Vacdb at national
level. FSdb
---
Demographic and health condition | Indeterminate∗ (%) | Completeness (%)
Sex | 0.07 | 99.93
Age group | 0.04 | 99.96
Symptoms | 0.13 | 98.87
Case evolution | 66.66 | 33.34
Final classification | 52.86 | 47.14
Test type | 14.83 | 85.17
Test result | 27.46 | 72.54
SARSdb
Demographic and health condition | Indeterminate(%) | Completeness (%)
Sex | 0.03 | 99.97
Age group | 0.12 | 99.88
Residential area (urban or rural) | 7.18 | 92.82
Scholarity | 63.88 | 36.12
Case evolution | 12.02 | 87.98
Final classification | 6.52 | 93.48
Date of hospitalization | 16.06 | 83.94
ICU admission | 12.12 | 87.88
Dyspnea | 13.23 | 86.77
Cough | 13.80 | 86.20
Fever | 17.42 | 82.58
Throat pain | 30.78 | 69.22
Diarrhea | 31.75 | 68.25
Vomit | 32.86 | 67.14
Fatigue | 42.62 | 57.38
Abdominal Pain | 45.79 | 54.21
Respiratory discomfort | 19.86 | 80.14
Saturation | 17.72 | 82.28
Vacdb
Vaccine status | Indeterminate(%) | Completeness (%)
Single dose | 0.00 | 100.00
First dose | 0.01 | 99.99
Second dose | 0.01 | 99.99
Third Dose/Reinforce | 0.05 | 99.95
Single Dose/Reinforce | 0.09 | 99.91
∗stands for missing values or incompatible values.

The validation presented in the material available at
https://pamepi.rondonia.fiocruz.br/en/data_en.html shows that the variable
completeness varies in accordance with the state in which a case was notified.
This may serve to indicate quality regarding data collection processes on a
regional health district level (data is then forwarded to the MoH data
systems). However, an in-depth analysis of the quality of data collection is
outside the scope of this manuscript.

## Usage Notes

The COVID-19 pandemic continues to pose a threat to global health. Populations
worldwide face severe inequalities with regard to the distribution of
resources essential to diagnosing, treating and preventing COVID-19[27].
Concomitantly, extreme poverty and its consequences, particularly poverty-
related infectious diseases, such as tuberculosis, HIV/AIDS, malaria, etc.,
persistently imperil the health of vulnerable populations, and scant attention
has been paid to these conditions due to limited health services during the
pandemic. Therefore, the data lake we have constructed represents a powerful
resource for studying past and current aspects of the COVID-19 pandemic, as
well as its impact on other health, economic and social outcomes.

We have designed the PAMEpi data architecture to incorporate different data
sources in order to enhance the power of a data-driven approach to
understanding the COVID-19 pandemic in Brazil. To enrich the available health
data, we aggregated data on human mobility, social inequality and non-
pharmaceutical government interventions to better reflect the complexities of
the COVID-19 pandemic. We have provided a description of all routines employed
to collect, store, organise, integrate and use data in real-time for potential
use in exploratory analysis, modelling and visualisation at both individual
and aggregated levels. Furthermore, this approach is not solely limited to
COVID-19, as the health data ingested also contains reports on other
respiratory diseases circulating in the country. Therefore, our efforts can be
extended to other diseases (particularly respiratory diseases) to include
additional important variables (e.g., biogeoclimatic parameters) and
potentially aid in the response to future emerging or re-emerging infectious
diseases.

## Code availability

As described in the Methods section, all coding has been documented and is
freely available in R or Python languages on the project’s Github page
(https://github.com/PAMepi).

## References

  * [1] Johns Hopkins U.S. County Level COVID-19 Tracking Map.  https://coronavirus.jhu.edu/us-map.  Accessed November 15th, 2021.
  * [2] Worldometer. COVID-19 Coronavirus Pandemic.  https://www.worldometers.info/coronavirus/.  Accessed December 1st, 2021.
  * [3] WHO Coronavirus (COVID-19) Dashboard.  https://covid19.who.int.  Accessed December 1st, 2021.
  * [4] Organization, W. H. _et al._ Covid-19 strategic preparedness and response plan: 1 february 2021 to 31 january 2022.  Tech. Rep., World Health Organization (2021).
  * [5] Google LLC "Google COVID-19 Community Mobility Reports".  https://www.google.com/covid19/mobility/.  Accessed: February 25, 2022.
  * [6] Brazilian institute of geography and statistics - IBGE: Ligações rodoviárias e hidroviárias.  http://geoftp.ibge.gov.br/organizacao_do_territorio/redes_e_fluxos_geograficos/ligacoes_rodoviarias_e_hidroviarias/base_de_dados/xls/.  Accessed: February 25, 2022.
  * [7] Brazilian institute of geography and statistics - IBGE: Ligações aéreas.  http://geoftp.ibge.gov.br/organizacao_do_territorio/redes_e_fluxos_geograficos/ligacoes_aereas/.  Accessed: February 25, 2022.
  * [8] Open Datasus. Notificações de Síndrome Gripal.  https://opendatasus.saude.gov.br/dataset/notificacoes-de-sindrome-gripal-leve-2020,https://opendatasus.saude.gov.br/dataset/notificacoes-de-sindrome-gripal-leve-2021,https://opendatasus.saude.gov.br/dataset/notificacoes-de-sindrome-gripal-leve-2022.  Accessed: February 25, 2022.
  * [9] Open Datasus. Banco de dados SRAG.  https://opendatasus.saude.gov.br/dataset/srag-2020,https://opendatasus.saude.gov.br/dataset/srag-2021-e-2022.  Accessed: February 25, 2022.
  * [10] OpenDatasus. Campanha Nacional de Vacinação contra Covid-19.  https://opendatasus.saude.gov.br/dataset/covid-19-vacinacao.  Accessed: February 25, 2022.
  * [11] Platform for analytical models in epidemiology - PAMEpi.  https://pamepi.rondonia.fiocruz.br/en/index_en.html.  Accessed: February 25, 2022.
  * [12] Jusbrasil.  https://www.jusbrasil.com.br/home.  Accessed: February 25, 2022.
  * [13] Allik, M. _et al._ Developing a small-area deprivation measure for brazil: Technical report.  _._ (2020).
  * [14] Cidacs: Índice brasileiro de privação - IBP.  https://cidacs.bahia.fiocruz.br/ibp/,https://researchdata.gla.ac.uk/980/1/Deprivation_Brazil_2010_CensusSectors.csv.  Accessed: February 25, 2022.
  * [15] Katikireddi, S. V. _et al._ Two-dose chadox1 ncov-19 vaccine protection against covid-19 hospital admissions and deaths over time: a retrospective, population-based cohort study in scotland and brazil.  _The Lancet_ 399, 25–35 (2022).
  * [16] Wang, H. _et al._ Estimating excess mortality due to the covid-19 pandemic: a systematic analysis of covid-19-related mortality, 2020–21.  _The Lancet_ (2022).
  * [17] Platform For Analytical Modelis in Epidemiology. (2022). PAMepi/PAMepi-scripts-datalake: v1.0.0 (v1.0.0). Zenodo. .  https://doi.org/10.5281/zenodo.6384641.  Accessed: February 25, 2022.
  * [18] Ministério da saúde: Guia de vigilância epidemiológica: Emergência de saúde pública de importância nacional pela doença pelo coronavírus 2019.  https://www.gov.br/saude/pt-br/coronavirus/publicacoes-tecnicas/guias-e-planos/guia-de-vigilancia-epidemiologica-covid-19/view.  Accessed: February 25, 2022.
  * [19] Oliveira, J. F. _et al._ Interdependence between confirmed and discarded cases of dengue, chikungunya and zika viruses in brazil: A multivariate time-series analysis.  _PloS one_ 15, e0228347 (2020).
  * [20] de Oliveira, G. L. _et al._ Estimating underreporting of leprosy in brazil using a bayesian approach.  _PLoS neglected tropical diseases_ 15, e0009700 (2021).
  * [21] Oliveira, J. F. _et al._ Mathematical modeling of covid-19 in 14.8 million individuals in bahia, brazil.  _Nature communications_ 12, 1–13 (2021).
  * [22] Veiga, R. V. _et al._ Classification algorithm for congenital zika syndrome: characterizations, diagnosis and validation.  _Scientific Reports_ 11, 1–7 (2021).
  * [23] Ministério da Saúde - Plano Nacional de Operacionalização da Vacinação contra a Covid-19 (PNO).  https://www.gov.br/saude/pt-br/composicao/secovid/pno_edicoes.  Accessed: February 25, 2022.
  * [24] WHO Covid-19 vaccines.  https://extranet.who.int/pqweb/sites/default/files/documents/Status_COVID_VAX_02April2022.pdf.  Accessed: February 25, 2022.
  * [25] Jorge, D. C. _et al._ Assessing the nationwide impact of covid-19 mitigation policies on the transmission rate of sars-cov-2 in brazil.  _Epidemics_ 35, 100465 (2021).
  * [26] Kerr, L. _et al._ Covid-19 no nordeste brasileiro: sucessos e limitações nas respostas dos governos dos estados.  _Ciência & Saúde Coletiva_ 25, 4099–4120 (2020).
  * [27] Pereira, F. A. _et al._ Profile of covid-19 in brazil: Risk factors and socioeconomic vulnerability associated with disease outcome.  _Available at SSRN 4081979_ (2022).
  * [28] Pataro, I. M. _et al._ A control framework to optimize public health policies in the course of the covid-19 pandemic.  _Scientific reports_ 11, 1–13 (2021).

## Acknowledgements

This study was financed by Bill and Melinda Gates Foundation and Minderoo
Foundation HDR UK, through the Grand Challenges ICODA COVID-19 Data Science,
with reference number 2021.0097 and the Fiocruz Innovation Promotion Program -
Innovative ideas and products - COVID-19, orders and strategies INOVA-FIOCRUZ,
with reference Number VPPIS-005-FIO-20-2-40. We thank Andris K Walter for
English revision and manuscript proofing and suggestions.

## Author contributions statement

N.B.S., F.M.H.S.F., L.I.O.V., A.C.S.F., F.A.C.P. and J.F.O. contributed to
collecting and curating the database. N.B.S., L.I.O.V., G.L.O. and J.F.O.
contributed to technical validation on the databases. All authors contributed
to contributed to analyse the results. N.B.S and J.F.O. contributed to writing
the manuscript. All authors contributed to and reviewed the final submitted
manuscript.

## Competing interests

The authors declare no competing interests.