help w/ automating the PROCESS of trading

Discussion in 'Strategy Building' started by dchang0, Feb 2, 2004.

  1. Bwahahahahahaha...
    #11     Feb 3, 2004
  2. Diode


    I went with the "write my own system" approach to automate my trading execution. In fact I wrote all my backtesting programs as well, over the last three years. In retrospect I think the latter was rather foolish on my part, although it led me to explore some ideas that probably wouldn't have occurred to me if I had been using one of the commercial backtesting programs.

    You might want to take a look at QuantStudio ( which is something of a toolkit for writing both backtesting and automated trading programs - programming is done in C# or any other .NET language, and there should be no inherent limitations on what kind of systems you can implement. They have an interface to IB and a full-blown FIX interface, and have received some favorable reviews on various boards over the last six months. Note: while they offer an inexpensive scripting version, you'll need the Professional version to develop auto-execution applications.

    [Disclaimer: I don't have first-hand experience with QS, so don't take this as an unqualified endorsement - do your own homework. If anyone reading this has used QS, I'd like to hear your experience with it.]

    By the way, I've been programming for 30 years and I would never let a computer trade my money without myself or someone I trust sitting in front of it, no matter how many failsafes I've built in.
    #12     Feb 3, 2004
  3. dchang0


    WOW, Diode--

    This QuantStudio Pro looks like EXACTLY what I've been looking for: a framework to code in that allows me rapid prototyping and rapid development, along with the ability to use the same trading system code for backtesting and realtime trading. I've got to try this thing out! Thanks for the tip--this is probably the product I will go with in the long run. (It appears to be the most extensible platform I have seen so far.)

    LOL! Yeah, most of my buds think I'm crazy for trying to do hands-off automation. It's cool--one of the reasons why I need attached orders is so that I can write code that issues an entry with an attached stop-loss. Doing it that way assures that the entire pair occurs as a single function call and is transmitted as a single transaction, if not a single order or single basket of orders. It gives me demarcation at the right points... Anyway, I don't plan on being too far away from the computer while it's autotrading--by the time I can fully rely on it, I'll be a full-time trader and no longer a salary-capped programmer. :p
    #13     Feb 3, 2004
  4. If you are a programmer, why don't you just build your program from the ground up using the Interactive Brokers Java API? It is free, and it will allow you to control the order pretty much any way you want. That is what I am doing.

    Some people do not like their quotes. I personally do not mind them (as of now). If you want better quotes, DTN IQ offers a Java API for their quotes for a fee (Interactive Brokers is free).

    Building a program from the ground up is more time consuming, but if you are a good programmer, it can give you the added flexibility that these 3 or 4GL type languages and systems cannot give you...

    Check out the IB API. For the price, it can't be beat...
    #14     Feb 3, 2004
  5. Bob111


    heh....i wish that i was full time programer unstead of risky business called trading..hold your horses pal
    #15     Feb 3, 2004
  6. dchang0



    You know, I was doing exactly that a while ago; the IB TWS Java API was what I started with right when I set a goal for myself to implement full autotrading. Back then, I was entering orders entirely by hand, with a HP 12c calculator beside my laptop. After a few botched orders (I acccidentally put some in as limits instead of stops and put some 1% stop-losses instead of the usual 8%!), I decided I'd program it to happen automatically. At the time, I was looking at the superb ButtonTrader and NinjaTrader apps. Eventually, though, my system at the time began to fail due to changing market conditions, and I realized that I needed to find a way to develop and backtest systems rapidly and try on new systems trading forward. I researched and tried a lot of demos at the time, including Amibroker, Wealth-Lab, an old copy of Tradestation, et al. I ended up picking up Wealth-Lab because of the rave reviews it was getting and spent a lot of time developing and testing systems with it. But, I made the unfortunate discovery of finding that the code I wrote for backtesting would have to be modified for trading forward. So what I'm looking for now is a way to write code once and use the same code for backtesting and realtime autotrading.

    Basically, I don't want to maintain two codesets. First of all, I can't stand the inefficiency and extra administrative overhead it adds, and second, slight differences in code can result in massive differences in the statistics calculated during backtesting. I'd be crazy to trade forward using code even the teeniest bit different than the code I used during backtesting and optimization--even crazier than the people say I'd be by leaving my trading entirely to the computer!
    #16     Feb 3, 2004
  7. Fair enough. The biggest disadvantage about the TWS API is that there is no backtesting.. That is one of the reasons I am thinking about picking up a copy of WealthLab. However, I still feel that writing your own system will be better off in the long run. You can make a decent living hopping on the train of TS or WL like a lot of other people. However, writing your own system from scratch can put you in a league of your own (I hope) :)
    #17     Feb 3, 2004
  8. dchang0


    Thanks, caplan8293, me too! Hope is all I've got, since my programming career is at a dead end (I got capped earlier this year, and the only realistic way for me to earn more as a programmer is by starting my own business or stepping up into management--and either way, I'm not a programmer any more, I'm a businessman. And if I'm gonna be a businessman, then I might as well do something I love like investing rather than pushing papers around on my desk.)

    I like the TWS API too--just gotta use the same code in both cases. Get this--once, while backtesting a system, I had a simple syntax error--I think it was a missing semicolon or something like that--and the resulting difference in performance was in the millions over a two-year testing period on $100K starting equity! In another case, I implemented my own version of a trading system that I found in a book--my version (based on my logic style) was long-term-profitable, while the book's version was not. A simple difference in the decision tree...

    So you can see why I'd be so concerned about using exactly the same code for backtesting and trading forward. This is not to mention the HUGE differences that can be had with changes in position sizing methodologies...

    Thanks for the tips and well-wishes, caplan8293--I wish you and everyone else here all the best luck in their trading. You guys have been super helpful while I have been studying/researching/developing my trading.
    #18     Feb 3, 2004
  9. Thanks. Good luck to you too and keep in touch.
    #19     Feb 3, 2004
  10. nitro


    This looks like a terrific package.

    #20     Feb 12, 2004