Saturday 5 August 2017

Forex mecânico


Negociação no mercado de câmbio usando estratégias de negociação mecânicas


Ações Vs Forex. Por que é mais fácil de 8220, ficar rico quick8221; Com estoques


29 de outubro de 2010 9 Comentários


É muito comum quando você procura as vantagens da negociação forex para ler toneladas de sites dizendo-lhe por que forex é muito melhor do que ações e por isso representa uma oportunidade muito mais suculenta para lucros com alavancagem sem precedentes e potencial ilimitado. As pessoas que escrevem sobre este assunto muitas vezes dizer-lhe que a negociação forex é melhor porque é um 8220; 24 horas market8221; Em que você pode fazer lucros apesar de estar em um 8220, touro ou urso market8221; E embora ambas as coisas são verdadeiras, eles sempre falham em mencionar as diferenças mais importantes entre estoque e forex trading e por que a negociação de ações é muito mais adequado para 8220, tornando as pessoas rick quick8221; Do que o mercado forex. No borne de hoje eu falarei sobre porque é muito mais duro conseguir lucros rápidos grandes do forex devido às limitações inerentes do mercado e porque este é evidentemente não o caso para estoques. Depois de ler este artigo você entenderá melhor as diferenças reais ao investir e negociar que se relacionam com a sua rentabilidade ao negociar forex ou ações.


Existem algumas diferenças óbvias entre o forex e os mercados de ações que todos nós sabemos. O mercado forex está aberto 24/5, o mercado de ações não é, o mercado de forex permite que você use a alavancagem muito alta (1: 50-1: 400) o mercado de ações não, o mercado de forex permite que você dia de comércio a partir de 1 USD, o mercado de ações não, o mercado de forex permite que você facilmente entrar em posições curtas, o mercado de ações não, etc Evidentemente, parece que o mercado de forex tem muito mais potencial para 8220, grandes lucros rápidos; Mas a verdadeira resposta é que isso simplesmente não é o caso.


Se você comparar o número de raras 8220, rápido rich8221; Casos que geraram fortunas devido ao que muitos considerariam 8220; sorte simples8221; Os casos no mercado de ações são bastante comuns, enquanto os casos em forex trading são inexistentes (pelo menos eu não poderia encontrar qualquer). Por exemplo, no mercado de touro de 1999 alimentado pela bolha ponto com há pelo menos 3 ou 4 exemplos bem conhecidos de pessoas que tomou um capital 30-100K e transformou em 5-10 milhões de dólares dentro de um único ano. Durante os últimos 20 anos você pode de fato encontrar muitos exemplos de pessoas que ficaram ricos desta forma ações de negociação, enquanto no forex este não é o caso.


Qual é a diferença fundamental que faz com que o 8220, ficar rico quick8221; Fenômenos tão 8220; comum8221; Em ações e praticamente nulo em forex. A resposta está relacionada com a forma como os mercados se desenvolvem e os ativos que comercializam. No forex trading você está especulando sobre a apreciação de uma moeda de countrys contra outro. Flutuações desses valores são geralmente muito pequenas e fixas eo lucro que você pode extrair deles é limitado. Por exemplo, se você tivesse uma conta de 10K e você tivesse uma alavancagem de 1: 100 e você usasse toda a sua alavancagem para entrar em uma posição eo mercado foi mil pips em seu favor sem dar-lhe uma chamada de margem (10, 100K lotes, 100 Dólares por pip, 1000 pips) você teria no final ter 110K. Agora, se o mercado foi apenas 100 pips contra você, você receberia uma chamada de margem e perder todo o seu capital. Leve em conta que a previsão de um balanço de 1000 pip dentro de 100 pips é extremamente difícil de fazer e você vai entender que obtendo 8220, retornos enormes 8221; Fora do mercado forex para ficar rico rápido é bastante difícil. Se você quisesse levar essa conta de 10K para 1 milhão você precisaria arriscar muito mais e o problema se tornaria ainda maior. Algumas pessoas vão argumentar que você pode alcançar esses enormes ganhos através da composição diária (por exemplo, um ganho diário de 5%), o problema é que tal abordagem não exige 8220; luck8221; Mas um verdadeiro muito grande a longo prazo estatística borda (que dura pelo menos um ano) algo que o mercado infelizmente não permite.


Agora com estoques isso é muito diferente desde quando você trocar um estoque (quando você comprá-lo) você só corre o risco de perder todo o seu dinheiro se o estoque vai para zero e você tem potencial upside ilimitado. Uma vez que existem empresas que podem ir de valores muito baixos para valores de negociação extremamente alta em vários anos torna-se óbvio que quem os pega quando eles são pequenos, com uma grande quantidade de dinheiro pode realmente se tornar um milionário muito mais rápido do que alguém negociação forex. Se você comprar um estoque em 50 moedas de um centavo e então o estoque vai a 100 dólares em 2 anos você fêz no fato 200 vezes seu investimento inicial, fàcilmente fazer exame de um investimento 10K a 2 milhão dólares. Claro, isso é tremendamente difícil de fazer e você é obrigado a perder todo o seu dinheiro com uma alta probabilidade, mas de fato foi feito, mostrando que este 8220, sorte8221 rentável; É possível em ações, mas bastante impossível em forex devido à composição real do mercado.


Tenho desenvolvido uma visão do mercado cambial nos últimos anos como um veículo de investimento melhor do que ações. Posso trocar o mercado forex com sucesso usando estratégias de negociação mecânica e obter um lucro anual médio composto maior do que o do mercado de ações que significa que a longo prazo para mim é melhor investir em forex e fazer retornos de ineficiências dentro de pares de moeda do que para Fazer o mesmo com ações. O mercado forex dá uma oportunidade para construir investimentos robustos com menos capital e para se manter calmo sob crashes mercado algo que os investidores de ações simplesmente não pode fazer porque afeta-los diretamente. É minha convicção de que o forex é um investimento a longo prazo melhor do que os estoques de uma perspectiva de rendimento e estabilidade.


No entanto, tenho que admitir que a partir de uma perspectiva rápida ficar rico não faz qualquer sentido para o comércio forex como as recompensas potenciais são limitados eo risco potencial é extremamente elevado. Qualquer um negociando este mercado sem uma verdadeira borda de longo prazo, tentando usar 8220, ficar rico quick8221; Sistemas como Martingales alavancado elevado ou scalpers é certo para limpar sua conta limpa no médio prazo e no curto prazo a sua recompensa não será muito significativo, uma vez que eles vão tentar arriscar tudo a cada vez para atingir o 1K a um milhão USD sonho. Se uma pessoa quer ficar rico rápido e fora do acaso, então estoques seria o caminho a percorrer, em ações que você pode até mesmo fazer investigação das empresas e identificar aqueles que produzem algum significado potencial que você poderia efetivamente tomar os mesmos riscos que em Forex com uma recompensa muito maior e potencialmente ilimitada para um 8220, tudo ou nada8221; aposta.


Para resumir, a idéia de que forex é um mercado melhor para obter um monte de riquezas mais rápido é um vazio e infundado. Se este é o seu objetivo que eu iria olhar para estoques onde há muitos casos documentados de pessoas que fizeram exatamente isso (passou de alguns milhares a alguns milhões), enquanto se o seu objetivo era crescer o seu capital para rentabilidade a longo prazo, em seguida, forex pode Ser uma boa oportunidade com muito melhor e estável a longo prazo recompensas quando comparado com a negociação de ações. Eu sei que isso soa como o inverso total do que as pessoas costumam acreditar, mas se você seguir meu trem de pensamento você vai ver que ele realmente faz muito sentido. o)


Se você gostaria de aprender mais sobre os sistemas de negociação mecânica forex e como você pode projetar e construir seus próprios prováveis ​​sistemas rentáveis ​​de longo prazo, por favor considere se juntar Asirikuy, um site cheio de vídeos educativos, sistemas de negociação, desenvolvimento e um som, honesto e transparente Abordagem automatizada de negociação em geral. Espero que tenha gostado deste artigo. o)


9 Responses to 8220; Ações vs Forex. Por que é mais fácil de 8220, ficar rico quick8221; Com Stocks8221;


Concordo que pegar um estoque pode fornecer um retorno muito agradável, mas é uma arte real, poucas pessoas possuem esse sentimento do mercado.


Negociação no mercado de câmbio usando estratégias de negociação mecânicas


Eles dizem que 90-95% dos comerciantes de varejo perder todo o seu dinheiro: qualquer evidência?


Se você é como a maioria de comerciantes de varejo para fora lá então uma das primeiras coisas que você pôde ter ouvido sobre a troca de varejo é que entre 90 e 95% de todos os comerciantes de varejo perdem todo seu dinheiro. Claro, este número não é sempre o mesmo e alguns livros / pessoas vão levá-lo tão alto quanto 99% dos comerciantes de varejo e alguns tão baixos quanto 85%, no entanto, parece haver um acordo tácito na comunidade que implica que a probabilidade de longo Sucesso está em algum lugar na região 1:10 a 1: 100. Uma das coisas que eu sempre me perguntei é de onde esse número veio e se há alguma evidência real que apoia esta figura. Existe algum estudo que explore o sucesso de comércio de varejo? Existe alguma evidência que nos diga que a probabilidade de ter uma borda de longo prazo é tão baixa? No borne de hoje eu estou indo o andar com alguns da evidência que eu encontrei no assunto e o que nos diz sobre negociar eo sucesso de comerciantes de varejo.


Em primeiro lugar, vamos lembrar que as estatísticas acima, embora usado em grande medida no mercado de Forex é realmente mais antigo do que isso (eu encontrei livros usando-o em futuros impressos no início dos anos 90), muito provavelmente o número acima foi derivado de observações Em mercados diferentes do Forex. No entanto, foi incapaz de encontrar a fonte original precisa desta citação, uma vez que é apenas citado sem referência e, portanto, decidi fazer uma pesquisa bibliográfica para ver se eu poderia encontrar algum 8220, evidência moderna8221; Que o acima é realmente verdade.


Pesquisa de artigos acadêmicos lidar com o desempenho de comércio a retalho não é fácil, apesar do fato de que o tópico é bastante interessante é observacional na melhor das hipóteses e, portanto, não no interesse da maioria das pessoas dedicadas à matemática, negociação ou estatísticas. Meu primeiro pedaço de evidência vem do Journal of Financial Analysis em um artigo de D. J Jordan (2003) onde a rentabilidade dos comerciantes dia estoque é estudado ea conclusão é que cerca de 20% dos comerciantes dia estudado teve resultados rentáveis. É interessante notar que as ações são um mercado com inerentemente menos alavancagem e, portanto, 8220; safer8221; De modo que esperamos que a rentabilidade dos comerciantes de varejo seja um pouco maior.


No entanto, este nem sempre é o caso. Um estudo feito por B. M Barber em torno de comerciantes de Taiwan publicado em SSNR em 2004 nos mostra que o desempenho dos comerciantes do dia pode até ser menor do que isso. No cenário de Taiwan um pouco mais de análise é realizada e os autores concluem que apenas cerca de 1% dos comerciantes têm pelo menos 2 anos de rentabilidade, enquanto o resto dos comerciantes entrar em uma raia de perda prolongada que acaba com uma conta wipeout. A evidência que temos destes dois artigos sugere fortemente que a maioria dos comerciantes dia em ações perder dinheiro. Como o Forex é um mercado com maior alavancagem, esperamos que os números sejam como um melhor caso da mesma magnitude.


Claro que torna-se importante para também procurar informações sobre este assunto sobre Forex. No entanto, uma vez que o Forex não é negociado através de uma central de câmbio, mas através de corretores de varejo, torna-se muito difícil obter acesso a quaisquer dados (e, portanto, não existem estudos a este respeito) porque estes dados são mantidos privados pelos corretores. Embora o NFA forçou corretores a mostrar o número de comerciantes varejistas rentáveis ​​e perdedores por trimestre eles não são obrigados a dizer o que o volume de negócios é e, portanto, não há maneira de saber o que a longo prazo (2 anos, por exemplo) taxa de sucesso dos comerciantes forex é. Sabemos apenas que a curto prazo (trimestre) cerca de 50-70% não são rentáveis, mas isso é mais provável aumentou para um valor entre 95-99% após um período de dois anos.


Depois de procurar por um tempo, eu poderia encontrar algumas fontes que apoiam esta teoria. A primeira verdadeira evidência vem da Reuters em um artigo que fala sobre a proibição do comércio de varejo de Forex na China. O governo chinês descobriu que mais de 90% dos participantes perderam seus depósitos, o que significa que este era um empreendimento altamente arriscado para a população em geral, muito mais de acordo com um cassino do que um veículo de investimento. Esta é a primeira peça de evidência que nos mostra que a taxa de sucesso na negociação de varejo de Forex está em linha com o 8220, rumored8221; Quantidade, embora os valores exatos descobertos pelos chineses não são detalhados (meramente que mais de 90% perderam seu dinheiro).


Minha peça final de evidência vem do Los Angeles Times em um artigo publicado um pouco mais do que uma semana atrás. Neste artigo o jornalista Nathaniel Popper entra em alguma profundidade no negócio Forex atual nos Estados Unidos, mostrando que os corretores estão realmente jogando um jogo de volume de negócios maciça em que eles estão principalmente interessados ​​em 8220, queima e ciclismo8221; Em vez de manter os clientes por períodos de longo prazo. O autor entra em alguns dos dados fornecidos pelos corretores de Forex dos EUA e como isso leva à conclusão de que a maioria dos comerciantes de varejo perder todo o seu dinheiro no mercado Forex. O artigo faz um bom ponto, destacando o fato de que as pessoas costumam entrar em negociação com os objectivos de fazer grandes quantias de dinheiro (com um capital inicial de 3K), mas a maioria de bast perder todo o seu depósito.


Certamente, provavelmente nunca teremos um estudo acadêmico decente sobre a rentabilidade do comerciante Forex varejo, porque os corretores nunca darão as informações necessárias para realizá-lo. A menos que o governo forças corretores para revelar número de volume de negócios e fazer uma diferença entre contas inativas, ativas e marginadas a figura real de quantos comerciantes de varejo são rentáveis ​​permanecerão obscuros. No entanto, é verdade que a evidência em ações e futuros aponta para uma taxa de sucesso de entre 10-1% e informações do governo chinês nos dizer que o sucesso de varejo é na verdade muito abaixo de 10%. Agora, como um pedaço de informação desonesto (mais como fofoca), posso dizer-lhe que um amigo meu trabalhando em um grande corretor europeu me disse que a sua taxa de sucesso de 5 anos conta é inferior a 0,5%.


No final, parece que o velho comerciante dizendo é certo para a grande maioria dos comerciantes de varejo: Se você quiser fazer uma pequena fortuna trading8230; Comece com uma grande fortuna: o)


Se você gostaria de aprender mais sobre o meu trabalho na negociação automatizada e como você pode aprender a criar e avaliar sistemas de negociação usando táticas de negociação de som e métodos de avaliação por favor considere se juntar Asirikuy. Um site cheio de vídeos educativos, sistemas de negociação, desenvolvimento e uma abordagem sólida, honesta e transparente para o comércio automatizado em geral. Espero que tenha gostado deste artigo. o)


Negociação no mercado de câmbio usando estratégias de negociação mecânicas


Em execução a partir do CFTC. Quais são os corretores não-NFA que os cidadãos dos EUA podem usar agora?


As novas regulamentações impostas pela Commodity Futures Trading Commission (CFTC) nos Estados Unidos não só têm alavancagem limitada para 1:50 (majors) e 1:20 (outros pares), mas também fizeram corretores norte-americanos com escritórios fora dos EUA repatriados EUA para que eles comercializam sob os regulamentos dos EUA. Durante as últimas semanas as pessoas com contas na FXDD (malta), Forex UK e FXCM UK, entre outros, foram informados por seus corretores que antes de 18 de outubro suas contas serão movidas de volta para sua filial nos EUA para que as contas podem negociar sob os atuais EU Leis. Muitas pessoas não estão muito felizes com isso devido às restrições de hedging, alavancagem e FIFO (First-In-First-Out) da NFA, que colocam severas limitações na forma como as pessoas podem negociar, especialmente quando usam a plataforma Metatrader 4 Tem algumas limitações importantes sobre como as posições podem ser tratadas. Isso significa que todos os cidadãos americanos têm de negociar sob a lei dos EUA. Existe alguma opção disponível para os clientes dos EUA?


Tanto quanto eu entendi, a legislação atualmente em vigor não é absolutamente clara sobre isso. É claro que os corretores que têm ambos os EUA e escritórios mais mar só pode levar os clientes dos EUA sob sua filial dos EUA, mas não é muito claro se os corretores não-NFA pode, de facto, tomar quaisquer clientes dos EUA em tudo. Até agora, não houve esforços para fazer com que os corretores não americanos deixem de aceitar clientes dos EUA, mas isso pode acontecer no futuro. Enquanto isso, parece que um cidadão dos EUA pode abrir e negociar com um corretor não-NFA, desde que este corretor não tem absolutamente nenhum vínculo com os EUA (nenhum regulamento NFA ou escritórios dos EUA) e que o corretor tem sido previamente aceitar cidadãos dos EUA. Passei um tempo procurando por corretores não-NFA que aceitam cidadãos dos EUA e eu compilei uma pequena lista para aqueles de vocês interessados ​​em fazê-lo. Tenha em mente que você deve e-mail ou falar com o apoio de qualquer um desses corretores, se você deseja se juntar a eles para garantir que eles não vão mudar o seu actual stand em clientes dos EUA e que as suas condições de negociação e instalações de depósito / Com suas necessidades.


Estes são os corretores não-NFA Metatrader 4 que eu encontrei que ainda aceitam clientes dos EUA (até esta data)


ActivTrades Portugal


LiteFX Seychelles


FXOpen Egito


Forex-metal Rússia


VantageFX Austrália


InstaForex Rússia


Tadawul FX Swiss


MIG Banco Suíço


DukasCopy Suíço


Como você vê há alguns corretores que ainda aceitará clientes dos EUA com muitos deles sendo muito bem regulamentados na Suíça e no Reino Unido como Dukascopy e ActivTrades, enquanto outros são muito respeitável corretores com muitos anos de existência como FXOpen e LiteFX. A partir dos corretores acima você pode ter muitas opções diferentes de contas de centavos muito pequeno FXOpen para segregado contas institucionais sobre o Reino Unido e corretores suíços. A grande maioria desses corretores permitirá que você negocie com níveis de alavancagem de até 1: 400-500 com hedging e sem regras FIFO, adicionado a isso, você também pode escolher entre uma miríade de métodos de pagamento indo de moedas online como AlertPay e Liberty Reserva para cartão de crédito e transferências bancárias.


Se você acabou de ser 8220; chutou out8221; De seu corretor no exterior e agora você está sendo forçado de volta ao território dos EUA você definitivamente tem uma escolha para sair e obter-se um corretor você pode negociar confortavelmente com. Agora, a lista acima dá-lhe muitas opções que vão desde corretores muito altamente regulamentado para menos regula com muitos métodos de depósitos / retirada e opções de dimensionamento de conta / lote. No entanto, lembre-se de entrar em contato com o corretor que você quer se juntar a si mesmo para que você possa ter uma idéia de sua política para os cidadãos dos EUA e quaisquer mudanças que possam fazer no futuro a este respeito. A coisa mais importante aqui é que você encontrar um corretor que suprimentos suas necessidades, não está exposta à CFTC e não vai mudar a sua política em relação aos cidadãos EU no futuro.


Se você quiser negociar dentro de um corretor dos EUA e sua estratégia não tem problemas com a quantidade de alavancagem atualmente sendo oferecido, então ele pode ser apenas uma questão de tempo desde a plataforma Metatrader 5 que foi construído em torno de uma abordagem de posicionamento líquido pode negociar qualquer cobertura ou Estratégia de portfólio sem ter que se preocupar com FIFO ou hedging regras. No futuro próximo provavelmente 1 a 2 anos Metatrader 5 começará a ser oferecido para negociação ao vivo, marcando uma solução para a maioria dos problemas atuais da plataforma Metatrader 4 que torná-lo tão hostil de usar sob os regulamentos CFTC atual.


Se você gostaria de aprender mais sobre a negociação de sistemas de negociação automatizados e como você também pode ganhar uma verdadeira educação neste campo por favor considere se juntar Asirikuy, um site cheio de vídeos educacionais, sistemas de negociação, desenvolvimento e um som, honesto e transparente abordagem automatizada Negociação em geral. Espero que tenha gostado deste artigo. o)


Negociação no mercado de câmbio usando estratégias de negociação mecânicas


Metas de lucro fixo em Forex Trading. Por que essa é uma idéia muito ruim


29 de setembro de 2010 4 Comentários


Lembro-me quando comecei a minha viagem para se tornar um comerciante rentável que uma das primeiras coisas que as pessoas me mostraram foi como você poderia se tornar um milionário muito rapidamente de um par de cem dólares se você pudesse fazer x pips todos os dias. Outras pessoas tinham argumentos muito convincentes para esta idéia, dizendo-me que o mercado move milhares de pips cada semana e, portanto, se você soubesse como negociar capturar esses pequenos lucros não deve ser nenhum problema em tudo. Após esta idéia um monte de pessoas começaram a postar em fóruns e publicar artigos em blogs tentando capturar a essência deste conceito. Muitos threads com nomes como 8220, 2% cada dia8221; Ou 8220; 100 pips daily8221; Começou a surgir em fóruns e todo um grupo de comerciantes começou a enfrentar o mercado em um X lucro por dia de estilo semana. Depois de adquirir muita experiência e ter me tornado um comerciante rentável eu mesmo posso dizer que não só é este conceito de 8220, lucro constante8221; Falho de design, mas a mentalidade em que coloca um comerciantes é terrivelmente perigoso e só aumenta as chances de fracasso. Dentro dos próximos parágrafos vou falar sobre o porquê metas de lucro fixo no forex são uma idéia muito ruim e como você deve ver a rentabilidade se você deseja ter uma melhor chance e realmente alcançar o sucesso.


