Position sizing – the easy way to great performance

Working on your position sizing algorithm is an easy way to pimp an existing trading strategy. Today we have a look at an energy trading strategy and how the position sizing can influence the performance of the strategy.

The screenshot shows you the returns of the same trading strategy, trading the same markets, the same time frames and using the same parameters. The returns on the left side look nice, making money every year. The returns on the right side are somehow shaky, and you would have to love volatility of returns if you would think about trading this basket. The only difference between the basket on the right and on the left side is the position sizing.

The energy basket:

The basket trades German power, base and peak (yearly, quarterly, monthly), coal, gas, emissions. All instruments are traded on a daily and weekly time frame chart, using the same parameters. If the daily trading uses a 10-period parameter, the weekly trading would use a 10-week parameter. This limits the degrees of freedom I have when doing the strategy-time frame-parameter merge, thus minimizing the curve fitting trap.

Continue reading

143th Hedgework – Interview


“Automate the search for promising assets”

The use of trading systems means, among other things, that more markets and smaller time levels can be considered with the same team. The higher trading frequency and diversification into more markets and time levels will in turn lead to better performance and reduced risk for the investor. Philipp Kahler von Tradesignal chatted at the 143rd Hedgework from the sewing box of a technical analyst. He answers the most important questions here.

HEDGEWORK: Mr. Kahler, you represent the quantitative side of portfolio management. Has fundamental analysis become obsolete?
Philipp Kahler: Quantitative analysis deals with the creation of investment rules, which are so clearly defined that you can even teach them to a computer. Whether these rules are based on price or fundamental data is the same. The only important thing is that you can test the rules and regulations in a meaningful way and that the result is convincing.

HEDGEWORK: What are the advantages of technical analysis?
Kahler: Compared to fundamental data, technical indicators have the advantage that they are available in real time. It is not the distributions in the last quarter that are decisive, but rather what the market is doing today. My market-to-market result is then also evaluated on the basis of current prices. Whether the technical indicators are better than the fundamental analysis indicators is unclear, but as a trader, the most important thing for me as a trader is to have my risk under control NOW – and that’s easier with technical analysis.

HEDGEWORK: In your presentation, you talk about the transition from technical to evidence-based technical analysis. What’s behind it?
Kahler: I mean quantitative models that make use of classical technical analysis in the toolbox. Indicators and simple price patterns are ideal for searching markets for opportunities. However, even the best technical analysis indicator alone will hardly justify a successful trading approach. The combination of several indicators, perhaps even combined with pre-screening by fundamental analysis – this is the best basis for creating a stable, quantitatively controlled portfolio.

HEDGEWORK: In which areas are quantitative systems particularly useful?
Kahler: If the holding period of a position is somewhere between five minutes and two weeks, then there is no way around technical analysis. If your holding period is between two weeks and several months, the technical analysis will at least provide you with valuable services for timing your decisions. What you do is not decisive.

HEDGEWORK: Quantitative systems can, in a first step, bring structure to investment decisions?
Kahler: Yes, you can automate the search for promising values, improve the timing of trading activities, and you will also see an improvement in the delivered performance by avoiding emotional decisions.

HEDGEWORK: What role do FinTechs and Robo Advisor play? Has their increased market presence already made a significant difference?
Kahler: Yes and no. Of course, flash-crashs are caused by the increased use of machines, but if you look at the Dow Jones for more than 100 years, you will soon find that the market hasn’t changed. The daily/weekly/annual volatility has been almost constant for more than 100 years. These new technologies have the strongest influence not on market behaviour, but on the business model of traditional asset managers.

HEDGEWORK: What added value can an investor expect from a quantitatively controlled portfolio?
Kahler: One advantage is that the use of trading systems means that more markets and smaller time levels can be viewed with the same team. The higher trading frequency and diversification into more markets and time levels will then lead to better performance and reduced risk for the investor.

