I have a process $X(t)$ defined on some finite time horizon $[0,T]$ and I know that my process satisfies the following SDE:

$dX(t)=X_t \mu dt + X_t \sigma dB_t$.

where $B$ is a standard Brownian motion. In particular I'm assuming that both the drift and volatility are constant over time.

**Question**:

Given data points $x_{t_1}, \ldots x_{t_n}$ that are realizations of the random variable $X(t)$ at times $t_1 \ldots t_n$, how do I estimate the drift and volatility parameters $\mu, \sigma$ ? I'm interested in a method that is relatively easy to implement.

I would also like to know if there already exist libraries in say Python that might help for this task.

What would be a method for estimating $\mu$ and $\sigma$ if they change over time? (I.e. they are are time dependent)