Certamente a idéia doesnt som louco ou ruim quando você primeiro pensar sobre isso. Você entra em negociação, fazer alguns pips, parar e repetir, todos os dias. O EUR / USD tende a mover pelo menos 50-100 pips diários assim que capturar um movimento líquido de apenas 20 ou alguns negócios pequenos para conseguir este nível de lucro não deve ser duro. No entanto, esta idéia tem algumas suposições gerais que torná-lo falho e sua aplicação na negociação real ao vivo para qualquer quantidade significativa de tempo, praticamente impossível. Por uma questão de fato, embora eu não posso provar que tal regime de negociação não é possível, posso dizer-lhe que eu não conheço um único comerciante rentável que tenha sido rentável, pelo menos, 2 anos que fez o seu dinheiro comercial desta forma. Assim, embora a possibilidade de tal possibilidade existir, a probabilidade de que isso aconteça parece extremamente baixa e desde que ninguém parece ter conseguido ainda altamente improvável.


Por que é tão difícil alcançar esse objetivo aparentemente tão fácil. Por que não posso uma pessoa entrar no mercado e tomar 10 pips todos os dias. A resposta encontra-se em outra suposição fatal desta idéia que considera que em todas as condições de mercado as ineficiências podem ser encontradas. Mesmo que o mercado possa ser ineficiente sob algumas condições de mercado muito especiais, como em mercados com forte tendência, por exemplo, nem todas as condições de mercado são igualmente ineficientes e certas condições de mercado, especialmente períodos ilíquidos ou períodos incertos - tendem a ser mais eficientes, Comportamento da multidão8221; Mas o preço é meramente o resultado de decisões individuais aparentemente não correlacionadas (que são muito imprevisíveis).


O problema com a tentativa de agarrar uma certa quantidade de lucro todos os dias é simplesmente que o mercado não pode ser 8220; willing8221; Para dar esse dinheiro afastado diário. Tentando 8220, empurrar o mercado8221; Em dar algum dinheiro em circunstâncias em que não há vantagem estatística em favor do comerciante é uma receita para o desastre, como eventualmente um conjunto de condições de mercado vêm quando o comerciante não tem borda e perdas um monte de dinheiro. Os comerciantes precisam trabalhar com o mercado como o mercado permite, não tentar entrar no mercado todos os dias, independentemente de como as condições do mercado de trabalho. Outro problema é que o objetivo de um lucro fixo por dia / semana / mês8221; Inerentemente significa que você vai perder lucro quando o mercado estaria disposto a dar-lhe mais e tomar perde quando você não deve ser negociação.


Pressão psicológica também se torna um fator extremamente importante quando os comerciantes decidem ir assim como a pressão para ganhar dinheiro aumenta à medida que as perdas são tomadas desde o 8220; Está sendo desperdiçada. Algumas pessoas, em seguida, sugerem novos comerciantes que a idéia é fazer 8220 x pips todos os dias em média8221; Mas que alguns dias perdidos estão OK. No entanto, esta afirmação é tão destrutivo como o comerciante está consciente desta média e uma crescente pressão é colocado em cima do comerciante para alcançar um certo nível de rentabilidade. No final, todo mundo que eu conheço que tentou trocar desta maneira acabou por fracassar devido ao estresse psicológico que o 8220, o lucro por unidade de tempo8221; Conceito exige, emparelhar isto com o fato de que os comerciantes que tentam isso geralmente não têm qualquer idéia sobre se ou não as técnicas que eles usam realmente têm uma vantagem estatística e você terá uma receita para o desastre.


A idéia de negociar com um lucro fixo é na minha experiência um terrivelmente falho uma vez que não reconhece a natureza variável do mercado ea pressão psicológica que coloca sobre os comerciantes. Meu conselho para qualquer um que quer ter sucesso na negociação não é tentar fazer um alvo de lucro fixo todos os dias / semana / mês / ano, mas para chegar a estratégias que podem avaliar a longo prazo para ver o que o lucro pode estar disposto a Determinadas técnicas de negociação. É irrealista acreditar que um certo lucro pode ser alcançado se não houver evidência sobre uma vantagem estatística ou o risco real assumido no longo prazo com uma determinada estratégia, a melhor solução é, portanto, para obter uma compreensão aprofundada do risco E as características de lucro de uma estratégia a longo prazo (5-10 anos ou mais) e trabalhar sobre isso sem fazer quaisquer suposições irrealistas sobre o mercado que não têm suporte real em evidência real.


Se você gostaria de saber como você também pode desenvolver estratégias mecânicas com técnicas de negociação de som e foco na confiabilidade de longo prazo e um alto como capa de rentabilidade por favor considere se juntar Asirikuy, um site cheio de vídeos educacionais, sistemas de comércio, desenvolvimento e um som, Honesto e transparente abordagem automatizada de negociação em geral. Espero que tenha gostado deste artigo. o)


Forex Automated Trading EA Championship, Worth o problema?


11 de fevereiro de 2009 1 Comentário


Todos os anos a maioria de nós está muito em sintonia com o mais recente metatrader 4 automatizado negociação campeonato. Traders nestes concursos obter centenas de milhares de dólares de pequenas contas iniciais contra os servidores demo que são modificados para mostrar as condições reais de negociação. Estes incluem deslizamento, alargamento de propagação e todas as outras coisas engraçadas que os corretores gostam de puxar sobre nós, os comerciantes varejo pobres.


Ano após ano, tenho refletido sobre os resultados dos consultores especializados e ano após ano estou mais convencido de que este concursos são mal concebidos. Acho que seus resultados não são o que a maioria das pessoas que procuram um e rentável estão realmente procurando.


Em primeiro lugar, a maioria destes consultores especializados são voltados para fazer investimentos de alto risco, a fim de ganhar o prêmio no curto período de tempo que o concurso usa. Este fato torna a maioria desses consultores especializados muito arriscado para usar para o comerciante varejo comum. Se eu estivesse entrando em um campeonato comercial eu definitivamente programa um desses consultores especializados que pode trazer até um tamanho de conta dez vezes e, em seguida, margem chamada a conta em um tempo muito pequeno. Claro, há a probabilidade de que a conta margem chamada no concurso, mas desde o período de tempo é tão pequeno, as probabilidades não são que contra mim. Por exemplo, um scalper com um TP de 10 pip e uma perda de parada de 500 pip é certo perder tudo no longo prazo, mas no curto prazo pode aumentar um capital de contas significativamente.


Isto é quando o segundo e mais importante fator entra em jogo. Eu acredito que a maioria destes conselheiros peritos para ser esporas de boa sorte no meio da história comercial. Exatamente como eu expliquei acima, o concurso só aconteceu em um período em que o ea foi rentável, mas esse período de tempo é muito pequeno para julgar os peritos reais de longo prazo rentabilidade.


Vimos isso com os vencedores de campeonatos anteriores, por exemplo, o conselheiro perito Bogie que teve segundo lugar um ano atrás, em seguida, falhou dramaticamente como as condições do mercado abruptamente mudou. Este perito conselheiros não são projetados para ser estável, os fabricantes de lucro consistente, eles são projetados para ser vencedor do concurso, então tome o seu tempo quando se pensa em comprar alguns ea que ganhou em um campeonato de negociação automática.


Mantenha-se à margem e espere até que o ea tenha uma quantidade significativa de testes ao vivo antes de você 8220; salto in8221; Apenas por pensar, 8220, ele ganhou o concurso8221 ;. Se você gostaria de saber mais sobre rentável livre e consultores comerciais forex especial por favor considere a compra do meu ebook sobre o comércio automatizado ou subscrever a minha newsletter semanal para receber atualizações e verificar as contas ao vivo e demo estou executando com vários consultores especializados. Espero que tenha gostado do artigo!


O sistema de comércio de Forex da matemática de Murrey


Entre todos os sistemas de negociação forex manual que tenho estudado durante os últimos anos, um dos sistemas que provou ser eficaz é o sistema de negociação forex Murrey Math.


Murrey matemática usa uma combinação de níveis de preços importantes, a fim de orientar o comerciante em tomadas uma ou outra posição. O sistema leva as 64 barras anteriores de alta e baixa e divide por oito, mostrando-lhe estes níveis importantes como 8/8, 7/8, 6/8, etc. Acontece que esses níveis representam com precisão suporte e resistência importantes Preço linhas que, quando usado com precisão, pode dar ao comerciante uma incrível precisão no fx mercado.


Eu desenvolvi algumas diretrizes simples para usar o sistema de comércio de Murrey (diferente daquelas que você deve geralmente encontrar) porque eu os encontrei para ser o mais eficaz, naturalmente, você é bem-vindo para mudá-los de modo que cabem seu estilo de troca. De qualquer forma, para usar este sistema de negociação, você deve obter o Murrey Math VG indicador disponível para metatrader 4 (isso automaticamente traça as linhas que estamos falando).


Em termos gerais as linhas 8/8 e 0/8 são resistência extrema e níveis de apoio, quando o preço chega a qualquer um destes termos é seguro esperar algum tipo de retracement. Eu troco os outros bares como eu trocaria o apoio regular e os níveis de resistência. Assim, minhas regras de sistema seriam assim (eu troco o gráfico EUR / USD de uma hora com este sistema):


Claro, eu parei essas regras simples com uma interpretação signficant de padrões de castiçal, mas na maioria das vezes eu tomar as posições apenas como afirmado acima. De qualquer maneira, a análise do candlestick fornece uma introspecção importante na ação do preço e você deve a considerar uma parte importante de cada estratégia negociando. Se você gostou deste sistema de comércio, mas gostaria de saber mais sobre sistemas de negociação automatizada e outros sistemas estou testando por favor considere a compra do meu ebook sobre negociação automatizada ou subscrever a minha newsletter semanal para receber atualizações e verificar as contas ao vivo e demo estou correndo com Vários consultores especializados. Espero que tenham gostado do artigo! (Abaixo, uma imagem de uma tela metatrader mostrando o diário Murrey Math Lines para esta semana)


Volume em Forex ... Isso significa alguma coisa?


De um modo geral, na negociação forex só temos uma fonte de informação para tomar decisões comerciais. preço. No mercado de câmbio, devido à falta de uma troca centralizada, falta-nos uma das mais úteis informações disponíveis sobre os mercados futuros e de ações, volume. This additional data tells us exactly the amount of money (or volume) moved by buyers and sellers which caused any given movement in price within the market at any given time, something which is basic to understand price formations, validate patterns and trade with generally more accuracy. But what is that volume indicator that shows in your trading platform then. On todays post I will address this question and I will discuss the inherent limitations and uses of 8220;volume8221; in forex trading.


First of all, it is important to understand why there cannot be a 8220;true volume8221; indicator in forex trading, why it isnt possible to know how much money goes through the market at any given time. Simply put, the market is just too large and has too many exchanges. For any given forex broker to have a true volume indicator, it would need to have feeds from every bank in the world which exchanges one currency for another, detailing the size of each transaction. This is not practical and probably not possible today. In fact, the only way in which we could have accurate volume information would be if forex was traded in a centralized exchange, something which will likely not happen due to the flexibility independent feeds give to inter-bank negotiations.


But what is that indicator you see on your trading platform. For example, there is an indicator named 8220;Volume8221; in Metatrader 4 which displays what appears to be volume information. Is this indicator displaying volume. How does it calculate it. The truth is that what the indicator displays is NOT true volume but a simple measure of the number of ticks received for a given time period. For example, a volume of 20 means that during that given time period the platform received 20 ticks.


Is the number of ticks directly proportional to volume. Sim e não. It does give an idea about the amount of 8220;activity8221; in the market but it does not give you any idea about the amount of money going through the banks. Since the amount of money is not proportional to the number of ticks. For example if the amount of money exchanged is very large but the number of transactions is small you might have a large candle with a small 8220;volume8221; (measured as number of ticks) but the real volume would be large. Therefore, the 8220;Volume8221; indicator is not a true measure of market volume.


Is it completely useless then. No, as I say, it is a measure of market activity, a measure of the 8220;amount of transaction8221; more than the 8220;volume of the transactions8221;. It still can be used on some analysis in which knowing market activity is important but it cannot be used to validate patterns and do volume analysis like on the stock and futures markets, simply because it is not the same variable. We could use the volume indicator as a way to determine market volatility and to predict the time of the day in which price will fluctuate to a larger extent, however using this indicator to determine the validity of moves is simply wrong since it does not correspond to true volume and moves which apparently happen on 8220;low volume8221; may in fact be large volume moves which happen on a few transactions. Therefore, the 8220;Volume8221; indicator is more like a 8220;liquidity8221; indicator, allowing us to locate periods where large amounts of buyers and sellers were available.


Another important problem is that since the 8220;Volume8221; indicator depends on the number of ticks, it is very broker dependant, therefore the building of automated trading systems based on this indicator is bound to give very large broker dependency unless measures are taken to normalize the volume indicator, something which also does not completely guarantee that this problem will be eliminated (although it is bound to be reduced).


If you would like to learn more about what I have learned about automated trading and how you too can reach your long term profitability goals using automated trading systems please consider buying my ebook on automated trading or joining Asirikuy to receive all ebook purchase benefits, weekly updates, check the live accounts I am running with several expert advisors and get in the road towards long term success in the forex market using automated trading systems. I hope you enjoyed the article !


Trading in the FX market using mechanical trading strategies


Machine Learning in Forex Trading: Why many academics are doing it all wrong


Building machine learning strategies that can obtain decent results under live market conditions has always been an important challenge in algorithmic trading. Despite the great amount of interest and the incredible potential rewards, there are still no academic publications that are able to show good machine learning models that can successfully tackle the trading problem in the real market (to the best of my knowledge, post a comment if you have one and Ill be more than happy to read it). Although many papers published do seem to show promising results, it is often the case that these papers fall into a variety of different statistical bias problems that make the real market success of their machine learning strategies highly improbable. On todays post I am going to talk about the problems that I see in academic research related with machine learning in Forex and how I believe this research could be improved to yield much more useful information for both the academic and trading communities.


Most pitfalls in machine learning strategy design when doing Forex trading are inevitably inherited from the world of deterministic learning problems. When building a machine learning algorithm for something like face recognition or letter recognition there is a well defined problem that does not change, which is generally tackled by building a machine learning model on a subset of the data (a training set) and then testing if the model was able to correctly solve the problem by using the reminder of the data (a testing set). This is why you have some famous and well established data-sets that can be used to establish the quality of newly developed machine learning techniques. The key point here however, is that the problems initially tackled by machine learning were mostly deterministic and time independent.


When moving into trading, applying this same philosophy yields many problems related with both the partially non-deterministic character of the market and its time dependence. The mere act of attempting to select training and testing sets introduces a significant amount of bias (a data selection bias) that creates a problem. If the selection is repeated to improve results in the testing set which you must assume happens in at least some cases then the problem also adds a great amount of data-mining bias. The whole issue of doing a single training/validation exercise also generates a problem pertaining to how this algorithm is to be applied when live trading. By definition the live trading will be different since the selection of training/testing sets needs to be reapplied to different data (as now the testing set is truly unknown data). The bias inherent in the initial in-sample/out-of-sample period selection and the lack of any tested rules for trading under unknown data makes such techniques to commonly fail in live trading. If an algorithm is trained with 2000-2012 data and was cross validated with 2012-2015 data there is no reason to believe that the same success will happen if trained in 2003-2015 data and then live traded from 2015 to 2017, the data sets are very different in nature.


Measuring algorithm success is also a very relevant problem here. Inevitably the machine learning algorithms used for trading should be measured in merit by their ability to generate positive returns but some literature measures the merit of new algorithmic techniques by attempting to benchmark their ability to get correct predictions. Correct predictions do not necessarily equal profitable trading as you can easily see when building binary classifiers. If you attempt to predict the next candles direction you can still make a loss if you are mostly right on small candles and wrong on larger candles. As a matter of fact most of this type of classifiers most of those that dont work end up predicting directionality with an above 50% accuracy, yet not above the level needed to surpass commissions that would permit profitable binary options trading.


To build strategies that are mostly rid of the above problems I have always advocated for a methodology in which the machine learning algorithm is retrained before the making of any training decision. By using a moving window for training and never making more than one decision without retraining the entire algorithm we can get rid of the selection bias that is inherent in choosing a single in-sample/out-of-sample set. In this manner the whole test is a series of training/validation exercises which end up ensuring that the machine learning algorithm works even under tremendously different training data sets. I also advocate for the measuring of actual backtesting performance to measure a machine learning algorithms merit and furthermore I would go as far as to say that no algorithm can be worth its salt without being proven under real out-of-sample conditions. Developing algorithms in this manner is much harder and I havent found a single academic paper that follows this type of approach (if I missed it feel free to post a link so that I can include a comment!).


This does not mean that this methodology is completely problem free however, it is still subject to the classical problems relevant to all strategy building exercises, including curve-fitting bias and data-mining bias. This is why it is also important to use a large amount of data (I use 25+ years to test systems, always retraining after each machine learning derived decision) and to perform adequate data-mining bias evaluation tests to determine the confidence with which we can say that the results do not come from random chance. My friend AlgoTraderJo who also happens to be a member of my trading community is currently growing a thread at ForexFactory following this same type of philosophy for machine learning development, as we work on some new machine learning algorithms for my trading community. You can refer to his thread or past posts on my blog for several examples of machine learning algorithms developed in this manner.


If you would like to learn more about our developments in machine learning and how you too can also develop your own machine learning strategies using the F4 framework please consider joining Asirikuy. a website filled with educational videos, trading systems, development and a sound, honest and transparent approach towards automated trading.


5 Responses to 8220;Machine Learning in Forex Trading: Why many academics are doing it all wrong8221;


Trading in the FX market using mechanical trading strategies


No more MT4 Back-testing. o) Moving to a professional, C/Python Backtester for the F4 Framework


During the past few months it has become evident as I expressed in my open letter to Metaquotes that the Metatrader platform has become a hostile environment for system development and professional live trading. For this reason it has become a priority for me to develop alternative solutions to all the needs that up until now had been fulfilled by this platform. Amongst these needs, one of the most important is clearly the historical evaluation of a strategys performance, also known as back-testing, which is fundamental to the development of algorithmic trading systems. During the past two months I have been working tirelessly with an Asirikuy member from Spain (Jorge) to develop a professional and robust solution that would allow us to back-test trading systems outside of the MT4 platform, without all the ridiculous and stubborn limitations imposed by Metaquotes on their strategy tester. Our efforts have created a C/Python tester assembly that is able to perform accurate and powerful historical tests, way beyond the many limitations of the MT4/5 trading platforms . Through this post I want to share with you some of the achievements weve made as well as some of the functionality we are planning to implement going forward.


The Metatrader 4 strategy tester has never been an ideal back-testing solution, when working with this tester you always feel like youre working 8220;around it8221; and not 8220;with it8221;. The MT4 back-tester suffers from some severe limitations in functionality that have been generated by the stubborn Metaquotes attitude towards the implementation of trader suggestions. For example you cannot select the spread used for back-testing, when the implementation of such a feature is as obvious and as simple as adding a few code modifications. Besides this there are other problems with configuration, a very limited set of statistics for optimization and a general lack of knowledge about how the different statistical measurements are calculated by the tester. You also have a completely 8220;hard coded8221; genetic optimization algorithm that you cannot modify or tweak to match the needs of your particular optimization procedure. There are other factors that inherently affect simulation accuracy, such as the use of constant swap rates through the whole historical period (as I mentioned on a recent post as well). Metatrader 5 fixes some of these things but introduces yet worse problems, such as the inability to load custom historical rates (so you have to carry out simulations with whichever data your brokers server wants to give you). On top of all of this the MT4 platform has no multi-core capabilities, taking no advantage of modern processor process distribution capabilities.


We at Asirikuy decided to develop a tester with Jorge that would fix all of these limitations, providing us with a very powerful testing framework that could allow us to get rid for once and for all of the MT4 platforms strategy tester. Using the power of the F4 framework it was rather easy for us to develop a tester because we can use the exact same code used for live trading in Mt4, but carry out the back-testing under a completely different environment. There is no uncertainty about the code in simulations and live trading being any different, because the strategy implementations are simply exactly the same (the same code is executed for live trading as it is for back-testing). With all of this in mind we developed a tester that now far exceeds the capabilities of the MT4 back-tester for our back-testing needs . These are the current capabilities of our C/Python backtester solution:


Cross-platform compliant. The tester has been coded/developed so that it can be compiled under Linux/MacOS (although we still havent run tests under these setups).


Multi-core support using OpenMP


Supports MPICH, meaning that you can run the tester across even large computer clusters. This is a feature that I havent seen in any other back-testing software. Want to run an optimization across 10 computers with quad processors using a total of 40 cores? Sem problemas!


Optimizations using either brute-forcing or genetics


Genetics are implemented using the powerful open source GAUL library. You can fully tweak ALL the parameters of the genetic optimization (mutations, breeding, migration probabilities, initial population, number of generations, etc).


Optimizations can automatically eliminate results with few trades, asymmetric results, etc. This is a huge improvement over MT4 as genetic optimizations do not converge to bad solutions as easily.


Wider available statistics for optimization (correlation coefficients, Ulcer index, profit factor, etc)


