  This paper deals with a projection least squares estimator of the function
$J_0$ computed from multiple independent observations on $[0,T]$ of the process
$Z$ defined by $dZ_t = J_0(t)d\langle M\rangle_t + dM_t$, where $M$ is a
continuous and square integrable martingale vanishing at $0$. Risk bounds are
established on this estimator, on an associated adaptive estimator and on an
associated discrete-time version used in practice. An appropriate
transformation allows to rewrite the differential equation $dX_t =
V(X_t)(b_0(t)dt +\sigma(t)dB_t)$, where $B$ is a fractional Brownian motion of
Hurst parameter $H\in [1/2,1)$, as a model of the previous type. So, the second
part of the paper deals with risk bounds on a nonparametric estimator of $b_0$
derived from the results on the projection least squares estimator of $J_0$. In
particular, our results apply to the estimation of the drift function in a
non-autonomous Black-Scholes model and to nonparametric estimation in a
non-autonomous fractional stochastic volatility model.
