JAB in forward test mode today

13 views
Skip to first unread message

new_trader

unread,
Jul 7, 2010, 9:09:29 AM7/7/10
to JArbitrager
today I let JAB run in forward test mode again. we can share results.
I will post mine at the end of the trading day.

nonlinear5

unread,
Jul 7, 2010, 9:12:43 AM7/7/10
to JArbitrager
Ok, cool.

new_trader

unread,
Jul 7, 2010, 1:37:28 PM7/7/10
to JArbitrager
intermediate results 13:37:
ES_NQ: 1 trade, +$233
ES_SPY: 8 trades, +$29
ES_YM: 1 trades, -$35
EUR_EUR: 12 trades, +$81
YM_DIA: 5 trades, +$31

nonlinear5

unread,
Jul 7, 2010, 2:27:40 PM7/7/10
to JArbitrager
As of 14:27
ES_NQ: 1 trade, +$283
ES_SPY: 10 trades, +$32
ES_YM: 1 trades, -$42
EUR_EUR: 19 trades, +$119
YM_DIA: 7 trades, +$56

nonlinear5

unread,
Jul 7, 2010, 3:58:26 PM7/7/10
to JArbitrager
End of day results:

ES_NQ: 2 trades, +$131
ES_SPY: 16 trades, +$66
ES_YM: 4 trades, +$21
EUR_EUR: 24 trades, +$137
YM_DIA: 9 trades, +$52
GBP_GBP (new): 4 trades, +$146

new_trader

unread,
Jul 7, 2010, 5:11:53 PM7/7/10
to JArbitrager
sorry for being late, had to watch the world cup semi final: viva
espana...

my final results:

ES_NQ: 2 trades, +$116
ES_SPY: 14 trades, +$50
ES_YM: 3 trades, -$59
EUR_EUR: 24 trades, +$118
YM_DIA: 8 trades, +$56

Gab

unread,
Jul 7, 2010, 5:29:15 PM7/7/10
to jarbi...@googlegroups.com
On Wed, Jul 7, 2010 at 5:11 PM, new_trader <loc...@gmx.de> wrote:
sorry for being late, had to watch the  world cup semi final: viva
espana...

:-)

It was the Euro 2008 all over again. I was in Spain when they won, it was incredible.

Nice results by the way. My account is blocked, but I'll see with IB if I can reactivate it, I'll participate in the tests as soon as I can. 

new_trader

