Overnight Spread Increase – BackTest
Forums › ProRealTime English forum › ProRealTime platform support › Overnight Spread Increase – BackTest
- This topic has 13 replies, 7 voices, and was last updated 4 years ago by Mike.
-
-
05/12/2016 at 11:08 AM #6863
Hello Each
What is the easiest way to allow for an increase in spread during overnight periods when back testing a Auto-System.
Previously I have input an average spread (between day rate and night rate). However, a back-test may show a System to be unprofitable (24 hours per day) whereas the same System would be profitable if it only trades 8 hours during the day / lower spread time.
It would be so much easier if PRT had 2 setting on the spread box (see attachment) … one for daytime and one for nightime … is there a more effective method to propose this to PRT / IT-Finance than me emailing them direct?
In the meantime what is the easiest way to hard code an ‘overnight spread increase’ into my Systems … I think I will use this for all my Systems from now on.
Thanks
GraHal
05/12/2016 at 11:56 AM #6871Hi GraHal, for ovenight fees I used to add order fee in money. But you are right, this is not very accurate and precise!
Maybe another method would be to change the way of placing orders by incrementing or decrementing the opened price. Instead of using orders at market, use stop orders at close+spread, but only if you are in widen spread condition of course.
It’s just an idea, didn’t test it 🙂
05/14/2016 at 10:14 AM #7053Thank you Nicolas, I forgot to mention I spreadbet with IG and the spread on some markets can vary enormously at night … e.g. GBP/MXN sparead can be 120 in the day and up to 500 at night! Profit can be made at 120 spread, but then it can all be lost by the morning by the Stategy buying back at 500 points spread and even sell / buy process again.
I know I can be flat before 080000 and flat after 170000 but often big moves occur during the ‘500 spread’ period.
I have decided to not trade GBP/MXN and GBP / NOK any more (it was Demo anyway) but in order to close this query in my mind … is it possible to code ‘spread’ into a System?
I tried as a condition …
If spread < 200 and Condition 1 then
Buy 1 perpoint
Endif
but the statement above was rejected.
Spread doesn’t appear to be an acceptable Term in any form … is that correct??
I’m sure ‘spread’ is coded into one of the Strategies on this Site?
Thanks So Much
GraHal
05/14/2016 at 10:29 AM #7054Hi Grahal!
This for backtest only but could be work:
123456789101112131415161718BuyPrice = XSellPrice = YDaySpread = 120*PipSizeNight Spread = 500*PipSizeIF Time>=090000 AND Time<220000 THENSpread = DaySpreadELSESpread = NightSpreadENDIFIF myConditionsLong THENBUY 1 CONTRACT AT BuyPrice+Spread STOPENDIFIF myConditionsShort THENSELLSHORT 1 CONTRACT AT SellPrice-Spread STOPENDIFCheers!
1 user thanked author for this post.
05/14/2016 at 12:48 PM #706111/28/2016 at 6:47 AM #1733811/28/2016 at 11:45 AM #17353Hi Bin
I’m glad you asked as it has reminded me! There’s so much interesting stuff to try on here that it’s easy to forget.
I’m sure it will work, but would need the times and ‘pip multiplier’ adjusted to suit each instrument / market traded.
Cheers
GraHal11/29/2016 at 12:27 AM #1744112/28/2016 at 1:27 PM #19241Hi
Thanks for this/also looking for a way to include spread variation into backtesting
Adolfo – Where would X and Y come from/be defined?
Also I think the STOP order is creating a pending order to execute the trade when MARKET = (BuyPrice+Spread) not actually placing the trade immediately and including the spread…?
GraHal/Bin any success?
12/01/2019 at 3:20 PM #113997Hi GraHal
Hope you are well?
Did you ever resolve this query?
I almost got stung with a 4H TF trade which opened on DJI with a guaranteed stop of 550, instead of 37. I now have time parameters set so that such trades won’t open but a safer way would be, per market, to not open trades if the spread was above “the norm”. Using DJI as an example I can live with 2.4 but 9.8 is too high.
I could extend the time parameters but this would not account for IG reacting to, eg, an upcoming FOMC announcement, hence the wish to use spread.
Any thoughts?
12/01/2019 at 4:03 PM #113999Please do not double post the same question. Thank you 🙂
12/01/2019 at 4:59 PM #11400412/01/2019 at 5:04 PM #114005Because I read it twice in two different threads.
12/01/2019 at 5:16 PM #114006Hi Roberto
Is this the other thread? It’s the only one I can think of…
If “yes” then do we just make the same point once so that the forum does not fill up with duplicates?
Thanks again
Mikehttps://www.prorealcode.com/topic/when-does-spread-actually-change/page/2/#post-113996
-
AuthorPosts
Find exclusive trading pro-tools on