where to start from

Discussion in 'Automated Trading' started by pbb, Apr 17, 2009.

  1. pbb


    Hi all,

    I am trading the fx markets for some years now with a strategy that did not change a lot since the start. I am thinking of (semi) automating the strategy to be able to get some fresh air when the sun shines. My programming skills are 0 but I do have someone that is very good at this and is willing to help but he doesn't have any trading knowledge. Can anyone advise me on where to start, which software to use etc. I know I am a bit vague on this, but I am new on this and it will be done from scratch.

    Thanks in advance.

  2. maxdama



    There are plenty of blogs where you can see what people have tried, such as maxdama.com. I went through the quest to find a pre-made trade trading software programming environment like most others, but finally decided to go with a system from "scratch" because the trading system softwares are missing big features like multi-level backtesting. The programming language R has a lot of packages for trading such as this one to connect to Interactive Brokers and quantmod for displaying charts. It depends on your programming background and system complexity.

  3. travis


    In my opinion, do not give your ideas to your friend, or number one he'll steal them and number two you will always depend on him. Study VBA and easylanguage and develop the whole system on excel (with IB API) and back test it on Tradestation (but maybe this part is not necessary since you said it's worked for many years).

    I wrote more on this here:

    If all you have to do is code on excel a system that already works, you could be done with the process in just a few months. As long as you don't feel that you have a phobia for formulas and for a simple programming language like VBA. The advantage in this case is that you won't have to ask your friend for every minor change to your system (several times a day for years, from my experience), which would result in you making your friend your partner - and then you don't know how much you can trust him with your ideas - he could give them to others, and even learn your method and abandon you from that point. All this just because you don't want to learn a programming language.
  4. Serious question.

    How do you expect to be systematic trading without programming skills?
  5. travis


    Also be careful with "semi automating the strategy". The power of an automated system is that it doesn't react to defeats or victories with depression or exaltation, which cause us to lose our objectivity and in turn lead us to losing all our capital - it happened a few times to me, exactly because of "semi" automating.

    If your system is only "semi" automated, then it is only "semi" objective, and then it's all up to your emotional balance whether such a system would win or lose. I don't know about you but I am very unstable when it comes to making investment decisions which will affect how I'll live the rest of my life.

    Instead, with a fully automated system, there will be no victory or defeat (or girlfriend breaking up with you) to endanger your method for selecting trades. Your emotions and also your attention won't affect your trades. Your fully automated system will have infinite attention, patience, emotional balance, and objectivity. So I'd say forget that "semi" and go ahead with "fully" automating your strategy.
  6. rosy2


    you need to get your hands dirty in code. you dont have to be good just productive. I think R and python (with scipy, matplotlib, rpy2, and ipython) are good starters. they both have good interactive support so you know if you're on the right track.

    I would start as follows with the languages.

    open a file.
    loop over each line
    print the line to the screen
    close the file

    the do the same thing and put the file into a an array. then loop over that array.

    then write a function like add(a,b) that takes 2 arguments and returns the sum of them.

    for the most part you only need to know 2 datastructures arrays (aka lists, vectors) and hashtables (aka dictionarys, associtive arrays, maps). You never need to implement these yourself.

    heres a decent site to get you comfortable and productive.

    after that. get some fx data and a timeseries library for R or python. slice and dice away.

    soon you will be suprised what you can automate... maybe your own job
  7. travis


    Speaking of "fully" automated vs "semi" automated - I was speaking about it earlier on this thread.

    Premise: I am about to celebrate my 30th day of full automation, without any intervention at all, no discretionary at all.

    Just a few minutes ago, I was looking at the systems, and it had just taken 3 straight losses on one of the systems, all within the max drawdown, and, despite the fact that until then it had been making money on the other systems, this red I saw, "-360 dollars", which for my capital represents about 5%, still got me a little bit upset.

    In another time and state of mind, over a month ago, I would have gotten really mad at the market, and, vengeful, I would've quickly opened a discretionary position trying to "get my money back". Usually I would've gotten it back. But there would have been a small risk of my trade going against me (about 25%). In that case, being so upset as I was, I would not have accepted a loss, would not have applied any stoploss, and would've carried the position until victory (my 360 dollars back) or death (account blown out). And there would have been a probability of 10% (from my experience) of that happening - the market not getting back in my favor until my account was already blown out.

    Now you can see why, for me, there are no doubts that full automation is the best way to go. Because during the past 10 years I have never been able to get rid of this crazy irrational thirst for revenge whenever my trade goes wrong.

    And, even if sometimes, by waiting for a few days, the market does come back, you've gotten so scared that you exit as soon as you can break even (or even if you can take only a small loss). And on top of that you've lost a few precious days or even weeks, during which your system would have made more money than it lost on that trade that sparked your revenge trading.
  8. Not much to cry over on a $7300 account.
  9. travis


    Congratulations on the math. Well, that's all the money I have. It's got advantages and disadvantages. It's not like I can say I don't care about losing "360 dollars". As I said, I get emotional about it. And that is why I am saying that "full automation" is the only way to go.
  10. travis


    This is a beautiful entry, I don't know who wrote it but it's just awesome:


    I agree with everything it says, but I will quote what I like the most about it:

    A trading system is a group of specific rules, or parameters, used by traders to identify entry and exit points to trade a security or futures contract.
    Trading systems can be back-tested using historical data to produce a simulated or hypothetical trading record. However, there can be significant difference between a hypothetical and real-time actual trading, and in all events, past performance is no guarantee the trading system will be successful in the future.


    The reason many traders use trading systems is that the system can save time and reduce or eliminate the emotion in making difficult trading decisions. Trading the futures and equity markets using a trading system provides the discipline to overcome the fear and greed that in many cases paralyzes a trader and prevent making timely decisions. Each order placed is governed by the trading system that will not deviate based on anything other than market data where the equity or futures is traded.
    #10     Apr 23, 2009