How to avoid "overfitting" in programmed trading?

In the process of establishing a quantitative trading model, many people will experience the situation of overfitting. Overfitting is actually a concept in the field of machine learning and statistics...
How to avoid "overfitting" in programmed trading?