|June 17th, 2012, 07:41 AM||#1 (permalink)|
Futures Experience: Advanced
Broker/Data: Interactive Brokers/DTN IQFeed
Favorite Futures: Bund Future
Posts: 278 since Aug 2011
Thanks: 100 given, 310 received
For some time I wanted to to conduct a little experiment: to run one and the same trading system in two different simulation environments.
I'm using Sierrachart and DTN IQFeed as data feed. Sierrachart offers a simulation environment for automatic and manual trading. So this is the first testing/simulation environment, let's call it the DTN instance (of Sierrachart).
My Broker is Interactive Brokers, they offer a paper trading account. I installed a second instance of Sierrachart connected to this paper trading account, this is the second simulation environment. Let's call it the IB instance.
My real trading account and the paper trading account run in different instances of IB's TWS. So both testing environments can run simultaneously and do not interfere with my real trading (done manually).
Sierrachart offers a feature called "remote chart", that is I can open and use a chart in one instance of Sierrachart that is running in another instance of Sierrachart.
Since the trading system I tested relies heavily on bid/ask data and DTN IQFeed offers the most reliable bid/ask data, I opened a remote chart of the GBL future in the IB instance which was fed by DTN's data in the DTN instance.
This was the symbol I used to trade: GBL (Future on German 10-year Notes) traded at Eurex. Symbol is GBL-201203/6-DTB for IB and BDH12/BDM12 for DTN. Ticksize is 0.01. One tick is worth 10€.
The system was programmed using the Spreadsheet System for Automatic trading facility of Sierrachart. The trading system itself is not of interest because it is a losing system, winning or losing was not the purpose of this test. It is a kind of countertrend system, it identifies overbought/oversold conditions and then sells/buys.
For the order management I used attached orders. Entry was done via limit orders (3 ticks below/above market), target 9 ticks, stop loss 5 ticks with the stop moving to (BE + 1 tick) after the trade was 5 ticks above/below entry.
Signal was evaluated once per bar, at the open of a bar. When an opening order was not filled, it was canceled at the open of the next bar.
Due to the usage of the remote chart the entry signals were fired virtually identically in both environments, only differences due to run time differences on my PC (a dual-core system).
After the opening signal the instances operated differently. The DTN instance did all the simulation work - fills of open and target, trigger of stop loss/trailing - within itself. The IB instance sent the orders (including attached orders) to IB's servers. The fills were simulated by the IB servers, the trailing stop was monitored by the IB instance on my PC using IB's data feed and the stop loss raised if conditions were met. The IB instance did not know that it was connected to a paper trading account, it "thought" to be trading real.
I ran this test from the second week of January 2012 to end of March 2012. That is I did not run any kind of backtest, the simulation was done in real time.
I had to drop a few data from one instance or the other because on some days I forgot to start both instances or just forgot to store the results. About a week of test results had to be dropped for the these reasons.
A short statistic of the results is shown in the screenshot. Commission has not been taken into account.
There is a 16% difference in the number of trades and a 45% difference in the P/L. I had not expected the results to be identical, but the difference in the number of trades surprised me. If anything I had expected to see less trades from the IB instance because here Sierrachart has to sent the orders to an IB (paper trade) server instead of simulating the fills in its own environment.
The difference in the number of trades is a more like 20% because there were about 30 trades from the IB instance which were missing from the DTN instance and 4 the other way round. The missing trades account for 21 ticks of the 59 ticks difference in P/L. I think that a 38 tick difference spread over more than 140 trades is not much to worry about.
From a statistical point of view the two results are identical. I had run an ANOVA test in Excel. ANOVA looks at averages and variances and from this point of view there is no difference.
I have attached the workbook and the spreadsheet I used in the IB instance.
Sorry, looks like I cannot upload the spreadsheet.
|The following user says Thank You to FGBL07 for this post:|