Filtering outliers in a backtest
Author: mikesblack
Creation Date: 8/15/2010 10:52 PM
profile picture

mikesblack

#1
I was trying to figure a way to have WL filter out outlier trades in a back test report. I would imagine a threshold a user could define so that any trades that exceeded this threshold would not be calculated. (e.g Any trades that exceeded 20 percent ROR.) Thanks.
profile picture

Eugene

#2
Check out the source code of Community.Visualizers in the Wiki. Specifically, the PerformanceEngine class that supplies data to the "Performance+" tab. There's a lot on outlier trades there.
profile picture

Eugene

#3
P.S. Trade Stability highlights outliers.
profile picture

mikesblack

#4
I think what I'll do is remove the issues that created the outlier events and recalc using only the remaining constituents. Given a list of 1000 and perhaps only 20 or 30 issues that contributed to the outlier trades perhaps I may have a view to what I'm after. Unless you know of a way to filter out particulair trade numbers prior to a backtest, this would allow for me to keep the data set elements in tact. Thanks Eugene
profile picture

Eugene

#5
Ruling out particular trades prior to backtest requires a crystal ball addon, which unfortunately isn't available for Wealth-Lab yet. ;)

To remove the outlier trades (3 std deviations), see PerformanceEngine.cs code on how to determine the threshold. If I was to do it, I'd run this check early in the code and create a modified List of Position objects free from outliers, and then would use this list throughout the code.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).