Trading Systems Part 5 - The Basic Steps for Forex and Futures
A system is a strategy to open a sequence of positions in an instrument based on the same or similar signals. As soon as a new signal triggers, the next position is opened as long as the previous one has been closed.
The system designer will determine in advance whether to trade in a trending or sideways environment. Within that environment, all signals are to be executed whenever they occur with little or no discetion according to predefined rules.
The main purpose of your system is to be profitable with historic data. In general, but not always, your system must be as complete as possible. A complete system is one that has you trading 100% of the trend and spending as little time as possible on the sidelines watching the prices trend in your direction. Profitability always trumps completeness.
In Part 3 and 4 we briefly explored signals. A signal is a price pattern that triggers the opening of a position. The signal may be any of the examples I used in part 4 of this series or it may be your own favorite signal. You choose the signals based on all the assembled evidence supporting the signal's usefulness and profitability. To open the position you turn to the setup tools from our earlier series on "The Basic Setup".
What is not a system
It is not a system just because you open a position in reaction to a signal. Every signal could fail. It starts to become a system when you are prepared for that possibility with a strategy to deal with it. Withdrawing to lick your wounds or changing to a different market where you "might have more luck" is not a system. If you have correctly identified the trend, you need to be ready to unemotionally open on the next signal, confident from your testing that the system wins over time.
A Martingale - A dangerous system
A martingale is a strategy where the risk is doubled after each loss in the hopes of paying off the previous loss(es) and reaching a profit.
It's a dangerous system that will almost certainly lose all the funds in your account. All it takes is five losses in a row starting at 2% of your capital before you have lost 62% and are unable to make the next double. If you risk all that remains on a 6th signal and lose, you are wiped out. As I pointed out in "A Simple Setup", five losses or more in a row are common enough that you should never risk more than 2%.
The next table summarizes your balance after each consecutive loss:
|Round||Risk||Cumulative Loss||Remaining funds|
Notice how by the 4th loss you have risked 30% just to make 8% - assuming your normal risk/reward multiplier is 4 and your trade risk is 2%? That alone should keep you away from this train wreck. Even if you start with just 0.1% of your funds, a quick calculation will show that you will lose half your account after ten consecutive losses, with the next failed trade wiping you out.
It works wonderfully though if you have unlimited funds available to trading, which nobody has. Margin rules should prevent you carrying out this strategy before you are ruined, but you also will not be able to recover your original trade balance, as the doubling strategy had promised.
If you play a martingale regularly, you will sooner or later face ruin. It is not a trading system.
Calculating the Target Price using Simulations
When you place one trade on a particular instrument as we did in "The Basic Setup", you are free to choose a TP that seems achievable given the current price action. Perhaps you choose a nearby level or an overhead area of resistance. However when running a system without any discretion, the TP will be different for each trade and therefore the calculation of the TP must derive from elsewhere.
The easiest solution is to use a multiple of the risk of the trade, where the risk is OP-SL. For example, you could insist that all trades must achieve a double (or 2 x OP-SL) before being automatically closed out. This number is based on the
risk/reward ratio (RRR) and clearly it matters. If the RRR is 1:2 then for every $1 risked, $2 is expected as the reward or win. In our simulations we are more interested in the
risk reward multiplier, which is the inverse of RRR, and to refer to it I will be using the notation RR. In this case we might say the RR equals two (1:2 becomes 2/1, or 2).
If you set a value too high for the RR then many or all trades could fail as the SL gets triggered first rather than the faraway TP. If in turn it is set too low then the trade is more likely to win but the winnings may not be greater than losses from other failed trades. It is apparent that there is an optimal, Goldilocks level for the RR for each market and leg of the trend, not too high nor too low.
For example, as you can see in the adjacent chart, if we used an RR=4, we could calculate TP easily by adding four times the trade risk to the OP. The trade risk (TR) would be just the amount we would lose if the stops were triggered, or (OP-SL). Multiply that risk by four and add it to the open price and we would have the TP to use for the setup.
For each RR there is a total win or loss from the system when applied to a range of historic data on a particular market. This RR will be calculated by simulating the system using historic prices and trying different values for RR until an optimum is found. I will do an example in the next story.
The purpose of the simulation is to determine the optimal RR so we can calculate the TP in every setup. Of course, the RR is not some fundamental constant of the universe - we expect it to change over time and in different markets. However our simulations may show some RR levels are more stable than others. Or we may find minimum or maximum RR ratios for certain markets or trend situations. Either way, we will end up with an RR that we will automatically be applied to each setup in the sequence of trades that make up our system.
The rules for reacting to signals within a system are determined during design and testing. The testing will simulate the real world consequences of applying the signal to historic data.
A simulation makes all the calculations you would in a real trade using real data as if you opened the position with your broker. Whether your simulated trade is stopped out for a loss or goes on to win at the TP depends on what happened in the real market with real historic data. You do not actually execute the trade with your broker, in fact your broker has nothing to do with your simulation. The simulation can be done with pen and paper or with a computer program if you have the skills. If you are so inclined, it's easiest to get started using a spreadsheet, however we will do it manually here.
But how to we get the RR for the market, timeframe and trend that we trade?
The RR will be calculated by simulating the system using historic prices and trying different values for RR until an optimum is found. I will do an example further below.
We have a chicken and egg situation: we need to run a simulation of the system to calculate an RR value but the simulation requires an RR value to run. The solution is to run the simulation starting with a low guesstimate value and then rerun the simulation with progressively higher values and compare results. Each increment in the RR, or step, is a value we decide on. If an optimum is reached, we can use that value for RR and calculate TP for each setup.
Normally you would start simulating with an RR of one, unless you have reason to believe your signal is so powerful that it wins most of the time. If that is the case, then you could start with RR=0.1. In order to win with such a low RR, you must win more than ten setups for every one you lose - not impossible but certainly cause for concern.
Next, the RR value is raised by a certain amount called the step size. If you started with RR=1, the step size might be 0.5 or one because in the first run you want to locate the area that is most profitable by quickly testing across a wide range. Later on, you can always backtrack to zoom in with a smaller step size. It really helps if your testing is automated with a computer program otherwise it can become tediously repetitive.
As we run simulations over the historic data with progressively higher values of RR, we make a note of our profit or loss from the system. After we finish, we choose the RR that gave us the highest profit, if one exists.
In some cases we might discover that the system is a failure and no RR value yields a profit. We can discard those systems or send them back to the 'laboratory' for further testing. In other cases we might discover there is no optimum because the market is in a relentless trend. In such a case the best strategy would be to keep trying entries with no TP until we find one that does not get stopped out. This would be akin to buying the S&P in 1923 and not selling. Each attempt would cost us 2% of our capital but the first winner would beat all those losses.
The 1987 market crash, while huge at the time, is now just a distant wiggle in the charts and an excellent entry position. This is the famous equities buy and hold strategy, which was more popular in the 1990s than today. That's reasonable considering all recent positions from 1997 until 2009 have been stopped out by the dotcom crash and the 2008 credit crisis, unless they had an SL way below the market.
Within a system, any one signal might fail leaving you with a loss. But when you trade all valid signals during the course of the trend you are following a system. A successful system will win more than it loses, even if more trades resulted in a loss.
A system is a series of trades that our testing with historic data suggests will win over time. We need a method to establish an optimum risk/reward multiplier for the market we trade which we will calculate by simulating trades on the historic data and observing the outcome for different RR levels.
In the following stories in this series I will try to pick tricky examples to show what can go wrong in our testing. In some cases the market is in a strong trend, in other cases there is either a mild trend or you are tricked into thinking there is a trend when in fact there is none. The key here is experience. Each time you run a simulation on a new set of data you learn something new. We need to use these methods frequently so they become part of our trading tools.
In the next story in this series I will show you the mechanics of such a simulation.
Copyright (C) PagooLABS 2017. All Rights Reserved.