Custom statistics can be implemented. As the source of the tester is fully available, you can simply implement any statistics you want to use that are not added by default.


Test systems across multiple symbols. This means that you can carry out an optimization that simultaneously evaluates a system on N currency pairs.


Portfolio simulations. Do you want to evaluate how the A+B+C combination of systems would have worked historically? Sem problemas!


Accurate historical swaps! Derived from historical interest rates obtained from Oanda.


Ability to select any spread level desired :o)


Images generated for balance curves, historical swaps and volumes.


HTML/XML and CSV format reports are generated after each test. The HTML reports even allow you to sort trading results by using the column headers!


Console and visual interface access for easy configuration and running.


Configuration files are easy to share, meaning that you can allow other people to easily reproduce your tests by simply sharing a file. No more irreproducibility!


As you can see our tester implements capabilities that far exceed those of the MT4 platform, giving us the opportunity to completely get rid of the MT4 strategy tester (as we have confirmed as well that our simulation results are accurate as well). With our new back-tester we can now perform tests in the manner that WE choose to be the best, optimize the variables WE want to optimize in the way WE want to do it and evaluate the setups WE want to trade. We can now run our portfolios and see how they have done historically (in a direct manner) and we can also carry out optimizations that target strategies that match our stability criteria. We can also simultaneously optimize a strategy across several instruments or even different feeds of the same instrument, to find parameters that generate the most robustness or the least broker dependency.


Our implementation is however quite new (only about 2 months from our first code writing) and we still want to implement other things to further the capabilities of our testing platform. For example next week I am going to be working on the implementation of multi-symbol capabilities, giving us the ability to test a system that uses information from several different symbols to make trading decisions. This will give us the possibility to develop systems that exploit inefficiencies that work through the whole currency market, not focusing on information from a single symbol to make trading decisions (things such as correlation based systems could be properly evaluated with this implementation).


As you can imagine, the above gives us a potentially huge advantage against traders who only have access to the MT4 platform, simply because we have the capabilities to work above the limitations of this tester. We can run tests in a faster way (take advantage of multi-core or computer cluster setups) and we can also carry out simulations that the people using MT4 simply cannot do (for example optimizing a system simultaneously for various pairs). In addition the added accuracy of our simulations thanks to our accurate historical spreads gives us an additional edge as we cannot be 8220;fooled8221; by problems that stem from the assumption of constant historical swap rates (as discussed in my last post). We can also run directed optimizations as we can control the variables of the genetics and target values meaning that we can arrive to better solutions within the parameter space in a faster manner.


Last week I carried out what I hope will be my last back-test ever in the MT4 platform. Right now I am using our C/Python tester and I am extremely happy with its speed, results and capabilities. From now on I will only run my tests on this implementation and hopefully by the end of this year as I mentioned in my open letter to Metaquotes I will be able to get rid of MT4 for live trading as well. I will also start to move our community members away from MT4 back-testing in the hope that they will embrace our new and powerful C/Python back-testing solution :o)


If you would like to learn more about back-testing outside of the limitation of the MT4 platform please consider joining Asirikuy. a website filled with educational videos, trading systems, development and a sound, honest and transparent approach towards automated trading in general. I hope you enjoyed this article. o)


Mechanical Forex


Trading in the FX market using mechanical trading strategies


Data-mining in Algorithmic Trading: Determining your data-mining bias through the use of random data. Part one.


On my last post I described how to use the R statistical software in order to generate simple random financial data series. Today we are going to use these series in order to test the data-mining bias of an automatic system generation approach in order to determine what system characteristics are required to assert that a strategy is most likely not the result of spurious correlations. Although I have approached the data mining bias problem on some Currency Trader Magazine articles (particularly using random variables to test for only spurious correlations), this approach using random synthetic data offers us a complete dimension regarding the interaction of the OHLC variables within the system creation process, something that the other approach neglects. Within the next few paragraphs and posts I am going to share with you my experience with this testing procedure based on random data, as well as my conclusions regarding its use in Kantu (my system generator program). You can get the random data used for these articles here and you can also download the Kantu demo to test this approach yourself.


So what is a data-mining bias? When you create strategies in an automatic fashion you face the problem of not being able to know the probability that the generated strategy is the mere result of a spurious correlation that is achieved simply because your mining process is able to get anything outside of the data. As the saying goes, 8220;if you torture the data long enough, it will confess to anything8221; . meaning that if you perform data mining with enough degrees of freedom for a long enough time youll always be able to find a system that has whichever level of profitability you desire, up to the maximum profit that can be extracted from the market historically. Think about this, if you have a strategy that can have 8220;and/or8221; conditions, it can easily be demonstrated that there is always a set of rules that can be profitable on every candle and extract all possible profit within some historical data. Given infinite degrees of freedom, there is always a fit for every problem. Therefore, for a data-mining approach with infinite degrees of freedom the data-mining bias is the greatest, youll always be able to find a strategy on a random time series with the same profitability as the strategy you have developed on your real historical financial data.


However, as soon as you restrict the degrees of freedom on a data mining approach you reduce the data-mining bias to a smaller level. If your data mining process only generates systems with two rules it will be impossible for it to extract all possible profits from the market and the amount of profit it will be able to extract from random data series will be limited significantly. The idea of using random time series is to be able to answer a simple question: What are the best statistical characteristics that my system can achieve if it can only generate spurious correlations? Once you have the answer to this question which is your data-mining bias you will be able to evaluate whether the strategies you generate using real financial time series are bound to be significant. Your data-mining bias depends on the degrees of freedom of your data-mining process (how many rules, how many possible shifts, which exit mechanisms, how many parameters, etc) and it also depends on the amount of data being used . For this reason you need to repeat your analysis for any changes across these aspects.


Data length is a very important part of the question. Whenever you have more data the data-mining bias is reduced because the probability to find a spurious correlation that is present across the whole data set is diminished. A system that would have a significant chance of being chosen out of luck within a 5 year period may be extremely difficult to find out of luck within a 10 year period, a system that would be chosen out of luck on one symbols 10 year data may be incredibly hard to find within 4 symbols on the same data length (because in practice the system would need to work under 40 years of random data). For this same reason the TF is also important, the lower the TF, the lower your data mining bias (other problems like broker dependency start to be present as well so that must be taken into consideration).


To test for our data mining bias in Kantu we need to first select the conditions we want for the creation of trading strategies. Using different inputs or using different rules and shift limits changes the magnitude of our testing bias. We must also make sure that the random data we generated matches the length we want to test on our real data series and we need to ensure that the same entry/exit mechanisms are present. In the examples I am going to use I have generated random data for 25 years of daily data and will be generating strategies using a maximum shift of 50, a maximum set of 3 price action based rules and a stop-loss for the exits of the trading strategy. We will also restrict the rules to use only the Open/Close values for the strategy. You can also run experiments using different system generation options, to see how the degrees of freedom you give your strategy changes your data-mining bias.


It is also important that you record the amount of attempts used to generate the strategies . because the confidence in your data-mining bias measurement depends on how exhaustive your search of the logic space is. If you just run 1000 random system simulations and you find that the best possible system has certain characteristics, youll have much less confidence than if you generate 10 million strategies. The amount of systems you need to generate to have good confidence depends on your degrees of freedom and grows exponentially as the possibility of more complex systems becomes larger . If your logic space is in the order of 1000 trillion it will be extremely hard to come to any realistic conclusions regarding the data-mining bias . For the logic space I chose for these experiments (SL = 0.5-3.0 in 0.5 steps, OC 3 rules, max shift 50), there are about 121 million possible strategies so we should generate at least this number of systems in our random-data test to have some confidence in our data-mining bias. A good strategy to reduce the logic space complexity is to increase the steps of variables (for example round shifts to the nearest 5), to reduce the number of inputs or to allow for a smaller range in the SL/TP/TL searches.


Another important aspect is to use more than one random data series for the tests. Doing several tests on different random data sets can increase your confidence regarding the possibility to generate certain results. A single random data set might have some quirks (especially if the data is not very long) so it is desirable to repeat the analysis on several different sets. Now that we have a predefined setup we can run our tests and see what we obtain, we can then compare these results to the system generation results of Kantu on a real financial data symbol and see whether we can obtain systems above our data mining bias. Tomorrow well go into the second part of this series where well see some real results for this analysis. Any suggestions? Leave comment!


If you would like to learn more about algorithmic system generation and how you too can use Kantu to generate strategies for your trading please consider joining Asirikuy. a website filled with educational videos, trading systems, development and a sound, honest and transparent approach towards automated trading in general. I hope you enjoyed this article. o)


5 Responses to 8220;Data-mining in Algorithmic Trading: Determining your data-mining bias through the use of random data. Part one.8221;


Trading in the FX market using mechanical trading strategies


Accurate and systematic evaluation of Data Mining Bias (DMB) in trading strategy creation


Generating trading systems through automatic means is nothing new. There are several algorithmic implementations available commercially, usually involving different methodologies such as genetic algorithms, random pattern searches, etc. However every automatic search for a trading strategy suffers from a significant problem derived from the notion of data mining bias, which is related with confusing a strategy that exploits a real historical inefficiency with a strategy that is simply a consequence of random chance. The more intensive the search, the worse your data-mining bias will become, meaning that you will have a greater chance of finding something 8220;better8221; simply because you looked for it harder. This is a simple consequence of expanding your search space because the law of large numbers dictates that even highly unlikely scenarios will be drawn as the sample size taken from a distribution grows. On todays post I am going to describe a way to systematically evaluate data mining bias (DMB) to determine whether a given performer from a given system search is likely to be the result of random chance or a true historical inefficiency. We are going to look at possible sources of additional bias and we are going to describe a methodology that does not depend on complexity, selection or past experience.


Let us suppose you want to search a given financial instrument for profitable historical trading systems. The first thing you need to do is to define how you will search for systems (what systems interest you) and this system filter choice must avoid selection bias. For example if youre developing systems for symbol A and you know that for A systems with high risk to reward ratios have historically performed better, including such a filter using this statistic introduces a selection bias (influence of past experience). Any performance filter must be based on symbol-independent criteria which can equally be apply to any financial instrument. Since we know what the ideal trading system looks like (a non-compounding system is ideally a straight line) we can make the non-biased assumption that we want to search for something as close to ideal as possible (highly linear systems). In addition we can also search for only systems that have traded with a minimum frequency (trades/unit of time), because we cannot evaluate linearity accurately on systems that have lower frequency.


Now that we know what type of systems we want to generate we must now choose a performance metric to evaluate our systems. This performance metric must be based on some characteristic we want to maximize for our strategies, for example we can use the profit, the sharpe ratio, the profit to maximum drawdown ratio, etc. You can also perform the analysis for various performance metrics if you wish. The idea of the performance metric is to allow us to score the systems created so that we can establish a method to rank our strategies.


From the above let us suppose we want to find systems that are highly linear (R2>0.95), which have a trading frequency above 10 trades per year, which have been profitable during their last trading year and we will use the profit to drawdown ratio as a performance metric (all criteria that can be applied to systems on any trading symbol). We now need to define a search space where we will be looking for these strategies, however the methodology needs to be established such that the definition of this space does not affect your conclusions. As with the filtering criteria, your search space needs to be generic, it cannot be specific to the symbol youre developing for. This means that the search space usually needs to be somewhat broad and include no previous knowledge about the symbol youre trying to evaluate. For this example I will be using a space composed of 2 price action rules with a maximum shift of 30 and a stop-loss ranging from 0.5 to 3.0 of the daily ATR for the symbol being tested. For the symbol selection I chose a Forex pair randomly from a set of 25 historical files, to ensure that my example has no bias from my past experience with a few FX pairs.


But how do we evaluate whether our created trading systems have any merit? This is where things get a bit more complicated. You cannot tell if your systems have or dont have any merit simply by looking at their performance because you dont know the probability that such a performance was generated randomly. How high or low your performance metrics can get will depend on the complexity of your system search space, so you cannot evaluate your strategy just by looking at how 8220;good or bad8221; it looks. In order to evaluate whether a trading strategy can be due to random chance you need to define a benchmark to compare it with, which must be from a system generation procedure where profitability from random chance is the only possibility.


In order to do this we take the price series were using and we generate N new random series generated from it. In order to do this we use a bootstrapping technique with replacement in order to preserve the distribution characteristics of the instrument. After doing this we then search for systems (using our above established criteria) on all these random series and we generate a distribution of all the systems that we found according to your chosen performance metric. Note that the value of N needs to be large enough so that the empirical cumulative distribution function of the statistics population converges, if it does not converge then your sample is not large enough to make any valid assumptions. In my experience an N between 50-100 is usually enough as to get an empirical cumulative distribution function that varies less than 0.00001% between iterations. You must also exhaust your whole search space on all the random series (search for all possible systems), so that you have no bias relative to how much of the available space you are evaluating. Note that this posts results were repeated with N > 500 and results remained exactly the same after the ECDF converged (as mentioned above) .


After we have obtained the empirical cumulative distribution function for our random strategies we now know how many random systems are expected to be generated for a given number of tests. We can get this value from any class within our distribution by simply looking at the total number of systems (B) and the frequency of that class. If we have 500 systems in the 0.2-0.3 class within a 5,000 system distribution then we can say that the probability to have drawn a randomly profitable system with a performance value of 0.2-0.3 is 0.1 or 10%. With this information we are now ready to generate systems using our real data.


After generating a distribution of systems obtained from the real data we can now calculate exactly what the probability of a system belonging to random chance actually is. Since we know the probability that a system with a given performance metric will exist out of random chance, the probability that our systems belong to random chance can be summarized as C/X, where C is the probability of the strategy to be generated from random chance according to our previous tests and X is the probability of the strategy being generated within our real data. Think about it this way, our real data contains both randomly profitable and non-randomly profitable systems (at best) and therefore the probability that a system is randomly profitable is simply the extent to which the random data generation probability covers the actual real generation probability within our system. If you know that in random data you have a 20% probability to generate systems with a 0.2 performance score and you get a 20% of these systems on your real data, then you cannot say if your systems are or arent due to random chance, because you got exactly the amount you expected from the random distribution. If you had obtained 40% then you could say that 50% of your systems are expected to be profitable due to random chance (20/40), so the probability of your systems to come out of random chance is 50%. If a system has a zero frequency in random chance, then the probability to generate it is at least lower than 1/TS where TS is the total number of system generation runs attempted across all searches on random series. This is another reason why we need to look into many different random series, because otherwise TS would be very small and we would have large random chance probabilities for systems with low frequencies on our real data.


You can then generate a plot with the probability of your systems to come out of random chance (above), which gives you the confidence with which you can assume that the system comes from random chance. You can see in the above example that for systems with a performance metric above 0.6, the probability that they come from random chance is minimal (less than 1 in 60 million for this particular test). This shows unequivocally that price action based generated strategies at least in this example are most likely NOT the result of random chance, at least for a set of more than 200 top performers. Note how the probability that the system belongs to random chance increases as we move to lower values, because it is simply not possible to distinguish in this case between both worlds as we generate a lower or equal mount of systems as expected from random chance probabilities. The empirical cumulative distribution functions also reveal the fundamental difference between systems on random and real data (we will talk about Kolmogorov-Smirnov and other tests on future posts). The methodology does not rely on past experience, uses data from all systems generated and accounts for the probability of random system generation, generating a clear confidence interval for the expectation of a strategy being the result of random chance .


The above methodology is also robust to changes in complexity, because the methodology includes an incorporation of all the trading systems generated, without any selection bias. If you increase the trading complexity you might increase your system profitability and your DMB which will in turn lead to a different empirical cumulative distribution function on your random and real data that will lead to similar conclusions in the end. This method therefore cannot be fooled by a selection bias related with system complexity because the whole method adapts to the level of system generation complexity being chosen. I have tested several wider and smaller complexity regions, always reaching similar conclusions. You can also test the above method using random data as if it was 8220;real data8221; (second image above) and you will get in the end a result that accurately predicts that the probability that your systems are random is always incredibly high.


There are also some other useful metrics that you can use to determine how much your real data distribution differs from the distribution of the random chance systems, something that we will be discussing on future posts. Note that the above conclusion that we can generate systems that arent expected to come from random chance cannot be taken generally and the test must be repeated for any symbol that you want to test. Symbols with a heavy long term bias might show much higher probabilities of good profitability on random chance. If you would like to learn more about algorithmic system creation and how you too can generate your own trading strategies please consider joining Asirikuy, a website filled with educational videos, trading systems, development and a sound, honest and transparent approach towards automated trading in general. I hope you enjoyed this article. o)


14 Responses to 8220;Accurate and systematic evaluation of Data Mining Bias (DMB) in trading strategy creation8221;


Bob says:


I think you should have someone proofread your articles if possible ( I know thats difficult) before you publish them because they seem to be written in a hurry. Look at this sentence for example:


8220;Think about it this way, our real data contains both randomly profitable and none randomly profitable systems 8221;


Do you mean the following?


8220;Think about it this way, our real data contains both randomly profitable and non-randomly profitable systems8221;


I hope you realize these sentences have totally different meaning and while reading you article I got very confused. I hope you also realize that I read your articles word by word because they are interesting.


As a general remark that casts doubts on your results:


Low probability of random system according to your method DOES not preclude a curve-fitted system. Any well fitted system will pass your tests, i. e. your test does not prove that your data-mining method does not fit the best systems to the data.


Meaning that you are back to square 1.


Fabio says:


Dear Daniel,


Thank you for this post, although I agree with Bob about some proof-reading.


Let me tell you that I strongly (wonderfully) appreciate your deep interest, now, for a topic that I was 8220;friendly fighting8221; with you within Asirikuy already last summer, if I remember correctly. Good that also now you see how important it is.


Let me anyway warn you about a small but important difference. I feel you are mixing up data dredging with mining bias here (and bob points out also overfitting, that is another 8220;subset8221; of the problem, I think).


Data dredging (closer to overfitting) means that, by using mining algorithms, you come out modelling noise instead of signal, if you want, or random (normal? perhaps not) errors instead of variables. Massaging data enough, your historical data series, which is just a sample out of the population of possible outcomes it could have taken in the past (read: which it could take in the future), you will surely find out some function for fitting it. But, if this is not the signal, but instead the noise, that you have extracted from the population, even with the linearity constraint, you have nothing that is useful for the future.


Mining bias comes from the fact that, by imposing an objective function (profitability, etc8230;), and given that each function estimated from an experimental sample will have an error attached, you come out selecting every time the ones that, by (model+error) result better than the others, where the differential can exactly be the modeling error more than the function. I have not fully understood in you example above whether this is the case in your experiment, because you seem to consider 8220;all8221; the systems generated by a Kantu run, without excluding any one. But when it comes to choosing one strategy to be traded, there you will surely pick one showing a result which contains also the mining bias component.


The big question to me, and I am still going around for finding an answer, is whether such bootstrapping randomization is correct when it goes about analyzing time series (like financial data), which often are characterized by the precise sequence of data (financial markets arent autocorrelated, at least at a certain extent?). Therefore it could be no surprise that your systems generated on 8220;real8221; (unscrambled) time series would look much better than bootstrapped. After all, all these mining efforts would extract at least a part of the 8220;edge8221; present in a financial historic series as they are, right?


What I would prefer is to see some benchmark comparison, to show that the mining-generated system produces a result which is statistically different from the benchmark. And for obviating the lack of a lot of validation sets, an alternative, in my view, could be the generation of a huge number of runs of random trades with the same characteristics (besides the forecast of a 8220;direction of the move8221;, i. e. buy and sell) as the modeled ones, on the intact data series.


Just my two cents. I have no answers, but just some cautious doubt.


All the best!


Alex says:


Why dont you cut Daniel some slack? Or start your own blog where you share so much valuable information for free as he does, but without typos?


Ive read your comments in other articles. You really love criticizing Daniels work and sometimes in a harsh way.


Trading in the FX market using mechanical trading strategies


Walk Forward Analysis: Degrees of Freedom, Adaptability and Survivability


A few days ago I wrote a post about the inherent problems of walk forward analysis (WFA) and why this technique in itself does not constitute a holy grail for automated trading. Since this post I have done deeper research into the matter and by comparing results for several systems I have been able to find interesting relationships between the number of degrees of freedom and the survivability in walk forward analysis (using simple selection algorithms). Within this post I will expand on this topic, attempting to explain why systems that are given more freedom are able to exercise a better ability to adapt and why this ability causes fundamental problems that lead to unprofitable walk forward analysis. I will also go into why this tells us something fundamental about the inability of systems to evolve towards unknown market conditions and how we may possibly deal with this.


As I went deeper into the area of walk forward analysis, it soon became clear that systems with successful WFA results have some very clear characteristics in common. The first obvious relationship between them was a very simple trading strategy setup, a higher trading frequency and a low number of possible parameter selections. Upon a closer analysis of the results it became clear that these systems were not changing dramatically over the course of the WFA but they were simply having small changes across a wide variety of market conditions. A closer look also revealed that the systems that give profitable WFA results tend to work only on pairs for which the inefficiency they trade seems to be practically ever-present, only failing under very specific market conditions and for short periods of time.


The above is important because it spoke to me about a general lack of adaptability. What we have here are systems that trade in a very fixed way like a volatility breakout strategy does for example and the ability to survive the WFA comes from the fact that the efficiency exploited by the system changes little across the instrument it is trading. For example volatility breakout systems will find very profitable results in symbols like the EUR/USD but they will fail bluntly on symbols where this inefficiency is not ever-present. such as the USD/JPY. More clearly, these systems will be unable to fend periods when the market has changed, for example in the case of the GBP/USD after 2009, where the market changed to make volatility breakouts almost obsolete. Although WFA may show reduced drawdown such periods, it does become clear that the drawdown in itself is unavoidable and if lasted long enough it would potentially destroy the account. If a good ability to adapt was present, the drawdown would have been easily avoided at least after the first part of the drawdown period made changing market conditions evident. A system that adapts to changing market conditions should easily avoid drawdown periods longer than a few WFA window lengths, especially if there is a complete and dramatic market change.


