Time series prediction using neural networks