An outlier is an observation that is numerically distant from the rest of the data. When comparing historical returns between different groups of stocks (for example, low P/E vs high P/E), it's important to note any individual stocks that might be skewing results of the whole group.
Therefore, the first thing you should do is identify a threshold of return (for example, annual returns of 1000%) that causes material changes in your results. That is, these outliers are altering your results!
So once you've identified such stocks, what should you do about them? The answer, as always: it depends! You have to dig into the outliers to figure out exactly what's going on.
In some cases, you may want to throw the outlier out. This could occur if you found errors in the underlying data, or if some occurrence caused this that you don't expect to happen again. In this case, when you delete the outlier, you will be more comfortable projecting your results going forward.
In other cases, you may want to keep them in. If some sort of unanticipated innovation or fraudulent behaviour caused a few particular companies to have returns that deviate from the norm, you may expect these sorts of events to occur at the same rate in the future.
In the case of outliers, there are no easy answers. One has to dig through the outliers and figure out whether they should kept and considered potential future occurrences, or tossed and considered liars.