In my view, it would be foolish to believe that such systems are truly adapting, because they never need to adapt to a dramatic change that removes the inefficiency they trade from the market and when they have to, they fail . However this poses a big question which is how we can give a system a larger ability to adapt in order to see if it can truly tackle dramatic changes in market conditions. At this point I decided to try systems with larger degrees of freedom, especially those systems that could generate dramatic adaptations to changes in market behaviour. The most obvious initial test is to try a system that can 8220;switch8221; the way in which it trades in a very dramatic manner; a breakout strategy that can either fade or trade breakouts.


The results of this experiment were very interesting because they showed that under competing opposite market strategies there are optimization periods where both can give profitable results but only one gives profitable results in the subsequent walk forward trading period. However there were also times when one of the two system switches was dominant, achieving profitable trading through several different periods at a time, only failing when the other strategy started to become dominant. In essence what we have when we introduce freedom that allows for a completely different trading logic to enter the picture is a system that is 8220;split8221; in duality between what it can achieve through both trading techniques. Such a system has enough freedom to adapt to two opposing inefficiencies and it only fails when the ground is neutral between the two (as the result is equivalent to a guess since none of the two techniques is dominant).


Perhaps the most dramatic effect is that the trading logic in fact changes in periods where you would expect it to, as the breakout inefficiency becomes less effective, the fadeout inefficiency becomes more predominant and the system starts to trade in a completely opposing manner. This is alike what traders generally call the 8220;switch8221; a flip between two opposing market views that happens under changing market conditions. Clearly you have losing periods while this happens while the change takes place but if the change is long lasting you actually get a few periods of very good profitability. Obviously if the change is short lasting you hesitate between the two logics and you end up with drawdown accumulated on either case. The market is very efficient in this case because it fails to imitate its past behaviour.


The above is only the beginning of the story but it does show that walk forward analysis success only seems to make sense when you give your system enough freedom to completely change the way in which its trading. Using WFA to adapt a system that is 8220;stuck8221; in a box is not a good idea because youre fooling yourself into thinking you have a true ability to adapt to market changes when you are simply observing a positive effect because the inefficiency you want to trade is practically constant under the pair youre analysing. By giving your system the ability to tap into logic that trades in a naturally opposing manner you ensure that you give your system the 8220;ultimate choice8221; regarding the way in which it should be trading.


Granted, the above is not easy to achieve and you will see that WFA fails bluntly under many different conditions when you increase degrees of freedom. However, profitable WFA is indeed possible for systems with very complex makeups (even genetic frameworks) but we will get into this topic on future posts. If you would like to learn more about trading systems and how you can learn to trade and analyse them please consider joining Asirikuy. a website filled with educational videos, trading systems, development and a sound, honest and transparent approach towards automated trading in general. I hope you enjoyed this article. o)


The Daily Time Frame. Five Reason to Love This Time Chart


I believe there is some sort of obsession right now in the forex trading community with the lower time frames. Perhaps it seems more profitable or glamorous to trade within the minutes and to get very small profitable trades with high lot sizes but the actual reality of the matter is that lower time frame systems with higher frequency trading often achieve the same degree of success that higher time frame strategies with much more effort and time requirements (plus a LOT more commission paid up in spread). I for one believe that the use of the higher time frames is unequivocally one of the best tools people have to become successful forex traders with low stress levels, I personally absolutely love the daily time frame for my long term trading strategies and it is in fact the lowest time frame I ever use when personally handling an account.


What is so great about the daily time frame. What makes it such a great tool for anyone who wants to become a successful trader (using either manual or automated techniques). Within this article I will give you the five main reason why I absolutely love the daily time frame and why I believe that system development and use within it is an extremely educational and profitable endeavor most traders should at least try for a year or two.


Just a few minutes each day. One of the great things about daily charts is that as the name implies they only have one new bar each day. This allows you to easily execute any trading strategy with very little time since it only requires a few minutes to check the new bar and input the signals. You know the exact time when the bar is closed so it is a chart that allows you to execute strategies when you dont have or you dont want to spend a lot of time in front of charts.


As successful as the lower time frames. Systems on the daily charts can be as profitable as systems traded on much lower time frames and as a matter of fact many times the trading costs are much smaller due to the reduced trading time. It is a myth that shorter time frames are inherently more profitable, there are daily strategies and short time strategies that work great but strategies in the daily time frames usually aim for very high gains over long periods of time reason why they may take more time to show their true profitability levels.


Broker dependency is VERY small. After using a script to remove Sunday candles (if present) daily candles show very little variation between different brokers. This means that the results of your system will be similar between brokers and the broker will be able to do very little to alter the results of your strategy since any slippage, re-quotes, etc are bound to represent only an extremely small percentage of your average profitable trade.


Always trade with the trend. Daily time frames offer you the ability to always trade with the developing trend while smaller time frames may sometimes get to into trades that temporarily go against long term trend direction. This allows you to have more peace of mind since you know that the market is moving with you. It is also true that most successful traders and market movers also use the daily time frame to do their trading so since you are using and looking at what professionals are actually looking at your chances of success are increased.


Stress-free trading. Maybe not entirely but the daily time frames allow you to trade a system and not worry about how it is doing every second. When entering trades on higher time frames small movements are not very significant and therefore you can just set your trade and leave it with confidence that the possibility of something bad ruining it is small. Weekend gaps will most of the time not be a problem since your trading targets will always be very large and the small indecisive days and 8220;blurry8221; short term charts will not be something you will need to concern yourself with.


Of course there are a few reasons why almost no new traders use daily charts particularly because of their desire to stay within the market a lot and their impatience to get profitable results. Certainly long term trading systems on daily charts are not so glamorous or fancy but they offer easy-to-evaluate trading setups and easy to understand logic that can be applied with confidence when adequate evaluation with profit and worst case scenario targets is achieved. With daily time frame systems this is especially important to do since these systems can usually have long and deep draw down periods that can last several years (alike some short term trading systems) but overall their profitability levels end up being similar to those of short term trading systems.


So in summary I believe that every trader should do at least a few years of trading with a daily time frame based systems at least in parallel with his regular trading activities (if they dont involve this already), just a few minutes everyday, sound robust trading techniques and long term results are some of the great reasons why the use of this time frame has paved the way towards the success of many new forex traders. Certainly you can be the next one :o).


If you would like to learn more about evaluating strategies by programming them into the MQL4 language to get accurate profit and draw down targets please consider buying my ebook on automated trading or joining Asirikuy to receive all ebook purchase benefits, weekly updates, check the live accounts I am running with several expert advisors and get in the road towards long term success in the forex market using automated trading systems. I hope you enjoyed the article !


Trading in the FX market using mechanical trading strategies


Neural Networks In Trading: Building a powerful trading 8220;brain8221; with several NN


Lets start the week with some good news :o) . During the past 2 years the development of machine learning systems has been a big priority for me. These techniques offer us the dream of permanently self-adapting trading implementations where trading decisions are constantly adjusted to match the latest data. Although I am aware that even this level of adaptability does not guarantee any profitability as the underlying models may become useless under some new conditions it does provide us with a larger degree of confidence regarding our ability to predict a certain market instrument going forward. On todays post I am going to show you my latest development in the world of neural networks, where I have finally achieved what I consider outstanding historical testing results based on machine learning techniques. Through this article I am going to discuss the different methods that went into this new system and how the key to its success came from putting together some previously successful yet not outstanding trading implementations.


First of all I would like to describe the way in which I develop neural network strategies so that you can better understand my systems and latest developments. My neural network trading systems are designed so that they always retrain from newly randomized weights on every new daily bar using the past N bars (usually data for about 200-500 days is used) and then make a trading decision only for the next daily bar. The retraining process is done on every bar in order to avoid any curve fitting to a given starting time or training frequency and the weights are completely reset to avoid any dependence on previous training behavior. The neural networks I have programmed take advantage of our F4 programming framework and the FANN (Fast Artificial Neural Network) library, which is the core of the machine learning implementation. The network topology isnt optimized against profitability but simply assigned as the minimum amount of neurons necessary to achieve convergence within a reasonable number of training epochs. Some variables, like the number of training inputs and examples used, are indeed left as model parameters. Now that you better understand how I approach neural networks we can go deeper into my work in NN.


I have to confess that my quest to improve neural network trading strategies has been filled with frustration. It took me a long time to develop my first successful model (the Sunqu trading system which is actually in profit after more than a year of live trading) but after this initial development I wasnt able to improve it a lot further (beyond some small enhancements). After this I decided to leave this model alone which is really complicated in nature and attempt to develop a simpler model which would hopefully be easier to improve. This is when I developed the Paqarin system, which uses a simpler set of inputs and outputs in order to reach similar levels of historical profitability on the EUR/USD. However to continue my frustration Paqarin wasnt very easy to improve as well. I did make some progress in improving this trading strategy during the last few weeks but I want to leave this discussion for a future post (as it deals with inputs).


My last attempt to overcome the above problems was the Tapuy trading strategy, a system that was inspired on an article dealing with the use of NN on images. Using the ChartDirector, DeVil and FANN libraries I was able to implement an image creation and processing mechanism that used EUR/USD daily charts (a drastic reduction of them) to make predictions regarding the next trading day. This system is very interesting because it shows that the simple pixels within these graphics contain enough information as to make decisions that have a significant historical edge. Tapuy is also interesting in the sense that it processes trading charts, the same input that manual traders use to tackle the market. However this system was no panacea and improving this strategy was also extremely hard. Tapuy is also hard to back-test (takes very long due to the image creation and reading process) and therefore the amount of experiments that could be made was reduced.


After creating these three systems my new NN creations were nil. I couldnt improve them substantially and I could not find a new strategy to create an NN, this was the main reason why I started to experiment with new machine learning techniques (such as linear classifiers, keltners, support vector machines, etc). However during last week I had a sort of epiphany when I was thinking about ways in which I could limit the market exposure of these systems by making them trade less in some manner and realized that the solution to my problems was in front of me the whole time. The solution to improve the performance of three classifiers all of them showing long term historical edges is simple8230; Just put them together to make trading decisions. o)


Surely my experience with other machine learning techniques told me that putting classifiers together to make trading decisions generally improved performance but I had never thought of putting these systems together because I viewed them mainly as separate trading strategies and not simply as machine learning decision makers. Nonetheless, it made perfect sense to put the three decision making cores into one strategy: what I now like to call the 8220;AsirikuyBrain8221; and come to conclusions regarding trading decisions from a prediction that conforms to the three techniques. If they all have long term edges, then their total agreement should have more predictive power than their partial agreement. The result completely amazed me. The trading strategies improved each others statistics tremendously (much more than if they were traded together as systems within a portfolio) and moreover, they diminished the overall market exposure of the strategies by a big margin. The system only has one position open at any given time, but it needs all predictors to agree in order to enter or exit a position.


The overall profitability is the highest among all the systems and the drawdown is the lowest, this means that the AsirikuyBrain achieves an Average Annualized Return to Maximum Drawdown ratio that is higher than any of the individual trading techniques used, the maximum drawdown period length is also reduced considerably, from more than 1000 days for the other NN systems, to less than 750 days. The linearity of the trading system in non-compounding simulations also increases tremendously (to R^2 = 0.98), thanks to the smoothing power obtained from the committee effect (which means that the idea works!). As you can see on the images within this post, the curves for the individual systems are markedly inferior when compared with the equity curve of the AsirikuyBrain strategy. I will continue to make some tests and improvements, so expect some new posts on NN within the next few days and weeks (including some posts about inputs, prediction accuracy Vs profitability and predictions of profitability Vs predictions of directionality).


If you would like to learn more about neural network strategies and how you too can build constantly retraining NN systems using FANN that can be executed on MQL4/MQL5/JForex or the Oanda REST API, please consider joining Asirikuy, a website filled with educational videos, trading systems, development and a sound, honest and transparent approach towards automated trading in general. I hope you enjoyed this article. o)


Trading in the FX market using mechanical trading strategies


Neural Networks in Trading: How To Properly Evaluate NN Derived Strategies


Last month I began a new series of posts dealing with the world of neural networks and how these could be used for the creation of automated trading strategies. One of the first problems someone who wants to derive profitable Neural Network (NN) based strategies has to tackle is the inherent complications within the evaluation of this type of strategies. Unlike regular transparent rule based trading systems, neural networks cannot be evaluated in a simple in sample/out of sample test basis since their characteristics make this type of evaluation dangerous. On todays post I am going to share with you why NN derived strategies need to be evaluated with special care and how this evaluation can be carried out. I will also share with you a very cool video showing how I am currently performing this analysis to derive our first Asirikuy NN based systems :o)


First of all we need to understand how neural network systems are different from traditional rule-based strategies. A neural network is merely a set of functions with very intricate relationships that predicts (hopefully) some sort of non-linear relationship within a data set. The main problem here is that the actual rules used to make decisions are not transparent and therefore we dont have any idea of how they are being used for trading. This poses a very dangerous problem if we attempt to build a long term NN based strategy (for example simply attempting to forecast some variable using a 10 year training period) as the NN does not know what constraints are needed to aim for strategy robustness. The aim of an NN is only to match the data as perfectly as possible during the testing period and this may lead to implicit asymmetric rules which we know nothing about.


No video? Download the DivX player for free.


Since we cannot know anything about the rules used by the NN it becomes difficult to evaluate their robustness. In order to do this it becomes necessary to come up with an evaluation methodology which can exploit the ability of the NN to fit data and additionally show that this can be done in a way which exploits a market inefficiency without the problems from asymmetry that could be generated if we attempted to train the network over very long periods of time. The best solution to this problem which favors the NN strengths is a walk forward analysis.


The video above shows you the type of methodology Im currently using to evaluate my neural network strategy ideas. I take a training period (150 days in the above example) and use it to train the network. The network is then put to the test on the following 5 days and then these results are saved. The training window is then moved by 5 days and the process is repeated to get the results for the following 5 days. In this way we are actually evaluating the network in a continuous walk forward 8220;moving window8221; type of way which ensures that any type of asymmetric rules will be contrained to the very short term.


By evaluating a 10 year period using the above methodology we can know if the NN does exploit some inefficiency and its able to adapt against changes in market conditions or if it simply is not able to carry out this task. In the end when net profits are achieved what we get is a strategy which is completely based on a neural network and constant retraining, a strategy that not only succeeds in the long term but successfully readapts to constant changes in market conditions. Certainly this doesnt mean that the NN is a 8220;holy grail8221; or never losses but it simply means that the NN retraining allows for the exploitation of some type of inefficiency.


In the end NN strategies will also have draw down periods and will be as hard to trade as other long term profitable strategies but they do increase the degree of confidence and adaptability against changes in market conditions. As the NN is able to continuously adapt against changes in the market it has an advantage which other strategies do not have, the ability to 8220;learn8221; from what happens in the market and take that information into account for the prediction of future values. The 8220;moving window8221;, walk forward strategy provides a very good way to evaluate the robustness of an NN train/trade strategy based on the prediction of a given future price characteristic.


Hopefully within the next few months I will be able to start sharing some of these finding with the Asirikuy community :o) (still lots of things to research!). If you would like to learn more about my work in automated trading and how you too can learn to build and design systems with robustness in mind please consider joining Asirikuy. a website filled with educational videos, trading systems, development and a sound, honest and transparent approach towards automated trading in general. I hope you enjoyed this article. o)


Trading in the FX market using mechanical trading strategies


Using R in Algorithmic Trading: Analysing your Trading Systems Historical Results


When we create a trading strategy one of the most important things we have to do is analyse the historical results in order to assess the historical weaknesses and strengths of our trading system. Regular software like MT4 or MT5 which are closed source have limited statistics presented in often fixed ways that heavily limit the ability of a trader to obtain the statistics he or she desires. Using the R statistical software we can create robust performance statistics for our trading strategies without the limitations of close sourced software with the ability to build custom reports and have full control over the appearance of the graphics being presented. In todays post were going to learn how to use R to build performance statistics for our trading systems in a manner that is easy-to-do, expandable and that easily leads to the construction of custom reports. For this post we are going to be using the quantmod, PerformanceAnalytics, xtable, xts and ggplot2 packages so make sure you have them all installed before you continue reading. As always, I heavily encourage the use of R studio to perform these experiments.


The first important thing is the format of your systems result data. For this experiment we need the system results file to have 2 columns, one containing trade closing times and the second one containing balance values. The date can be in any format but you must be certain that your format matches the one yous specify on the read. zoo function. For this tutorial I will be using files with a 8220;%d/%m/%Y %H:%M8221; date format (something like 25/12/1995 5:00). In order to generate performance statistics we are going to load our data into an xts object and we are then going to create monthly and yearly returns (using quantmod) that we can then analyse using functions from the performanceAnalytics function. We will also construct good looking plots of these results using the ggplot2 library. The code below loads your system result file into an xts object called 8220;results8221; and then generates yearly and and monthly returns using quantmod. The 8220;head8221; function displays the top values for the 8220;results8221;, 8220;monthly returns8221; and 8220;yearly returns8221; objects so that you can confirm that everything was loaded properly.


Now that we have loaded our data we can now generate some statistics to analyse our system results. The first thing you will want to do is draw an overall chart of your trading system usings the chars. PerformanceSummary command. This function creates a beautiful graph showing your systems equity curve, the monthly returns and the drawdown periods. Please note that these values are all given as fractional returns, meaning that you need to multiply them by 100 to get a percentage. For example the graph I generated below has a maximum drawdown of -0.30, which is 30% in percentage terms. The performance summary graph already gives you important information about your trading strategy.


After getting this chart we can then obtain some tables to analyse using the table. CalendarReturns function applied to our monthly returns. This table can be used within a report to see both the monthly and yearly performance values through our whole test. Values here are given in actual percentage returns so there is no need to carry out any additional multiplications to analyse the results. Through this table you can easily see your best year, your worst year as well as the overall variations for each calendar month during every year. It is easy to see for example on the system results given as an example that September has been a profitable month since 2008 while it would be difficult to get this information from most other plots.


Another important set of statistics you want to have are related with your distribution of returns. We want to see the kurtosis and skewness of our distribution of returns as well as Risk measures. I took this idea form this tutorial related with the analysis of stock returns, so feel free to check it out for more information about this analysis and how you can also plot several of these analysis together if you have data for different systems loaded within a given xts object (more on this on a future post when we do system comparisons using R).


There are several additional statistics you can obtain from the PerformanceAnalytics library, so make sure you go through the documentation if you want to have a more powerful usage of this tool. You can easily obtain statistics such as your annualized return, maximum drawdown, downside risk, drawdowns and rollingPerforamnce using the options available within this R library. With this information you can build a good looking report that you can then put into a pdf using Latex (more on this on a later post). Finally we are going to create a yearly return graph as an example using the ggplot2 library which generated a good looking plot that you can also use to further analyse your trading results. The ggplot2 library offers a wide variety of plotting options, allowing for easy customization of your performance results.


As you can see we can use R for very varied things, including the analysis of our trading systems. Using the xtable, quantmod, PerformanceAnalytics and ggplot2 libraries we can create very easy-to-read analytics that can really help us better understand and analyse our trading strategies. If you would like to learn more about trading system analysis and how you too can perform advanced analysis beyond what MT4/MT5 or other programs will give you please consider joining Asirikuy. a website filled with educational videos, trading systems, development and a sound, honest and transparent approach towards automated trading in general. I hope you enjoyed this article. o)


Trading in the FX market using mechanical trading strategies


Taking a big step in machine learning: Profitable historical results across multiple Forex pairs


In the past I have been able to use machine learning to create profitable trading systems successfully, this includes my Neural Network implementations (which generated the Sunqu, Tapuy and Paqarin strategies, later building the AsirikuyBrain) as well as my attempts at linear classification and other types of algorithms. However, one of the things that all of these developments have in common is that they have traded on EUR/USD daily data and have failed to generate decent results across other pairs and/or time frames. This means that although I have tackled this particular pair/timeframe successfully (several of these systems have been traded live with profitable outcomes) I still hadnt been able to develop anything for other instruments. On todays post I am going to talk about one of my latest developments (in big part due to an Asirikuy member I will be mentioning later on) which has allowed me to achieve profitable machine learning results across other pairs besides the EUR/USD. Note that all back-testing results showed are non-compound (so that they can be easily judged by linearity).


The fact that machine learning techniques seem to be so 8220;easy8221; to develop on the EUR/USD daily, yet so hard to develop on other pairs on the same timeframe has always bugged me. Why is the EUR/USD daily so special, that previous data seems to easily predict future daily bar outcomes while in other pairs this simply does not work? The answer seems to be this exact same point of view what I am trying to predict. Fabio a member of our community pointed to me that it would be interesting to attempt to classify whether a certain trade outcome would be successful, rather than trying to classify simply whether the next bar would be 8220;bullish or bearish8221;. Predicting whether a certain trade entry would be successful is an interesting route, because youre trying to predict whether your actual trade within some exit boundaries will reach a profit or loss, rather than whether the overall directionality will be for or against you.


