An Algorithm for Parameters Estimation: Bounds onthe Estimation Error and Application to Time-Series Prediction