Показват се публикациите с етикет EA. Показване на всички публикации
Показват се публикациите с етикет EA. Показване на всички публикации

28.12.2012 г.

Optimization of trading strategy: is there something wrong Part 2


Is there something wrong with optimizing trading strategies. I think the whole conception of optimizing may be a wrong paradigm. In fact during optimization we make in the same time the strategies very vulnerable to randomness.


That is the whole point. All trading strategies are very  vulnerable to randomness but the problem is that y we do not know to what extent they are vulnerable.

That is why the use of any fancy digital filters or enigmatic time series preprocessing methods: SSA, wavelets, PCA does not add much.

On the other hand the use of different optimization algorithms does not add much too: back propagation, genetic algorithms, particle swarm optimization etc.

So what is the reaction of the big guys. They were investing in infrastructure in order to use the infrastructure edge together with complex data mining methods. And that worked and works. However as many others will do the same the competition will increase in the low latency market. Even more some countries are planning to tax the HFT, in France this is already a reality.Big boys are also using traditional macro strategies but this is another beer.

My point here is that a successful trading strategy needs to balance two pillars:

a. An adequate optimization regarding the market conditions. In practice that means that the strategy needs to learn from the market conditions and not to over - fit the past market conditions. This is a hard stuff.

b. The randomness robust trading strategy. There is a need to secure that the trading strategy is robust regarding the randomness of the market.

There are different ways to achieve it.

- To measure the state of predictability of the market and trade only when the market is sufficiently predictable. This is the core concept of the Spinal Implant EA. In this EA the algorithm takes a trade only if the fractal dimension is below a certain value.

-To apply walk forward testing.
This is a traditional approach and maybe is the state of the art in the trading community. But unfortunately quite a few algorithms pass this test, only to prove later that they are not so good.

-To apply Monte Carlo methods
So I really think that this should be implemented by everybody that seeks consistent results.

The Discussion will be here: only for logged users, sign up for free.


18.12.2012 г.

Optimization of trading strategy: is there something wrong

What is a central question of all trading strategies is the optimization. However is there something wrong with the optimization or at least with our perception of optimization of trading strategies.
I think there is something elusive here.

I think that the main problem is that we look at the market as a problem.
Yes, I think so, we think that the market is a problem and if there is a problem we look for a solution. Applying mathematical models for searching a solution is just the right thing to do.
But what if, there is something wrong in our paradigm?

Of course the trading rule with the highest observed performance is likely to perform in the future provided we have sufficient observations and we do properly performance statistics.

However the problem is that the best rules are highly positively biased. Aronson writes in his book the Objective Technical analysis that technical analysis methods "have the potential to be valid knowledge but only if back-tested results are considered in light if randomness (sampling variability) and data-mining bias.

This screen shot is from the book of Aronson Evidence based technical analysis. Here you can see out-of-sample performance deterioration, that means that the rule which performed well in the past did not perform in out-of-sample trading.

Here in the first part is the in-sample data: the data used for data mining or simply put rule back-testing. In this period you see 50 % Return on on investment. However the out of sample is a different thing. The out-of-sample actually means that the data is not used for data mining and is the actual performance.


The reality is more complex as we may assume. There is not only a problem that needs a solution to be found but there is something else too. That explains why the data - mining normally fails in out of sample trading. I will stop here for the moment.

7.10.2012 г.

EA Gann High Low Activator


The work of Gann is indeed very interesting it is the result of someone who has dedicated his entire life to the markets.

Howevever what we know about him today is not everything he has created. Some of his works never quited the manuscript stage.

I think that he was using everything he can, all the available technology of his day in order to read the markets. I think he was a visionary. Many can't understand but the simple bar charts of today were at the time something completely astonishing.

Yes today we have the summum of all the technical analysis available on internet, most of the readers here have gigabites of technical books and works in their hard - drives.

But on the other hand if Gann had an odge during his lifespan markets over the others the same is not true for us.

The market is something very specific, not all markets are the some and the markets evolve during time. I mean that the most computarized markets of today are fundamentally different from the markets in which Gann has practices his methods.



So there are two difficulties.

1. The Gann works and methods are incomplete (many of his works are not available).

2. Even if they were they were created for markets totally different from the market of today. That means that authomatic implementation is not going to work.



And yes, what can be done is to be fimiliriased with his methods and to have a creative approach.

