My Project
THE BEGINNING OF MY JOURNEY
I had been looking for the right challenge for a long time, something that could maybe help me build a small side income. But what should I do? Invent the thousandth dating app? Turn my home into a smart house just so I could control my lights because I can’t even turn them on by myself anymore? Or browse freelancer sites where every other guy thinks he needs to start another web project? I wanted something that would push me to the limits, something that not everyone could do, something I’d really have to fight through. Something most people would fail at miserably. Eventually, the YouTube algorithm figured out what I was looking for and started showing me videos of people programming trading bots. Up until then, I had no experience with the financial market whatsoever. But I quickly realized that I had found my true passion. Suddenly, I knew what I would start doing on the side – but I couldn’t even begin to imagine where this journey would take me.
Naive as I was, I started experimenting with technical analysis, trying to implement signals, hoping to find a magical combination of indicators that would bring me big profits in the crypto markets. I unleashed massive neural networks on the market data. Then, I dove into reinforcement learning, thinking I could decode the markets with deep learning. I busted my ass trying to extract meaningful features or patterns. I used statistical methods and tried to filter out the noise of the market. I wrote myself such insanely comprehensive software and kept backtesting on historical data to push the approaches even further into overfitting and got hyped about the often spectacular results. And my bot... poor little guy... running on a Raspberry Pi connected to my router, he tirelessly shuffled cryptocurrencies back and forth, slowly but surely depleting the budget. The algorithms kept getting more complex, the neural networks got deeper, and the bot became more aimless. It didn't help to feed him with even more data and to yell at him from the depths of my soul. No chance of using anything outside of historical data in a meaningful way.
FINDING AN EDGE IN THE MARKET
I found myself reading all possible articles and books, continuously learning more. Surely, it must be possible to generate signals with machine learning?! I mean, Jim Simons (The Man Who Solved the Market) managed to do it too, didn’t he?! But high quality data is expensive, and I guess I didn’t have enough of it. Not to mention the fact that I had no clue what really mattered when it came to trading in markets.
All the articles that claim to show how to train neural networks to predict market movements only teach you how to train a moving average... Most of the strategies shared online rely too much on subjective interpretation, are too short-sighted, or only work under specific conditions or market circumstances. This makes them inconsistent and unreliable in real-world trading, where markets are dynamic and conditions change frequently. Additionally, many of the algorithms showcased on YouTube demonstrate backtests on limited datasets that lack statistical significance. And when the performance is lousy, one of the parameters is quickly adjusted, and suddenly, you've got the holy grail... Cool story, bro, but your crap doesn’t work in the long run, especially when you consider slippage, transaction costs and execution speed.
These tests are often overfitted to historical data, meaning they perform well on the tested sample but fail to adapt to unseen or live market conditions. This issue occurs when strategies are excessively tailored to past data, capturing noise rather than meaningful patterns. A slight change in a parameter should not have a significant impact on performance. Furthermore, the risk of overfitting increases drastically with each additional degree of freedom, meaning the number of adjustable parameters. In-depth technical knowledge is required to develop models, methods, and strategies. It is highly likely that applying rudimentary implementations will not suffice. One thing I had been wondering for a while anyway was, why the hell would a bank care if you draw some lines on a chart? If an institution wants to drive the price in one direction, it doesn’t give a damn about you and your indicators, even when your moving averages cross. Besides, indicators are derived from the same piece of information... namely the price. Where is the added value of information here? On the contrary, technical indicators are often lagging behind. You're distorting the raw data and trying to tell me you're making massive profits with that?
There was nothing that truly provided a sustainable statistical edge. Eventually, I reached the point where I realized: Without knowing how the market really works, this is never going to work.
SWTICH TO FUTURES
I bought a trading education in the form of a video course to focus on "volume trading." At this point, the trading also shifted from cryptocurrencies to the futures market. Futures offer significant advantages over other financial products. Futures contracts are standardized and listed on exchanges like the CME (Chicago Mercantile Exchange), meaning that prices and trading volumes are publicly available. This transparency helps to make informed decisions. In addition to insights into the order book, long and short positions can be easily traded here. You can bet on both rising and falling markets, meaning that futures can also be profitable even in bear markets. Futures markets, especially the major indices and commodities, offer high liquidity, making it easy to open or close positions.
In the futures market, I saw massive potential to finally make my bot profitable. For this, I wanted to learn from experts how trading is done in the Champions League, so I could ultimately translate my knowledge into code. How long could this take, right? I mean, I'm a clever guy, I’ll figure it out pretty quickly. On the side, I read books ad nauseam and absorbed everything that seemed even remotely relevant. Thanks to my prior experience with by bot, I was able to move through the course quickly. However, my first attempts at demo trading soon showed me where my weaknesses lay. I had to learn: With my current mindset and personality, I would never succeed. I thought "I'm disciplined, I just need the right strategy"... Bro, no strategy in the world will make you consistently profitable if you don't work on yourself. I don't think anything else will confront you with your weaknesses as much as trading does. Trading brings you to your knees. It crushes your oversized ego. Trading teaches you humility. The market couldn’t care less about your desire to be right and punishes every mistake made out of carelessness, overconfidence, or arrogance. As long as you don't fix your damn habits, you can apply as many strategies as you want – you will fail. Period!
TRADING PSYCHOLOGY
People always talk about how much trading has to do with psychology. I don't think anyone really understands how much success in this field actually depends on psychological barriers. Psychological hurdles in trading are the decisive factor between success and failure. These hurdles arise from emotional, cognitive, and behavioral factors that make rational decision-making difficult. Especially in day trading, these psychological challenges are extremely pronounced, as the trading is fast, stressful, and full of risks. The time pressure and the quick movements in the market only exacerbate the problems. Below are some of the issues you’ll face:
Loss Aversion
Losses usually weigh much heavier than gains – this leads to holding onto losing positions for too long, hoping they’ll turn around. At the same time, profits are realized too quickly, out of fear they might turn into losses. This massively distorts your risk-reward ratio, making long-term profitability impossible.Greed and Overtrading
Greed is the arch-enemy of every trader. It leads to taking too many or too risky positions. After a loss, there's an attempt to make up for it immediately with a hasty trade – also known as "revenge trading." These are all triggers for excessive trading, chasing after every small market movement. If you can’t break this downward spiral, your account will crash faster than you can blink.Fear of Missing Out
The fear of missing out is another huge hurdle. Especially when the market is on a tear, there's a strong urge to jump in, only to find yourself in a losing position moments later. This feeling of missing out leads you to enter the market when it doesn’t make rational sense. You ignore your analysis and enter at the wrong time.Confirmation Bias
You only look for information that confirms your opinion and ignore anything that contradicts it. Especially because being "right" feels good, you overlook clear signals that go against the trade. You want to impose your opinion on the market, but the market is always right.
A brilliant book is Thinking, Fast and Slow by Daniel Kahneman, in which psychological topics related to decision-making and our thinking processes are discussed. It is especially the natural fight-or-flight instinct of humans that leads to exiting positions too quickly or, on the contrary, fighting against the market just to cling to your "right." These downward spirals are not only emotionally exhausting but also strain your trading account. Anyone who doesn’t get this under control as quickly as possible will be destroyed. The real challenge in trading is not finding the perfect strategy – it’s about understanding yourself and overcoming your own psychological hurdles, to fully leverage the potential of your statistical advantage or edge. There are no shortcuts here. This journey is insane. I guess everyone has to go through this hell. But why expose yourself to such pain? Because if you manage to implement it sustainably, you'll belong to the top 1% of the world!
DON'T BE A WUSS
Busy with my education and the daily battle with my emotions, I slowly realized that the strategies I had been taught didn’t work in every market situation. Unfortunately, the training was very superficial, and by now, I’m also convinced that none of the coaches in the course are profitable. However, they really know how to market themselves, I’ll give them that...
So, there I was: with even more foundational knowledge, another trading approach that didn’t work sustainably, and still huge difficulties controlling my emotions in the market and trading with discipline (I guess a lot of that was also due to the bad strategies and the lack of confidence, knowing that none of the coaches could really trade by themselves). For months, I’ve been learning, reading books in the areas of psychology and trading, tracking everything in my daily journal in order to evaluate everything repeatedly. I repeated my daily reports weekly, and my weekly reports were reviewed monthly, including every previous month, to get as many reps as possible and achieve peak performance through deliberate practice (a great book on this is Peak by Anders Ericsson!). Every mistake is recorded and analyzed. My trading journal is bursting with information, and yet I’m not getting anywhere.
Should I just give up now? Then I’d definitely have a damn lot of free time and could fully indulge in the routine of everyday life. But am I a damn pussy? No! I’m pushing forward. How can I dive even deeper into this world?! Right! By learning the ultimate discipline: Understanding order flow. I hit the reset button, discarded the crap I’d learned, and started exploring the world of order flow trading. I drilled all the information into my brain until I was able to develop own trading strategies based on that foundation. I have tested so much, you have no idea. Non-stop research, backtesting, forward testing, repeat. I analyzed so much data, and tried to extract signals from the market, continuously pushing towards my long-term goal: to automate a profitable trading bot. Furthermore, the conditioning of myself required to behave disciplinarily in the markets cost me so much energy that I hardly had the opportunity to write any more algorithms. By then, I also knew that it's not just important for the entry to be on point. A sensible trading system involves so much more. Above all, risk and trade management plays a central role. Theoretically profitable approaches can quickly be ruined by poor management. A functioning algorithm required much more than I had expected.
After about two years of hard work and tons of shit to swallow, I finally reached the point where I had the capacity to test and implement new ideas and algorithms alongside my daily trading. Not yet as automated strategies, but as reliable signals to support my trading decisions.
DEVELOPMENT OF ORDER FLOW ALGORITHMS
I am currently engaged in developing tools to support my daily futures trading, focusing on analyzing order flow to identify rejection or trend-continuation signals. A key method I utilize is tick bars, which sample financial data based on the number of transactions rather than time intervals. This approach, as outlined by Marcos Lopez de Prado in Advances in Financial Machine Learning, aligns data sampling with information flow and offers better statistical properties. Unlike time bars, which may follow non-Gaussian distributions, tick bars enable returns that are closer to an IID (independent and identically distributed) normal process. This characteristic is crucial for financial models that rely on the assumption of normally distributed returns. By concentrating on transaction counts, tick bars provide more accurate insights into market activity.
The system I'm developing comprises multiple signals designed to support my trading decisions by confirming entry points. The chart below highlights two of these signals (black and orange dots). A dot below the candle represents a long signal, while a dot above the candle indicates a short signal. These signals are categorized into two groups: trigger and confirmation. In these examples, the black dot serves as the trigger signal, while the orange dot acts as the confirmation signal.
Initially, a short signal (black dot) appears. The entry would be executed using a stop order near the candle's low. This is followed by a downward impulse, but the system soon provides a counter-signal (orange dot). Exiting the short trade at this point would secure some ticks. The counter-signal now shifts the focus toward potential long entries. Shortly after, a long signal occurs, which can be traded. Additional confirmation comes from the accumulation phase at the low. Sellers fail to push prices lower, and the market is clearly supported by passive buyers absorbing sell market orders. This is reflected in the dense red areas at the low. Identifying such zones will also be incorporated into the system to enhance decision-making efficiency.
In the illustration above, a strong rejection signal is shown. The combination of both signals (orange and black) provides sufficient confirmation for these setups. However, despite having these tools, I am still not consistently profitable ☹️. A major challenge in this process is filtering out setups with low-quality signals. When too many filters and degrees of freedom are introduced, the system tends to overfit, as described by Marcos Lopez de Prado.
As a human, it is possible to identify high-quality trades, but even then, losses are inevitable. Unfortunately, I still lack the mental resilience to handle multiple losses in a row and fully trust the system without hesitation. To address this, I am actively trading using these signals, while continuously adding new elements and ideas to make the system more foolproof 😤. I am also exploring the potential of machine learning algorithms to enhance the reliability of these trading signals. Even a slight increase in reliability can make a significant difference over time. To achieve this, I am collecting a substantial amount of data, which needs to be labeled first. I am also still interested in using reinforcement learning to train an agent not just for decision-making but for one of the most critical aspects: risk management.
Whoever has read this far... I’ll keep you updated 🤣