How to Spot and Avoid Overfitting and Underfitting in Algorithmic Trading