JArbitrager

197 views
Skip to first unread message

primen...@gmail.com

unread,
Dec 3, 2014, 4:37:38 PM12/3/14
to jbook...@googlegroups.com
I have been testing a pretty simple strategy that is more or less an arbitrage strategy between a future and a stock, where I buy or sell when the difference is 1 std dev away from the mean and close the position after regresses to the mean.  I am wondering if JBookTrader will handle this with the bolinger bands indicator in some way, or should I try to set up JArbitrager which I think I have read was designed for that.

The difference between the two securities is more or less a synthetic security which is to be watched and traded when it deviates from the mean or returns to the mean.

Thanks

Ali Farahani

unread,
Dec 3, 2014, 9:20:52 PM12/3/14
to jbook...@googlegroups.com
Greetings,

JBookTrader has been optimized for Order Book trading. It offers a level of abstraction through the Strategy class that works best when used for Order Book trading. You could develop a custom layer on JBookTrader for Bolinger Band trading to utilize the infrastructure (e.g., order management, position management, etc.) but then it won't be JBookTrader.

Kind regards,

Ali

Eugene Kononov

unread,
Dec 3, 2014, 10:10:13 PM12/3/14
to JBookTrader
JArbitrager would definitely be a better fit to this, compared to JBookTrader. 

--
You received this message because you are subscribed to the Google Groups "JBookTrader" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jbooktrader...@googlegroups.com.
To post to this group, send email to jbook...@googlegroups.com.
Visit this group at http://groups.google.com/group/jbooktrader.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted

primen...@gmail.com

unread,
Dec 3, 2014, 10:18:10 PM12/3/14
to jbook...@googlegroups.com
OK Great I will use it

Eugene Kononov

unread,
Dec 3, 2014, 10:20:35 PM12/3/14
to JBookTrader
JArbitrager last release was in 2010, and no development work had been done since. You'd have to do a bit of work to bring it up to shape.

primen...@gmail.com

unread,
Dec 3, 2014, 10:40:04 PM12/3/14
to jbook...@googlegroups.com
I got it running, and connected to TWS, what do you think it might be lacking?  Several TWS updates since 2010.  I guess people are still using JArbitrager?

Eugene Kononov

unread,
Dec 3, 2014, 10:53:25 PM12/3/14
to jbook...@googlegroups.com
I don't think it would be able to place trades. It has an old version of IB API which is not compatible with the latest version of TWS. That API needs to be updated. You can take the newer version of that API from JBooktrader and drop it in your JArbitrager project. Then test everything using a paper trading account.

primen...@gmail.com

unread,
Dec 3, 2014, 10:58:01 PM12/3/14
to jbook...@googlegroups.com
Thanks, I will get to work on it.

Eugene Kononov

unread,
Dec 3, 2014, 11:06:48 PM12/3/14
to jbook...@googlegroups.com
The sample strategy in JArbitrager is pretty much what you were describing. It trades when the spread between the SPY and the ES becomes too wide, and closes the trade when the spread reverts to its recent mean. My paper trading of this strategy showed that this particular pair is essentially arbitraged to death, so there is no hope for a small trader to squeeze any profit. Did you backtest your pair yet?


On Wednesday, December 3, 2014, <primen...@gmail.com> wrote:

primen...@gmail.com

unread,
Dec 3, 2014, 11:22:02 PM12/3/14
to jbook...@googlegroups.com
I actually found a different pair that Goldman Sachs has not thought of yet, I have done no long-term backtesting but it reverts pretty reliably I think.  I look forward to backtesting it for real.  I made about $4k last week on one 3 day trade though.

primen...@gmail.com

unread,
Dec 3, 2014, 11:25:12 PM12/3/14
to jbook...@googlegroups.com
And sincere thanks for developing this program! 

Eugene Kononov

unread,
Dec 3, 2014, 11:42:33 PM12/3/14
to jbook...@googlegroups.com
Neither jbooktrader nor jarbitrager hold positions overnight. If your trades span multiple days, you would have to make changes in the way jarbitrager trades, backtests, and optimizes trading strategies.


On Wednesday, December 3, 2014, <primen...@gmail.com> wrote:
Message has been deleted

primen...@gmail.com

unread,
Dec 5, 2014, 12:44:14 PM12/5/14
to jbook...@googlegroups.com
I had no trouble updating the API in JArbitrager, now I am trying to figure out how to edit the java to keep positions open for multiple days.

I am not yet familiar with how the program works, do you think this going to be a big job or tricky to modify?


On Wednesday, December 3, 2014 10:42:33 PM UTC-6, Eugene Kononov wrote:

Eugene Kononov

unread,
Dec 5, 2014, 1:01:46 PM12/5/14
to JBookTrader
You are on your own, primenumber. The development of JArbitrager stopped 4 years ago, and I don't think there are any active users.

--

primen...@gmail.com

unread,
Dec 5, 2014, 1:15:18 PM12/5/14
to jbook...@googlegroups.com
I will definitely be an active user!  I have been hoping that I might one day find a strategy that would make an autotrade program worthwhile.  As you know, there are very few good ideas that have not been arbitraged out by the bigger fish. 

Eugene Kononov

unread,
Dec 5, 2014, 1:21:52 PM12/5/14
to JBookTrader
I'd suggest that before you make any dramatic changes to JArbitrager, make sure that your strategy works on the intra-day basis. To validate your strategy, you would need a historical data file in JArbitrager format, which has the prices of each of the two instruments side by side. Just like JBookTrader, JArbitrager has functionality to backtest and optimize your trading strategy. 

--

primen...@gmail.com

unread,
Dec 6, 2014, 4:57:49 PM12/6/14
to jbook...@googlegroups.com
At least as far as trading mode, wouldn't I be able to just set the trading schedule to "0:01", "23:59" and just operate like that?  I think I saw you recommend that in an earlier message.  It does not try to close positions at the end of the day arbitrarily does it? 

I am concerned about backtesting and optimization though, that seems like it would take some heavy modification.


On Wednesday, December 3, 2014 10:42:33 PM UTC-6, Eugene Kononov wrote:
Reply all
Reply to author
Forward
0 new messages