When implementing the above idea in F4, I saw that not all trade outcome predictions were equally successful, while predicting big edges didnt work at all (for example attempting to predict where a 1:2 risk to reward trade would be successful), predicting smaller edges worked much better. Different algorithms also gave markedly different results, while linear classifiers were extremely dependent on the feed data (changed significantly between my two FX data sets), Support Vector Machines (SVM) gave me the best overall results with reduced feed dependency and improved profit to drawdown characteristics. Simple mean keltner clustering techniques also gave interesting results, although the profitability was reduced compared with the SVM. As in all my machine learning implementations, training is done on each new daily bar using the past X bars and therefore the machine learning technique constantly retrains through the whole back-testing period .


Interestingly this technique achieves profitable results (25 year back-tests) across all 4 Forex majors (same settings), with particularly good results on the EUR/USD and GBP/USD and worse but still profitable results on the USD/CHF and the USD/JPY. The ability to predict outcomes seems to be lost most significantly on the USD/JPY, where there is a significantly long period (about 10 years) where the strategy is unable to achieve any significant level of success. I would also like to point out that the current machine learning test uses just a single machine learning instance and I havent attempted to increase profitability by building committees or such other 8220;tricks8221; that might help improve and smooth results when using machine learning techniques. In this case trying different trade range predictions within a committee or even only putting SVM and mean Keltner techniques to work together might significantly improve the results.


For me the fact that this technique has finally 8220;broken the multi-pair barrier8221; has been quite significant as it reveals something fundamental about using machine learning which, up until now, I seem to have missed. This also reinforces the fact that output selections are absolutely critical when developing machine learning strategies as attempting to predict the wrong outputs can easily lead to unprofitable techniques (as it happened to me when attempting to create ML strategies on other symbols). Choosing outputs that are meaningful for trading but still predictable within a good accuracy, leads to the development of more successful machine learning strategies. In this case in particular, changing the focus to a prediction that had direct implications in trade profitability had a good impact.


Although the results up until now are quantitatively nothing to 8220;party about8221;, the fact that there is now a road open towards developing profitable ML strategies that might work across the board (not just only on one pair) gives me confidence in the fact that I am walking the correct path (thanks to Fabio for his suggestions). After reaching this milestone my goal now is to polish and study this machine learning implementations to find better predictors and improve the results on non-EURUSD pairs, my end-goal would be to have a machine learning strategy that can deliver highly linear historical results (alike the AsirikuyBrain) across at least the 4 majors (hopefully even more pairs) so that I can have a source of diversification that is constantly being adapted to new market conditions.


If you would like to learn more about machine learning strategies and how you too can easily build linear classifiers, random forests, keltner mean clustering, neural network and SVM strategies in F4 please consider joining Asirikuy, a website filled with educational videos, trading systems, development and a sound, honest and transparent approach towards automated trading in general. I hope you enjoyed this article. o)


Trading in the FX market using mechanical trading strategies


Portfolio Optimization: What is the best way to calculate trading system weights?


When you have more than one trading system to use you instantly face a problem related with the specific weights you should assign to your strategies. Your end goal is to maximize the risk adjusted return of your systems under live trading conditions but you only have information from back-testing results. Is there an ideal way to select the weights of your portfolio based on back-testing data such that the returns of your portfolio in real trading are maximized? On todays post Ill seek to answer this question using my personal research as well as published results from others online. Well look at the portfolio optimization problem and why the selection of an optimum setup is not as straightforward as it might initially appear.


There are mainly two types of strategies available when balancing a trading system portfolio (deciding which weights to give to each system). The first set of strategies are described as 8220;naive strategies8221; and correspond to those strategies that do not make use of historical return data to decide what weights to assign. The simplest naive strategy is the equal-weight method, where all systems are given exactly the same weight, assuming that there is no way to know how to balance a portfolio beyond knowing that we want everything to trade equally. There are other naive strategies, such as balancing by frequency, where the frequency of trading systems is used to balance trading between systems. This means that a system with a higher frequency would have a lower weight and vice versa.


I will call the second set of strategies for portfolio balancing 8220;designed strategies8221;. These strategies use the historical information available through back-testing to attempt to maximize the potential return of a portfolio. The most common designed strategy is to perform an optimization of portfolio weights that attempts to maximize the portfolios risk adjusted return in a portfolio back-test. In simple terms this means that you should choose your weights such that a risk adjusted return statistic such as the Sharpe ratio has the maximum possible value in the back-testing period. This is usually called a Markowitz optimization which seeks to find the portfolios historical efficient frontier so that we can use it in live trading.


So why would we ever choose naive strategies Vs more elaborate designed strategies? The main reason is that designed strategies find optimum weights for past performance which often fail to be the same optimum values for real live trading. The reason why this happens is due to the estimation and model errors within the portfolio optimization process. The back-testing data knows only the past and changes between system correlations in the future are bound to change the way in which systems interact and therefore make a balancing based on historical results clearly sub-optimal. Furthermore, the weighing process usually removes systems from trading (because it considers them detrimental to the portfolios historical Sharpe ratio) but this causes a significant reduction in the level of diversification available in the portfolio. You can read this article for a study comparing different designed strategies to naive strategies.


Say you have 100 systems and a Markowitz optimization process removes 50 system from trading, you will now trade only 50 systems that were selected with a significant estimation error. Perhaps in real trading those 50 systems would have been quite important to increase the level of return within the portfolio. When you use a naive balancing method that simply distributes weights equally among those 100 systems you will have the maximum possible degree of diversification everyone trades equally therefore any use of a designed strategy should justify this loss of diversification with a better guarantee of an increased live performance risk adjusted return. You can try to get away from this issue by constructing a method that is a hybrid between both, say you perform a Markowitz optimization of your 100 systems but then add X% risk to all systems, such that everyone trades but the Markowitz favored systems trade a bit more. These entropy enhancing methods show some merit but often underperform the equally weight method as well. Read this paper for more information.


The view is not very encouraging. We know from research in the field that when using trading systems attempting to balance to maximize historical performance gives sub-optimal results due to estimation errors and reductions in diversification. We also know that this problem becomes more pronounced as our set of systems becomes either larger or more uncorrelated. This is quite intuitive as having more systems increases our estimation errors while systems being more uncorrelated increases the diversification penalty from failing to use any one strategy. Long story short, the bigger and more uncorrelated your system set is the more difficult it will be for you to find a balancing method that performs better in live trading than a naive portfolio balancing strategy. When in doubt, use equal weights.


Can we do anything then? Well, suppose that our goal is not to maximize performance under all market conditions as traditional portfolio balancing suggests but to reduce bad performance when market conditions are unfavorable. We know that our worst trading scenario is a random walk, as system equity curves would follow a negatively biased due to the spread random walk that would end up in bankruptcy, so we can think that our best shot at creating a good portfolio is simply to create the portfolio that shows the highest risk adjusted return when trading on random data sets. This means we should carry out simulations of our systems on a large number of random data series, then perform an optimization for each set of tests and then get an average optimum weight for our systems from all the optimizations on random data. Since we know random walk trading is the most unfavorable condition and we can shield against it since we can create as many simulations on random data as we wish we can therefore get a portfolio that is at least best performing under the worst conditions. This is most likely going to under-perform relative to the naive strategies under favorable conditions but it will be the optimum portfolio to trade when things go temporarily sour.


If you would like to learn more about how you can trade portfolios containing hundreds of trading systems and how different balancing methods work please consider joining Asirikuy. a website filled with educational videos, trading systems, development and a sound, honest and transparent approach towards automated trading.


Simple Moving Average Crosses as Profitable Trading Systems


As you may know by now, this week I have been dedicated to finding profitable simple trading systems. One of the first trading systems that new traders are exposed to is the moving average cross. A moving average is simply a line drawn on the screen that reflects the price average of the past x number of periods for each bar. A moving average cross strategy is simply entering or exiting the market when two moving averages cross or when price itself moves above or below the moving average.


Why does this make sense. The moving average cross strategy makes sense because what it basically implies is that if the price is moving above its average, then price should be increasing and vice versa. The same when you trade the cross of two different moving averages. If the average of a small number of periods is above the average of a bigger number of periods then this means that price is increasing and so forth.


But well, things are not that simple. The problem with the moving average strategy is that the price movement needs to be long enough in order for the lagging quality of the indicator to be minimal. Since the moving average lags the market because it takes time to react to market moves (because it is an average of past periods after all), then if price movements are too small you will always get in too late and exit with loses. This is why moving average strategies fail to work long term on all the smaller time frames. In smaller time frames, trends are not long lasting and they quickly reverse, whipsaw and send us a bunch of mixed and false signals which make the strategy a losing one.


So where are moving averages profitable. Well, higher time frames with very slow moving averages are the greatest because you catch extremely large market moves (sometimes even 2000 pips !) and you get very few trades, about one or two each year. This strategy greatly diminishes the amount of money you pay in spreads and guarantees a long term stable profit. This strategies can be easily traded with the unviersalemacross ea found at forex-tsd which lets you trade ma crosses.


Below you can see a backtesting chart for the EUR/USD, the GBP/USD and the USD/JPY (from 1999, on daily charts). This strategy is very good and really catches those year long market trends. Modelling quality is n/a because of some chart mismatch errors due to volume but again, the erros of this backtesting are almost none because we are trading very long term, in fact, you can easily visually backtest the strategy and see that the results are indeed what they are.


Even though this strategy has long term profitability and has a few trades every year, most traders will never even consider it because they still think that 20-50% is a real profit target in forex automated trading. If we look at the trades of the EUR/USD (200 slow ma and 20 fast ma) we see that each trades takes an anormous amount of profit. In fact, the average win is more than 5 times the average loss because of this. Below you can see a sample trade with the moving averages drawn, on the next chart you see a higher time frame (weekly) in which you can see how the ea caught all the long term trend perfectly.


This system can generate you a profit of about 40-50% a year with a draw down not exceeding 30%. Again, even though this is better than the best fund managers in the world, most retail traders (most of them not being profitable) will argue that this profit target is too small for them and that they 8220;know8221; that that quantity can be made in a monthly basis. This is true, a person can make 40-50% for a month or two, but the market exposure needed to make this amount of money will wipe the account. What I aim for is constant, consistent, stable, long term profits. I do not mind trading 2 or 3 times a year, in fact, I consider this better than entering positions everyday.


If you want to learn more about other commercial and free automated trading systems I have used and reviewed as well as expert advisors I have programmed to follow long term stable strategies, such as the 4 week breakout, turtle system and the 8and8 system please consider buying my ebook on automated trading or subscribing to my weekly newsletter to receive updates and check the live and demo accounts I am running with several expert advisors. I hope you enjoyed the article !


Trading in the FX market using mechanical trading strategies


Your Scalping and High Frequency Trading. Two Very Different Things


The other day I was talking with a somewhat new trader - just under a year of experience - about scalping techniques and my opinions about them. When I said that I didnt know anybody who had achieved trading success in the long term (5 to 10 years) using such techniques he was very quick to point to me to the fact that many traders are indeed successful this way and that huge companies profit simply from 8220;scalping8221;. He was talking to me about high frequency traders also known in the trading industry as 8220;quants8221;. After he finished talking to me about these companies I asked him what do you think 8220;quants8221; Faz. and the answer was that they do very fast scalping and use trading strategies that need to trade thousands of times per day.


This experience with this trader showed me that there is a general misconception about high frequency trading and scalping and that many traders attempt to develop scalping techniques in the hopes of imitating high frequency traders without ever realizing that both types of trading are absolutely different in what they attempt to do. First we need to understand what the general retail trader scalper does and then we need to compare this with what high frequency trading attempts to do. After we get an understanding of these two trading techniques and the scenarios in which they happen we will see why attempting to imitate 8220;quants8221; in a retail environment using tools such as metatrader 4 is a waste of time and an exercise which in the long term will yield absolutely no positive results.


So what do retail traders want to do. When a retail trader talks about scalping he or she is generally talking about the taking of positions that are exit in less than 10 minutes or which take a profit below 5 times the spread. This is what scalping is for retail traders. Note here that scalping does not involve trading frequency but it merely involves the entering and exiting of positions on extremely low profit targets. Of course the idea is to do this as frequently as possible, 8220;scalping8221; the market for very small profits everyday. The idea of retail traders is to develop a strategy that can do this profitably in the long term something that has several technical problems since these strategies are impossible to evaluate in long term simulations due to the fact that they are extremely dependent on live execution variables. However as you see here retail scalpers need to have a positive mathematical expectancy to be profitable and this is attempted with the use of a scalping trading strategy (which cannot be adequately evaluated in the long term).


The big boys know that such scalping strategies will ultimately fail in the long term since their profitability cannot be adequately evaluated and the short term nature of the market changes in an almost random way. High frequency traders and companies do not attempt to profit from such 8220;scalping strategies8221; but from market inefficiencies that arise with a guaranteed positive mathematical expectancy. Such inefficiencies are called arbitrage opportunities and arise for merely milliseconds or even shorter periods of time as the price of different instruments that should give a certain value, give another. In forex trading triangular arbitrage is the most common form of this game in which positions are taken on three currency pairs when their exchange rate doesnt synch correctly. For example when the EUR/USD GBP/USD exchange rates to go from EUR to GBP are not equivalent to EUR/GBP. High frequency traders use direct connections to banks and extremely high speeds to get in and out of this positions with a profit. The opportunities exist but they last merely a thousandth of a second so being very fast will allow you to take this very small profit. When you do this thousands of times a day you have a high frequency trader.


So the two worlds are extremely different. On one hand you have retail traders attempting to profit from short term strategies without ever knowing if they do have a positive mathematical edge (because they cannot evaluate them accurately due to execution variables) and on the other hand you have high frequency traders who exploit market arbitrage opportunities that last for only fractions of second (or even a millisecond). It is evident now that both scenarios are absolutely and totally different, the first scenario doesnt lead to success with certainty since the strategies used as subject to a very large variety of problems (besides the lack of knowledge about a true statistical edge you are also influenced by how your execution changes with time) while the other case is a 8220;sure way8221; to profit since the arbitrage opportunities are guaranteed to bring you profits (provided you are fast enough !).


A retail trader can therefore not compare him or herself with a 8220;quant8221; in a high frequency trading environment because not only are they attempting to do two completely different things but their tools and possibilities are absolutely different. High frequency trading operations have as I mentioned before direct connections, very fast execution and custom made trading solutions (often made in matlab) while retail traders have a very slow metatrader 4 platform running through a broker (even if its an ECN) with much higher trading commissions and an execution which is at least slower by a factor of 1000.


After analyzing all this it becomes obvious why high frequency trading operations are successful and why retail traders who attempt to use scalping systems are not in the longer term. The first crowd looks for a 8220;sure thing8221; by tapping very short lived arbitrage opportunities while the second group 8220;guesses8221; by using strategies that depend on execution and whose risk and profit characteristics cannot be judged accurately. Of course if you would like to learn more about the development of trading strategies and how you can gain a true education regarding automated trading please consider joining Asirikuy, a website filled with educational videos, trading systems, development and a sound, honest and transparent approach to automated trading in general. I hope you enjoyed this article. o)


Trading in the FX market using mechanical trading strategies


The Indicator Series. The Choppy Market Index an Answer to the 8220;trend/range8221; Questão


November 3rd, 2010 4 Comments


Is the market trending or range trading. This is one of the most common questions you will hear people ask when using technical analysis tools. Certainly there are many ways in which indicators can tell you if in the past the market was ranging or trending on a given instrument, tools that can be used for this are the RSI, ADX, Stochastic oscillator, etc. However the most important question comes when we attempt to predict some type of future behavior after we conclude that the market has been trending/ranging for a given period of time. On todays post on the indicator series a collection of posts I have created to explain the nature and uses of indicators in mechanical trading I will talk about the Choppy Market Index, a very unknown yet quite useful indicator that gives us a very transparent way to see if the market has been ranging or trending. By evaluating the information the indicator tells us I will suggest several ways in which it can be used to create long term profitable systems.


Despite my efforts to find who created this indicator I was unable to find information about the author. I was in fact introduced to this indicator by the book 8220;Building Winning Trading Systems with Trade Station8221; by Geroge Pruitt and John R. Hill, a book detailing the creation of several systems for the futures market using the Trade Station platform. Overall this book gives a good introduction to Trade Station coding and the building of long term trend following strategies (alike the turtle trading system) and one of the things I found most interesting when I read this a few years ago was the use of the Choppy Market Index, although much better uses came to mind later on.


The Choppy Market Index (CMI) is actually a very simple indicator which compares the difference between the close of the current period with the close X periods ago and normalizes this against the range (highest lowest) of that period. The value of the indicator is finally multiplied by 100 to give a number between 0 and 100. The formula of the indicator is highlighted below :


CMI = ((|Close Current period Close X periods in the past|)/(Highest point in X periods Lowest point in X periods))*100


If you see the indicator simply tells us how much the market has moved compared to how much it has 8220;wandered8221;, it gives us a good idea of how much the instrument has actually moved within the past X periods compared to its overall 8220;volatility8221;. The good thing about this indicator is that it is a very straightforward measurement of congestion, low values of the CMI indicate that the market hasnt moved almost anywhere for the past X periods while high values indicate that the market has trended strongly.


The important thing here is to realize that the CMI should not be used as a tool to predict the continuation of a given market behavior because such an approach is bound to fail. The CMI only tells you information about the past so when it gives you a measurement below 20 (implying that the market has only closed 20% of the range it has walked for the past X periods, it is ranging) it simply tells you that the past has been a congested zone. In order to take advantage of this information we need to analyze what it implies. Low values of the CMI especially on high periods (50) on higher charts like the daily imply that the market has been very congested for a given period of time and very successful breakouts usually follow periods of increased congestion. The CMI can therefore work as a tool to build a breakout strategy since it is very good for measuring 8220;accumulation patterns8221;.


When the CMI is high we also have an advantage since it tells us that the market is prone to retrace. When the CMI is close to 100 it implies that the market has closed almost all the movement it has made, implying that the market should retrace with a significant probability. The higher the period of the CMI and the higher the value the more 8220;over-extended8221; a given trend is. Of course care must be taken when building such counter-trending mechanisms but the CMI clearly shows you how you can build a trending-(counter-trending) full system using a single indicator. When the CMI shows a congested market we expect breakouts and when it has a high value we expect retracements. Of course we will need to take into account many other things to build a trading strategy but this information shows you how to use the CMI properly and why it is not bound to succeed when used as a tool to predict continuations. Other tactics, like using the indicator to determine trend establishment and then entering upon retracements are also obviously possible.


The CMI is not very easy to find (I couldnt find any MQL4 implementation) so I have coded a small free version of the indicator for MT4 you can download here .


If you would like to learn more about mechanical trading and how you too can build your own likely long term profitable systems based on sound trading tactics please consider joining Asirikuy, a website filled with educational videos, trading systems, development and a sound, honest and transparent approach to automated trading in general. I hope you enjoyed this article. o)


Mechanical Forex


Trading in the FX market using mechanical trading strategies


The Golden Problem: Why It is Difficult to Come Up With a Good Trading System for Spot Gold and Some of My Findings


Gold is definitely something most of us want to trade, not only because it is a significantly liquid asset but because it is offered by many different Forex brokers and provides a solid alternative asset class against currencies. If you have a system for spot metals that can also trade spot currencies then youre most probably after a solid market inefficiency and even if you have separate systems for spot currencies and gold the degree of diversification you gain by investing in gold might increase the future chances of survival of your strategy basket. However creating a system for gold is not very easy since the market conditions that determine gold price have fluctuated significantly during the past twenty years and some of the assumptions made for currency trading simply do not apply to gold.


When developing systems for spot currencies I usually do a development process based on 10-20 years of data which in the end reveals a strategy that is able to profit across a wide variety of market conditions. In currencies the assumption that a strategy that gives 10 years of profit will continue to profit is valid for the most part as systems that have been developed over the 1990-2000 period and then out-of-sample tested from 2000 to 2010 give profitable results overall. This means that the market structure around currencies seems to have some sort of coherence which has not disappeared within the past 20 years and which has a high probability of growing even stronger into the future. For me it is therefore not hard to develop a system for spot currencies as I have a high degree of confidence in the like-hood of success of the development process.


Now silver and gold are a completely different story. If you develop a system using EOD data for Gold between 1994 and 2000 (which is what we have available) youll find that these systems always fail in the 2000-2011 period, simply because gold has 8220;changed gears8221; and entered an exponential growth phase during the past ten years which is very unlike anything seen within the 1980-2000 period. When developing systems with even the slightest degrees of freedom it becomes evident that any curve fitting to the gold 1994-2000 era yields unprofitable results under a later out-of-sample testing time. It is therefore evident that any strategy developed from the 2000-2010 period will most likely suffer the same fate. Gold has increased almost 8 times in value since 1998 and this growth phase seems to be simply unsustainable in the longer term so gold will most likely either arrive at a 8220;still phase8221; (much slower ascent or decline) or crash hard during the next 10 years (check data from 1960-1980 to see a similar scenario happening). the important thing is that we simply cannot assume that exponential growth will continue, we must build systems that may profit if it does or if it does not.


Does this mean that we cannot develop a gold system? No, it certainly doesnt mean that but it means that we need to develop systems for gold that take into account everything that has happened within the past 17 years (from 1994) so that we do not simply crash and burn if there is in fact a change in golds trading tendency. We want to be within a scenario where we can profit from both a steady continued ascent (further valuation of gold) or a change in golds trading (crash or change to 8220;stand still8221;). I could not comfortably develop a system based only the past 10 years of exponential growth because all systems are heavily asymmetric (rely almost entirely on longs to profit) and fail under previous conditions (which we will eventually see again as the economy cycles).


