tag:blogger.com,1999:blog-35364652.post860618627764654049..comments2024-03-22T10:29:59.088-04:00Comments on Quantitative Trading: Trading platform and EC2 revisitedErnie Chanhttp://www.blogger.com/profile/02747099358519893177noreply@blogger.comBlogger64125tag:blogger.com,1999:blog-35364652.post-10102807288567112772013-01-10T10:40:44.938-05:002013-01-10T10:40:44.938-05:00Which VPS hosting company do you use?Which VPS hosting company do you use?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-35364652.post-24902206962992865442013-01-07T08:20:56.879-05:002013-01-07T08:20:56.879-05:00Anon,
I used to use Amazon EC2 because I only run ...Anon,<br />I used to use Amazon EC2 because I only run strategies during the market hours and I can save on some CPU time at night. But since I now run strategies round the clock, I switch to a VPS, which is more convenient.<br /><br />I used a M1 large Windows instance when I was with EC2.<br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-54267803623633703362013-01-06T20:05:22.987-05:002013-01-06T20:05:22.987-05:00Thanks for your reply, why did you choose Amazon E...Thanks for your reply, why did you choose Amazon EC2 over traditional VPS?<br /><br />Also what type of instance do you run http://aws.amazon.com/ec2/instance-types/ ?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-35364652.post-13106186213865315412013-01-04T20:42:05.524-05:002013-01-04T20:42:05.524-05:00Yes, EC2 is a reasonable choice, and is a step-up ...Yes, EC2 is a reasonable choice, and is a step-up from home computer. It doesn't do much to reduce your latency to your broker, but of course it is much more stable than home computer.<br /><br />I haven't experienced any issues with cloud services in general, such as the ones your mentioned. In particular, I never had an instance got shut down. <br /><br />EC2 is not the only cloud service. If you google VPS, there are many providers which will provide you with a permanently running service (no starting or killing instances).<br /><br />The typical monthly cost is $100-$400 depending on if you are using CPU at all times.<br /><br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-90612459252546016062013-01-04T18:34:27.684-05:002013-01-04T18:34:27.684-05:00I'm running an automated trading strategy curr...I'm running an automated trading strategy currently from home. My setup uses my broker's Windows-based trading platform and I've written the automation using my brokers API. I want to reduce some of the technological risks such as internet connection or power going down. I am US based.<br /><br />One option is colocation at my brokers datacenter but that is more expensive than I'd like at this stage. Another is a dedicated server at a generic datacenter but that is not much cheaper and doesn't offer the latency advantages.<br /><br />Do you think using Amazon EC2 is a reasonable replacement for a home desktop computer-based infrastructure?<br /><br />What issues are there with EC2? I'm not familiar with cloud services but do you have to worry about the system slowing down for a few seconds because someone else is doing heavy CPU/IO/networking? The system pausing for a few seconds could be bad. <br /><br />Do you find the connection from EC2 to broker typically better than connection from home to broker?<br /><br />Do you have to worry about the instance being shutdown while trading?<br /><br />Overall am I stepping up my infrastructure by moving from home computer to EC2? Or am I just swapping one set of issues for another?<br /><br />What is a ballpark monthly cost for an EC2 instance that could replace a home trading system?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-35364652.post-34096567626335326792012-04-10T07:52:11.072-04:002012-04-10T07:52:11.072-04:00reptile,
There is no "best" platform, si...reptile,<br />There is no "best" platform, since it all depends on your own skills. For me, Matlab is the language/platform of choice. But once I master Python, I may try one of those open source IDE such as Marketcetera or Tradelink because of their FIX connectivity.<br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-51530591575559997582012-04-10T06:25:38.819-04:002012-04-10T06:25:38.819-04:00Sooo.. what is the best platform for algo ? :)Sooo.. what is the best platform for algo ? :)reptilehttps://www.blogger.com/profile/07294073688662746080noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-52629012701910298002012-02-20T12:44:26.688-05:002012-02-20T12:44:26.688-05:00Thanks for the feedback. I have an open call in w...Thanks for the feedback. I have an open call in with IB about the OPG issue. No answer yet...<br /><br />I will research your open print volume input/idea further.<br /><br />Thanks again. <br /><br />ClarkClarkhttps://www.blogger.com/profile/04347663335214043595noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-35426089446015544982012-02-20T12:34:04.563-05:002012-02-20T12:34:04.563-05:00Clark,
If some of your OPG orders did not receive ...Clark,<br />If some of your OPG orders did not receive the official open prices, this is a major bug/issue that you need to work with IB to resolve. <br /><br />On the other hand, if your order size is a substantial portion of the opening print, it will definitely affect the open price itself (independently of the bug above). It should not really be called "slippage" in this case. It should be called "market impact". I would recommend you set your order size to be no more than 5% of the opening print. The size of the opening trade can be found either on Bloomberg, or by looking at the volume immediately after the open.<br /><br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-29799776751386910502012-02-20T12:27:15.806-05:002012-02-20T12:27:15.806-05:00Ernie,
"Relative to what" is exactly wh...Ernie,<br /><br />"Relative to what" is exactly what I am struggling with. In my test trades, about 75% of my trades receive the "official open" the other 25% are higher and lower in approximately equal proportions. I guess OPG is not really OPG.<br /><br />If my trade volumes increase, it would impact what the "official open" is, so I am trying to estimate this. It is likely that I need to go read some more research papers that describe modeling slippage, so if you can recommend those I would greatly appreciate it.<br /><br />Additionally, if you have any ideas regarding specific Interactive Brokers order algos, I am all ears.<br /><br />Regards,<br />ClarkClarkhttps://www.blogger.com/profile/04347663335214043595noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-31791614671021184852012-02-20T12:12:47.756-05:002012-02-20T12:12:47.756-05:00Clark,
My question to you is: slippage relative to...Clark,<br />My question to you is: slippage relative to what?<br /><br />If you are sending OPG orders, your execution price will be exactly equal to the official exchange open price. <br /><br />So do you mean slippage relative to the mid point just before/after the open? <br /><br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-64682482347099234682012-02-20T12:07:35.676-05:002012-02-20T12:07:35.676-05:00Can anyone point me to publications or share their...Can anyone point me to publications or share their knowledge on modeling slippage? I am working on equities statarb system (with a few twists) that is trading a small account (less than $1MM). Backtesting performance is good, live performance is good, but I need to get a better grasp on slippage to know if it can scale. It trades daily (not intra-day). I have run some live tests on Interactive Brokers proprietary order execution algos and tested Interactive Broker's OPG orders (Open Price Guarantee) execution, but my test results are inconclusive. My tests would indicate that slippage is 0 to slightly positive, but that can't be right even at the current small size of trades. I would greatly appreciate any advice, and thanks in advance for any pointers.<br /><br />Regards,<br />ClarkClarkhttps://www.blogger.com/profile/04347663335214043595noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-20758402708426130442012-01-26T07:40:08.316-05:002012-01-26T07:40:08.316-05:00Andrew,
Have you tried downloading the file http:/...Andrew,<br />Have you tried downloading the file http://quantum.meplaza.nl/ib_matlab_tutorial.zip?<br /><br />I don't think ActiveX can work in Linux, but maybe other readers who know more about this can comment here?<br /><br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-15559405927625938072012-01-25T20:57:57.803-05:002012-01-25T20:57:57.803-05:00hey ernie,
thx for your reply. i checked out matl...hey ernie,<br /><br />thx for your reply. i checked out matlab-trading.blogspot.com i'm not sure if there's matlab code still available for linking with the IB api? also would you have experience getting activeX working on a linux sys? i'm trying to port this over to a linux os as letting it run on win os hasn't been that stable long term wise. thx!Andrewnoreply@blogger.comtag:blogger.com,1999:blog-35364652.post-77345076074555233762012-01-25T15:10:33.735-05:002012-01-25T15:10:33.735-05:00Anon,
The best colocation option is one that is of...Anon,<br />The best colocation option is one that is offered by your own broker, since your market data and orders all travel within the same local network. Lime brokerage offers colocation, so does FXCM for institutional clients. I have heard rumours that even IB is going to offer this service.<br /><br />If your broker does not offer this, then Equinix or Telx also offers data centers close to various exchanges and ECN's. They have lots of clients in trading. Monthly rate starts at about $1K.<br /><br />Other readers have previously suggested slicehost.com and gogrid.com as alternatives to EC2 as well.<br /><br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-76020340097928504152012-01-25T13:09:28.695-05:002012-01-25T13:09:28.695-05:00What other options are there besides EC2 is you wa...What other options are there besides EC2 is you want faster execution besides colocation.<br /><br />In terms of colacation are there any services like ec2 specifically for trading?<br /><br />What are the best colocation options are out there. Last I looked it was around 10k a month but it seemed hard to find information. Also concerned about security. If this was closer to 1-2k I'd be in. I mainly trade futures so looking in chicago area.<br /><br />Thanks all your responses have been very helpful as people typical ask other questions I have. Great blog!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-35364652.post-88782778614031218512012-01-25T07:30:07.013-05:002012-01-25T07:30:07.013-05:00Hi Andrew,
You can try matlab-trading.blogspot.co...Hi Andrew,<br /><br />You can try matlab-trading.blogspot.com or leptokurtosis.com for free Matlab ActiveX API. Also, search for "Interactive Brokers API" on Matlab File Exchange will get you to one too.<br /><br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-76165041092250789182012-01-25T01:57:26.535-05:002012-01-25T01:57:26.535-05:00hi ernie,
been a long time fan and have avidly r...hi ernie, <br /><br />been a long time fan and have avidly reading your book. I have been trying to move my trading into the quantitative direction. At the moment I am trying to decide b/w Python and matlab for implementing my trades with IB. However, it seems that the free matlab to IB api's that were once available have all been taken down; i was hoping if you could point me in the direction of any that you can think of? I would strongly prefer to stay with matlab as my previous programming has been in this area. thx!Andrewnoreply@blogger.comtag:blogger.com,1999:blog-35364652.post-54040823694317307892012-01-23T15:32:44.900-05:002012-01-23T15:32:44.900-05:00Will,
I know of a few sites which track people'...Will,<br />I know of a few sites which track people's real investment track records (e.g. Currensee.com, myfxbook.com, strategyxchange.com), but none that require traders to disclose their strategies.<br /><br />But obviously, if someone has disclosed their strategies to you, you won't need an independent website to verify its performance: you can just repeat the backtest yourself!<br /><br />The only caveat may be that you think perhaps a recently disclosed strategy is full of "data snooping bias" (i.e. overfitted to past data, or "datamined"). To avoid this, you can look up strategies that have been disclosed publicly a few years ago, and then backtest its performance in the years since publication.<br /><br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-71801797647499460632012-01-23T12:03:40.887-05:002012-01-23T12:03:40.887-05:00Ernie,
Is there a place where people have publishe...Ernie,<br />Is there a place where people have published specific strategies that they used in the past, saying how profitable they were and how long they remained valid, in a way that could be backtested and checked. I guess you could say I'm experiencing a lack of trust regarding the literature I have read, because it's starting to sound a bit like parapsychology ("it worked...I saw it work...but nobody else saw it and in fact it doesn't work if anyone else is watching because the subject gets nervous, or some other reason, etc etc") I too am a former physicist, by the way.Will Nelsonhttps://www.blogger.com/profile/00289187877856552901noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-6592202624783844232011-12-28T14:46:19.487-05:002011-12-28T14:46:19.487-05:00Anon,
Matlab is a general-purpose computational pl...Anon,<br />Matlab is a general-purpose computational platform as opposed to a special-purpose trading software: you can program it to be as complicated or as simple as you want. I personally have used it for everything from backtesting to live execution for many different instruments/markets and brokerages.<br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-30675941854399072032011-12-28T13:35:58.203-05:002011-12-28T13:35:58.203-05:00Ernie,
Does Matlab have the ability to backtest m...Ernie,<br /><br />Does Matlab have the ability to backtest multiple strategies (intraday momentem, long term trend following, etc) on a portfolio (40 or so) of futures contracts simultaneoulsy and return one set of performance data (sharpe, max drawdown, etc) for all the strategies combined as per Mechanica or Trading Blox? Also, is it difficult to set up futures contract data (contract size, currency conversions, etc) in Matlab? <br /><br />thxAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-35364652.post-82203269166296602852011-12-19T08:11:12.390-05:002011-12-19T08:11:12.390-05:00Billy,
You can program some simple events-driven s...Billy,<br />You can program some simple events-driven strategy in Matlab, but no, it is not good at efficient processing of complex events. However, google "Matlab CEP" and you may find some useful examples out there.<br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-81673602899050936872011-12-19T04:52:14.828-05:002011-12-19T04:52:14.828-05:00Hi Ernie
I have brought your book too. It really ...Hi Ernie<br /><br />I have brought your book too. It really opens up my mind given i am really boring to work as IT guy in i.bank. <br /><br />Anyway, here is my question, if you use matlab to build your ATS, is there any Complex Event Processing feature on Matlab? Is it possible for Matlab to handle event driven strategy ?Billy Tsoihttps://www.blogger.com/profile/06213232894549018543noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-61966267833072785412011-12-08T22:12:19.003-05:002011-12-08T22:12:19.003-05:00Hello fellow trader. Please visit my blog at http:...Hello fellow trader. Please visit my blog at http://openbooktrader.wordpress.com. Thanks!Anonymousnoreply@blogger.com