Some even say that Gann was one of the first guys who actually used algorythmic approach. It is about the Gann high - low activator (now by the way entirely coded in mql and freely available to everybody, in its time that was the edge of the research).

Have a loot at: Krausz: W.D. Gann Treasure discovered



I made my own EA Gann High Low Activator. It is based on the indicator Gann High Low activator SSL from the code base.

You can download the indicator with the EA from here, just click on the download button. You need to install the indicator in order to make it work the EA.

And here the good news are over. Yes I made some testing but I did not find this EA strategy reliable on the recent market of Euro/Dollar. You can make your own tests and share.

Parameters:

The EA is based on the moving average generic EA, that means it shares the generic money management module. However in order to make it work I changed the trading rules a little bit (I do not pretend that I got it right).

So there is only one parameter and it comes from the High Low activator it is the Lb parameter and that is simply the number of bars you use for the computation of the indicator.

The rules can be interpreted as the basic single average system towards the price. Check the picture and you will understand.

If the Close is < the Gann High Low Activator indicator we Sell

If the Close is > the Gann High Low Activator indicator we Buy

DOWNLOAD the EA from here



18.06.2012 г.

Shark 7.0 EA review

This is a review by a trader of the Shark 7.0 EA.

Pros:



+ Though I didn’t figure out what activates the logic, I like the idea behind. As it places orders only when the market moves quickly, there is a great probability given that either a sell or a buy order will close in profit.

(It is not possible to figure out the logic if it uses Artificial intelligence algorythms)

+ It uses pending orders only. I consider it to be an advantage, as it decreases slippage greatly.

(That is not necessary some brokers still have slippage on pending orders.)

+ trades two currency pairs.

+ It does not open more than one trade at a time.

                                               Cons:



- As SL is placed very close to the market price, dishonest brokers may play dirty games.

(That is important as it is about very close orders to the price. Choose carefully the broker and always always monitor the execution. That is why you need to backtest with your broker tic by tic.)

(And of course you can't have something for nothing everything has its cost, here as thestrategy seeks for the tightest stop loss, that necessarily comes with costs: extra care and control over the execution).



- I am certain that Shark 7.0 will not work with market makers, and results will vary from broker to broker.

(I agree on this, but I would add some market makers not all market makers, I think if you play with 0.01 lots as basic lot instead of 0.1 lot you may have less problems in the first time)



- The final version input parameters are limited to money management settings only. Other parameters are not accessible by the user and can’t be changed. To my mind that’s a bad thing for experienced traders as they don’t have much “space” to maneuver with their settings. Who knows, maybe they change that after seeing this post.

- The user manual does not include any information regarding broker and VPS requirements. That’s not a big deal for experienced traders but clearly, a disadvantage for newbies.



That EA has potential but extreme care need to be used when implemented.

I would add that the quality of the code is guaranteed as the EA is done by experienced traders and programmers.



We would negotiate for EA Shark 7.0 discount coupons for our members even one evaluation copy may be available to one of the most serious contributors on www.beathespread.com.

It is recommended to buy this EA (is someone is interested) and not to search free copies because of the support. The support is a critical feature and without support do not even think to let it trade for you. (Personnal opinion).

12.06.2012 г.

PNN for metatrader using Parzen window classification version 2 with kernel smoothing of inputs

This is the PNN using Parzen window classification version 2 with kernel smoothing of inputs. You need to have the PFE indicator.

Here you will file the standard PNN called version 2. And the PNN with money management and kernel smoothing of inputs.

Nevertheless this is a beta version, because I am not sure that the integration of the kernel smoothing with the PNN code is correctly executed.

So this is what we have for now. Anyway the idea is interesting.

In the normal PNN Eric we have as input the difference between:


b[bar]= Close[bar]-Open[bar+AmoutOfForecastBars-1])

The idea was to replace this piece of code with something else and to see how it would affect the EA.

So I replaced this by the kernel smoothing of PFE.


b[bar] = kernel()

So this is the idea. However the number of bars of parameters is still an important parameter because it affects the initial period for training:


TrainingStartTime = Time[0] + Period()*60*AmoutOfForecastBars

Of course we can replace this piece of code by Numbars_for_Training as a parameter, but I chose not to touch this for the moment.


TrainingStartTime = Time[0] + Period()*Numbars_for_Training

Any wise look in the code would be welcome as there is not many native mql code for neural implementations.













DOWNLOAD from here