Another interesting part comes when we attempt to develop trading systems for the past 17 years. Using our Asirikuy genetic framework (Coatl) there are almost no positive results and those that do show up have a very limited number of trades. Coatl is indeed quite confused by the hard change in trading character and despite its very large decision space it is unable to find a meaningful fit that can achieve significant profit on this assets charts for the past 17 years. It seems that the change in market conditions was nothing but abrupt and therefore genetics do not achieve success as the 8220;grip8221; they attempt to put around gold is just 8220;too tight8221; to put it in words.


What can we do to build a successful trading system for gold. Well we can always think of gold a as as regular commodity and attack it with a symmetric trend following strategy that makes no assumptions and has no optimizations (Quimichi) and see what happens. Not surprisingly Quimichi is one of the few Asirikuy strategies that does manage to reach a profitable outcome on golds 17 year data without any optimization and with the exact same settings used on other currency pairs. This shows yet again Quimichis power as it is able to profit from things as varied as the USD/JPY and the spot gold XAU/USD pair. Sure, results arent very good (average compounded yearly profit to maximum draw down ratio of 0.2) but overall results are positive which is the first step into the building of a really robust gold system (which will resist even a 8220;hard crash8221; in gold).


Certainly I will continue to explore this area with some similar trend following techniques and some additional genetic modifications and hopefully I will be able to find some robust implementations to trade metals within Asirikuy which can help us compliment our currently currency-only trading portfolios. If you would like to learn more about automated trading and how you too can perform long term evaluations using EOD data please consider joining Asirikuy, a website filled with educational videos, trading systems, development and a sound, honest and transparent approach towards automated trading in general. I hope you enjoyed this article. o)


Trading in the FX market using mechanical trading strategies


Machine Learning in Trading: Differences between higher and lower time frames


About two years ago I started my journey into the development of trading systems using machine learning techniques, particularly neural network based systems using the FANN (Fast Artificial Neural Network) library. However after the development of several systems, including successful implementations using both direct price information and image processing (reading directly from charts) I then decided to explore other machine learning techniques that were potentially faster and more powerful than neural networks in the prediction of financial time series. Following several articles by Belo and Barbosa mentioned along my previous posts about machine learning I started to develop ensembles of different machine learning techniques, studying the differences between them and how they were affected by inputs, outputs, etc. Today I want to talk a little bit about the big differences in building a machine learning technique for the higher and lower time frames and why the lower time frames represent a much larger challenge than the higher ones.


When you develop a machine learning technique for trading you are generally searching for a method that allows you to predict a given outcome that translates directly into an inefficiency (a net positive, long term monetary gain for you). This means that you will generally attempt to predict both the future direction of price and its magnitude, so that you can get a good idea of how much money you will be able to make if your prediction is right. My approach has generally been to attempt to predict the direction/magnitude of the next bar in a price series and this can be quite successful for the higher time frames with the appropriate input/output structures. The reason is simply that the daily time frame bars are large and therefore the movements within them are easier to predict than the movements within a lower time frame, which are inherently more random. Applying this simple methodology attempt to predict the next bar(s) leads to huge failure along the lower time frames and therefore this technique is limited to only higher time frames (but even then its likely to be sub-optimal).


Looking at the way in which regular trading systems are developed through mathematical expectancy analysis it soon becomes clear that when you develop a system using machine learning you should aim to look for trade entries that have a high chance of success towards a predefined profit target and position holding time . This means that you shouldnt train a system in order to learn if the next hourly bar (or the next ten or twenty or fifty for that matter) will be bullish or bearish but you will simply train it to give you an idea of whether if you had entered a trade on that bar after X time you would have eventually reached your profit target before your loss target (this takes into account the whole price range (high/low) movement). This means that you train your system to distinguish circumstances that lead to favourable movements within a given predefined maximum holding time, without constraining your strategy to trying to predict the outcome of a particular time period. The inputs used to define the machine learning method are bound to be similar, so the outputs are marking the main difference between this approach and the more basic 8220;predict if the outcome is bearish or bullish for the next bar(s)8221;.


It is no secret that up until now my success in the development of machine learning techniques for the lower time frames has been very limited but I believe that this is precisely due to the above issue dealing with the way in which I have been designing my predictions. Attempting to predict if the net movement for the next bar(s) will be positive or negative leads to very frequent trade entries as your machine learning technique tends to predict one or the other while having an output that attempts to forecast the success of an actual trade entry (whether you will reach the profit target before the loss target) is something much more in line with what we want as we are directly training the system to reach a predefined trading goal. With this type of output you can trade a clearer probability for trade success or failure while the 8220;next bar(s)8221; prediction does not allow you to take into account the total price excursions but merely a very limited view of the open/close differences of the selected period.


This is perfectly in line with the work of Belo and Barbosa and other academics who have postulated that higher time frames are more profitable for machine learning because they seem to be more predictable (have less noise). The issue, as explained above, is most likely related with the way in which they are trying to predict things. Certainly it is extremely difficult to predict the outcome of the next 15 minute or 1 hour bar while predicting the outcome of the next daily bar is much easier, the reason is that the daily bar is simply much bigger and therefore its movement represents overall market phenomena much more clearly. The problem here is that youre trying to predict the wrong thing. I believe there is no reason why you cannot achieve a profitable 1H system using machine learning, but it seems naive to believe that you can do this by predicting the next 1H bar (which is very difficult) but you should instead predict your chances of success if you entered a trade now and you want to hold it for a maximum of, for example, 10 hours.


My next goal in the development of machine learning strategies will be to tackle the issue of lower time frame machine learning systems using the above mentioned approach. I will first try simple linear/kernel classifier models that are bound to be much computationally lighter and I will then switch to more advanced models such as neural networks and support vector machines. I have yet to see if the above mentioned technique will be successful in machine learning but my first experiments point to some preliminary success. I also want to know if I can also achieve success without the use of binary classifiers but simply by predicting directly the mathematical expectancy values of a trade taken at a given point in time with a defined holding time. Do you have any ideas to develop better machine learning systems for the lower time frames. Do you have any opinion about my proposed design. Leave a comment with any questions or suggestions!


If you would like to learn more about machine learning techniques and how you too can use libraries such as FANN and shark to design trading strategies please consider joining Asirikuy. a website filled with educational videos, trading systems, development and a sound, honest and transparent approach towards automated trading in general. I hope you enjoyed this article. o)


The Turtle Trading System No.1 – Completing a Long Term Profitable Strategy


After a lot of time since I wrote my first post on the turtle trading system (by Richard Denis) today I intend to write a second post aimed at showing you the results I have obtained from the Turtle Trading System No.1 strategy. For those of you who are not familiar with the turtle trading system, this was a system developed more than 25 years ago by a trader named Richard Denis which was aimed at making anyone profitable in trading using a very rigid set of trading rules that were supposed to be executed to perfection by the trader.


Many people have asked me why I did not code the Turtle System No.1 when I coded the Turtle Trading System No.2. From a programming point of view, the turtle trading system No.1 is more complex than the second trading system in that the second trading system operates on much simpler rules which only include a entry breakout and an exit breakout which do not change upon any loses or profits obtained by the system. On the contrary, the No.1 system uses a 20 day breakout as an entry with a 10 day breakout as an exit with the 20 day breakout rules being changed to a 55 breakout rule if the system takes one profitable trade, then reversing the rules to the original 20 day breakout after any 55 breakout trade is taken.


However, in order to see the full performance of the turtle trading system I decided to code the Turtle Trading System No.1 and see if it performed better, worse or the same as the No.2 system on several currency pairs. After a few hours of coding the system and making it work as it should I finally managed to get a decent implementation of the No.1 system. The system trades exactly as it was explained by Richard Dennis changing the entry criteria depending on the profitability of the previous position taken.


The results, as you can see from the graph above, are much better than the results obtained for the Turtle Trading System No.2. The faster exit criteria and the change to a longer term entry when a profitable result has been achieved make the system better adapt to market conditions in the EUR/USD for the past 10 years. The backtest was done from Jun 2000 to Jun 2009 and it shows that the No.1 system is able to produce a 25% annual profit with a maximum draw down smaller than 20%.


However it is worth noting that the problems that exist with the turtle trading system No.2 still exist for this system when trading any other currency pair. On the other cases results are a little bit better but globally the same as the turtle trading system No.2. I have submitted an article to currency trader magazine for publication on this months issue (December 2009) that features the results of the turtle trading system amongst 7 different currency pairs including several moderate optimizations I have done that were able to achieve very significant levels of profit with a reduced level of draw down from 2000 to 2009. Such was the improvement that the turtle trading system becomes competitive against the gods gift ATR in term of average yearly profitability on some currency pairs.


I am proud of this systems coding but a lot still needs to be done in order to achieve the full potential of the turtle trading system. Please stay tuned for tomorrows article which will be about what is still left to be done about the turtle trading system in order to achieve an exact replica of the full trading technique that Denis turtles used. If you would like to learn about automated trading strategies and how you too can trade or develop long term profitable systems please consider buying my ebook on automated trading or subscribing to my weekly newsletter to receive updates and check the live and demo accounts I am running with several expert advisors. I hope you enjoyed the article !


Trading in the FX market using mechanical trading strategies


Neural Networks in Trading: How to Design a Network for Financial Forecasting in Eight Simple Steps


Lets be honest, building a neural network for the forecasting of financial series is not an easy task. The success or failure of a network depends on many different aspects and having a way of developing networks which is both systematic and efficient is a very important part of achieving both successful and powerful predictive results. During my 8220;neural networks in trading8221; series of posts I have faced the incredible challenge of building such networks but have always failed to explain the exact steps necessary to achieve this goal. On todays post I will be talking about my approach towards the systematic building and testing of networks which is based on a 1996 article of the Neurocomputing journal written by Kaastra and Boyd on the journal of Neurocomputing (free access here).


First of all I believe that anyone interested in the development of neural networks for the forecasting of financial time series (or the improvement of algorithmic systems) should read this article as it is a great and very slightly technical work which describes the steps necessary to develop networks and the different problems one might find when attempting to implement such a tool. One of the great achievements of this article is that it makes very limited references to mathematics and any particular set of tools, explaining the problems at a very simple level which makes it a very good introduction for anyone interested on this subject but without the need to go too much in-depth into technical matters. Although deeply understanding the way in which neural networks are built and what the different variables of their topology truly implies is key to long term success the understanding of all these parameters might be too complicated to tackle at first and a simple introduction is much more useful for the average trader interested in this field.


I found this article in January 2011 when I was starting to get into neural networks as a part of my yearly objectives in trading. I really liked it because it gave me an overall view of what a trader needs to do when first facing the problem of financial forecasting. For example the article tells us that there are mainly eight steps which need to be tackled in order to go from the idea of implementing a network to the full practical implementation. The first step suggested by the authors -8220;variable selection8221; is probably the most important as it determines the whole nature of the problem as within this step you select the variables you want to study amongst all those available within the financial series. For example this is where I decide that I want to forecast the GBP/USD weekly close or the XAU/USD monthly volatility (to give some examples).


The next two steps, data collection and preprocessing, deal with the collection of data relevant to the above variables and the processing of this data to make it pallatable for the neural network. For example if I wanted to forecast the GBP/USD weekly close I would collect all GBP/USD weekly closing data and other data I think might be relevant for this predicition (for example GBP/USD high, low and open values and all OHLC data for the EUR/USD. After this I then need to preprocess this data to both highlight the relationships I want to forecast for the network and scale it to the networks prefered 1 to 10 range. For example by dividing all values by the GBP/USD close and then dividing them by 10 I get values between 0 and 1 which already have some pre-drawn relationships that tie them to the GBP/USD close. Networks are not very good at drawing relationships from pure data (for example OHLC data) but you need to build some relationships between data in the preprocessing steps to gain a better chance at success.


Step number four training, testing and validation set selection - deals with the division of the above data in order to test the network implementation on later steps. For example if I had I a year of data I may wish to train for the first 4 months, then test the results for the next 2 months and retrain if necessary and then finally test over the whole year for validation. However this notion has been pretty much deprecated since the creation of this article as now the most robust form of evaluation which is the one I used for Asirikuy NN developments - includes the introduction of a moving window which constantly changes the training period automatically and performs constant validation through a very long period of time (for example a 10 year period).


The next steps 5-7 deal with the evaluation of what we would call 8220;network topology8221;. Within these steps the user should evaluate the structure of the network, the evaluation criteria (what determines the networks success or failure) and training procedure (number of iterations, learning rate, etc). The article is especially useful here as it gives us some very important tips regarding how to build a network for financial forecasting. For example we are discouraged to choose more than 2 hidden layers and we are also given several tips on how to choose the number of hidden neurons and the effect that changing these parameters might have on our end result. Certainly these steps are the ones which might take the builder of the network the most time as they encompass the largest amount of possible choices and it is often difficult needing substantial experience to build a network which has reached an optimum in this regard. Often extensive testing through moving window out-of-sample type testing is needed to reach something which has a high level of usefulness. Bear in mind however that initially all youre required to make is some choice regarding network structure which later on (after testing and implementation) can be changed.


The last step of the development process implementation is a very important one as it will determine the global capabilities of your NN implementation. The software you use will often determine the flexibility of your implementation and therefore how many options you can use to improve on your first selections. For my Asirikuy NN programs I have used FreePascal and FANN as they provide a very easy way to build networks and interface them with expert advisors coded on the MQL4 language. Additionally DLLs generated from this 8220;combo8221; can be used on any other type of trading system (coded on MQL5, C++, etc) giving us a lot of flexibility regarding where and how we can use the neural network. This combo also allows us to create iteratively optimizing neural networks that use a moving window approach on the MT4 backtester.


So if you want to build neural networks for the forecasting of financial time series I definitely encourage your to read the above mentioned article :o) If you would like to learn more about my work in trading and how you too can learn more about the power and coding of neural networks please consider joining Asirikuy. a website filled with educational videos, trading systems, development and a sound, honest and transparent approach towards automated trading in general. I hope you enjoyed this article. o)


2 Responses to 8220;Neural Networks in Trading: How to Design a Network for Financial Forecasting in Eight Simple Steps8221;


Trading in the FX market using mechanical trading strategies


Designing Forex Trading System Portfolios: Looking at Moving System Correlations


The need for system portfolios in trading is a real no-brainer. The efficacy of an edge can deteriorate with time and therefore the use of different systems that hedge and compliment each other seems to be necessary to increase profitability and reduce risk. However the problem with portfolio building comes from the fact that its always done with hind-sight. Any combination of strategies that are historically profitable will tend to give better results than a single system and the more you pile up strategies the better the results you will get. This means that youre encouraged to maximise your margin usage because you will almost always get an advantage in historical testing from doing so. On todays post we will be discussing some of the real life issues that arise from these problems and how we can arrive at potentially better portfolios by building portfolios based on moving window correlation. The concept of moving correlations allows us to see how the relationship between strategies changes with time and whether any observations are simply fortuitous or reflective of a strategys nature.


What is the problem with the creation of portfolios. Let us suppose you have two systems, A and B. When you simulate a run of A+B you get much better results than when you trade A or B on their own but you are unsure if you should put them together for live trading. However you decide to go forward and trade them live but suddenly you hit a drawdown period where both A and B tank and you are left with a reaching of your statistically determined worst case scenario, without knowing what went wrong. Why was your decision to put A and B together wrong if your back-testing results show you that it made perfect sense, the results were in fact better and the risk was supposedly less than when you traded them apart! In order to understand why things went wrong and why the choice to run A+B together wasnt justified we first need to understand what makes systems give better results when simulated as a portfolio under historical testing.


If A and B are both profitable during your back-testing results, then it is obvious that the profits of A and B will be additive since both of them are in the end going to generate profits. However the drawdown periods from A and B will most likely not perfectly match and therefore you will see that your maximum drawdown periods will with a very high probability drop to a smaller value. So you have added a lot of compounding power (additive profits) but your drawdown has dropped due to the misalignment of drawdown periods. Results for portfolios of historically profitable systems will always be better than the individual systems due to the above reasons. You need to look for something beyond the simple improvement in trading statistics to be able to judge if A and B should belong together or if they should stay apart. But what makes this difference?


One possible answer: study system correlations. Correlations measure the way in which the results of a strategy are associated with the results of another, whether a 2% profit on system A is likely to cause a 2% profit/loss on system B. If system A makes 1% and system B always also makes 1% then the correlation coefficient between the two is 1 while if the opposite happens, A makes 1% and B loses 1%, then the correlation coefficient is -1. However you shouldnt study the correlations of system results as a whole but you should calculate the moving window correlation of some return figure (correlation for the past X monthly returns) and see how it evolves through a long term (10+ year test). This will give you an idea of how stable the relationship between the strategies is and therefore how likely it might be in the future for the strategies to correlate and drag you into a deep drawdown. If your systems are always negatively correlated then there is a big chance that there is a causal link that prevents drawdown alignment and therefore it would be a safer bet to trade A+B. Note that correlations between systems will never be negative 8220;all the time8221; because they sometimes align in times of profit! It is also important to see when positive correlations have happened (whether they align with loses or profits).


So what should you look for? The images in this post show you several examples of system correlations. In all cases A+B give better results than either A or B traded alone but in some cases it is clear that the correlations imply that the systems should not be traded together. The first image shows the 48 moving monthly return Pearson correlation coefficient for two trend following strategies on the EUR/USD, since both strategies tackle similar market phenomena they show a very high positive correlation through the entire test (they only have a two month period of slightly negative correlation!). Although the results of A+B are better than A or B we should not trade these two systems together because it is obvious that they have a tendency to work in the same way and therefore the probability that they will align and kill the account when they fail is quite high. It is evident that systems that are designed with poor regard to correlation tend to have worse robustness because the strategies are hard-wired to tackle similar market phenomena.


Take a look at the second image I have posted. This image shows you a counter-trending strategy coupled with a trend-following strategy on the EUR/USD. The strategies have a much better hedging relationship and you can see that correlations are largely negative through a very big portion of the test. The positive portions you see correspond to profitable periods and even then the magnitude of these correlations is quite small (less than 0.2). You could therefore infer that the probability that these two systems will align within a significant drawdown phase is much smaller because the very nature of the strategies suggests that they trade in different ways that generate return structures that tend to be negatively correlated. This obviously doesnt mean that the systems cannot become heavily and positively correlated in the future but it does mean that the chance of this happening becomes much less significant. The idea here is to pair strategies that are fundamentally different so that 8220;trading in the same way8221; becomes much harder between them.


It is also worth noting that the Pearson correlation coefficient is not very robust to outliers (assumes a normal distribution) and therefore its not the best idea to use the simple monthly returns to calculate it. It is therefore useful to use variants of the monthly return that can be treated via logarithmic transformations (as Fd has suggested within our community) to generate normal distributions. When working with the regular monthly return (non-normal) the Spearman correlation coefficient might be more accurate (as it is more robust to outliers and makes no assumption about normality).


Last but not least, I would like to thank Fabio an Asirikuy member who pointed me in the direction of some material that suggested the use of correlation windows as a tool to enhance the building of trading portfolios (so this is definitely not a new thing). This is certainly a useful tool that makes the building of portfolios that are 8220;very likely to fail8221; much less likely. Of course, if you would like to learn more about trading systems and portfolio building please consider joining Asirikuy, a website filled with educational videos, trading systems, development and a sound, honest and transparent approach towards automated trading in general. I hope you enjoyed this article. o)


Forex Expert Advisors. Forex Kagi, an Unbiased Review


On this post I will start the review of trading systems that have come out during the months of May-June 2010 focusing my efforts on those expert advisors that have received the highest media and community attention. On todays post I will be reviewing an automated trading system called Forex Kagi which promises to use an 8220;ancient Japanese trading technique8221; to grant to unprecedented success in forex trading. Through the following paragraphs I will be going through all the trading evidence shown by the people at the forex kagi website, I will see if the evidence is able to backup the claims of profitability made by the authors and Ill give you my opinion about whether or not I consider forex kagi worth buying and testing.


Overall forex Kagi follows up on the formula of most of its predecessors regarding marketing. A website with an introductory video filled with relatively poor information about the trading system followed by a website filled with similarly poor content with relatively no information about the way it trades the market and its actual risk and profit characteristics. The Forex Kagi software falls into what I would call an 8220;empty promise8221;. The website goes on and on about the 8220;virtues8221; of the software, its very favorable risk to reward ratio, small stop loss values, high accuracy, etc, however there is NO evidence on the whole website that shows this to be true.


It is very difficult for me to believe that people try to sell software with such lack of general evidence to backup their claims of profitability. The forex kagi website shows no simulations of performance nor a live trading record to backup its claims. Therefore this website could just be made up without even having a decent product to sell. All the information we have is a bunch of pictures of 8220;trades8221; anyone could have drawn with any decent trading software and there is just NO information regarding the trading performance of this system.


How are you supposed to trade something that doesnt show the slightest evidence of being profitable. How do you trade a piece of software that shows no evidence at all. The developers of Forex Kagi should get serious and understand that performance MUST be demonstrated through live. investor-access verified trading results and that a simple 8220;tale8221; of what the software is supposed to trade like is just not enough.


Of course, due to the overwhelming lack of any evidence on the forex kagis website I consider this trading system NOT worth buying and testing. I would have to see ten year simulations, 6 months of live testing and a consistency test between simulation and live results before considering to buy this product. Right now this is nothing but an over hyped tale of a piece of software which has trading results that are simply unknown to us. With no evidence of profitability or the profit and draw down targets of this system how can they expect anyone to buy it ?


If you would like to learn more about automated trading and what characteristics you should look for on a likely long term profitable system please consider buying my ebook on automated trading or joining Asirikuy to receive all ebook purchase benefits, weekly updates, check the live accounts I am running with several expert advisors and get in the road towards long term success in the forex market using automated trading systems. I hope you enjoyed the article !