HEDGEWORK: Could you please describe how you proceed with a new product offering or a new investment strategy?
Kahler: This can be done in two ways. Either I have a trading system that I am convinced of. I then look for all the markets in which it functions and combine them into a quantitatively managed portfolio. Or I get a market given. Then I try to develop systems that work without adapting the parameters, e. g. in the hour/day and week range. Several such approaches are then combined to form a portfolio.

HEDGEWORK: Backtesting is an essential part of a product launch. These are sometimes not very reliable in retrospect. What is important to note here? What are the pitfalls?
Kahler: The baking test is not the problem. The adaptation of the strategy to the market – the parameterization and weighting of the individual components of the trading system – is critical. Since only a few adjustment screws lead to a high degree of adaptability of the trading system, there is a high risk that one adapts too much to past data, called curve fitting, without the system’s set of rules really saying anything decisive about the market.

HEDGEWORK: What method do you propose for testing the robustness of a strategy?
Kahler: On the one hand, you can first test the stability of the parameters. If a system includes the 200-day line, then it should work roughly as well with the 150-day and 250-day line. In a further step, the system must then be tested with unknown data. If a trend-following model works in Germany, for example, then it should not fail in the USA either. And finally, you should let the system disappear in the drawer for half a year and then check again to see if the real-time results were as expected.

HEDGEWORK: Maybe we can take a little more look at your sewing box. What practical tips can you give prospective quants?
Kahler: It’s easy: Learn to trade! Without a computer, with real money, so losses really hurt. Even though studying science is an advantage, I do have the experience that traders who are not blinded by numbers because of their own experience will eventually develop the more stable systems.

HEDGEWORK: Finally, perhaps a glimpse into the future?
Kahler: Computers will take on more and more tasks, the worldwide availability and comparability of brand names will in many cases make brand names unimportant. Investors no longer ask for a certain fund, but want to invest their money with manageable risk and limited correlation to other markets. Whether an algorithm or an analyst does this is information that will not reach the investor at some point. Since the computer often delivers better performance and is paid less than the classic fund manager, it doesn’t take much imagination to estimate future developments.

The interview was conducted by Ronny Kohl, automatic translation by DeepL


Philipp Kahler is Senior Quantitative Analyst at Tradesignal Ltd. and advises financial institutions and energy trading companies on the development of quantitative-based trading strategies. He gained professional experience as a trading system developer in proprietary trading at Berliner Landesbank. There, he managed a wide range of very successful, systematic trading systems for several years.

120th Hedgework – Interview


“I believe in self-fulfilling prophecy”

Algorithmic trading is often surrounded by the nimbus of mysterious and impenetrable. But with the right tools and methods, the opportunities and risks of automated trading strategies can be exploited. Philipp Kahler, Senior Quantitative Analyst at Intalus Group, showed the way to systematic investment at the 120th Hedgework in Frankfurt.

Philipp Kahler,
Intalus Group
Hedgework: Mr. Kahler, in short: What is Algorithmic Trading?
Philipp Kahler: Algorithmic Trading is trading with pre-defined and tested rules. The rules can come from higher mathematics, where game theory has its roots or is based on technical analysis.

Hedgework: Why should institutional investors focus on technical analysis and algorithmic trading?
Kahler: The technical analysis displays information quickly and clearly. Contrary to this are the many investment recommendations in the subjunctive; that the stock XY next week should be bullish for the reasons and could reach a new high. Then a purchase might be advisable. The rule-based technical analysis does not dare to speculate. The software simply pings when a situation arises that is in line with the rules. In real time, and not maybe and next week.

Hedgework: How does it work?
Kahler: I like to program rule-based strategies with indicators and chart patterns. One or two classical indicators define the market phase, a chart pattern or an oscillator signal then gives the final GO for entry. The position is then hedged by a sales and time stop. If nothing happens or if it goes wrong, the position is closed. Any accumulated profits and any counter-signals then lead to new exit instructions for the following day at the end of the day.
So I’m not trying to predict what might happen tomorrow, but my algorithm contains a number of rules for scenarios that stand for and against my position. Just as an emotionless and deliberate professional would do.

