Login Page - Create Account

Support Board


Date/Time: Sun, 05 May 2024 15:21:04 +0000



Post From: How to handle non-standard sessions in back testing?

[2019-12-02 16:31:26]
J4yTr4der - Posts: 20
I'm running into the problem of holiday/short trading sessions being in my data which is causing some back test trades to hold way longer than they should (several days sometimes).

I see there is (was?) an option to enter specific dates to exclude, but that's not an ideal solution. When back testing, I would like to either be able to just skip non-standard sessions (which since this is in back testing, should be no problem since the future is known) or even better have an option to flatten at a specific time on only short sessions (so that my system can trade them if there is a valid signal, but get out before the close so as not to hold too long).

In fact, related to this... during back testing it is possible that my system finds a valid signal say on a Friday afternoon, takes it, and has to hold until Sunday or longer. I would prefer this not to happen, but I don't know of a way to set something like "Exit before close of week". We can define to exit at close of a session or other specified time, but I would love to just ensure that no position is carried past the close on a Friday. Any ideas on how to accomplish this, would be great to hear. Thanks!