unread,
Jul 7, 2010, 5:36:22 PM7/7/10
to JArbitrager
I am located in Germany, for me it was terrible ;-(
but the definitely better team has won in 2008 and 2010, great team
these spanish guys...

the GBP_GBP strategy seems also very promising!

can you share it so that we can test it tomorrow with JAB?

our results are still differing. today they are closer than yesterday.
any explanations?
can the different location lead to different results? my machine is
connected via cat5 cable to my 16.000 MBit DSL router.

nonlinear5

unread,
Jul 7, 2010, 6:56:41 PM7/7/10
to JArbitrager
More or less in line. I am working on a new version which is tick-
driven, not timer-driven. That should give us more consistency.

new_trader

unread,
Jul 8, 2010, 8:10:08 AM7/8/10
to JArbitrager
> More or less in line. I am working on a new version which is tick-
> driven, not timer-driven. That should give us more consistency.
fine, looking forward to the next version.

I will be recording today and for the next day. I need the data to get
something comparable to the data of the new downloader.

nonlinear5

unread,
Jul 8, 2010, 4:12:09 PM7/8/10
to JArbitrager
For Thursday, July 08:
ES_NQ: 2 trades, -$89
ES_SPY: 17 trades, +$98
ES_YM: 0 trades, $0
EUR_EUR: 22 trades, +$88
YM_DIA: 14 trades, +$133
GBP_GBP (new): 8 trades, +$18
NQ_QQQQ (new) : 11 trades, -$3

new_trader

unread,
Jul 8, 2010, 4:27:01 PM7/8/10
to JArbitrager
For Thursday, July 08:
ES_NQ: 2 trades, -$109
ES_SPY: 8 trades, +$46
ES_YM: 2 trades, -$125
EUR_EUR: 22 trades, +$63
YM_DIA: 10 trades, +$62

nonlinear5

unread,
Jul 12, 2010, 4:02:57 PM7/12/10
to JArbitrager

new_trader

unread,
Jul 12, 2010, 4:16:09 PM7/12/10
to JArbitrager

dafa

unread,
Jul 12, 2010, 5:15:12 PM7/12/10
to JArbitrager
July 12 result:
ES_NQ: 2 trades, +$86
ES_SPY: 49 trades, +$322
ES_YM: 9 trades, +$53
EUR_EUR: 99 trades, +$458
GBP_GBP: 45 trades,+279
NQ_QQQQ: 49 trades, +$16.96
YM_DIA: 43 trades, +$333.

On Jul 12, 4:16 pm, new_trader <loc...@gmx.de> wrote:
> July 12 results:http://groups.google.com/group/jarbitrager/web/JAB_finalresults_20100...

new_trader

unread,
Jul 13, 2010, 12:51:37 PM7/13/10
to JArbitrager
my intermediate result for Jul. 13:
http://groups.google.com/group/jarbitrager/web/JAB_20100713_till_1230.png

since my TWS lost its connection at ~12:30 I had to restart TWS. So I
was stopping JAB.
Had you guys this problem too?

nonlinear5

unread,
Jul 13, 2010, 7:32:52 PM7/13/10
to JArbitrager
I ran JArbitrager in the trading mode using paper-trading account, and
it's bad news. All of the sample strategies lost money. The backtest
using the same period of time resulted shows a profit. So, it looks
like forward test and backtest results are not representative of what
would happen in real trading. On average, it looks like each trade had
about $20 slippage. That is, each trade profit is $20 less than what
forward test and backtest indicate. It should be easy to account for
this $20 slippage in the backtesting and optimization, but I think
that will mean that no profitable trades would be found. Maybe the
slippage would be less when using a real account, but that's a long
shot.

Far Fetcher

unread,
Jul 13, 2010, 9:35:54 PM7/13/10
to JArbitrager
I ran two of the pairs through a database study the other day, even
though I didn't have a complete dataset for the day. I wanted to
capture today, but I got started late, then later my wife restarted
her computer which left another gap in the numbers. Could someone send
trade times, 1.02 data and 1.02 historical 1 second data? I want to
see how the prices change +- 1 second from each trade. The day I
checked there was a lot of fluctuation inside each second, and the
forward trades often had better than realistic fills. We have to keep
in mind that IB often makes the market in house, and they would like
to keep the slippage doing it. There is also a problem with the paper
trading, from personal experience it takes longer to get fills than
real trades.

Larry

nonlinear5

unread,
Jul 14, 2010, 10:31:22 AM7/14/10
to JArbitrager
Larry, I'll upload my data sets tonight. Your analysis would indeed be
helpful.

new_trader

unread,
Jul 14, 2010, 11:13:02 AM7/14/10
to JArbitrager
thanks for your analysis.

tomorrow I will be live trading the EUR_EUR strategy for at least 30
minutes, depending on how much money I will gain/loose ;-).
I think it is the best and almost only way to see how order are
filled.

nonlinear5

unread,
Jul 14, 2010, 2:30:27 PM7/14/10
to JArbitrager
>
> tomorrow I will be live trading the EUR_EUR strategy for at least 30
> minutes, depending on how much money I will gain/loose ;-).
> I think it is the best and almost only way to see how order are
> filled.

My prediction is that you will lose about $15 per trade. Thanks for
paying the price.

new_trader

unread,
Jul 14, 2010, 3:10:18 PM7/14/10
to JArbitrager
> My prediction is that you will lose about $15 per trade. Thanks for
> paying the price.
is this prediction based on the analysis of the strategies report
files and the recorded market data?
I have looked into today's data: the fills could be OK.
but all this is hypothetical, we have to cross the border :-)

I want to have quickly more facts on JAB. With 15$ per trade this is a
good price compared with the hours we all spend into JAB.
Because if we really will have the fill problem, we will have problems
with the foundation of JAB. This would be a serious issue which will
be hard to fix. the question is if another broker will be the
solution. a broker which is specialized in high frequence trading?

nonlinear5

