Teste do Macaco | Testes de Robustez | Vilela One | Robô Trader Metatrader 5

Usually most of the focus during a strategy development
goes to the entries. However some authors defend
that the most important are the exits. For example,
Laurent Bernut said that: “Bad entries can be salvaged.
Bad exits can’t.” You performed an entry
and it wasn’t good? It’s still possible
to manage this entry, perform a good exit
and not ending up so bad. On the other hand,
a bad exit… You closed the position,
it went back to a profitable position, or you closed prematurely
and the tendency kept going. That is not possible to recover. Now, Thomas Stridsman said that: “Entry/exit doesn’t mean much to me, I focus all my research
on money management.” Another author, another point of view.
There are authors who defend that what matter is the entry.
Others say it’s the exit. Others defend that what matter
is money management. I say we must focus on everything. The three of them
are important pillars on the strategy. But our focus here
is not discussing the importance, it’s to discuss
where our strategy’s strength is. So we’ve created a good strategy,
we’re happy with it, the question now is: Does this strategy get good results
because it has a good entry, because it has a good exit
or because it has a good money management? Money management
is very easy to isolate, we can just turn off all kind of resources
related to capital management and start trading
just one contract. If we do that
and our strategy keeps being good, then money management
is not a problem. Entries and exits that are the focus. But separating entries and exits
is a little bit more complicated, and that’s the purpose
of the “Monkey Test” which we’ll see now. So I’m setting
the indicator “Bollinger Bands”. Setting up the “Period”:
“36” combinations. “Deviations”: “11” combinations. 36 times 11,
“396” possible combinations. That’s our “Optimization”
at the moment. This is the “Results Distribution” window.
There are 97% of positive results. This is my “Parameters” window. And now I want to find out
if my strategy has good entries or good exits
and for that I’ll use the “Monkey Test”. Back to my “Parameters Settings” screen, here I have the “Robustness Tests” group
and here I have the “Monkey Test” option. It presents me four options: “Regular”, which is doing nothing, it’s letting my strategy run
exactly how I’ve set it, performing entry and exit
through “Bollinger Bands”, through “Take Profit”, “Stop Loss”,
anything I’ve set. So it doesn’t change anything. “Random Exits” mean it will use
my strategy to perform entries, in this example,
the “Bollinger Bands” indicator, but if I had set “Take Profit”,
“Stop Loss”, “Partial Exits”, anything like that,
it will completely ignore them. If my “Bollinger Bands” indicator
is an opposite signal, if I had placed it
in a way it inverts the hand, it will also ignore them. It will perform exits
in a completely random way, it’s like throwing a coin, if it’s head, it’ll exit,
if it’s tails, it won’t exit. It’s completely random. It’ll completely remove
any kind of intelligence that exists in my exits. The third option
is exactly the opposite. It will perform
completely random entries. Like throwing a coin
in order to perform or not an entry. However, when it exits,
it’ll use my strategy. If I have set “Take Profit”,
it’ll use my “Take Profit” size, if my indicator indicates opposite signal,
it’ll exit through the indicator. So the complete opposite
of the second test. At the fourth test, it’ll perform
both random entries and random exits, that means
it’ll ignore my strategy completely, But in order to do that, I have to check “Optimization”,
“Monkey Test”. There will be four different combinations
for the “Monkey Test”. Those four options here. And the amount of tests
of our “Optimization” has quadrupled. This is the only test that adds a load
on our “Optimization” process. It makes the process
four times slower, because it needs to make
four times more tests. Let’s run this “Optimization”
and see how it goes. Here we have the result. At the first screen,
the distribution looks the same, the same values,
the same number of tests, 396. What changes is on this screen:
“Monkey Test”. Here we have four distributions, one for each of those four kinds of tests
we’ve previously seen. Let’s start with the first one. The first one is exactly the same
as that distribution, nothing changes. It’s our pure test
running our strategy both on the entry and the exit
without changing anything. Let’s observe
only the main parameters. The average is close to R$ 2.000,00, approximately 97% of positive results
and a “Z-score” of 2.4. Let’s take a look at this distribution
on the upper right corner. Here we have random entries,
which means, it’ll entry randomly “throwing a coin” and it’ll exit
according to our strategy. What happened? Our average dropped
from R$ 2.000,00 to R$ 700,00, the amount of positive results
dropped from 97% to 72% and our Z-score dropped to 0.65. So we can conclude
that there is intelligence on our entries. If we changed our entry
to a random entry and the result got worse, then there is intelligence
on our entry. Now let’s take a look
at the lower left corner. Here we have the opposite,
they are random exits. So it enters with our strategy,
and exit randomly. Our average profit
dropped now to R$ 490,00, the amount of positive results
dropped to 70% and Z-score dropped to 0.51. It looked a lot
like the random entries results, it is a little bit worse. If we look the numbers precisely,
we can say that our exits have a stronger weighting
than our entries. When we remove the exits,
the performance drops less than when we removed
our entries. But as they are very alike numbers,
it gets hard to really say it. I’d say both have the same weight
and both have intelligence. And, at last,
we can look at the complete random result, where only 4% of the results are positive,
Z-score is negative, our result average is R$ -2.000,00.
A quite negative average. It shows it indeed exists intelligence
on our “Optimization” process. This was the “Monkey Test”
proposed by Kevin Dave in this book. Its aim is to separate entries and exits
in order to find out where the strategy’s strength
and weaknesses are. Find out if the strategy makes money
because it has a good entry, because it has a good exit,
or because of both. On the next video
we’ll talk about “Walk Forward Analysis” and “Walk Forward Matrix”
created by Robert Pardo. See you next video. See you.

7 Replies to “Teste do Macaco | Testes de Robustez | Vilela One | Robô Trader Metatrader 5”

  1. Olá, Vilela! Cara, sensacional seu projeto e seus vídeos. Sua iniciativa com certeza contribui muito para o amadurecimento e desenvolvimento de nosso mercado. Comecei há um tempo a estudar o mercado a fundo, utilizando meus próprios algoritmos e tal, por isso, muito obrigado pela sua ajuda. Compartilhar informações e conhecimento é de uma grandeza gigantesca, parabéns e muito sucesso.

  2. Vilela fiz um teste do macado conforme o link abaixo
    Minha duvida é se minha entrada e minha saida são pessimas ou só funcionam juntas.
    Pq no teste do macaco tanto com entradas aleatorias como em saidas aleatórias houve pioras no resultado final.

Leave a Reply

Your email address will not be published. Required fields are marked *