Hedgework: What indicators do you look for?
Kahler: I like to use classics such as moving averages, Directional Movement Index, Parabolic or ADX for trend determination. For entry or exit, significant high and low points, candlestick formations, oscillators. Generally speaking, I use indicators that other traders use, but I don’t always use them in the classic way. And I believe in self-fulfilling prophecy (laughs).

Hedgework: Why do you use technical analysis to develop algorithms?
Kahler: Technical analysis shows me how the others see the market. One can now argue whether the markets are efficient and whether every available information is reflected in the price, but this is a theoretical discussion. In practice, I see that other traders use technical analysis to determine entry and exit. And I don’t want to ignore that information.

Hedgework: You are thus betting very heavily on the right time to buy and sell. The latest research is more in the direction that market timing is not possible or does not bring anything.
Kahler: Let’s assume this hypothesis is correct. Timing is not possible. Then the movements of the markets are a purely random walk. Yesterday’s events have no influence on today’s events. And this is clearly contradicted by every insight into one’s own experience and behavioral finance. Yesterday influences how we think and act today. And that gives me the foundation of technical analysis.
If the market then falls by 20 percent in one day and they don’t stop because timing doesn’t work, they can do so tomorrow at -30 percent. Or write an article about why this was the right thing to do at that time, as the market is now back to baseline again.

Hedgework: How can the market universe be searched for promising values using algorithms?
Kahler: Define promising! Values that have been in trend for a long time and for which you hope that they will rise for a few more days? Or values that are at least 75 percent below their high and now trade at twice as much volume as a year ago? Values where a reversal pattern has occurred today that every retailer knows?
The beauty of scanning the markets is that you can find out from thousands of values exactly those that meet your own rules.

Hedgework: You compare the values at different time levels. What is the reason for or statement can the user draw from the comparison?
Kahler: I think that mass psychology works best where there are masses. So, if only the people who see a candlestick pattern on the 60-minute chart come into this market, then the following movement will probably not be so great. However, if the same candlestick pattern appears on the weekly, daily and 60-minute charts, there is likely to be more movement as more traders are involved. Since this is not easy to find, I have to rely on automated scans of my software. Manually looking for these scenarios would degenerate into work.

Hedgework: Be long when the chart is green and short when it is red. That sounds trivial. Is that really it?
Kahler: When the pedestrian lights switch to green, do you walk blindly across the street? Or maybe you want to check again if there is no car coming?
Same with one of my red-green models. The colour is comparable to the traffic light. The second step is to confirm the trend with a new high or low. Then there is also the question of positionsizing and risk management. All these are simple building blocks that combine to form a rather complex trading model.

Hedgework: Is this approach also suitable for institutional investors who do not have a large investment team?
Kahler: Technical Analysis is a useful tool for this type of analysis. It allows me to automate a lot of things, such as scanning markets and baking strategies. Automatically generated trading signals and alarms are then the mechanical assistants that enable the Portfolio Manager to monitor a universe of markets and strategies in a short period of time. Fortunately, the software industry has reached the point where there is hardly any need for dedicated programmers, but at least the first prototype can be created by the dealer himself.

Hedgework: In volatile markets in particular, this sounds like a lot of reallocations and transactions and transaction costs. This is at the expense of performance. What is your experience?
Kahler: But in volatile markets, however, there are also the best opportunities. If the markets move, money can be earned well.
However, the cost of reallocations and the associated work involved are clearly an important criterion in system development. The number of transactions can be adjusted by selecting the time levels and trading approaches in such a way that it can be done with the given trading team.

Hedgework: How long is the average holding period?
Kahler: If it goes wrong, it only takes a few seconds. In my strategies, however, I usually work several days to weeks.

