OpenQuant + AmiBroker: my recipe for building robust Automated Trading Systems

Discussion in 'Trading Software' started by dareminator, Apr 29, 2008.

  1. cmaxb

    cmaxb

    how do you code up a custom indicator for openquant? When I code up the dll, I have to shut down and restart oq, and get it to reload my newly compiled dll for every little change.
     
    #31     May 2, 2008
  2. bobpit

    bobpit

    #32     May 4, 2008
  3. Bobpit... I'm sure Dareminatour will give you more detail, but I've been playing around with AmiBroker for the past 3 days. Previous to that I've played around with NinjaTrader and OpenQuant for about a month between them.

    So far I impressed with AmiBroker on an 'ease of access' basis. It is the most powerful product I have seen for handing large amounts of data of large symbol lists and performing very quick backtests.

    The language (AFL) is unique to an extent, although if you know C++ or C Sharp you will have little problem adapting. AFL has the advantage of being written specifically for techincal analysis so it does have some advanatges over the C sharp based alternatives. I think DareMinatour had it spot on when he said AmiBroker is a great platform for backtesting ideas quickly. The best I've seen frankly - I hear TradingBlox is the best of the best in terms of backtesting depth & output (but it can't handle tick data and it's $3,000 - so not an entirely fair comparision).

    However, AmiBroker is NOT a serious proposition for automated trading yet. I'm unconvinced there is one product that ticks all boxes rigt now.

    I respect Gyles review... I read it myself about 6 weeks ago. However, as of yet I don't feel influenced by his arguments. I have not seen other serious backers of Traders Studio outside of Gyles.

    I think the truth is, the size of th community behind AmiBroker & NinjaTrader speaks for itself. There's a reason why these two products get so highly reviewed, consistently, by so many users on EliteTrader.
     
    #33     May 4, 2008
  4. I'm going to chime in here - frankly I found this review very off-base. For instance, there was a complaint about AB's charting capabilities - I've found there's really only one thing it doesn't do particularly well - point and figure charting. But that's about it. And I'm sure that even Murray would say that TradersStudio's charting could use some work in different areas.

    I think TradingBlox is a great product but $3k is a lot to spend on such a product - it may be worth it, but I was not able to determine that in the demo period. Tradersstudio is definitely a work-in-progress, but can do some things that only TradingBlox can do (multi-system testing with optimization) - so I've found it useful once I have a system I've figured out. And I've found AB to be the best software to test with because of the raw speed of the software and because it invites testing of variations because of it's speed and easy syntax. For instance, I've seen other systems code up, say, a VIDYA indicator and have it take about a page of code. In AB, this is about 5 or 6 lines.

    Add to it the great community behind AB and you've got a great solution for most people - although the community does not tolerate (and rightly so) people who don't do their homework.

     
    #34     May 4, 2008
  5. bobpit,
    Siddhartha & droskill have said it well. Not much to add.

    It seems that the reviewer's biggest gripe was "requirement for programming skill". It did take me some time to be efficient in the AmiBroker Formula Language (dealing with whole arrays at once, rather than looping over values). The discomfort of learning a new language construct. But once you are comfortable with it (could take a few weeks), doing complex things becomes very easy.

    Another complaint was the UI. Some aspects of the UI can infact be annoying (such as 'always on top' issues between code & analysis windows). However, it doesn't stop me from analyzing anything I want.
     
    #35     May 5, 2008
  6. ronblack

    ronblack

    dareminator,

    very good info you provided. I don't know how complicated your strategies are but can you tell me if you are kind enough whether I can do the following with Amibroker?

    I have a universe of 55 stocks and I construct an indicator based on the price and volume of these stocks. It is a daily indicator based on a set of formulas. I would like to backtest it on historical data. Can Amibroker do such backtest, i.e. use 55 data files simultaneously to calculate an indicator and also use the result to enter and exit trades on another security?

    Thanks,

    Ron
     
    #36     May 5, 2008
  7. Amibroker has the concept of a "composite" - this is run prior to running a backtest. The composite can be made up of just about any rules/data you like. For instance, let's say I want to look at number of new lows in an index to construct a trading strategy. I create a "scan" that creates a new, custom ticker that contains that data based on all of the components of an index. Once you have constructed that composite, you can use it in any trading strategy.

     
    #37     May 5, 2008
  8. Incidentally, if you want to read more about this feature, here's a link:

    http://www.amibroker.org/3rdparty/

    Download the document titled: "IntroToAtc.pdf"

    Or I think you can access the manuals as well.
     
    #38     May 5, 2008
  9. ronblack

    ronblack

    Thanks droskill for the info. A few questions: does the scan create the indicator based on the available historical data? What about if one security in the index has less data than the rest?

    Can you also use things like RSI(x) in the scan?

    Ron
     
    #39     May 6, 2008
  10. The scanner, like the backtester, adjusts dynamically to the amount of data available. Meaning, if you have 10 securities and 5 go back to 1987 and 5 only go back to 1995, the scan will start with the data that is available and then incorporate the other securities as it "reaches" them in time.

    RSI - yes you can very easily create a composite based on that. As an example, this is the code for generating the number of stocks in an index that are above a 50 day moving average.

    AboveAvg = Close > MA(Close,50);
    Buy = 0; //We'll scan, but not buy
    AddToComposite(AboveAvg,"~MyAboveAvgIndex50day", "C");

    I could have just as easily said:

    RSIbelow = RSI(14) < 30;
    Buy = 0; //We'll scan, but not buy
    AddToComposite(RSIbelow,"~MyBelowRSIIndex", "C");

    This will create a new equity called ~MyBelowRSIIndex that will contain, over time, all the stocks in an index (or any watchlist) that have a RSI(14) below 30.

    I could then reference this in a system as a buy/sell indicator.

    fc = foreign("~MyBelowRSIIndex","C");
    buy = fc > 90;//buy when a lot of stocks are below 30 on RSI

    Hope this helps...

    /d/

     
    #40     May 6, 2008