# Characteristic function of Gamma-OU process

Consider the Gamma-Ornstein-Uhlenbeck process defined in the way Barndorff-Nielsen does, but consider a different long running mean $$b$$ which may be bigger than zero:

$$dX(t) = \eta(b - X(t))dt + dZ(t)$$ Where $$Z(t) = \sum_{n=1}^{N(t)}J_n$$ With $$N(t)$$ being Poisson($$\lambda t$$) and $$J_n$$ iid Exponential($$k$$)

This has solution $$X(t) = b + \mathrm{e}^{-\eta (t-t_0)}\left[X(t_0) - b\right] + \sum_{n=N(t_0)}^{N(t)}\mathrm{e}^{-\eta (t-\tau_n)}J_n$$ Where $$\tau_n$$ are the jump times of $$N(t)$$

What is the characteristic function of the stochastic part (the compound Poisson part)? Let's call it $$\bar{Z}$$.

Additionally, there's a different process defined as $$dY(t) = \eta(b - Y(t))dt + dZ(\eta t)$$ Which is said to have always the same distribution for every time point (as seen in Schoutens 2003). What is the characteristic function in this case? I assume it's supposed to be a gamma characteristic function, but I don't see what parameters it must have; is it really independent of $$t_0$$ and $$t$$?

I have been reading a lot of related papers on the subject, but they only work with the Laplace transform. I have calculated a version of the characteristic function of $$\bar{Z}(t)|\bar{Z}(t_0)$$ using the theorem

$$\Phi_{\bar{Z}(t)|\bar{Z}(t_0)}(u) = \Phi_{\int_{t_0}^t f(s) dZ(s)}(u) = \exp\left[ \int_{t_0}^t \Psi_{Z(s)}(uf(s))ds\right]$$

Where we have the characteristic exponent of the compound Poisson process given by

$$\Psi_{Z(t)} = -\lambda \left( 1 - \frac{k}{k-iu} \right)$$

And the function $$f(s)$$ in our case is $$\mathrm{e}^{-\eta(t-s)}$$.

I obtained a huge formula, so I am wary of my results. Here is the result I obtained:

$$\Phi_{\bar{Z}(t)|\bar{Z}(t_0)}(u) = \exp\left\{-\lambda\int_{t_0}^t \left(1 - \frac{k}{k - iu\mathrm{e}^{-\eta(t-s)}} \right)ds\right\}$$

$$\Phi_{\bar{Z}(t)|\bar{Z}(t_0)}(u) = \exp \left\{\frac{\lambda\log\left[\mathrm{e}^{2 \eta t_0}u^2+k^2\mathrm{e}^{2 \eta t}\right]}{2 \eta} - \frac{\lambda\log\left[\mathrm{e}^{2 \eta t}u^2+k^2\mathrm{e}^{2 \eta t}\right]}{2 \eta}- \frac{i \lambda}{\eta}\arctan\left(\frac{\mathrm{e}^{-\eta (t-t_0)} u}{k}\right) + \frac{i \lambda}{\eta} \arctan\left(\frac{u}{k}\right) \right\}$$

With some cleaning up,

$$\Phi_{\bar{Z}(t)|\bar{Z}(t_0)}(u) = \left( \frac{k^2 + u^2 \mathrm{e}^{-2\eta(t-t_0)}}{k^2 + u^2}\right)^{\frac{\lambda}{2\eta}}\exp\left\{ i \frac{\lambda}{\eta} \arctan\left( \frac{ku\left(1 - \mathrm{e}^{\eta(t-t_0)} \right)}{k^2 + u^2 \mathrm{e}^{\eta(t-t_0)}} \right) \right\}$$

And the limit when $$t \rightarrow +\infty$$

$$\Phi_{\bar{Z}(+\infty)|\bar{Z}(t_0)}(u) = \left( \frac{k^2}{k^2 + u^2}\right)^{\frac{\lambda}{2\eta}}\exp\left\{ i \frac{\lambda}{\eta} \arctan\left( \frac{u}{k}\right) \right\}$$

And from here I do not know how to manipulate it so that the stationary limit is the gamma characteristic function (assuming it is).

Furthermore, it contradicts a result I found in another paper(https://arxiv.org/pdf/2003.08810v1.pdf Eq.5), which omits the calculations and refers to another source that only has the Laplace transform (https://core.ac.uk/download/pdf/96685.pdf Example 3.4.3). That paper says the characteristic function is: $$\Phi_{\int_{t_0}^t f(s) dZ(s)}(u) = \left( \frac{k - iu\mathrm{e}^{-\eta(t-t_0)}}{k - iu}\right)^{\lambda / \eta}$$

However, some numerical tests I have done seem to indicate this might be wrong.

EDIT: I'm starting to suspect that I could get the polar form that I obtained to eventually end up giving the same result as in the paper, or the other way around, rewrite the one from the paper in this polar form. I think my numerical errors come from the pole at $$\bar{Z}(t)=0$$, as when I am numerically inverting the characteristic function to obtain the pdf I can't seem to separate the "non-singular" part of the characteristic function from the full one and add the pole at the end.

I have confirmed the two forms of the characteristic functions are equivalent, it's just that I had obtained a polar form. Here is the deduction from the original form to mine (easier to show), first simplifying notation by writing the exponential term as $$c$$:
$$\Phi(u) = \left( \frac{k-iuc}{k-iu} \right)^{\lambda/\eta} = \left( \frac{\sqrt{k^2+(uc)^2}\mathrm{e}^{i \arctan \left(-uc/k\right)}}{\sqrt{k^2 + u^2}\mathrm{e}^{i \arctan \left(-u/k\right)}} \right)^{\lambda/\eta} = \left( \sqrt{\frac{k^2+(uc)^2}{k^2 + u^2}}\exp\left\{i \left[\arctan\left(-\frac{uc}{k}\right) - \arctan \left(-\frac{u}{k}\right)\right]\right\} \right)^{\lambda/\eta} = \left( \sqrt{\frac{k^2+(uc)^2}{k^2 + u^2}}\exp\left\{i \left[\arctan \left(\frac{-\frac{uc}{k}-(-\frac{u}{k})}{1+(-\frac{uc}{k})\cdot(-\frac{u}{k})}\right)\right]\right\} \right)^{\lambda/\eta} = \left( \sqrt{\frac{k^2+(uc)^2}{k^2 + u^2}}\exp\left\{i \left[\arctan \left(\frac{\frac{u}{k}(1-c)}{1+\frac{u^2 c}{k^2}}\right)\right]\right\} \right)^{\lambda/\eta} = \left( \sqrt{\frac{k^2+(uc)^2}{k^2 + u^2}}\exp\left\{i \left[\arctan \left(\frac{ku(1-c)}{k^2+ u^2 c}\right)\right]\right\} \right)^{\lambda/\eta}$$
And eventually $$\Phi(u) = \left(\frac{k^2+u^2 \mathrm{e}^{-2\eta(t-t_0)}}{k^2 + u^2}\right)^{\frac{\lambda}{2\eta}}\exp\left\{i \frac{\lambda}{\eta} \left[\arctan \left(\frac{ku(1-\mathrm{e}^{-\eta(t-t_0)})}{k^2+ u^2 \mathrm{e}^{-\eta(t-t_0)}}\right)\right]\right\}$$