How can overfitting be avoided in algorithmic trading?