Discrepancy: Realized Result vs. Post Trade Backtest

Questions about MultiCharts and user contributed studies.
Doctor Al
Posts: 24
Joined: 15 Aug 2019
Has thanked: 4 times

Discrepancy: Realized Result vs. Post Trade Backtest

Postby Doctor Al » 07 Jun 2020

I request help in understanding what the explanation is for the following situation:

I was automating a strategy for trading the micro S&P 500 futures contract based on the chart of the emini S&P 500 futures on Friday, June 5th 2020. The chart I use is constructed by merging historical data for @ES (TS's symbol for the front month emini S&P 500 futures) with CQG's real time data for the same contract. My broker uses CQG data, so that is my real-time source.

Symbols:

@ES = TS emini continuous futures contract
EPM20 = CQG real time emini futres contract (analogous to @ES for the purposes of this post)
MESM20 = CQG real time micro S&P 500 front month contract

I use the Broker Profiles/Symbol Mapping to arrange to trade the micro S&P 500 futures based on the merged chart described in the first paragraph above. That is @ES is symbol mapped to MESM20, and EPM20 is also symbol mapped to MESM20. @ES and EPM20 are respectively the TS and CQG symbols for the emini S&P 500 futures, while MESM20 is the CQG symbol for the micro S&P 500 futures.

My strategy entered short at 3199.25 on a stop. There was no discrepancy between the stop price and the fill price I received on the short entry. My stop-loss for the trade was automatically calculated from the entry price by adding (275/50 = 5.5 points) to the entry price. Thus, my stop-loss on the short position was 3204.75 = 3199.25 + 5.5.
My stop-loss is not placed until after the bar of entry is completed. I was stopped out on the 5th bar of the trade, where the entry bar is the 0th bar of the trade.
I was stopped out of the trade at 3204.75. However, the current display of the chart in back-test mode does not show any election of a stop-loss, just an end-of-day profitable exit. In fact, the current back-test shows that the highest price of @ES reached after completion of the entry bar was 3204.00, which is below my stop-loss price of 3204.75.

Looking at TS data for the micro ES contract, that does show a high price of 3205 at the time I was stopped out, but my intention was to be trading the micro ES contract based on the @ES TS symbol and the analogous CQG (EPM20) real time data. That was my understanding of how the symbol mapping feature should work. In my opinion, the stop-loss should only be elected if the emini symbol reaches the stop-loss price; a momentary blip up in the micro contract should not trigger my stop-loss. I'm requesting to trade off the emini chart but execute on the micro contract.

If anyone can explain why I was stopped out of the trade and how I could modify my back-test of the strategy to reflect real-world behavior, I would appreciate it.

By the way, is there any way to add an attachment to these posts ? (e.g. I have a picture of the current back-test, but I don't know how to put it in this post.

Thank you for your time.

User avatar
Svetlana MultiCharts
Posts: 645
Joined: 19 Oct 2017
Has thanked: 3 times
Been thanked: 163 times

Re: Discrepancy: Realized Result vs. Post Trade Backtest

Postby Svetlana MultiCharts » 08 Jun 2020

Hello Doctor Al,

You mapped @ES to MESM20, therefore the orders are executed according to MESM20 contract, and that is expected behaviour.
Unfortunately, there is no way to have the orders executed according to the prices of a third contact.
If you would like to trade on EPM20 prices, please map to EPM20 symbol.

How to put a picture:
Click Attachments -> Add files -> put the cursor in the text and press Place inline.

Doctor Al
Posts: 24
Joined: 15 Aug 2019
Has thanked: 4 times

Re: Discrepancy: Realized Result vs. Post Trade Backtest

Postby Doctor Al » 08 Jun 2020

In my opinion, it would make sense to use the actual chart (and prices for the actual charted symbol) to trigger buys and sells on whatever symbol you map to the charted symbol.

User avatar
joebone
Posts: 175
Joined: 05 Sep 2018
Has thanked: 53 times
Been thanked: 4 times

Re: Discrepancy: Realized Result vs. Post Trade Backtest

Postby joebone » 19 Aug 2020

Is it possible to use symbol mapping to get the desired effect here?

map the micro contract to the Emini contract?

granitepeak
Posts: 25
Joined: 07 Jul 2020
Has thanked: 2 times
Been thanked: 4 times

Re: Discrepancy: Realized Result vs. Post Trade Backtest

Postby granitepeak » 20 Aug 2020

The chart is created using your data source. In this case I am calling it XYZ supplied by DTN. If at my broker the symbol to buy or sell XYZ is 123, then I map XYZ to 123. Every time an automated order takes place on the chart using XYZ DTN data, it will place the order using the prices from XYZ and place the order at the broker with the only thing be changed is the symbol to 123.

I have found the most accurate automated results is to use bid and ask data. I do know for sure that if you only use trade data, live and history will not line up.

TS only has trade data.

What I am next saying, to me is logical but not based on any knowledge. The micro does not have near the volume of the mini. It is quite possible that a stop sitting there gets picked off by a trade. That had the stop not been there in the first place it may not have ever traded at that price. I would assume using mini data for your chart will help your modeling, but you still are placing an order in a thinner market.

Use a DOM and watch the micro bid and asks dance around. Next watch the trade bar to the right. There are times when the bid and ask travel through a range of prices without a single trade. As far as I have been able to see, this impacts the quality when comparing a historic and live chart.


Return to “MultiCharts”