Serving the Quantitative Finance Community

 
User avatar
genie92
Topic Author
Posts: 0
Joined: May 1st, 2006, 3:39 pm

High Frequency Arbitrage Platform

May 2nd, 2006, 1:15 pm

HelloFor the past year or so I have been working independently, diligently coding a high performance high frequency arbitrage platform for trading futures. I've financed the operation on my own, placed a server in a highly strategic location, and implemented some working high frequency arbitrage strategies.I've also learned the hard way that there is no way that one person can realistically do all of this - develop platform software, do arbitrage research/strategy coding, manage risk, and do the trading. It's just too stressful.I feel the only healthy thing to do is to separate myself of the arbitrage and go back to trading discretionarily.I was trying to figure out some way to keep from wasting all of my accomplishments as I try to exit this business, and I came up with a few ideas: (1) call my futures trading buddies and see if one of them wants it, (2) call some brokerage firms and see if they want it, (3) create a website for it and see who knocks on the door, (4) throw it out the window and say lesson learned, eat the losses and move on, or (5) write a book on my experiences and charge some ridiculous price for it.Is there anyone else out there who has tried something like this on their own? Do you have any suggestions or ideas? Is it foolish to make it this far and give up? You can reply privately by e-mail.Thoughts welcome, I'm sure I'll get plenty of flaming from those who have made it successfully. That's fine. It won't be any worse than the struggle I have been through.
 
User avatar
monarc
Posts: 0
Joined: June 21st, 2004, 2:35 pm

High Frequency Arbitrage Platform

May 2nd, 2006, 3:24 pm

Or you can collaborate with somebody who is in the same boat as yours. I did the same thing and I am almost done with it. Yes, coded myself, BUT NOT VERY HIGH frequency. I use MATLAB to trade it. and Since I have been using matlab for many years, I am very comfortable programming it. A friend of mine, who is an expert JAVA programmer implemented the JAVA API for me, giving me the java methods neccessary for connecting to my broker's api. Now, I call from within matlab the java methods. I run it off a 1 sec timer from matlab. I know some people might say that MATLAB is NOT robust enough and blah and blah...But it works fine for me. Ofcourse, I keep monitoring it through remote host connection. Will be going LIVE with REAL money account next week. So far, it has been LIVE with PAPER money. It has performed good. I ONLY trade futures. Email me if you want to collaborate. Just an Electrical Engineer turned Quant Futures Trader. thanks
 
User avatar
crowlogic
Posts: 0
Joined: May 22nd, 2005, 6:47 pm

High Frequency Arbitrage Platform

May 2nd, 2006, 3:47 pm

I've also spent a vast amount of time working on my own high frequency 'arbitrage' system written in Java and some custom numeric packages I wrote by integrating several optimized math packages into java via JNI wrappers. A ton of my stuff is done in matlab but when I find something useful I re-write it in java and pick unit testing procedures and an OO framework around it..The main thrust of my work so far is to collect the rawest, highest frequency and most complete set of data that I can then import into matlab for modelling and analysis and since I'm constantly finding ways to improve my work so I've decided to keep digging deeper, getting the most fundamental stuff right (quote arrival process, irregularly spaced observations, bid/ask bounce, jumps, reaction-diffusion, etc).I know matlab is definately not stable enough for me to trust as I get crashes quite often, but I've heard good things about the matlab compiler (basically a standalone headless version of matlab). Also, I've found that re-coded, documented and properly designed algorithm interfaces can greatly speed execution and gives you access to some really good profiling tools.I'm focusing on equities but I can easily add futures.Have you found any down-sides to using the fixed 1-second interval, do you model intra-day seasonal quote intensity/volatility? How do you filter prices and model the spread?I'd love to share ideas.. even if we can't share code, ideas are just as useful.Also, who is your broker?--StephenQuoteOriginally posted by: monarcOr you can collaborate with somebody who is in the same boat as yours. I did the same thing and I am almost done with it. Yes, coded myself, BUT NOT VERY HIGH frequency. I use MATLAB to trade it. and Since I have been using matlab for many years, I am very comfortable programming it. A friend of mine, who is an expert JAVA programmer implemented the JAVA API for me, giving me the java methods neccessary for connecting to my broker's api. Now, I call from within matlab the java methods. I run it off a 1 sec timer from matlab. I know some people might say that MATLAB is NOT robust enough and blah and blah...But it works fine for me. Ofcourse, I keep monitoring it through remote host connection. Will be going LIVE with REAL money account next week. So far, it has been LIVE with PAPER money. It has performed good. I ONLY trade futures. Email me if you want to collaborate. Just an Electrical Engineer turned Quant Futures Trader. thanks
Last edited by crowlogic on May 1st, 2006, 10:00 pm, edited 1 time in total.
 