unread,
Jul 14, 2010, 3:51:35 PM7/14/10
to JArbitrager
>
> I want to have quickly more facts on JAB. With 15$ per trade this is a
> good price compared with the hours we all spend into JAB.
> Because if we really will have the fill problem, we will have problems
> with the foundation of JAB. This would be a serious issue which will
> be hard to fix. the question is if another broker will be the
> solution. a broker which is specialized in high frequence trading?

JAB has the same architecture as JBookTrader. I've placed hundreds of
live trades with JBookTrader, and the results were consistent with
backtesting and forward testing. That is to say, when I traded live,
and ran the same strategy with the recorded data, backtest would show
about the same number of trades and the P&L. Live trades were executed
in about 300ms. So, if I traded the ES, and the current bid/ask was
1020.25/1020.50, my fills were virtually always 1020.25 to sell and
1020.50 to buy, which is exactly what backtest and forward test would
assume.

With JArbitrager, things are more complicated. Instead of one
instrument, there is a pair, so a scenario like the following is
likely:

-- Instrument1 bid/ask is 100.01/100.02, and instrument2 bid/ask is
100.01/100.02
-- some sort of news is release, or there is simply a buyer/seller, so
instrument1 bid/ask moves to 100.11/100.12
-- at this point, JAB sees the spread has widen considerably, so it
places the order to sell instrument1 short and to buy instrument2, on
the assumption that instrument2 bid/ask is still 100.01/100.02
-- a moment later, the new bid/ask for instrument2 is updated to
100.11/100.12.
-- as a result, the strategy bought instrument2 at 100.12, with the 10
cent slippage

So, essentially, the problem is the timing of placing the order. I
don't have a good solution for that yet. There may in fact not be a
good solution at all. If the discrepancies persist for, let's say
100ms, and it takes 200ms for IB to execute the order, then we'll
always be late.

I agree with you that losing $15 per trade is not that expensive for
what you are going to find out.

new_trader

unread,
Jul 14, 2010, 4:16:57 PM7/14/10
to JArbitrager

new_trader

unread,
Jul 14, 2010, 4:48:49 PM7/14/10
to JArbitrager
thanks for your much appreciated feedback!

I have just looked at the different IB order types:
http://www.interactivebrokers.com/en/p.php?f=orderTypes#detail
only a few are suppported by the API.
Fill-or-Kill would be nice, but is only available for futures.do not
know if it is supported by the API
-> i think that is not an option

