Any dataset contains accidents. If you search hard enough you will find rules that explain them perfectly, and those rules carry no information about tomorrow. The tell is a backtest that looks excellent and an out-of-sample result that looks like a coin flip.
A simple demonstration: generate 1,000 series of pure random-walk prices and test 100 moving-average rules on each. On the best-performing combination you will see an impressive equity curve with a good sharpe-ratio, drawn entirely from noise, because you took the maximum of 100,000 random numbers.
Defences are all variations on the same idea: fewer parameters, more data, honest counting of how many things you tried, and results that must survive data the fitting never touched. See walk-forward-analysis and purged-cross-validation.
Related: underfitting, out-of-sample, data-snooping, multiple-testing, degrees-of-freedom