User avatar
farmer
Posts: 63
Joined: December 16th, 2002, 7:09 am

High Frequency Arbitrage Platform

May 2nd, 2006, 4:39 pm

QuoteOriginally posted by: genie92For the past year or so I have been working independently, diligently coding a high performance high frequency arbitrage platform for trading futures.What is a platform? I've written data-management code to receive, store, and retrieve data, decision code to turn data into buy-sell decisions, order-routing code, and visual monitoring code. But I've never coded a platform, so far as I know.QuoteOriginally posted by: genie92I've financed the operation on my own, placed a server in a highly strategic location, and implemented some working high frequency arbitrage strategies.So are you saying you interface with Globex or something, so you put the server at MCI's first hop in Illinois? Or is the "location" on top of your "platform?"QuoteOriginally posted by: genie92I was trying to figure out some way to keep from wasting all of my accomplishments as I try to exit this businessIf you have an exchange membership and a clearing relationsip, could you sell that? Code is really a dime a dozen. But I don't get it. It should take less than two weeks to write the code, and many years to develop the trading strategy. You've just begun. Are you short on cash?If you know enough to write a book, all the heavy lifting is behind you, not including strategy development. So far as risk management, that should be much easier than writing a profitable strategy. I figure a person who can come up with one profitable strategy after two years, should be able to write a risk-management program in two days.If it took a year to write the code, maybe you just need some more patience, and a few contract jobs to pay the bills in the meantime.
Antonin Scalia Library http://antoninscalia.com
 
User avatar
crowlogic
Posts: 0
Joined: May 22nd, 2005, 6:47 pm

High Frequency Arbitrage Platform

May 2nd, 2006, 4:50 pm

I agree with this, the code is definately not the hard part, it might take a non-trivial amount of time to get it to be robust though.My code handles* Scriptable commandline interface* Persistent scheduled/recurring tasks* Data feed monitoring, time-outs, lag, connect, disconnect* assembly/sorting/aggregation of full depth-of-book information from multiple data sources, possible each coming up and going down at different times* 'Price impact' functions, e.g. "How many shares can I *immediately* execute and only slip the exact specificed percentage" or "WHat is the slippage on an immediate sell vs. projected slippage of a limit order sitting for 55 seconds?"* Data mangement/storage/retrival/playback/export to matlab (can "replay" archived data and sent it back thru the callback handlers just as if it was happening in realtime)* Paging/Email monitorig/Chat bot (IM client integration for mobile monitoring)I think that stuff probably qualifies as a 'platform', and from there it seperates the nitty-gritty details from the strategy/modelling/resting.--StephenQuoteOriginally posted by: farmerQuoteOriginally posted by: genie92If it took a year to write the code, maybe you just need some more patience, and a few contract jobs to pay the bills in the meantime.
 
User avatar
farmer
Posts: 63
Joined: December 16th, 2002, 7:09 am

High Frequency Arbitrage Platform

May 2nd, 2006, 4:50 pm

QuoteOriginally posted by: genie92It's just too stressful. I feel the only healthy thing to do is to separate myself of the arbitrage and go back to trading discretionarily.And if you get cold, maybe you can fix that by pouring ice down your shirt.
Antonin Scalia Library http://antoninscalia.com
 
User avatar
monarc
Posts: 0
Joined: June 21st, 2004, 2:35 pm

High Frequency Arbitrage Platform

May 2nd, 2006, 7:05 pm