limit orders would perhaps be a solution, but make things more
complicated:
* check if the limit order has been fully acceptd for both instruments
* if both orders have not been accepted, what should we do: wait for
the next signal from JAB to place the next apir of limit order? we
would have to think thoroughly on this
* if only one order has been accepted, should the position be closed
immediately?
->this all sounds very tricky :-(

nonlinear5

unread,
Jul 14, 2010, 8:47:47 PM7/14/10
to JArbitrager
new_trader,

I've added a $15/trade slippage assumption and re-optimized EUR_EUR.
It looks like period of 600 and entry 20 may actually be able to pull
a small profit. With these parameters, EUR_EUR averages about 9 trades
per day.

Gab

unread,
Jul 14, 2010, 10:23:30 PM7/14/10
to jarbi...@googlegroups.com

I want to have quickly more facts on JAB. With 15$ per trade this is a
good price compared with the hours we all spend into JAB.

Thanks for testing that.

It's not that expensive to test if you stop it soon enough if it looses money after 2 or 3 trades. 

new_trader

unread,
Jul 15, 2010, 5:03:07 AM7/15/10
to JArbitrager
> new_trader,
>
> I've added a $15/trade slippage assumption and re-optimized EUR_EUR.
> It looks like period of 600 and entry 20 may actually be able to pull
> a small profit. With these parameters, EUR_EUR averages about 9 trades
> per day.
>
thanks for your support and optimizng the strategy!
today i will run the original EUR_EUR strategy to get an impression
how the strategy will behave.
in forward testing mode it is highly profitable as we know.

I think that for arbitrage trading backtesting and optimising are
hardly possbile. It all depends on how much your brokers fills your
order.
today we will hopefully know a little bit more...

I have found a nice article on high frequency trading:
http://www.advancedtrading.com/regulations/showArticle.jhtml;jsessionid=RH02SFUISFIZHQE1GHPCKHWATMY32JVN?articleID=219500759&pgno=1
here some providers are also listed.

-> these guys have co-located their servers in the computing centers
of NASDAQ and have near zero latency.

new_trader

unread,
Jul 15, 2010, 10:02:31 AM7/15/10
to JArbitrager
> today i will run the original EUR_EUR strategy to get an impression
> how the strategy will behave.
sorry guys, my IB margin is not big enough:
the order from JAB for the Cash Contract was rejected:
201: Order rejected - reason:Order size is not within the limits (for
id 2)
my buying power is ~163.000 EUR, and this instrument requires some
168.000 EUR

the order for the future contract was accepted, so I had a short
position for the EUR future
I had luck that I only lost 67.42$

Gab

unread,
Jul 15, 2010, 10:04:16 AM7/15/10
to jarbi...@googlegroups.com

sorry guys, my IB margin is not big enough:
the order from JAB for the Cash Contract was rejected:
201: Order rejected - reason:Order size is not within the limits (for
id 2)
my buying power is ~163.000 EUR, and this instrument requires some
168.000 EUR

the order for the future contract was accepted, so I had a short
position for the EUR future
I had luck that I only lost 67.42$

Damn. That's no good for you.

Was your fill price for the future the same as the 'assumed' fill price for the forward test? 

nonlinear5

unread,
Jul 15, 2010, 10:11:03 AM7/15/10
to JArbitrager
> > sorry guys, my IB margin is not big enough:
> > the order from JAB for the Cash Contract was rejected:
> > 201: Order rejected - reason:Order size is not within the limits (for
> > id 2)
> > my buying power is ~163.000 EUR, and this instrument requires some
> > 168.000 EUR
>

There is a way to test this. You can set the size of your paper
trading account to whatever you want, and trade with it to see if
margins are OK. I should have told you earlier.

new_trader

unread,
Jul 15, 2010, 10:18:50 AM7/15/10
to JArbitrager
> Damn. That's no good for you.
>
> Was your fill price for the future the same as the 'assumed' fill price for
> the forward test?
no way to get this: TWS popped up with a window where I had to confirm
the trade so we have no way to examine this :-(

new_trader

unread,
Jul 15, 2010, 10:20:37 AM7/15/10
to JArbitrager
> There is a way to test this. You can set the size of your paper
> trading account to whatever you want, and trade with it to see if
> margins are OK. I should have told you earlier.
never mind :-)
perhaps we will find an instrument combination which requires a lower
margin.

Far Fetcher

unread,
Jul 15, 2010, 10:53:09 AM7/15/10
to JArbitrager
I like to put a pair, like ES and SPY on the same TWS chart, at the 1
minute time period and showing a line. Add the bid and ask to get an
idea of the spread. Now you can visually see the B/A of the first, and
where the last trade of the second falls. There's a good trade when
the second is well outside the first, especially when it lasts for
more than a second. Keep in mind TWS adds a coefficient to chart both
items at once, and this might not be what you expect, Right now (ES *
1) is with (SPY * 9.952) on my TWS, most people would prefer (SPY *
10.000). If the plot coefficient is not so good, it will change my
using another time period and going back to the 1 minute scale. The
chart updates at one second intervals, so it doesn't show the 300 msec
detail I'm trying to tweeze out of the data. More about this in the
next post.





On Jul 15, 5:03 am, new_trader <loc...@gmx.de> wrote:
> > new_trader,
>
> > I've added a $15/trade slippage assumption and re-optimized EUR_EUR.
> > It looks like period of 600 and entry 20 may actually be able to pull
> > a small profit. With these parameters, EUR_EUR averages about 9 trades
> > per day.
>
> thanks for your support and optimizng the strategy!
> today i will run the original EUR_EUR strategy to get an impression
> how the strategy will behave.
> in forward testing mode it is highly profitable as we know.
>
> I think that for arbitrage trading backtesting and optimising are
> hardly possbile. It all depends on how much your brokers fills your
> order.
> today we will hopefully know a little bit more...
>
> I have found a nice article on high frequency trading:http://www.advancedtrading.com/regulations/showArticle.jhtml;jsession...

Adam

unread,
Jul 15, 2010, 12:45:06 PM7/15/10
to JArbitrager
There's an option in TWS called "Bypass Order Precautions for API
Orders." It should correct this behavior.
Reply all
Reply to author
Forward
0 new messages