PDA

View Full Version : How to delete outlier data (misprint) for accurate backtesting?


Avn_0903
04-09-2010, 09:33 PM
I noticed that there are a lot of bars misprinted while I backtested my 5-min chart (maybe due to bad data feed?) and their highs or closes go way way beyond what the normal range would be. this can really make my backtesting results inaccurate. So how do I delete outlier bars from the test?

NinjaTrader_Ben
04-10-2010, 08:02 AM
Hello,
You will need to export the historical data and modify it:
http://www.ninjatrader-support.com/HelpGuideV6/Export.html

Then make sure you don't reload it again:
http://www.ninjatrader-support.com/HelpGuideV6/WhenDoesNinjaTraderLoadHistoricalData.html

Avn_0903
04-10-2010, 09:38 AM
Is there any type of code that scan for irregularity of a bar and if true disregard the bar from calculation? Like if (High - Low) > Abs(Open - Close) * 10 then disregard the bar?

NinjaTrader_Ben
04-10-2010, 11:07 PM
Hello,

I am sure there is something out there, but I don't know where it is exactly. Sorry.

Avn_0903
04-10-2010, 11:15 PM
I tried enabling bad tick offset but it did not wok. Is it supposed to work when backtesting?

NinjaTrader_Ben
04-11-2010, 09:49 AM
Hello,

Can you tell me more about what you are doing when you say you are enabling bad tick offset. A screen shot would help as well if you can.
To post a screenshot press Alt + PRINT SCREEN to take a screen shot of the selected window. Then go to Start--> Accessories--> Paint, and press CRTL + V to paste the image. Lastly, save as a jpeg file and post the file as an attachment.

Avn_0903
04-11-2010, 10:49 AM
Here's the image from NT7:

NinjaTrader_Bertrand
04-12-2010, 09:12 AM
This would only work on incoming tick in realtime Avn_0903, for backtesting and bad ticks in NT7, you can work with the new Historical Data Manager and exclude / amend data as needed -

http://www.ninjatrader.com/support/helpGuides/nt7/editing.htm

Those changes would then be persisted on reload from servers...