Sobreoptimización en el Tradig/Overfitting at trading ESP/ENG

in LeoFinance3 days ago

20230917_135804_0000.png
Imagen creada por mi en Canva

Introducción

Hola traders y bienvenidos de regreso.
Seguramente en algún momento encontraste por redes sociales un video o documento explicando una estrategia de trading que ofrece resultados milagrosos, unos trades hermosos de 20R y un winrate por encima del 70%
Supongo que ya sabes lo que te voy a decir ES MENTIRA
Pero cubano cómo puede ser mentira si ahí están los gráficos, están explicadas una por una las confluencias y patrones que fueron dando forma a las operaciones y todo tiene sentido.
Vale te explico no es que sea mentira pero existe un fenómeno en las inversiones y el tradig llamado SOBREOPTIMIZACION

Sobreoptimización

La sobreoptimización en el trading ocurre cuando intentas ajustar tu estrategia de manera excesiva para que se desempeñe perfectamente en una muestra determinada de datos históricos.
Esto puede llevar a un problema grave: la estrategia funcionará muy bien en el pasado, pero será imposible de aplicar en el futuro.

Te pongo un ejemplo de la vida real:
Imagina que un estudiante debe pasar un examen de historia y su estrategia para prepararse fue aprenderse TODAS las respuestas de las preguntas de exámenes anteriores.
Teniendo como muestra los exámenes anteriores su tasa de éxito será altísima pero el día de la prueba final las preguntas son nuevas, diferentes y el estudiante por supuesto no conoce las respuestas.
Evidentemente su estrategia de estudio fue errónea puesto que debió enfocarse en aprender historia en general y no respuestas de preguntas de exámenes anteriores.

Si extrapolamos esto al trading es fácil encontrar las similitudes y entender por que la sobreoptimización puede ser letal para una estrategia de trading.
Digamos que tienes una estrategia a la que deseas realizar un backtesting, comienzas a hacer Replay y vas aplicando todas las pautas estipuladas en tu plan de trading para analizar el gráfico. En determinado momento descubres un "patrón" y te das cuenta que si lo añades a tu plan puedes optimizar tus entradas para obtener un mejor Riesgo/Beneficio en tu trades. A partir de ese momento comienzas a buscar dicho patrón en el gráfico y como estás en modo Replay puedes pausar el avance de las velas, retroceder y manipular el gráfico para que tus entradas sean perfectas. Tendrás por supuesto unos resultados de backtesting espectaculares, el hijo perdido de Warren Buffet.

La realidad es que seguramente muchas de las variables con que "mejoraste" tu estrategia no serán aplicables en tiempo real por diversos motivos:

  • Tiempo de reacción
  • Sesgos de error humano
  • Errores de interpretación
  • Imposibilidad de identificar dichos patrones en tiempo real

¿Cómo identificarla?

pexels-anna-nekrashevich-6801648.jpg
Fuente: Pexels

Para poder combatir la sobreoptimización es importante poder identificar primero en que contextos podemos encontrarla y aquí te voy a contar los 2 principales donde en mi opinión se puede dar este fenómeno

1 Todos los traders pasan por una fase donde quieren dominar el mercado, ser los masters y encontrar "EL MÉTODO" esa estrategia invencible que los hará millonarios en un par de meses.
En esta fase es bastante común probar todo tipo de estrategias y hacerlo en tiempo pasado, el caldo de cultivo perfecto para la sobreoptimización.

2 Nosotros los influencers, para vendernos, para ganar seguidores, para obtener relevancia en redes sociales.
Es muy común encontrar videos, tutoriales, cursos enteros enseñando una estrategia con resultados asombrosos pero la realidad estas clases suelen ser la mayoría en un ambiente controlado, un momento específico del mercado que ya conocemos y donde sabemos que la estrategia funciona de lujo. Esto suele traducirse claro en seguidores rompiendose los sesos tratando de aplicar estos conocimientos sin lograr tener éxito. Porque claro la estrategia no es falsa ni tu influencer favorito te está mintiendo ahí está el vídeo, ahí está el gráfico, ahí están las estadísticas, pero es que simplemente la estrategia no es aplicable en real porque está sobreoptimizada.

¿Cómo podemos evitar la sobreoptimización?

Aquí te van los que a mí me funcionaron y aplico desde hace algún tiempo.

  • Una estrategia Simple: Las estrategias simples funcionan muy bien en el largo plazo ya que sus reglas más generalistas se pueden adecuar a la mayoría de situaciones del mercado.
  • Prueba tu estrategia también en Paper Trading:
    Para poner a prueba una estrategia no solo existe el backtesting, en el Paper Trading o Demo puedes operar con tú estrategia en tiempo real pero sin arriesgar dinero. De esta forma te aseguras que funciona, si eres capaz de aplicarla y de seguir todas las reglas.
  • Utiliza una muestra representativa: 10 operaciones no son relevantes estadísticamente hablando, el período de 1 mes tampoco lo es. Prueba tu sistema en un periodo de tiempo largo, que comprenda diferentes fases del mercado, expansiones, acumulaciones, crisis, retrocesos. Deja que los grandes números hagan su trabajo.
  • Aprende constantemente: El trading es un proceso de aprendizaje continuo. Mantente al tanto de las noticias económicas y las tendencias del mercado. Optimiza, mejora, estudia, repite.