Hedgework: Does the approach also work at portfolio level?
Kahler: It works particularly well at portfolio level thanks to diversification. It is almost impossible to achieve a steady performance with only one traded value. However, if I am dealing with a universe of non-correlated values, then continuous performance is possible with relatively simple strategies.

Hedgework: How do you determine the optimal position size in a portfolio?
Kahler: I risk the same amount per trade, depending on the planned trading frequency and within certain limits for the invested capital. The various systems are also weighted according to the volatility of the results.

Hedgework: What happens to the money that does not flow into the stock market due to negative signals?
Kahler: No absolute return approach will always be invested. That is why it makes sense – irrespective of the investment issue – to be active in several markets and time levels. Cleverly chosen, with little correlation to each other, the investment ratio then remains fairly constant and the problem is eliminated.

Hedgework: What is the equity/bond ratio in a portfolio? Does the stock market always have priority?
Kahler: No, no, not just stocks or pensions. Absolute return means that at the end of the year you want to see a certain return at a given risk. It is not known which market this will bring me in the future. Surely the Bund Future has been good at trend-following strategies in recent years, but what about next year? Perhaps the return on investment then comes from oil, gold or other sources. That is why the idea is to search markets for certain rules and then act where the traffic lights turn green.

Hedgework: In which market environment does this approach work best and where not?
Kahler: I like working with trend-following strategies. They are easy to develop and implement on the market. In order to ensure that the yield is right, the trends should not be too small, both in terms of time and volatility. And this is where the scanning method comes into play again. I have to look for the markets and time levels in which the markets meet my criteria. Or I need to have a switch for another strategy, one that works well in sideways markets.

Hedgework: How do you deal with black swans and chance?
Kahler: There’s not much you can do about a real Black Swan within the trading system world. After all, by definition, it is a risk that has not been known to date or has been completely misinterpreted. Only a strategy outside the stock market can help.
But all the market shocks that have occurred in history must be looked at very carefully. Not only on the chart, but best in conversation with participants. It doesn’t look so wild on the chart, but when you see how everything else goes wrong on such days, you don’t automatically invest everything in a market-system combination.

Hedgework: What is the advantage of your strategy over other trading strategies based on technical analysis?
Kahler: It’s my strategy. I developed it according to my convictions and it does what I would do by hand. This doesn’t have to be any better than all the other strategies on the market, but the trader’s psychology also comes into play in system trading. If you don’t believe in your strategy, you leave it at the first setback and then you’re not in the good phase. A good system only makes losses – simply because it is used in the wrong environment or by the wrong dealer. My advice: always be honest with yourself. The rule-based technical analysis supports this, as it leaves no room for interpretation.

The interview was conducted by Alexander Heintze, translated by Deepl Übersetzer

EEX Phelix Base Yearly – Buy Wednesday, short Thursday?

When it comes to simple trading strategies, the day of the week is surely one of the best things to start with. That’s nothing new when it comes to equity markets. Everybody knows about the calendar effects, based on when the big funds get and invest their money. I do not know about any fundamental reason for the day-of-week effect in German power trading, but is seems to be a fruitful approach.

First of all I have to point out that it is not only the day of the week which is important. A strategy that just buys on Wednesdays and sells 1 or 2 days later would be doomed. But if you add a little filter which confirms the original idea, you will end up with a profitable trading strategy.

This filter will just be a confirmation of the expected move: If you suspect that Wednesday ignites a bullish movement, then wait until Thursday and only buy if the market exceeds Wednesdays high. Same for the short side, wait for a new low before you enter!

Have a look at the chart. The strategy shown buys on Thursdays if Wednesdays high is exceeded. The position is closed 2 days after the entry.

If you run a simple test which day of the week is the best to get ready for a long trade the day after then the next chart shows the return on account of the strategy using data from 2012 up to now: (exit one day after entry)

Continue reading

Bitcoin Trading Strategy – review of returns

Bitcoin is not as bullish as it used to be. May it be due to fundamental reasons like transaction cost and slow speed, or maybe the herd found a new playground, whatever it might be, it is a good time to have a look how my bitcoin trading strategy performed.

The bitcoin trading strategy uses two moving averages for the trend detection, and, when the averages say bullish, the strategy will buy if the market moves above it`s old swing high.

The position is protected with an exit at the last swing low and a 3% trailing stop.

But have a look how this simple strategy performed over the last two years:

Trading on a daily timeframe and investing 10000€ with each entry, the strategy managed to get more than a 100% return over the last 2 years.

Continue reading

The rhythm of the market

Usually we chart the market at it’s absolute level. But what, if we would just chart the net daily, weekly, monthly movement? Would this be an advantage? Would this show us new trading opportunities?

The short answer is: Yes! The trend is not everything, and it seems to be of some significance for further movements, if the market has moved more than x % from the beginning of the day, week or month.

But let’s have a look at some charts – and you will see how well it works:

The first chat is an intraday chart of EuroDollar, 8am-5pm CET. It shows you the daily net movement.

Continue reading

Bitcoin Handelsstrategie

Die Cryprowährung Bitcoin ist zurück!

Sie erlebte ihren Hype vor 2014, doch ging es seitdem fast nur noch bergab. Nach den Hochs um 1000$ für einen Bitcoin Ende 2013 verfiel der Preis bis auf 150$. Doch diese Zeiten scheinen vorbei zu sein, bitcoin is back!

Bitcoin Chart Analyse

Der Chart zeigt den Bitcoin / USD Verlauf der vergangenen 3 Jahre. Es spring sofort ins Auge, dass die lanfristige  fallende Trendlinie im Juni 2015 gebrochen wurde. Seitdem ist neben den Kursen auch das gehandelte Volumen stark am Steigen. (Kurs- und Volumsdaten von  bitstamp.net)

Bitcoin Chartanalyse

Noch immer ist die Volatilität des Marktes extrem hoch, Bitcoin ist ein reines Spekulationsobjekt, beliebt bei Leuten mit Hang zur Weltverschwörung.  Dies sind die besten Voraussetzungen dafür, dass eine automatisches Bitcoin Handelssystem funktionieren kann. Die hohe Volatilität ermöglicht zudem mit geringem Kapitaleinsatz ansprechende Gewinne.

Bitcoin Handelsstrategie

ich bin nicht an die Börse gegangen um mir den ganzen Tag Gedanken über Trendlinien zu machen, ein automatischen Handelssystem für Bitcoin ist da schon eher mein Ding.

Meine Bitcoin Handelsstrategie basiert auf klassischem Swing Trading. Die Strategie selbst wurde auf von mir auf der IFTA Konferenz in Tokyo vorgestellt, IFTA Mitglieder können den vollständigen Systemcode auf der Webseite http://www.ntaa.or.jp/ laden.

Die Basis des System sind die Swing Punkte.

Bitcoin Swing Points

Eine programmierte Definition dieser Punkte finden Sie im Swing Point Stop

Kombiniert man diese Swing Punkte mit einer einfachen Trenderkennung, ergibt sich ein hoch profitables Bitcoin Handelssystem.

Bitcoin Trading Strategy

Bitcoin Handels Regeln:

Continue reading

Opening Range Breakout

Ein Opening Range Breakout System von Perry Kaufmann.

Es wurde im Magazin “Technical Analysis of Stocks&Commodities” im Juli 1994 besprochen, und wie es scheint, funktioniert es noch immer.

Das System wartet die erste Handelsstunde ab und geht dann bei Ereichen eines neuen Hochs oder Tiefs  long oder short.  Die Einstiegs Order (Stop Buy / Stop Sell) wird nicht exakt auf das Hoch / Tief gelegt, sondern ein paar Punkte darüber /darunter. (hier 20 Ticks)

Prinzipiell ist die Strategie der Afternoon Trader Strategie sehr ähnlich.

TSM(S) 1st hour breakout detail

Da die hier vorgestellte Systemversion  ursprünglich für dieTradestation 2000i in Easy Language geschrieben wurde, ist das Laden von 3 Zeitreihen ein wenig kompliziert gelöst. Aber es funktioniert.

Backtest mit adjustiertem DAX Future:

TSM(S) 1st hour breakout backtest

zum Tradesignal Equilla Code Passwort “code”

Selbstlernende Handelssysteme

Ein jeder kennt die klassischen Indikatoren wie RSI oder Stochastic. Und ein jeder kennt die dazugehörigen Handelsanweisungen: Long, wenn überverkauft, Short wenn überkauft. Und zumindest im Lehrbuch funktioniert das auch. Aber wie sieht das ganze am realen Chart aus? Würden Sie dem Lehrbuch vertrauen und Ihren Kunden auch einen baldigen Kauf empfehlen wenn der RSI unter 20 liegt?

Testen anstatt zu studieren

Schön, wenn ein Indikator im Lehrbuch funktioniert, doch will ich hier ein Verfahren darstellen, bei dem der Indikator selbst angibt ob, wann und wie gut er funktioniert! Dazu habe ich mir für diesen Beitrag den RSI Indikator vorgenommen.

Zunächst wird der Wert des Indikators betrachtet, sowie, ob er steigt oder fällt. Mit diesen beiden Kriterien lässt sich der RSI einfach klassifizieren.

RSI Prognose

Dann erfolgt der eigentliche Backtest: Innerhalb der letzten 1000 Bars wird nun geschaut, wie sich der Markt bei einem gleichen Indikatorstand (zwischen 90 und 100) und Richtung (über Triggerlinie) verhalten hat.


Am Bild kam dies innerhalb der letzten 100 bars 36 mal vor. Dabei war die durchschnittliche Bewegung innerhalb der darauffolgenden 5 min DAX Futures Kerze -0.03%. Der RSI hat beim aktuellen Stand also eine negative Kurs Prognose.

Dass es auch nach dem nächsten bar statistisch nach unten geht, sieht man an den 5 Prognose Punkten am Chart. Sie zeigen, wie sich der Markt statistisch innerhalb der nächsten 5 Bars verhalten hat, unter der Bedingung, dass der RSI den aktuellen Stand und Richtung hatte.

Markt Performance als Indikator

Der obige Screenshot zeigt den Indikator und die Prognose für den kommenden bar (sowie die 4 darauf folgenden). Er zeigt jedoch nicht, wie sich diese Prognosen in der Vergangenheit verhalten haben, in welchen Bereichen der Indikator in der Vergangenheit seine höchste Aussagekraft hatte. Dies ist am nächsten Chart dargestellt.

RSI Prognose

Am Bild ist unter dem eigentlichen RSI seine aktuelle prognose für den nächsten Bar dargestellt. Um diese prognose ist ein Bollingerband gelegt, um so die Bereiche zu definieren, an welchen der RSI seine höchste Aussagekraft hat (= die stärkste Bewegung vorhersagt)

Continue reading

Reality vs. Robert W. Colby, CMT

Dont`t believe!

Papier ist geduldig, darum ist es oft besser wenn man selbst testet bevor man ein veröffentlichtes Handelssystem mit seinem Geld ausprobiert. Heute geht es hier um einen Handelssystem out of sample Test

Ein schönes Beispiel dafür ist eine Strategie aus Robert Colbys Buch “The Encyclopedia of Technical Market Indicators“, 2nd edition, 2003, page 791ff.

Darin wird ein einfaches moving average crossover Systeme vorgestellt, welches anscheinend seit beinahe 100 Jahren phänomenale Gewinne verspricht.

Hier eine Kopie aus dem Buch:

colby wma strategy


Tradesignal Backtest

Continue reading