Trading the Full Turtle System… The Ayotl Trading System


For the past year I have been very interested in the development of a trading system that matches all the exact specification of the original turtle trading system developed by Richard Denis in the 80s. I have separately programmed and evaluated both turtle trading systems (no.1 and no.2) in a reliable fashion leading to a publication on the 2010 January issue of currency trader magazine of my research done on the Turtle trading system No.2 and its performance on 7 different currency pairs during the past 10 years of trading. Near last years end I published a post which stated that I was working on an implementation of the turtle trading system that would allow completely automated trading of both strategies including all correlation and portfolio management rules which formed part of the original turtle system.


As far as I know, there is no precise implementation of the separate trading systems available for mt4 besides my own and there is currently no implementatin of all the portfolio managment and correlation strategies which are supposed to further enhance the profitability of this trading system. Todays post aims to show you what I have been up to for the past few weeks regarding this trading system and what I have achieved8230; The Ayotl trading system.


As always, there is an etimological reason for the name. Since I want my developments to be able to be distinguished from other peoples attempts to develop a turtle trading system expert advisor I decided to give mine the name Ayotl, which simply means turtle shell in Nahuatl, the original language used by the Aztecs in Mexico. A common word which also has its roots in Nahuatl is tomato, which comes from the word tomatl from the same language.


What is the Ayotl trading system exaclty. It is not only a single expert advisor but a conjunction of three different expert advisors which are used together in order to trade the turtle trading system in a portfolio environment. There is an EA that trades system no.1, another EA that trades system no.2 and another EA which is called the 8220;turtle controller8221; which simply controls what the other experts are doing and authorizes or denies permission to open new trades. The controller EA takes into account the number of total open trades per currency, total long open trades, total short open trades, total trades opened on heavily correlated instruments, total number of trades opened on uncorrelated instruments, etc. The controller has a myriad of functions and manages all the experts so that they work in unisone, just like an original turtle trader would have done.


Ayotl is the first true automated representation of the whole turtle trading system. The person who wants to use it picks up the instruments and simply decides whether to use system No.1 or No.2 on each one, loads the experts on each different chart, loads the controller on a separate chart (instrument does not matter) and defines the magic numbers used for each one of the separate instances. Then the system is initialized and the controller starts to handle requests and answers to each one of the interfaces. While it does that the EA checks if each request fulfills the necessary criteria to allow for the opening of new trades. The only shortcoming of this approach is that the Ayotl system cannot be backtested due to the fact that it uses several different currency pairs and the interactions between trades taken on different pairs but the separate systems can be tested individually on backtesting achieving the results shown on the Currency Trader Magazine article I mentioned at the beginning.


Without a doubt trading either system no.1 or no.2 yields profitable results in the long term. Manually looking at the probable modifications caused by the portfolio strategy only points out to a diminishment in risk because of the diversification and restrictions caused by correlations, total number of trades, etc. For the past two weeks I have tested the strategy on the 5 minute time frame (only to have fast breakouts and exits to test the programming, clearly the final system will be traded ONLY on daily charts like the original turtle trading system) and have found it to behave just exactly as it is supposed to. After a little bit more testing and the writing of a manual for the system it will be released for use to both ebook customers and newsletter subscribers. Watch my twiter feed on the bottom of the left handed sidebar (or subscribe to the feed) to get the news when the release is coming out.


If you would like to learn more about long term profitable trading systems and how you too can program design and use your own trading systems to achieve reliable profits in the forex market please consider buying my ebook on automated trading or subscribing to my weekly newsletter to receive updates and check the live and demo accounts I am running with several expert advisors. I hope you enjoyed the article !


Forex Expert Advisors. Forex Triad an unbiased Review


September 20th, 2009 No Comments


Today I am going to focus on the review of the Forex Triad trading system which was requested last week by a newsletter subscriber. This expert advisor claims to be a 8220;system so robust powerful it can instantly identify winning trades, transforming you into an expert in every market condition no matter what your current level of experience is8230; Guaranteed8221;. For sure, the first thing that went to my head when I read this was 8220;they should better have the evidence to backup such a bold statement8221;, of course, after analyzing the whole website I soon arrived to some very decisive conclucions about this trading system which will be discussed in the following paragraphs.


The Forex Triad trading system is part of a group of pure hype expert advisors that have multiplied like ants for the past year. Throughout the whole systems webpage there is nothing but talk, talk and talk with little evidence to backup the things they say. This guy is pretty bold to say that his system is 8220;guaranteed8221; in any sense as there is not even a single glimpse of proof that can even hint to any of this guys claims being true. For example, this person says that the forex triad system is able to work under any market condition. I am sick of reading this over and over again, why would a person say something works under every market condition when this is NOT proved anywhere. There is simply no proof ever showed by the guy that tells us that his system is able to do this. Moreover there is not even proof that his system is profitable at all.


The creator of this system just goes on and on about things with no importance and then shows us some charts with 8220;sample trades8221; and 8220;testimonials8221; as evidence of a systems profitability. This type of evidence is what I like to call 8220;soft8221; evidence because it does backup a systems profitability claims when hard8221; evidence (like verifiable trading statements) exit but by itself it is nothing but an illusion. I could go into metatrader and make those charts in 15 min, I could also write 6 fake testimonials in 5 minutes. Who says this guy is not. Also, this guy should be aware (if he is no experienced in forex trading) that a few trades are NOT enough to know how a system works, in fact, thousands of trades are required to know this, specially if you want to prove your system works under EVERY market condition.


This type of sales page and the fact that there are people trying to sell systems out there with outrageous claims and NO proof of profitability is something that makes me angry. I wonder how many people have fallen prey to this guy and have actually lost their hard earned money trading this thing. I mean, if there is no evidence for profitability it is probably because the system loses money. If the webpage has a few months, the guy should have at least a few live tests on different brokers and a 10 year old backtest to prove his claims. If he does not, then maybe the evidence was not so 8220;in tune8221; with the sales pitch. Dont waste your time with this system, it is absolutely, in my opinion, NOT worth buying.


If you would like to learn more about how long term profitable systems are really traded, tested, evaluated and how you can start to make money with realistic profit and draw down targets in the forex market lease consider buying my ebook on automated trading or subscribing to my weekly newsletter to receive updates and check the live and demo accounts I am running with several expert advisors. I hope you enjoyed the article !


Forex Trading Strategies: Forex Rebellion, an Unbiased Review


December 8th, 2009 3 Comments


As you know, most of my time is dedicated to the review of automated trading systems, however today I am going to take a little bit of time away from that in order to review a manual trading system called forex rebellion. I think it is also important to review manual trading systems because often it is easy for people to fall into all the marketing and hype presented by these sellers. In particular I wanted to review the forex rebellion trading strategy since it is a perfect example of the way in which these forex strategy sellers lure people into buying their trading systems that have a complete lack of evidence and support.


First of all, what would you ask a trader who wanted to manage your trading account. What track record would someone have to have in order to convince you that they can produce profits with your money. Um ano. Dois. Most serious investment firms wont even bother if your track record is below 10 years. So why is it that people have such a soft criteria when they go out to look for and buy a manual trading strategy ?


Of course, the dream my friends, the dream. Forex Rebellion is a perfect example that shows you how this marketing technique works. The whole website is based on the concept of positive reinforcement. It tells you what you want to hear and then reinforces it with some insufficient evidence of profitability that you will believe because well, you want to believe it. Of course, in the whole process some very important information is not given. Such things as the maximum expected draw down of the strategy, the expected average annual profitability, the number of trades, the expected loses because of swap, spreads, etc.


More over, the website never shows us an actual track record of trades that has any 8220;decent8221; length. That is, we dont have a track record of at least a few years to actually believe the things this guy is saying. I have known people who, out of luck, have been able to pull 100 and 200% profits during one or two months, that is no problem. The actual problem in forex trading is to do this in the long term and this is what sets a successful trader apart from a 8220;lucky8221; um. So who in their right mind would buy a system that has tests of 2 or 3 months. Absolutely no one. A fund manager would laugh if you told him to hire you out of your three months of experience in trading.


I am sure you all can see that when this is put in perspective it becomes obvious. A trading system with very scarce evidence with no actual evidence of long term profitability is just as good as going to Vegas and spinning the roulette. All the talk and the videos and everything on the web page is simply no substitute for evidence, the evidence is a must and no system without it should be considered. Especially manual trading systems.


Of course, in my opinion, in the light of the complete lack of any reliable information that can backup any of the claims made by the author in the long term I am going to say that this trading system is absolutely NOT worth buying or testing, although, the website is in fact a perfect example of many of the strategies used by people in the 8220;forex product business8221; to take money away from the people in the market. However, if you came to my website because you are interested in automated trading systems and how they can be traded profitably please consider buying my ebook on automated trading or subscribing to my weekly newsletter to receive updates and check the live and demo accounts I am running with several expert advisors. I hope you enjoyed the article !


Confused by Your Charts. How About Trying a Simple Line Chart for Trading ?


September 6th, 2010 No Comments


There is a very common term used in trading called 8220;paralysis by analysis8221;. This is what happens to someone who is so overwhelmed by the amount of information on their screen that they are unable to make decisions regarding whether or not to trade. This is something that happens to every trader at some point in their career, a fruit of the desire to get very good entries without having significant risk. Usually people who suffer from this paralysis will have dozens of indicators loaded on their charts with a lot of contradictory signals that are difficult if not actually impossible to interpret in a meaningful and useful way to actually enter and exit trading positions. On todays post I want to talk about a way in which you can tackle paralysis by analysis and restart your trading in the simplest of ways. Through this post you will learn what I have learned works best to eliminate 8220;paralysis by analysis8221;.


You start your trading day and your screen is filled with indicators and clutter. The obviously beautiful layouts, tons of trend lines, support and resistance levels and indicators are nice to look at but interpreting what they say is difficult. You have a 20 period RSI giving a signal that you would normally take but you do not do so because you have a 100 MA that contradicts what it has to say as well as a Parabolic Sar indicator and a candlestick pattern formation you dont like at all. Even though the setup is pretty good you do not take it because you are paralyzed by the amount of technical data you are having to analyze. You have been officially paralyzed by your own analysis.


This 8220;paralysis by analysis8221; is far more common that what people usually think it is. It happens especially to traders who have been into trading between 6 months and one year which is the period in which people become a little bit obsessed with perfecting their entry techniques (from what I have seen at least). Paralysis by analysis is not good as it is usually a symptom of lack of confidence and the need to have what people believe are 8220;high probability setups8221; by putting up as many signals as possible together. Traders who get paralyzed usually believe that they need to see 8220;agreement8221; between many different indicators and that this in itself will provide them with the statistical edge they need.


If you feel you are in this situation, then you need to make a change. When I got paralyzed by my analysis I found out that the absolutely best solution was to go back to the simplest form of a trading chart, the simple line chart. This is a setup that shows you price action merely as a line moving on your screen, it is fantastically easy to interpret and it shows support and resistance levels with a clarity that is not rivaled by any other type of chart (perhaps only by renko charts). The simple line chart easily allows you to determine where price is headed and to draw support and resistance levels without breaking a sweat. Below you can see an example of this.


2B6-49-56%2BAM. png" /%


The main advantage of the simple line chart over other types of charts used in trading is that it is extremely simple. Even though price action may seem difficult to follow and price patterns hard to spot and interpret on a candlestick or similar chart, on a simple line chart such things as price patterns and price direction simply jump off the screen. Traders usually do not resort to a line chart because they consider them exceedingly simple and 8220;lacking8221; in the amount of information they give them regarding price action movements but the truth is that line charts offer you one of the clearest pictures of overall market action and most importantly to new traders it is the most intuitive chart to interpret.


While spotting trends and support and resistance levels on a candlestick chart can be harder, doing so in a line chart is totally easy as these things are evident most of the time. For this reason I have found that for traders suffering from paralysis by analysis, the line chart provides an extremely valuable tool to get rid of all the analysis tools and come back to what actually matters in trading, price action.


So even though simple line charts are no miracle tool and they wont make you a profitable trader on their own they will provide you with a very clear, simple and effective analysis tool that will greatly help you improve your trading and remove any paralysis you might actually have that could be eliminating your ability to trade in a reliable and long term effective manner.


If you however would like to learn more about my work in automated trading systems and gain a true education in their use and design please consider joining Asirikuy. a website filled with educational videos, trading systems, development and a sound, honest and transparent approach automated trading in general. I hope you enjoyed this article. o)


Don’t Fool Yourself. Why Renko/Fixed Range Charts Cannot be Backtested Accurately with MT4 or MT5


Definitely most traders will agree with me in that renko charts (also known as fixed range charts) are one of the best tools for trading, eliminating most of the 8220;noise8221; around the market and giving us a very clean picture of pivots and support and resistance levels. Renko charts 8220;even out the blur8221; by displaying a new bar only when a movement of a fixed set of pips has happened. As you may see on the image shown below an example of a renko chart price action becomes easier to understand and overall trading becomes easier. Given the fact that fixed range charts are good for trading it then becomes obvious to ask the question. can we build and back test expert advisors for the MT4 and MT5 trading platforms that use renko/fixed range charts. The answer to the first part of the question is yes but very sadly the second answer is a resounding NO. On todays post I will share with you my conclusions around this subject and why it is NOT possible to build 10 year accurate backtests of this type of charts using metatrader 4 or 5. I will also point out why results may be EXTREMELY misleading and how they may point out to a much higher profitability level than what is actually achieved.


First of all, let us talk a little bit about how we generate renko/fixed range charts on metatrader 4. We usually use one minute charts of downloaded metaquotes data and then apply a script to generate the fixed range chart we want to see. We effectively generate a history file with all the information necessary to display these new charts. Now, some people have ventured into using this data to run backtests and their results have often been pretty fantastic, however they NEGLECT to take into account some VITAL aspects of this conversion that make backtesting and especially the backtesting of scalping systems ABSOLUTELY useless.


The main problem with the backtesting of system on fixed range charts using this generated data from metaquotes one minute information is that tick data is not available. Because of this we get into a problem regarding the splitting of the bars and the actual 8220;volume8221; within each one of them since the formation of fixed range bars happens 8220;in between8221; one minute candles. The result is that we dont know when a new bar gets formed and the overall tick distribution becomes impossible to know. The image below shows you in a more graphical way what the problem exactly is. The end result is that a renko bar may have been formed before or after certain movements and therefore the whole movement of price and the exact formation of the fixed range bars is NOT accurate.


This effectively leads to a massive increase of the errors generated by mass interpolation and it acquires a fairly important tone when using fixed range bars in the order of 1-10 pips. This problem of generation and tick distribution can be SO large that actual simulations are absolutely unreliable to the point where backtesting results may give extremely profitable results (a few hundred dollars to billions in a few years) of a system that in reality is a simple loser. Scalpers are extremely vulnerable to this since the actual formation of the bars is not known and therefore the actual 8220;small movements8221; that determine their profitability and the timing of their signals is TOTALLY different.


It is also worth understanding here that the problems with fixed range bars are FAR worse than those of a scalper within a time based chart since the actual distribution of ticks is actually known in time based charts and therefore the distribution of them between bars holds at least some similarity with reality while those of a renko chart are merely made up since no tick data to do an adequate 8220;splitting8221; of the information is available. The shape of renko charts changes with one minute interpolation while this doesnt happen with time charts. However backtesting of scalpers is unreliable in either case not only due to one minute interpolation problems which may greatly overestimate profitability but due to the lack of execution problems and spread information.


To sum it up, even though the generation of fixed range/renko charts is possible in metatrader 4 and 5, the actual use of these charts for automated trading is not possible since the actual usage of accurate simulations to get draw down and profit targets for these systems is not possible since no tick data to do an adequate tick distribution splitting is available. For this reason if you see any system that has a modeling quality of (n/a) and the owner says the backtest was done on fixed range/renko charts you already know why this systems results are NOT reliable and why there is a GREAT chance that results are highly overestimating profitability and underestimating losses (to the point where real trading would show opposite results). Especially systems that use small renko bars and scalping techniques are bound to give astronomical results that are obviously not achieved in real trading.


Of course, renko bars are a great tool and it would be absolutely great to be able to do simulations with their data. However, until metaquotes decides to include tick data or we find a source of tick data that goes back to 2000 our chances of doing accurate simulations on this type of charts and therefore the development of systems with accurate profit and risk targets will not be possible.


If you would like to know more about automated trading and how you too can learn to code your own adaptive and likely long term profitable systems based on accurate simulations please consider buying my ebook on automated trading or joining Asirikuy to receive all ebook purchase benefits, weekly updates, check the live accounts I am running with several expert advisors and get in the road towards long term success in the forex market using automated trading systems. I hope you enjoyed the article !


Trading in the FX market using mechanical trading strategies


Algorithmic Trading from Home: Building a Reliable Linux Server


A few weeks ago I closed all of my Metatrader 4 accounts in order to start trading outside of this unprofessional trading platform. Using the Oanda Java API which I access using the Asirikuy Trader python front-end the possibility to move outside of Windows has also become a reality. Trading from Linux is something I have always wanted since the Linux operating system offers a much higher level of stability with a much more powerful console implementation and open source solutions for an extremely wide array of applications. Today I am going to talk about the setup of my Linux trading server for algorithmic trading, why I decided to set it up here instead of using an online Virtual Private Server (VPS), which precautions I had to care about and which distribution and system specifications I have decided to use for this setup. After reading this article you should be able to analyse whether a Linux home trading server is the right choice for you and what you need to take into account before moving in this direction.


When deciding to move away from Windows and into a Linux trading server, the first thing I considered was to migrate my trading to a VPS setup similar to the Windows setup I was previously using. Linux VPS are usually cheaper or the same price for the same technical specifications so it seemed like a good idea to migrate to a Linux server. However upon reviewing the commercial offerings available I quickly noticed some problems with what was available, Linux VPS offered only single core implementations (for the same price as windows dual core ones) and more importantly these VPS implementations were thought more for web hosting than for hosting processor intensive software implementations like those I intended to use for trading. While the Windows VPS commercial offering has adapted to offer solutions catering to what traders using MT4 need, the Linux VPS offering has been limited to offering what the web hosting community demands (which is what the Linux VPS are most often used for).


Since I was going to be paying about 300 USD a month in servers (to host all the accounts I wanted to trade), it became evident that a home solution might be cheaper and more suitable to my needs. Using our trading setups the RAM consumption per account is around 30-80 MB while the processing needs vary depending on the strategies used with most accounts consuming roughly less than 10% of an intel i7 processor when they are executed (roughly every 30 seconds). For the amount of accounts I want to trade an intel i7 processor (which is a quad core) with 8GB of RAM seemed ideal. I also decided to go with a solid state drive (100 GB) in order to have reliable storage. The computer is connected directly to my internet router using an ethernet cable (no wifi to increase reliability) and I have also added a 4G modem (about 30 USD/month) in order to provide internet access whenever my primary connection is down. The computer is also connected to a UPS (Universal Power Supply) that contains enough charge to allow for about 2 hours of sustained use if the power goes out. Electricity costs for this server setup should be about 25 USD/month where I live, so total costs are around 55 USD/month including the secondary internet option.


Regarding the operating system, I decided to setup Linux Mint instead of Ubuntu (to avoid some of Canonicals bloatware), which provides a similar look-and-feel without some of the added unnecessary complexities of Ubuntu for the setup I wanted. I also decided to go with a desktop type distribution instead of a hard-core server distribution because I still want to be able to have a good level of regular user usability (like a user-interface, etc). The computer is connected to one of my screens and keyboard/mouse through a KVM (Keyboard-Video-Mouse switch), which allows me to access this computer whenever I want without having a completely separate setup. Installation of all my trading software went without any issues. I was able to compile F4 without any problems (as I have done on Ubuntu for a while) and launch the Asirikuy Trader program to connect with the Oanda trading servers via the Java API. I have also setup a BitTorrent Sync service so that I can backup everything during the week-end (clearly backups during the week arent ideal due to the constant log writing of the trading instances) and I have also added all my accounts to the system startup (via a simple script). After all this setup I still have a good chunk of my hard drive (+50%) free, so the 100GB choice was just right for what I wanted to achieve.


The above setup seems to be very robust. The Asirikuy Trader is a very slick console application that is only concerned with algorithmic execution (no bloatware like MT4 with its marketplace, charts, etc) so trading systems are ran in a much more efficient manner. The program is also executed within a bash shell loop, so any exceptions that may cause the program to crash are easily recovered from by simply launching the program again. The Asirikuy Trader also contains emailing functionality so I can easily receive emails in case of any failure or problem with any of the trading instances (like disconnections or other such problems). Right now I am testing demo implementations of all the setups I want to trade live in order to iron out any issues before moving into actual live trading. Up to now execution has been completely in-line with my expectations, finally giving me that professional trading setup feeling I had always been looking for but never found with Metatrader 4.


From this experience I have to say that the cost/control/reliability of a Linux trading server implementation can be just as good as that of a Linux VPS, provided that you care for things such as internet connection redundancy, backups and power redundancy. In the case of Windows VPS implementations this difference is not so strong because the Windows market has already adapted significantly to the needs of the Metatrader community (therefore providing good performance/price ratios for these needs) but in the Linux market I failed to find a powerful solution that offered me an acceptable performance to price ratio. Another thing worth considering is server latency, if youre far away from the trading server and youre trading systems that operate at a higher frequency then trading closer to the source (which an adequate VPS host can give you) might be completely worth the additional price to pay. In my case the savings are tremendous, from paying what would cost 300 USD/month I ended up paying significantly less than 100 USD. With the initial price of the computer setup (around 600 USD), the investment will be completely worth it after a few months. That said, I am happy to say that I am now MT4 free!


