Stopped Out

Real or Live trading compared to Demo trading

I have now been automated trading using strategies on the real or live environment with FXCM for 20 months. During this time, I have run multiple different types of strategies in parallel between the real and demo environments.

Demo when compared to Live trading actually compares pretty well, as you would expect. During normal market volatility, I find there are usually only differences near boundary conditions/edge cases. When I say edge cases, I mean when the differences in behavior is caused by some very small difference in price or indicator value which causes a trade to go one way or the other. For example… a reversion strategy I was working on made the following trades in the Demo environment.

Demo Trades

At the same time, the instance running in the live environment did the following:

Live Trading vs Demo Trading

You can see from the above example that the live environment made one less trade than the demo environment. In this case it resulted in the overall setup making less money in the real environment compared to the demo environment.

When I looked into this at the time, it turned out the conditions to generate the trade were not genuinely met in live when compared to demo, or rather, it seemed that the trade conditions were only temporarily met in Demo but never met in Live – the live environment just missed out on the trade.

If you have ever had the prices ticking side-by-side between live and demo you would know that they are not always in sync and sometimes there can be very small differences in the price and they do not both receive the same ticks, or even tick at the same time. Unfortunately these small differences are enough themselves or lead to a significant enough difference in an indicator value to result in a discrepancy between making a decision or not.

It is important to note a couple of things:
– Firstly, this kind of difference can impact all decisions, not just the opening of new positions but also the closing of them too.
– Secondly, this behavior is not always necessary against you. I have had it that the live environment did something good for me while the demo did not, for example, close a losing trade sooner etc.

Actually, it is quite common to have fractions of a pip difference between Demo and Live but it goes either way so I like to think it averages out. However, one should remember that the above only applies during normal market operation. We can also get differences in behavior in more extreme market conditions too.

For example, trading was suspended and prices went stale in the live environment due to the SNB shocker last month. However, that was not the case in the demo environment. In another example which is probably more common, I had a stop order execute in the live environment when the price had not reached the stop level yet, this did not happen in Demo. Here is the screenshot of the live environment:

Stopped Out

You can see the dashed line from the arrow indicating the actual close price vs the price where the stop order was placed. Some people could easily mistake this for being ‘stop hunted’ but it turns out this happens when there is very low liquidity in the market and the advertised price is not the actual executable price. This, unfortunately, did not happen in the Demo environment.

So as you can see, one needs to be careful when evaluating an automated strategy in the Demo environment. It is best to adopt a conservative view on all decisions made by your strategy and if possible, tweak the configuration accordingly. For example, adjusted the stop or limit orders by half a pip etc as an extra confirmation that the price definitely reached the appropriate level.

Next post, I’ll discuss differences between backtesting and live trading.

 

Posted in Research, Strategies and tagged , , , .

2 Comments

  1. Hi,
    I recently had a trade which closed similarly to the last example, apparently above the then current price.
    After carefully looking, it seems to me the tick chart shows the trade closed on the last tick of the second before the second in which there was a tick with the close price.
    Meaning it might just be a representation bug, or perhaps marketscope 2 can’t precisely show trade closing point in a tick resolution.
    In the screenshot you posted, a few ticks later it seems the price reached the price it closed.
    This is a conjecture though, can you possibly confirm?

    • Hi,

      Thank you for your comment.

      I suspect it is a different issue as it took a good number of seconds for the price to actually reach that value. You can even see the price dipped first and then came back. Either-way, I enquired with FXCM and this was the explanation …

      This ticket was stopped out a price of 119.983. This was a valid price on the buy/ask side of the market. However, initially, this price was reached on the secondary tier of liquidity. The pricing engine for the Trading Station platforms use several tiers of liquidity. When the first tiers of liquidity, from which the charts derive their price feed, are originated, are used up by orders, secondary liquidity can fill a trade. This type of execution is infrequent, and occurs usually only during fast or thin markets. During fast moving markets especially around high impact news events, the charts cannot capture all prices ticks.

      It is important to make a distinction between indicative prices (displayed on charts) and dealable prices (displayed on the FXCM Trading Station). Indicative quotes are those that offer an indication of the prices in the market, and the rate at which they are changing. These prices are derived from a host of contributors such as banks and clearing firms, which may or may not reflect where FXCM’s liquidity providers are making prices. Indicative prices are usually very close to dealing prices, but they only give an indication of where the market is. Executable quotes ensure finer execution and thus a reduced transaction cost. Because the spot forex market lacks a single central exchange where all transactions are conducted, each forex dealer may quote slightly different prices. Therefore, any prices displayed by a third party charting provider, which does not employ the market maker’s price feed, will reflect “indicative” prices and not necessarily actual “dealing” prices where trades can be executed.

      Another thing to keep in mind while trading.

      Cheers,
      MMFX

Leave a Reply

Your email address will not be published. Required fields are marked *