I am using the following article: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.7.274&rep=rep1&type=pdf (pages 8-10) to construct non parametric approximations to drift, $\mu$ and diffusion, $\sigma$ for geometric brownian motion.
Let $X_t$ be an Ito process:
$$dX_t = a(t, X_t)dt + b(t, X_t)dB_t$$
Our case of interest is geometric brownian motion, that is when $a(t, X_t) = \mu X_t$ and $b(t, X_t) = \sigma X_t$.
In the article the infinitesimal generator is used to construct approximations for $\mathbb{E}[f\left(t + \Delta t, X_{t + \Delta t}\right)]$.
$$\mathcal{L}f(t, x) = \frac{\partial f(t, x)}{\partial t} + \frac{\partial f(t, x)}{\partial x}a(t, x) + \frac{1}{2}\frac{\partial^2 f(t, x)}{\partial x^2}b^2(t, x)$$
For example, of order 1: \begin{equation} \label{approx} \mathcal{L}f(t, X_t) = \frac{1}{\Delta t} \mathbb{E}[f\left(t + \Delta t, X_{t + \Delta t}\right) - f(t, X_t)] + \mathcal{O}(\Delta t) \end{equation}
As we want to approximate $a(t, X_t) = \mu X_t$ and $b(t, X_t) = \sigma X_t$ we can choose:
$$f_a(t, x) = x$$ $$f_b(t, x) = (x - X_t)^2$$
Such that by the definition of infinitesimal generator:
$$\mathcal{L}f_a(t, x) = a(t, x)$$ $$\mathcal{L}f_a(t, X_t) = a(t, X_t)$$
$$\mathcal{L}f_b(t, x) = 2(x - X_t)a(t, x) + b^2(t, x)$$ $$\mathcal{L}f_b(t, X_t) = b^2(t, x)$$
Using (\ref{approx}) the values of $f_a$, $\mathcal{L}f_a$ and $f_b$, $\mathcal{L}f_b$:
$$a(t, X_t) = \frac{1}{\Delta t} \mathbb{E}[X_{t + \Delta t} - X_t] + \mathcal{O}(\Delta t)$$ $$b^2(t, X_t) = \frac{1}{\Delta t} \mathbb{E}[\left(X_{t + \Delta t} - X_t\right)^2] + \mathcal{O}(\Delta t)$$
For a GBM $a(t, X_t) = \mu X_t$ and $b(t, X_t) = \sigma X_t$:
$$\mu X_t = \frac{1}{\Delta t} \mathbb{E}[X_{t + \Delta t} - X_t] + \mathcal{O}(\Delta t)$$ $$\sigma^2 X_t^2= \frac{1}{\Delta t} \mathbb{E}[\left(X_{t + \Delta t} - X_t\right)^2] + \mathcal{O}(\Delta t)$$
But I don't understand how to get the two constant values for $\mu$ and $\sigma$. I need them to generate samples from the analytical solution for GBM.