The truth is that a Windows/Linux VPS is not always worth it. Depending on the connection speed, power costs, redundant internet connection costs, computer costs, etc, a local solution might be much better than a remotely hosted solution. This might not be true when you consider the cheapest VPS solutions (like the horrible VPSLand) but trading from this type of hosting is completely crazy as their level of reliability is extremely low (see my open later to VPSLand). It is also true that if your power costs are high then a good Windows VPS (like with accuwebhosting) might make more sense. If you would like to learn more about trading outside of MT4 and how you too can build your own trading portfolio to trade from Linux please consider joining Asirikuy. a website filled with educational videos, trading systems, development and a sound, honest and transparent approach towards automated trading in general. I hope you enjoyed this article. o)


Mechanical Forex


Trading in the FX market using mechanical trading strategies


Autonomous Forex Trading Agents Using Machine Learning: The Road to True 8220;Set-and-Forget8221; Algo Trading?


Every month I usually perform a simple literature search in order to find new and interesting research articles in the field of Forex algorithmic trading. As many of you may know during the past two years I have been very interested in neural networks and what they can achieve in trading but recently thanks to my friend Fd I have expanded this research to include machine learning in a much more general sense. This month while performing my literature search I found some very interesting examples using machine learning and in particular I have read papers by Rui Pedro and Orlando Belo (links to their papers here ), two guys from Portugal who have developed some really nice research in the area of autonomous Forex trading agents. During the following paragraphs I am going to introduce the concept of autonomous trading agents, what some research has found and why this area of research is quite exciting.


Definitely one of the biggest problems we currently have in trading is the design of a trading methodology. The problem involves everything from deciding how to design a strategy, to optimizing a system once it is fully coded and then deciding for how long it should be traded and when it should be redesigned or re-optimized. The main problem is that this whole process requires the intervention of a human trader in order to design models, test models and choose how models are being used. Ideally we would want an algorithm that could do everything by itself, an algorithm that could have many models to choose from, select models in a way that works historically and then change the way in which it adapts and trades according to its historical results. We are talking here about a trading implementation that is autonomous and can function without any human intervention, evolving in a way that does its best to guarantee profits under unknown market conditions.


Is there such a thing? Is there a way to create a true trading robot? The answer seems to be that there is 8230; at least someone trying :o). Rui Pedro and Orlando Belo have done some extensive research in this area and their approach to the solution of the problem is very interesting. These two guys build their autonomous robots using 3 different pieces that handle different parts of the trading process. The idea is that these parts are able to fully take care of the whole strategy design, decision making and money management aspects of the trading strategy, also evolving trading rules as the market changes and the system needs to adapt.


So how do they do it? The first part of their system is an Ensemble Model that uses several classifiers and regression models in order to draw predictions from the market data. This was very interesting for me because I had never thought about this solution when working with neural networks in the past. Instead of using a single predictive model (for example a neural network) you can use several different types of models that all have different advantages and disadvantages. Within the Ensemble model these guys always include logistic regression models, decision trees, neural networks, etc. In total they have over 10 models within their Ensemble model that are used by the autonomous system to have a variety of 8220;choices8221; to trade the market. How do we go then from these models to making actual trading decisions?


The case-based reasoning system, which is the second layer of the 3 layered model, handles this part of the puzzle. This part of the model takes a look at what the system has experienced in the past according to previous model results and judges what should be traded and what should not be traded. For example if the system sees that in the past when the random forest and RIPPER rule learner predictors agreed and the system followed there was a profit, then it will bet that there will be a profit again this time if the case repeats itself. The case-based reasoning system analyses all the cases that the system has experienced and their outcomes, with the idea to adapt the system as the number of cases evolves. The quality of the predictors might change over time and the case-based reasoning system handles the relevance of the predictors in a way that can derive the best historical results.


The last part of their puzzle is actually a rule-based section where the system can be told things that it isnt capable of learning through trading. For example it can be told that the first Friday month is the NFP release or that the trading week should be cut to certain hours (not in hind-sight but to reduce broker dependency for example), etc. This part of the trading model is the least complex as it only includes a bunch of hard-coded rules (that shouldnt change) which allow the system to improve its results as this information cannot be derived through the trading data.


The most interesting thing about the above is that these guys built a model for the USD/JPY in 2007, using 2003-2007 data (there is no apparent optimization but this was the data they used to test the model) and then traded this same system live from 2007-2008 achieving results that were comparable with those of the in-sample period (they were less profitable but overall acceptable). Through their 2008 paper they also show some of the ways in which the predictors adjusted to new market conditions, which were not available within the period they used for the design of the autonomous implementation. Interestingly enough the results of the financial crisis and the periods that followed were never published in any paper but during the year 2010 they did release a new paper that described a whole multi-system approach that involved several autonomous systems, each trading on its own currency pair.


This paper was less convincing as it involved different ensembles for the different currency pairs and the inputs of the regression models also involved indicators (which obviously need shift information that is subject to optimization). It is also important to mention that the models were fitted to maximize their individual predictive profits during the in-sample period, showing that the adaptive process was used to yield the best results across a certain set of market conditions. The method used by Rui and Belo therefore has the same disadvantages as a regular NN based system in the sense that the model conditions need to be defined and tested across some given market period. The models can still adapt as market conditions change and the way in which they adapt can in a certain degree be controlled by the case-based model that assigns their lot sizes. They therefore have a fundamentally first degree adaptive technique with some flexibility given by the second model used. The last paper these guys published on the subject which talks about an Autonomous hedge fund takes the concept even further, developing autonomous systems that trade FX, futures, stocks, etc.


One of the things that Rui and Belo achieved which I havent been able to is to produce adaptive models that give significantly profitable historical results in currencies besides the EUR/USD. Implementing some of their ideas and improving on several of them will also be part of my check-list for 2013. In order to do this I plan to use the C++ shark open source machine learning library and some imagination :o). If you would like to learn more about the NN systems we have developed and how you too can use F4 to implement your own neural network ideas please consider joining Asirikuy, a website filled with educational videos, trading systems, development and a sound, honest and transparent approach towards automated trading in general. I hope you enjoyed this article. o)


Trading in the FX market using mechanical trading strategies


Determinism and Entropy: Choosing which Forex pairs to trade using R


Lets first understand a bit more what approximate entropy is about. When you have a time series you have a sequence of elements that can be organized either randomly or in certain patterns. Two time series can have the exact same standard deviation, variance, mean and other descriptive statistic measurements, but one can show repetitive patterns while the other can be completely stochastic. Traditional descriptive statistics cannot distinguish between both as from this perspective they are the same therefore we need a more elaborate measurement to try to tell which one is more random than the other. The wikipedia page on approximate entropy gives a good example and goes deeper into the mathematical nature of the measurement.


We can easily perform a measurement of approximate entropy in R using the 8220;pracma8221; package with data obtained from Oanda using the quantmod package. In this manner it is easy to obtain entropy measurements for the past 500 days of data, allowing us to draw a picture of the current state of the FX market from an entropy point of view. The code above shows you how this can be done. The code also generates a graph using gpplot2 that shows you the entropy measurements going from lowest to highest (graph below). With this script you can easily obtain and compare entropy values for 17 symbols. You can add/remove any symbols if you wish, by simply adjusting the indexes and dataframe size.


Once you have entropy measurements we now have to ask ourselves how this helps us choose which pairs to trade. Pairs with the lowest entropy values are the ones that have the highest non-random components, while pairs that have the highest entropy values have the highest random components. I prefer to also multiply the entropy values by the trading cost of each pair (in pips) so that I can get values that are also adjusted against trading costs. Patterns might be more readily available on a more expensive pair, which means that the advantage may be completely nullified against a cheaper pair with a lower advantage. From this graph it seems clear that we should be trading either USDJPY, EURUSD, GBPJPY or USDCHF while a pair like the AUDCHF would seem to be the least favorable to trade.


It is also worth wondering whether these values change significantly across time or whether they are quite constant. I repeated the above analysis using 25 years of data for the 4 majors and the results show that the qualitative order remains fairly similar although on a longer term perspective the USDCHF becomes the pair with the lowest entropy. The increase in entropy for the USDCHF under recent times may be in a big part due to the introduction of the EURCHF peg in 2011, which might have increased the amount of randomness for this pair. Note however than long term entropies are generally lower overall.


It therefore seems most favorable to trade pairs for which the long term and short term entropy values are low. This means that we have pairs for which there is a certain stability regarding the amount of deterministic/random components, definitely having a long term value that is of similar magnitude when compared with the short term value is also advantageous. Entropy measurements could also provide a way to trigger/stop trading on certain symbols as entropy increases imply that the time series is becoming more random and therefore trading is becoming more difficult. Graphing entropy Vs time provides you with a cool way to measure this.


Although entropy is not the only consideration when choosing a pair to trade (other things such as random walk hypothesis tests, costs and liquidity should all be considered) it is a very useful measurement to aid you in your decision to trade or not trade a given instrument. If you would like to learn more about symbol analysis and how you too can generate automated systems to trade any chosen pair please consider joining Asirikuy. a website filled with educational videos, trading systems, development and a sound, honest and transparent approach towards automated trading in general.


Mechanical Forex


Trading in the FX market using mechanical trading strategies


Algorithmic Trading and Books: My Recommendations for Those Interested in Automated Trading Strategy Use and Development


I have always stressed the importance of having reliable information when building a knowledge base to succeed in trading. It is no secret that information available online is often from unreliable and anonymous online sources which might and often do have less experience than the person interested in reading the information they have to offer. I have always believed that books from recognized authors who have a better idea of what is going on are a much better source of information than the online 8220;hype8221; and therefore reading this type of material has always been one of my most frequent recommendations. Despite this fact I have never actually talked about which books I like and recommend to new traders so I decided to write an article today about this issue. On todays post youll be able to learn more about which books I would recommend to people interested in learning more about automated trading.


Now lets be clear about something from the start. As far as I could see there are no books dealing with the creation, design, evaluation and use of automated trading systems for the Forex market on the retail market should I write a book guys? and therefore the material you will find on all the books I will recommend was not particularly made for or thinking about Forex but many of the concepts introduced are nonetheless useful for anyone interested in algorithmic trading as a retail Forex trader. The books have very important concepts dealing with system design and testing but many of the practical aspects will need to be adjusted by the reader to fit the Forex market. Certainly important issues like broker dependency type stress tests are not taken into account since they are not an issue in futures and stocks so you need to understand the differences and apply whichever information can be extended over all markets.


Another very important thing I want to stress here is that you should NOT go to a website and buy all the book right away since you may simply be wasting your time and money by doing so. If you want to read some of the books then I would recommend you do this in a one-by-one basis and this way you will not have a 8220;to-read8221; pile which will often make reading harder than easier. The most important thing is to work in a read and apply basis where you read a book and start applying at least some of what you have learned before you move onto the next one. You are not just going to get these books to say you 8220;read them8221; but you are going to get this books to gain an education so application before 8220;massive information gathering8221; is a priority. Youre not in this to become an encyclopaedia but to apply whichever useful concepts you learn! I will talk about the books in the order in which I suggest you read them so please take this into consideration (of course, not set in stone).


Now let us get into some of the books I would recommend. My first recommendation would be 8220;Trading System Explained8221; by Martin J. Pring. through his book the author goes into many basic aspects of strategy development and gives a good view of how he develops his strategies in a reliable way. The author is not the best writer however and you may get a little bit lost at times, also the book would probably not be good to someone very new to trading although it is a good match for someone who has already been confronted with trading but wants to get into its algorithmic side. The book is not very advanced in this regard but does expose some very valid concepts in trading which are a worthy read for most people new to algorithmic trading. It could very well serve as a basic foundation for people interested in mechanical trading.


My second recommendation 8220;An Introduction to Algorithmic Trading8221; by Edward Leshik and Jane Cralle is a fairly new book which talks about the foundations of algorithmic trading and the application of this trading technique demonstrated through the showing of live-used mechanical trading techniques. The book is no 8220;great revelation8221; but for a new trader it shows key aspects of mechanical trading system development and exemplifies them quite good with trading strategies which are in fact being executed on a live trading basis. Most 8220;coding8221; on this book is done in excel so for those a little bit shy at programming it may provide an 8220;easier route8221; to get into this world. In summary another 8220;core book8221; which might be useful for someone just getting into this game.


One of my favourites 8220;Evidence-Based Technical Analysis8221; is a book by David Aronson which attempts to tackle automated trading from a 8220;scientific-like8221; perspectiva. The book introduces the user to the scientific theory and applies them to the development of algorithmic strategies through the use of several statistical analysis techniques and sound system development tactics. I especially like the way in which the author talks about statistics which I think is a very good introduction to people new to algorithmic traders. When I say 8220;learn statistics8221; I believe this book provides a solid starting ground for the necessary knowledge to apply this field of mathematics to the building and testing of mechanical trading system.


The final book I want to mention today 8220;The complete guide to building a successful trading business8221; by Paul King is also a piece of material I would recommend since it gives you a good 8220;course8221; on how to treat your trading and build your algorithmic career thinking about trading as a business. Although it doesnt detail strategy building or design this book does give some very important notes about how you need to approach your trading and what things you need to take into account in order to build a solid and sound long term trading perspective. If you want to eventually live from trading then this book is probably a must read.


Of course there are many other books I like and many I would recommend just to learn more about Forex and trading in general but the above books are merely a small summary of which ones I consider most useful for those of you who are just getting into the algorithmic trading 8220;game8221;. Sure, the above books wont make you a profitable mechanical trader and they wont give you holy grails to implement on MQL4 and become rich but they will give you some very important ideas about the field and the knowledge necessary to succeed within it. As I say before some knowledge about the Forex market is required to extrapolate many of the concepts and conclusions to this market but it can certainly be done after you start to apply and experiment with the presented concepts on the Forex market.


If you would like to learn more about my work in automated trading and how you too can earn a true education in this field please consider joining Asirikuy, a website filled with educational videos, trading systems, development and a sound, honest and transparent approach towards automated trading in general. I hope you enjoyed this article. o)


16 Responses to 8220;Algorithmic Trading and Books: My Recommendations for Those Interested in Automated Trading Strategy Use and Development8221;


Franco says:


There is definatley an opportunity for you to write an algorithmic trading book, I would say go for it!


Evidence Based Technical Analysis was a good book, but the level of detail for certain topics that are very important like Monte Carlo simulations are not enough.


My search for a better explanation for Monte Carlo simulations is what brought be to this site in the first place :)


How to Treat Forex Like a Business. Ten Things You Need To Do When You Trade


September 13th, 2010 5 Comments


The internet is filled with people who advice and give their opinion about how others can succeed in forex trading. Many times this advice is extremely vague and does not have any practical implications with it that can actually help newer traders succeed. One of the most common examples of this is how more experienced traders tend to tell people new to the market to 8220;treat forex like a business8221; while they give absolutely no specific advice on how you are supposed to do this. Sure, for successful traders this is obvious and the advice needs no further explanation since they are already treating forex like a business but for new traders the advice is totally meaningless since they do not know how to trade forex like a business or the steps they need to take to make this a reality.


On todays post I want to share with you 10 practical things you need to do to treat your forex trading like a business, after you do these ten things you will find that your trading will be much more organized, your goals will be much clearer and you will be on your road or at least a much clearer path towards long term profitability. Definitely treating your forex trading like a business is extremely important but what does this mean. What practical decisions can you take to change the way in which you trade the forex market. Keep reading to find out !


1. Think in terms of goals and expenses. The first change you must make is around the way in which you look at forex trading. If you are going to treat this venture like a business you need to think about it in terms of goals and expenses. In trading goals are profitability targets and expenses are both trading costs and losing trades. A great part of your success will fall into being able to look into your trading as a set of goals and expenses.


2. Determine your plan. This is perhaps the most important part of trading which is to determine how things will be done in your business. If you were opening up an aluminium can factory you would have to figure out how you are going to be making the cans, who will buy them and who your suppliers are going to be before you even think about starting your business. Forex is the same thing, you need to have a trading plan which is merely a set of rules (either mechanical or discretionary) that you will follow in your business.


3. Determine your goals based on your plan. Your plan provides the anchor which allows you to determine realistic profit targets. After you come up with a plan you need to deeply evaluate it through reliable simulations to obtain a given set of profit targets that you will be able to use. If your profit targets are not what you want they you can change your plan and reevaluate it to make them better. When you are happy with your goals, continue.


4. Determine your expenses based on your plan. The next important thing you need to do is understand what your expenses will be. What percentage of your account will you be losing in average every year before reaching your goals. For how long will you lose that capital. Accurately determining variables such as the maximum draw down, the average draw down period length and the probability to have a losing month are key aspects of your forex business plan.


5. Determine your capital requirements. Since you now have a plan with goals and expenses you now need to determine your capital requirements which is simply the amount of money needed to execute your plan. Certainly different trading strategies will require different amounts of money to be tradable. This also depends on the amount of money you want to make, if you are aiming to make 20K a year and your goal is 20% then investing 100K might be necessary while if the only thing you want to do is execute your strategy with the minimum possible capital you might only need 200 or 1000 USD.


6. Draw best and worst case scenarios based on your simulations. A very important thing you need to do is to come up with how future scenarios might look for your trading strategy. If your simulations were done in a reliable manner then you can use 10 year backtests to get a picture of how best and worst cases might look like. Your next year might be as profitable as the most profitable year of the past 10 years while it can also be as bad (or worse) than the worst year. Having these pictures is vital since it will allow you to see where your plan is going and if what you are experiencing is or is not normal.


7. Come up with a worst-case scenario. As in every business there can be a point when the expenses are way beyond those programmed by the plan and a change must be made in order to survive to the future. In your trading business you need to come up with a worst-case scenario so that in case your strategy becomes too risky you will know well before hand when to change it. I generally use two times the 10 year historical maximum draw down as my worst case scenario, something that has worked well for me.


8. Do monthly, quarterly and yearly evaluations. Another important aspect of treating trading like a business is evaluating how your business has performed in a monthly, quarterly and yearly manner. Just like all other business do you should generate reports and analyze how your strategy has performed during these time periods. It is always important to know if your expenses are what you expect from your plan (within the bound of normal draw down periods), if your goals have been met and if you have reached any of your worst case scenarios. Staying on top of your plan by evaluating it frequently is a vital part of survival.


9. Do not change your plan when it is working as planned. A big mistake perhaps one of the biggest new traders make is to jump away from a trader system just because profitability goals are not being met. If a trading system is losing money within the programmed expenses and the 10 year simulations you have made then there is no reason to run away from your trading plan. While your draw downs remain within what you planned when you evaluate the strategy your business is actually working as planned.


10. Do not increase your goals or your expenses. Another very common mistake made by traders who are not yet experienced at treating forex like a business is the change of their goals and expenses along the way. When a system performs well they increase the risk (to increase their profitability goals) and when it is doing badly they sometimes increase their draw down tolerance to allow the system 8220;to recover8221;. There is a reason why you have set goals and expenses and worst case scenarios and you should NOT change them just because of short term performance. Every change in the business plan needs a total reevaluation of goals and expenses which should always be done if any detail is changed. Committing to a set of goals and expenses and sticking to them is a big part of success.


Although the above advice is only a small part of treating forex like a business it does gather all the most important aspects you need to take into account when you want your trading to be something serious, more predictable and less emotional. Treating forex trading like a business with adequate planning, goals and expenses is a vital part of trading which most people new to the market simply ignore or are too lazy to develop. If you follow the above advice and develop a trading plan with an idea of what the behavior of your system might be then you will be miles away from the large majority of new traders.


If you would like to learn more about system evaluation and how you too can develop mechanical systems with reliable simulation results please consider joining Asirikuy, a website filled with educational videos, trading systems, development and a sound, honest and transparent approach automated trading in general. I hope you enjoyed this article. o)


The 4 Week Breakout Strategy EA, a Very Simple Profitable Trading System


I decided to dedicate most of my last weeks free time (which was not much by the way!) to try and find the most simple, profitable trading system I could use to trade the forex market. The truth is that I wanted to find a very simple, understandable system that I knew was long term reliable and that could be easily explained to new traders so that they could trade a consistent, profitable trading system they could trust.


Throughout my whole search, I decided to center on very simple trading strategies that work in the long run and give a good amount of profit (at least 30%) a year, with an acceptable level of risk. The truth is that I could not find that many systems and the only one that certainly caught my eye was a very simple 4 week breakout strategy that just centers on obtaining profits from a breakout of a 4 week high or low. The systems rules seemed very simple at first :


Buy on a breakout of a 4 week high (close any shorts)


Sell on the breakout of a 4 week low (close any longs)


This system is indeed barely profitable since you often give back most of your profit because of the exit signal, which of course lags the market badly since it is just the same as the entry signal (but reversed). I decided to implement a suggested modification which simply moved the exit so that the system would close trades on the breakout of a smaller number of days so you would enter a trade on the breakout of a 4 week high or low but exit on the breakout of a 1 or 2 week high or low. This greatly improved the system, but draw downs were still a bit pronounced since we were getting in at trades on tops and bottoms when we had ranging markets.


If you want to have access to this and other expert advisors I have programmed (if you just want this ea buy me a cup of coffee and Ill send it to you !) and read about other free and commercial expert advisors I have tested and reviewed please consider buying my ebook on automated trading or subscribing to my weekly newsletter to receive updates and check the live and demo accounts I am running with several expert advisors. I hope you enjoyed the article !

No comments:

Post a Comment