AmiBroker or R or Python?

Discussion in 'Programming' started by ngterry, Dec 10, 2012.

  1. ngterry


    Currently, I'm using TradeStation, and I have found that using TradeStation is extremely slow in doing optimization and walk-forward test, etc. Therefore, I'm looking for other tools.

    I know many people in the forum is using Java in the live trading environment, but prototyping in other language. I think I need more time to go that path. As an individual retail trader, productivity is the top priority for me, I may have to go through a LOT of trading ideas before coming upon one that works! Therefore, I don't want to waste my time to learn and swithc between tools.

    Please advice!
  2. ehlaban


    Multicharts is good and you can quickly make your strategies in
    easylanguage so productivity is high.

  3. R.

    Please see the other threads on R.
  4. robbrit


    I've worked extensively with all three, here's my take on them:

    All of them are fairly easy programming-wise (compared to things like Java or C++) and easy to install. They are also all a bit slow, however if you're feeling ambitious you can write C plugins for any of them.

    Pros: easy to use, speaks the trader's language a bit better, integrated within a trading platform
    Cons: a lot less flexible, you're bound to Amibroker

    Pros: great for quantitative analysis, many many open-source libraries for very specific types of statistical analysis
    Cons: a bit cryptic if you're not a statistician, general purpose libraries tend to be a bit strange to use (FTP, MySQL, etc.).

    Pros: Very wide user-base, libraries for everything under the sun (not just trading or finance-related), if you're looking to expand a team it is much easier to find Python programmers than R or AFL. Has been gaining steam lately among quantitative folks because the quality of libraries like pandas are constantly increasing. If you really want to go low-level it has bindings to QuickFIX.
    Cons: Requires you to know how to program, is a "jack-of-all-trades, master-of-none" style language.
    dunleggin likes this.
  5. Gizzz


    python is free
    python is a master of abstraction
    python is easy to learn
  6. robbrit


    Oh right, forgot to mention that Python was free ;) so are all the libraries for it, I have yet to come across a Python library that wasn't free (and I use Python every day for work).

    The same holds for R, I also haven't found any library for it that you had to pay for - although I haven't used it as much as Python.

    As a master of abstraction, I'd definitely agree that Python does do abstraction better than the other two languages. This is only necessary though once you start getting into more complex programs, for the simple scripts that a lot of traders use the abstraction mechanisms in Python aren't as useful.

    Finally as far as easy to learn goes, that's debatable depending on the person's background. From working with non-programming traders many of them can get a grasp of AFL fairly easily, but for them to become half-decent in Python would require a fair bit more mental effort and some of them just don't get it. Same story for R: folks coming from a statistical or mathematical background will find it a bit easier to work with than Python simply because the syntax lends itself specifically to what they do.
    This is normally the case when you compare general-purpose languages like Python to domain-specific languages like R or AFL. However comparing Python to other general-purpose languages like Java or C++, I'd for sure agree that it's easier to learn!
  7. robbrit


    You're perfectly right. What I was talking about was AFL specifically, not Amibroker.

    The example that I meant is this situation: you write 100 scripts in AFL and then one day decide that you want to switch to some other trading software. Unless they support AFL (unlikely) you're going to have to re-write every script where with R or Python (or any other non-vendor-specific language) you'll probably have to make a few minor tweaks, but that's it.

    A bit off-topic, but I'll put my comments on C# as well (I built a small automated trading platform a few years back using C#, IronRuby, and Mono):
    Pros: Much much faster than AFL, R, or Python. IMO is a much more pleasant language to program in than Java or C++. If you want to go bigger (1000+ scripts running simultaneously) then C# would be my go-to choice.
    Cons: Harder to learn than AFL, R, or Python - for non-programmers anyway, programmers will pick it up pretty easily. You're stuck to Microsoft (so no Mac/Linux) and you have to pay unless you want to go the Mono route (which comes with its own set of problems). Poor open-source community compared to R or Python, half the time when you find a library to use you have to pay for it.
  8. ofthomas


    lots of tools, it depends on what you are doing... R is excellent for certain things and has lots of modules and examples out there for modeling and live trading... AmiBroker, is fast and great with baskets... I know a lot of people are masters at it... since you have code on EL, have you looked at MultiCharts?

    in the end, it comes down to whatever ou are happy with that will get done what you need done... so go to the sites and test it...
  9. 2rosy


    do yourself a favor and use a language that will let you do anything. these proprietary languages are a waste of brain space
    userque likes this.
  10. There is a reason why there is more than one language on the market. One is not enough to get everything done effectively enough.

    Amibroker is a good start if you are a trader, but you are always better off with more than one language. I like C#, but I have programmed in more than one of the general level languages.

    NinjaTrader is based on C#, so learning C# lets you master NinjaScript faster if you ever choose to.

    Just my 2 cents in my first post.
    #10     Jan 4, 2013