Neural network approximation of stochastic processes: A recursive algorithm