Hello stephen,Interactive Brokers is my Broker. They give JAVA API for free if you open an account with them. My model just gets the bid ask quotes and other stuff by connecting matlab to the broker's API. Once it gets into the matlab, you can do whatever you want after that. 1 second interval works fine. When I am NOT running the arbitrage system, I just use matlab to collect the data from the broker API. Another cheap way to get the data intsead of buying from outside company. I have been using it with PAPER accoubnt so far.regarding crashes, yes, they will happen. For the past 30 days of my data collection and program running, it crashed twice. so thats not too bad. I think the usefullness lies in running your strategies in a simulated mode and when you think it works well, then you can always write in java or c++ and then go with real trading. I am NOT a good JAVA Prograamer and I dont want to depend on others everytime for coding up my stratategies and so I went with MATLAB. You all know how easy it is to program in matlab new strategies.......I tested three strategies in matlab in two weeks and after siome analysis will be going with one I think which is the least risky.(even if the matlab crashes, the losses would NOT be great, only the opportunity to make the profit would be lost. and I restart it again. Like I said this situation has NOT occured to me yet as the crashes that happened were after the day)QuoteOriginally posted by: crowlogicI've also spent a vast amount of time working on my own high frequency 'arbitrage' system written in Java and some custom numeric packages I wrote by integrating several optimized math packages into java via JNI wrappers. A ton of my stuff is done in matlab but when I find something useful I re-write it in java and pick unit testing procedures and an OO framework around it..The main thrust of my work so far is to collect the rawest, highest frequency and most complete set of data that I can then import into matlab for modelling and analysis and since I'm constantly finding ways to improve my work so I've decided to keep digging deeper, getting the most fundamental stuff right (quote arrival process, irregularly spaced observations, bid/ask bounce, jumps, reaction-diffusion, etc).I know matlab is definately not stable enough for me to trust as I get crashes quite often, but I've heard good things about the matlab compiler (basically a standalone headless version of matlab). Also, I've found that re-coded, documented and properly designed algorithm interfaces can greatly speed execution and gives you access to some really good profiling tools.I'm focusing on equities but I can easily add futures.Have you found any down-sides to using the fixed 1-second interval, do you model intra-day seasonal quote intensity/volatility? How do you filter prices and model the spread?I'd love to share ideas.. even if we can't share code, ideas are just as useful.Also, who is your broker?--StephenQuoteOriginally posted by: monarcOr you can collaborate with somebody who is in the same boat as yours. I did the same thing and I am almost done with it. Yes, coded myself, BUT NOT VERY HIGH frequency. I use MATLAB to trade it. and Since I have been using matlab for many years, I am very comfortable programming it. A friend of mine, who is an expert JAVA programmer implemented the JAVA API for me, giving me the java methods neccessary for connecting to my broker's api. Now, I call from within matlab the java methods. I run it off a 1 sec timer from matlab. I know some people might say that MATLAB is NOT robust enough and blah and blah...But it works fine for me. Ofcourse, I keep monitoring it through remote host connection. Will be going LIVE with REAL money account next week. So far, it has been LIVE with PAPER money. It has performed good. I ONLY trade futures. Email me if you want to collaborate. Just an Electrical Engineer turned Quant Futures Trader. thanks
 
User avatar
crowlogic
Posts: 0
Joined: May 22nd, 2005, 6:47 pm

High Frequency Arbitrage Platform

May 2nd, 2006, 7:17 pm

If you are serious about trading you should really check out Lime BrokerageI've used IB's java api before.. it sucks, they limit your message rate and you can get burned in fast moving markets and even when markets arent moving fast you are dealing with slow, incomplete data. Also, you still need that huge beast of a program running in the background just to use the API.Lime's api is completely java based.. very very fast, simple to use, pretty good design. I can send you the javadoc's if you like. Also, just last month they were the top liquidity provider for the NYSE.Top Liquidity Providers in NYSE-Listed Securities - March 2006 I don't work for em them have any other interest besides being a very happy customer.--StephenQuoteOriginally posted by: monarcHello stephen,Interactive Brokers is my Broker. They give JAVA API for free if you open an account with them. My model just gets the bid ask quotes and other stuff by connecting matlab to the broker's API. Once it gets into the matlab, you can do whatever you want after that. 1 second interval works fine. When I am NOT running the arbitrage system, I just use matlab
 
User avatar
genie92
Topic Author
Posts: 0
Joined: May 1st, 2006, 3:39 pm

High Frequency Arbitrage Platform

May 2nd, 2006, 7:50 pm

