Automated Trading: Getting Started

Discussion in 'Automated Trading' started by RogWilco, Dec 29, 2010.

  1. RogWilco


    So I'm working on building an automated trading system from scratch, and I'm now at the point where I need to figure out how to structure my application and organize the "workflow." (do I set up some sort of event listening framework? do I have a core process that reevaluates positions at regular intervals/candlesticks? .... that sort of thing)

    Are there some generally accepted/understood paradigms that are typically used for this? I have a nagging feeling this area is well covered by online resources, books, articles, etc. but have no idea what I should be looking for. I'm wondering if anyone could point me in the right direction?.

    Any book recommendations? Any programming design patterns worth googling? Any fundamental automated programming concepts I should understand before starting?
  2. byteme


    This question seems to be asked quite frequently around here.

    As little as a couple of weeks ago:

    Doing a search for "reinvent" turned up these other threads too:

    Getting Started with Automated Trading

    Building a TradeEngine, need syntax advice!

    Zen and the art of ATS design...

    I don't know how useful those threads are as things often go off topic pretty quickly around here and onto debates about which programming language is best.

    The one I was looking for however has links to a bunch of useful resources:

    Sharing Resources: Let's Not Reinvent the Wheel

    Take a look at some of the open source automated trading system platforms like TradeLink (.NET), ActiveQuant (Java), Marketcetera (Java) etc.

    You may find you don't need to re-invent the wheel.

    This kind of system is inherently event-driven. Events being market data e.g. ticks arriving or other information e.g execution reports etc.

    You should be familiar with design patterns like pub/sub and observer. When events happen somebody needs to be "listening/watching" for or "subscribed" to that event who then takes the appopriate action based on the content of the event and the current context/state e.g. current positions, previous data. The action may be to submit a trade - open/close a position etc.

    In principle it's quite straightforward. In practice, the devil is in the details - robustness, correctness, fault-tolerance etc.

    There's also this book on Amazon that I haven't read and has mixed reviews:

    Building Automated Trading Systems: With an Introduction to Visual C++.NET

    It's probably easiest to first choose a broker with an API that you like and supporting a language you want to use. Then look at their example code.
  3. SteveH


    Use Tradelink to code your ATS:

    Enhance that. Don't start from scratch.

    Your odds of creating a successful trading system that's automated are super low unless you can already trade successfully with your own finger on the mouse buttton. People learn from their mistakes, computers don't. Unless you put in 1+ years of your own sweat-equity studying/trading LIVE markets day-in and day-out, you're just a monkey at a typewriter, thinking that the Star Spangled Banner is going to eventually be printed on the page.

    If you are a trained programmer/engineer or highly technical-minded, then double or triple the amount of time it would take a normal person to learn how to trade. ;-)
  4. rosy2


    what's the point before this? seems like you are at point one. start simple...
    1) connect to data/order platform
    2) subscribe to prices
    3) keep track of positions
    4) keep track of orders
    5) place some orders

    keep it simple. a lot of those free platforms are good but they might be overwhelming to most people