Help Center Blog Open An Account

Process of Automation


#1

I am looking for the process that one would go about automating a system. Please don’t be “afraid” to be technical because I have real time trading experience. Input from programmers/traders is appreciated.


#2

This is the short version of the process:

Observe a possible market inefficiency that we want to exploit.
Formalize the observed phenomena.
Define the conditions under which the exploitation of the phenomena works long term (years).
Upon having these conditions defined we measure all the essential metrics of the strategy.
According to metrics above define money and risk management.
Thanks for the questions. Please feel free to ask as many questions as you wanted about automation. No Doubt that many traders lean this way.

Matt


#3

Just a few tips and not in any particular order:

Quantify how to exploit the inefficiency (Can rules be written for these inefficiencies?)

Inefficiencies are detected by watching the charts and seeing when, how frequently and how to exploit them.

Establish Parameters: • (net profit, profit/drawdown ratio, expectancy, sharpe ratio, average trade net profit, etc.)

Determine how frequently and when you are going to adjust parameters (adjust to market, or be re-optimized on a periodic walk-forward basis)

in back testing consider commissions and slippage.

Test at least 5 years and six month going forward once you completed the process. I find that most systems that don’t work on back testing immediately are being reoptimized and have little chance in the futures unless you know EXACTLY where you adjust the strategy rules and determine the method for re-optimizing some of the parameters going forward.

Stop the system if it exceeded the drawdown and/or the rules you established no longer apply.
There is a lot more to system as far as sampling of data, but that is a whole new topic onto itself.


#4

I am not going to reintroduce the steps already outlined, they were quite thorough from @thedint. I did want to comment on the “forward test” aspect, as one component was missed. The number of parameters in your strategy vs. the number of historical bars tested against is critical! The number of parameters refers to the “degrees of freedom” and there are other terms in formal mathematics for this principal. It comes down to how easy it is for the system to conform to the history, otherwise known as “curve fitting”. Trendfinder points out one way to avoid curve-fitting. It is to have in-sample and out-of-sample data, where in-sample is used for optimizing, out-of-sample is used for walk-forward testing. If this is at all unclear make sure it is perfectly clear before you create trading strategies.

Now let me go further with the point I’m making. If you always go long when the 3rd bar is higher that the previous two, that is effectively one degree of freedom. If you add a parameter that says, when the 3rd bar is X higher than the previous two you have added a “degree”. That next degree means two things: 1) you can exploit historical statistics in the history that may be predictive 2) you can exploit historical statistics in the history that may not be at all predictive. The common ground here is that you don’t know. However, the more bars that you test against the higher the probability you will move from non-predictive to predictive. This is the law of degrees of freedom. Now economists will say you can always have a “black swan” event. This means all the past history could be useless because something new comes in. However, the rule still applies. The probability of tapping into predictive trends goes up with greater history, it is just that nothing is guaranteed.

I was going to give some rules of thumb regarding number of parameters, or degrees vs historical bars but there are other variables. Another consideration is time-frame. If you exploit something and it works at multiple time-frames that adds confidence. Also, longer time-frames are more predictive in nature than shorter. I like to use 60 min bars for swing trades because it removes much noise. If you do some research, however, there are mathematical relations between degrees and the sample size (the sample size meaning the number of bars in our case). I simply factor in other aspects while I do this calculation. In short, I typically will have 10,000 bars of data and 7 or fewer parameters. If you take 2 ^ 7 you have 128 which is almost 100 times less than the sample size. Degrees are multiplicative, leading to the power rule so that is a part of my rule of thumb.


#5

I appreciate your effort! But to be honest, trading signal service is not proper way of trading to me, because I wanna be a successful Forex trader! In addition, that means, I need manual knowledge! This is way, I use my live trading account sincerely to learn technical as well as fundamental analysis!