Artificial neural networks as approximators of stochastic processes