Conclusiones

Bueno Criptomijos espero les haya quedado todo bastante claro.
Crear una estrategia perfecta cuando sabes lo que va a pasar es muy fácil pero seguramente no funcionará en el presente así que deja de mirar hacia atrás y enfócate en lo que está sucediendo ahora. Mantente simple, pon las estadísticas a tú favor y nunca nunca para se aprender.
Mucho PROFIT y hasta la próxima.

ENGLISH

20230917_142825_0000.png
Image created by me at Canva

Introduction

Hello traders and welcome back.
You've probably come across a video or document on social media explaining a trading strategy that promises miraculous results, beautiful 20R trades, and a win rate above 70%.
I suppose you already know what I'm going to say: IT'S NOT TRUE.
But Cubano how can it be false when there are charts, and every confluence and pattern that shaped the trades is explained, and everything makes sense?

Okay, let me explain; it's not that it's false, but there exists a phenomenon in investments and trading called OVERFITTING.

Overfitting

Overfitting in trading occurs when you excessively adjust your strategy to perform perfectly in a specific sample of historical data.
This can lead to a serious problem: the strategy will work well in the past but it Will be impossible to apply in the future.

Here's a real-life example:
Imagine a student has to pass a history exam, and the preparation strategy is to memorize ALL the answers to previous exam questions.
Based on past exams, his success rate will be very high, but on the final exam day, the questions are new, different, and the student, of course, doesn't know the answers.

Clearly, the study strategy was wrong because he should have focused on learning history in general and not just memorizing answers to past exam questions.

If we extrapolate this to trading, it's easy to find similarities and understand why overfitting can be deadly for a trading strategy.

Let's say you have a strategy that you want to backtest. You start replaying and apply all the guidelines in your trading plan to analyze the chart. At a certain point, you discover a "pattern" and realize that if you add it to your plan, you can optimize your entries for a better Risk/Reward ratio in your trades. From that moment on, you start looking for that pattern on the chart, and since you're in replay mode, you can pause the candle progress, go back, and manipulate the chart to make your entries perfect. You'll undoubtedly have spectacular backtesting results, the long-lost child of Warren Buffet.

The reality is that many of the variables with which you "improved" your strategy won't be applicable in real-time for various reasons:

  • Reaction time
  • Human error biases
  • Interpretation errors
  • Inability to identify such patterns in real-time

How to Identify It?

pexels-anna-nekrashevich-6801648.jpg
Source: Pexels

To combat overfitting, it's important to first identify the contexts where it can occur. Here, I'll tell you about the two main contexts where, in my opinion, this phenomenon can occur:

1 All traders go through a phase where they want to dominate the market, be the masters, and find "THE METHOD," that invincible strategy that will make them millionaires in a couple of months. In this phase, it's quite common to try all kinds of strategies and do it in the past, the perfect breeding ground for overfitting.

2 We, the influencers, to sell ourselves, gain followers, gain relevance on social media. It's very common to find videos, tutorials, entire courses teaching a strategy with amazing results. But the reality is that most of these classes are in a controlled environment, a specific market moment that we already know, where the strategy works like a charm. This often translates to followers racking their brains trying to apply this knowledge without success. Because, of course, the strategy is not false, and your favorite influencer isn't lying; the video is there, the chart is there, the statistics are there. But the strategy simply isn't applicable in real life because it's overfit.

How Can We Avoid Overfitting?

Here are the things that have worked for me and that I've been applying for some time:

  • A Simple Strategy: Simple strategies work well in the long term because their more general rules can adapt to most market situations.
  • Test Your Strategy in Paper Trading: To test a strategy, there's not only backtesting; in Paper Trading or Demo, you can trade with your strategy in real-time without risking money. This way, you ensure that it works, that you can apply it, and follow all the rules.
  • Use a Representative Sample: 10 trades are not statistically relevant, and a one-month period isn't either. Test your system over a long period that includes different market phases, expansions, accumulations, crises, retracements. Let the big numbers do their work.
  • Keep Learning: Trading is a continuous learning process. Stay updated on economic news and market trends. Optimize, improve, study, repeat.

Conclusions

Well, Criptomijos, I hope everything is clear to you.
Creating a perfect strategy when you know what will happen is very easy, but it probably won't work in the present. So, stop looking back and focus on what's happening now. Keep it simple, put the odds in your favor, and never stop learning.

Lots of PROFIT, and until next time.

Posted Using LeoFinance Alpha

Sort:  

https://leofinance.io/threads/uncubanomas/re-uncubanomas-i1eaxp1n
The rewards earned on this comment will go directly to the people ( uncubanomas ) sharing the post on LeoThreads,LikeTu,dBuzz.

Thanks 🤝

Congratulations @uncubanomas! You have completed the following achievement on the Hive blockchain And have been rewarded with New badge(s)

You received more than 600 upvotes.
Your next target is to reach 700 upvotes.

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP