Trading Strategies

Published on 25 September 2023 at 20:35

At the time of writing I am trading a breakout strategy with my MT4 Algorithm. I use manual trading to train myself, as well as to follow Tom Hougaard, who currently uses a strategy based on the decisionbar 15-20 minutes into the opening.

I know that Tom is not a fan of automated trading, but I dont see why you cant use both automated trading and manual trading. I do both. I can't be online 24/7, but my algo can. And I actually like to program the algos and test them. I learn from both worlds and get inspired from both worlds.

In my terminology a Strategy is simply an automated program that can buy and sell, based on the rules you have programmed yourself.

Let's jump right into it: You have created a trading strategy and you have optimized the parameters and have obtained the following result:

At first glance, this looks like a good strategy. There is a good data base, i.e. approximately 250-450 trades, which provides statistical certainty. Another positive observation is that there is profit on all the combinations (and not just on the top 2 etc.).

However, this strategy is not very convincing. The problem with parameter-optimizing a strategy is that it will be optimized for exactly the 250-450 market combinations in the period in which the test is carried out. But there is a high probability that precisely these combinations will not be repeated, as the market is constantly changing.

Therefore, there is the greatest probability that the best parameter optimization values ​​will not give the same good result in the future. One therefore has to expect that the top result of the test result cannot be achieved in live trading.

Another thing is that this super optimization will contain randomness. Try to roll a die every day 20 times for 5 days and note the result. You will find that some days have more six-eyes than others. Do you want to execute your strategy only on selected days, when your test result shows that, for example, Monday has the most 6-eyes? No, of course not.

If you therefore have a test result that has optimized your stoploss to 15.23, then it is a theoretical value. Personally, I don't want to trust a parameter value if it doesn't make logical sense to me. That is, I think; can it really be true that a stoploss of 15.23 gives significantly better results than a stoploss of 15.26? No, well. But the fact that there is a difference between Stoploss at 15.00 or 20.00 makes sense.

Furthermore, you must be aware that the Test result will always give you the desired price. Let's say you are testing a strategy to buy at a price of 16123.4 yes, then the test result will show that you bought at exactly 16123.4 when the price hits. In the real world, you probably won't get that price, as it is affected by variable spreads, maybe you pay a commission, and by the way the price might just move quickly.

To sum up: Parameter optimization will typically show overly optimistic results, as the result is influenced by chance, the changing nature of the market, common sense and achieving the right price.

This is how I analyze a test result.

First of all, I use my common sense to avoid randomness (like with dice rolls). After that, I want to see a result based on many trades, preferably well over 100. It is also important that the strategy is tested several years back, as well as more recently (the past year). When all these conditions are met, I can select the test result that will be my future input parameters. Let's start with this simplified example:

Trade # Profit Number of Trades Realistic Profit
1 2000 200 1600
2 1900 100 1700
3 2300 25 2250

In the example above I have calculated 'Realistic Profit' based on the test results. Based on my experience in trading the major stock indices, a "difference" of 2 points is normal. That is, every time my test result shows a Payoff of 4, it is in reality 4-2=2. In trade #1 the profit is 2000 for 200 trades, but since I "lose" 2 points per trade in slippage, commission, etc then I lose 200 x 2 = 400, which means that my realistic profit is 2000-(200x2)=1600

Trade No. 3 I will not consider at all, as it is based on 25 trades, which gives too much statistical uncertainty. It is therefore trade number 2 which gives the highest realistic profit, and therefore I will base my input values ​​in live trading on these.

Unfortunately, most often I see that the glamorous algorithms that are sold on the web are based on many trades, each of which has a Payoff of less than 2. This means that people are tricked into thinking that the algorithms give some huge profits, but when they are traded live, then they make losses. Personally, I want to see Payoff of more than 5 if I have to trade the strategy in question live. My own strategies have a payoff of 7-8 in test results, and I continue to work on achieving a higher payoff than that.

In conclusion, I also try to build a strategy that is relatively stable, i.e. it does not have too big fluctuations, too big losses, for longer periods. Even if a strategy ends with a positive result in, for example, a year, it can be psychologically hard to see that there is a loss period of, for example, 3 months.

Add comment

Comments

There are no comments yet.