I don't know how to quote on these forums, is it supposed to be obvious?[ What is a platform? I've written data-management code to receive, store, and retrieve data, decision code to turn data into buy-sell decisions, order-routing code, and visual monitoring code. But I've never coded a platform, so far as I know. ]I use "A platform" to mean an integrated package that performs all of the above functions, and includes the trader's interface to do all the trading / risk management.[ So are you saying you interface with Globex or something, so you put the server at MCI's first hop in Illinois? Or is the "location" on top of your "platform?"]Basically, yes.[ If you have an exchange membership and a clearing relationsip, could you sell that? Code is really a dime a dozen. But I don't get it. It should take less than two weeks to write the code, and many years to develop the trading strategy. You've just begun. Are you short on cash? ]No I don't have an exchange membership - as far as taking two weeks to write the code, that may be true for a simple application written in Visual Basic or something like that. A fully integrated client-server application written in assembly and C++, specifically optimized for multi-processor CPUs, that's not something most people get working in weeks.As far as trading strategies, some of the strategies are very easy if you're fast enough. Unfortunately it takes a lot of monitoring, a lot of time, and paying a lot of fees to get everything working and profitable in real-time. Not to mention- there's a whole heck of a lot of risk of things going wrong![ If you know enough to write a book, all the heavy lifting is behind you, not including strategy development. So far as risk management, that should be much easier than writing a profitable strategy. I figure a person who can come up with one profitable strategy after two years, should be able to write a risk-management program in two days. ]Risk management is more than just some application that monitors risk from a trading standpoint, it's the proper adjustment of the trading application for market conditions and profitability. Let me give you an example of a risk that is hard to quantify unless you work at this alone:Some days or weeks, the trading is very long, maybe 12-16 hours a day. By the third or fourth day, I am mentally exhausted. My decision making, adjusting trading quantities/parameters, etc. is just not as sharp. Unless you've traded through extremely stressful situations while sleep deprived, it's hard to understand the types of risk created.
 
User avatar
farmer
Posts: 63
Joined: December 16th, 2002, 7:09 am

High Frequency Arbitrage Platform

May 2nd, 2006, 8:08 pm

Yeah, Penson is who all the day traders used to use. I imagine a combination of Penson, Globex, and IB for other futures, is a very good tradeoff between power and being able to get it up and running very quickly.QuoteOriginally posted by: genie92Some days or weeks, the trading is very long, maybe 12-16 hours a day. By the third or fourth day, I am mentally exhausted. My decision making, adjusting trading quantities/parameters, etc. is just not as sharp. Unless you've traded through extremely stressful situations while sleep deprived, it's hard to understand the types of risk created.This is just a result of you not having a good decision-making process in place. Put simply, you're making guesses. The result would be hardly better if you were wide awake. If you clearly understand what you are doing and why you are doing it - if you are making recurring classifications - you should be able to do it just fine sleepy, and it shouldn't be stressful. You need to record your analytical decisions in a stimulus-response catalog for instant reuse.I've long believed that if you can't do something drunk and tired, you're not very good at it to begin with. It does take time for the brain to develop an attention span, and habits, specific to an occupation. Perhaps you are still too fresh off the programming daily routine, and just need to give it more time. When young football players start at college, or in the pros, it takes them several years to get comfortable with the speed of the game, and with the decisions they have to make over and over - their "reads." But they stick with it, because they know it will get second nature, and there is a reward at the end of it.My suspicion is that it's not that you're not cut out for it, but that you have a preconceived sense of work and reward which is designed around a programming workday. You just need to develop new pathways of satisfaction, and you will grow happy with sitting and reacting, rather than engineering functional lines of code. I bet you could program all night. You just need to learn to be happy with a different type of tangible product of your effort. You won't make money every day, and every decision won't get the desired outcome.Besides, if you have this discretion, just shut it down after a few hours like you plan to if you "go back to trading discretionarily." Normally when people are making money, they keep working, unless they have a date, or have to pick up the kids at band practice or something. But I bet if you push through several weeks of 16 hour days, even though you are risking a loss doing so, you will get in a groove.
Antonin Scalia Library http://antoninscalia.com
 
User avatar
TraderJoe
Posts: 1
Joined: February 1st, 2005, 11:21 pm

High Frequency Arbitrage Platform

May 2nd, 2006, 11:43 pm

Why don't you guys go and work for these guys as C++ programmers ?Lime Brokerage Careers.
 
User avatar
crowlogic
Posts: 0
Joined: May 22nd, 2005, 6:47 pm

High Frequency Arbitrage Platform

May 2nd, 2006, 11:47 pm

I thought about it, but the entire point of this is that I want to 'be my own boss', etc, etc. And I have no degree or experience in the financial industry, plus based on their figures I'd be taking a paycut from my current job which is pretty easy and gives me a lot of time to focus on trading software.--StephenQuoteOriginally posted by: TraderJoeWhy don't you guys go and work for these guys as C++ programmers ?Lime Brokerage Careers.
 
User avatar
farmer
Posts: 63
Joined: December 16th, 2002, 7:09 am

High Frequency Arbitrage Platform

May 3rd, 2006, 12:44 am

QuoteOriginally posted by: TraderJoeWhy don't you guys go and work for these guys as C++ programmers ?Why don't you do them a favor, and mail them a Bangalore phone book.
Antonin Scalia Library http://antoninscalia.com
 
User avatar
KackToodles
Posts: 0
Joined: August 28th, 2005, 10:46 pm

High Frequency Arbitrage Platform

May 3rd, 2006, 1:08 am

QuoteOriginally posted by: genie92For the past year or so I have been working independently, diligently coding a high performance high frequency arbitrage platform for trading futures. I've financed the operation on my own, placed a server in a highly strategic location, and implemented some working high frequency arbitrage strategies. I've also learned the hard way that there is no way that one person can realistically do all of this - develop platform software, do arbitrage research/strategy coding, manage risk, and do the trading. It's just too stressful. I feel the only healthy thing to do is to separate myself of the arbitrage and go back to trading discretionarily. I was trying to figure out some way to keep from wasting all of my accomplishments as I try to exit this business, and I came up with a few ideas: (1) call my futures trading buddies and see if one of them wants it, (2) call some brokerage firms and see if they want it, (3) create a website for it and see who knocks on the door, (4) throw it out the window and say lesson learned, eat the losses and move on, or (5) write a book on my experiences and charge some ridiculous price for it. Is there anyone else out there who has tried something like this on their own? Do you have any suggestions or ideas? Is it foolish to make it this far and give up? You can reply privately by e-mail. Thoughts welcome, I'm sure I'll get plenty of flaming from those who have made it successfully. That's fine. It won't be any worse than the struggle I have been through. What you have done is analogous to a bad trade that has you in a losing position. You need to exit your position ASAP, suck it up and realize your losses. If you dawdle, you will stand to keep losing more time & money. Get out now. Option (4) is the only way to go.
Last edited by KackToodles on May 2nd, 2006, 10:00 pm, edited 1 time in total.
 
User avatar
genie92
Topic Author
Posts: 0
Joined: May 1st, 2006, 3:39 pm

High Frequency Arbitrage Platform

May 3rd, 2006, 1:57 am

You know, that's exactly how I've felt. It feels like a bad trade that I have held for too long- always feels great to blow out the position and start fresh!QuoteOriginally posted by: KackToodlesQuoteOriginally posted by: genie92For the past year or so I have been working independently, diligently coding a high performance high frequency arbitrage platform for trading futures. I've financed the operation on my own, placed a server in a highly strategic location, and implemented some working high frequency arbitrage strategies. I've also learned the hard way that there is no way that one person can realistically do all of this - develop platform software, do arbitrage research/strategy coding, manage risk, and do the trading. It's just too stressful. I feel the only healthy thing to do is to separate myself of the arbitrage and go back to trading discretionarily. I was trying to figure out some way to keep from wasting all of my accomplishments as I try to exit this business, and I came up with a few ideas: (1) call my futures trading buddies and see if one of them wants it, (2) call some brokerage firms and see if they want it, (3) create a website for it and see who knocks on the door, (4) throw it out the window and say lesson learned, eat the losses and move on, or (5) write a book on my experiences and charge some ridiculous price for it. Is there anyone else out there who has tried something like this on their own? Do you have any suggestions or ideas? Is it foolish to make it this far and give up? You can reply privately by e-mail. Thoughts welcome, I'm sure I'll get plenty of flaming from those who have made it successfully. That's fine. It won't be any worse than the struggle I have been through. What you have done is analogous to a bad trade that has you in a losing position. You need to exit your position ASAP, suck it up and realize your losses. If you dawdle, you will stand to keep losing more time & money. Get out now. Option (4) is the only way to go.