Home Trading system Design Basic notions Designing a Trading System – Find the Critical Key Factors to Success

Designing a Trading System – Find the Critical Key Factors to Success

182
2

Critical Features for a Perfect System

Systems are things that work by themselves. Van K. Tharp defined in reference to how McDonald’s business works says:

A system is something that is repeatable, simple enough to be run by a 16-year-old who might not be that bright, and works well enough to keep many people returning as customers 

Basically, he states that a system is some structure designed to achieve some financial goals capable of working autonomously or run by average people.

Features:

Applied to trade, the essential features a system must accomplish are:

Profitability: Usually, the strategy is profitable in a diversified basket of markets and conditions.

To guarantee its profitability over time, it is desirable to add one more feature: Simplicity. Simple rules tend to be more robust than a large pack of rules. A large set of rules can show extremely good back-tested results, but it is the result of overfitting. Thus, future results tend to be dismal.

Quality: the model should show a statistical distribution of returns differentiated from a random system. There are several ways to measure this. The Sharpe ratio and the Sortino Ratio are two of them. Basically, the quality property estimates the ratio between results and a figure of the variation of these returns. Typically, the standard deviation of returns is the parameter chosen.

Risk Management and position sizing algorithms: Models are executed using position sizing and risk management algorithms, adapted to the objectives and risk tastes of the trader. It is desirable that the algorithm that determined entries and exits be separated from the risk management and position sizing section.

Measures of Quality

Sharpe Ratio

Sharpe ratio is a test of the quality of a system and is the conventional way for the calculation of risk-adjusted returns.

SR =ER/ SD(R)

SR = Sharpe ratio

R = Annualized percent returns

ER = Excess returns = R – Risk-free rate

SD = Standard deviation

Sortino Ratio

The Sortino Ratio is a variation of the Sharpe Ratio that attempts to include only the “bad” volatility. Thus, the divisor is SD(R-) where R- is linked solely to the negative returns. That way the index doesn’t punish possible large positive deviations common in trend following strategies.

Sortino Ratio = ER/SD(R-)

Coefficient of variation(CV)

The coefficient of Variation is the ratio of the standard deviation of the expected returns (E), which is the mean of returns, divided by E. It’s a measure of how smooth is the equity curve. The smaller the value, the smoother the equity curve.

CV = SD(E)/E

SQN

The inverse of CV multiplied by the square root of trades is another measure of the quality of the system. It’s an estimate of how good it is in comparison with a random system.

SQ = √N xE/SD(E)

Another, very similar measure of quality comes from Van K. Tharp’s SQN:

SQN = 10*E/SD(E), if the number of samples is more than 100 and

SQN = SQ if the number of samples is less than 100.

The capped SQ value allows comparing performance when the number of trades differs between systems.

Calmar Ratio

CR = R% /Max Drawdown%

It typically measures the ratio over a 3-year period but can be used on any period, and it’s mental peace index. How stressing the system is, compared to its returns.

CR shrinks as position size grows, so it can be a measure of position oversize if it goes below 5

Key Ideas to Consider

A trading system, like other systems such as a car, a TV or a computer,  is composed of several pieces put together to form a working unit. To optimise its performance we need first optimise every one of its parts, fiding for every piece the best solution that fits us.

Market identification:

Market personality: Does it tend to trade or is cyclical?

Basket: shall we trade a basket or is the system asset specific? If we are trading a basket of assets, are they uncorrelated or do they move in sync?

Liquidity: It is a critical aspect too. Which are the most liquid hours which ones to avoid? Especially relevant is to recognise and avoid the times when liquidity is low and establish a minimal level to find a trade acceptable.

Volatility is also essential information that we need to judge. Is volatility an issue? Is the market exposed to unpredictable events or volatility is just the result of the normal trading activity?

A too volatile situation on a system created or optimised for conditions with less volatility, and it may crash badly. We should place special care to stop positioning if not automatically corrected based on the prevailing volatility or price range changes.

News-driven volatility is another aspect to care about. The trader usually should avoid this kind of volatility when using a mechanical trading system, because it’s improbable that the rules were designed to handle that kind of volatility.

Identifying the Market Personality

Some trading signals work in trending markets, while others are more suitable for price channels or seasonal markets. In fact, the best idea is also to hold a basket of successful trading strategies that can be applied to asset classes in different market conditions. If the strategies are uncorrelated help reducing risk the same way as a basket of uncorrelated securities.

Identify mean reverting markets.

Mean reversion is usual in intra-day time frames. The popularity of automated trading systems, high-frequency trading, profit taking, and market manipulation, including stop-loss taking, create the conditions for such market type.

Some of these market types, which include indices and highly observed currency pairs such as the EURUSD are rather difficult to trade intraday. A trading system that targets these markets should employ custom entry and exit methods, using signals that identify oversold or overbought conditions, bands or channels that can trigger entries with propper reward-to-risk ratios.

The Law of Active Management

Grinold and Kahn were the minds behind the Fundamental Law of Active Management. The purpose of the Fundamental Law of Active Management is to gauge the value of active management, represented by the information ratio IR. Only two variables are used: IC, the Manager’s skill, and N, the number of Investment Decisions.

IR = IC x √N

This formula implies that, taking costs aside, if two managers show similar skills, the most active manager will outperform the other one.

This formula applied to trading systems or strategies reveal something which seems obvious: On two equally performing strategies, we can infer that the most active will win the less active.

Of course, there is a limit to this: If the cost of trade overrides the potential benefit of the increase in activity. We can see that this cost goes higher as the time frame shortens while the trade activity increases.  A possible solution is to increase the activity trading different uncorrelated assets and keeping the timeframe unchanged.

Timeframes

The trader’s available daily time has to be considered too. Can he trade all day long or just a handful of hours during the evening?

A solution to this problem is the use of a fully automated trading system. In that case, a reasonable trader should set the system to stop trading if a determined loss amount is reached.

To traders not willing to let an automated system by its own, let’s examine the different timeframes:

Minute to 1 hour: These time frames can be considered very short-term. They are only valid to persons able to follow the markets the whole day.

Their potential profit diminishes as the time frame gets shorter while the costs of the trade increases. Also, the timing is much more critical. Errors in timing are paid by an increase in the per cent losses.

2- 4 hours: These timeframes allow for better profit targets, while there is no need to follow the market continuously. The preset of profit targets and stops can free the trader the burden of continuously looking at the screen.  A trader doing other activities during the day can take these signals and, then, continue doing his daily activities with almost no difficulty.

Daily: Suitable for swing-trading. People can analyse the market during the evening and take the signals. Usually, the trade takes from 2 to7 sessions to complete. The trader can adapt the stops and targets to the current market situation as it is developing.

Also suitable to increase the trading activity using a basket of uncorrelated assets.

Weekly: Long-term positions. Mostly for long-term investors.

Risk

Trade Risk

Risk is a broad concept. There are several kinds of risk. The first type of risk is the trade risk. The risk you assume on a particular trade. That’s the monetary distance from the entry to the stop loss multiplied by the number of contracts bought or sold.  It’s easy to assess and measure. Trade risk is proportional to position size.

Maximum Drawdown

The second type of risk is the maximum drawdown a system may experience. This type of risk is dependent on the position size and the per cent losers of the system. Knowing these two values it is possible to estimate it with certain accuracy.

Risk and Volatility

Risk can be defined as the variability of results. It’s a statistical value that measures the mean value of the distance between results, and the mean of results and is called standard deviation. The point is that market volatility is shifting and, further, it’s different from asset to asset.

If a trader has a basket of tradable markets, there might happen that one asset is responsible for 60% of the overall volatility on her portfolio, because the position size in that particular asset is higher, compared with others or because its volatility is much higher.

The best way to reduce the overall risk is through diversification and volatility standardisation.

Diversification:

To reduce overall risk there is just one solution: To trade a basket of uncorrelated markets and/or systems, with risk-adjusted position sizing, so no single market holds a significant portion of the total risk.

Below is the equation of the risk of an n-asset portfolio when there’s no correlation:

𝜎=√ (w1𝜎12 + w2𝜎22+ … + wn𝜎n2) (1)

where 𝜎I is the risk on an asset and wis the weight of that asset on the basket.

As an example of the effectivity of diversification, let us assume that we hold a basket of equal risk-adjusted positions in 5 non-correlated securities with a total risk of $10. Thus, there is a $2 risk exposure on each asset, and the total risk would have been 10 if assigning the whole trade to one asset. But, if the assets are totally uncorrelated, the combined risk can be computed using equation (1).

Then:

Risk =√ (5 x22) = √20 = 4.47

So, for the same total market exposure, the risk has been reduced by more than half.

Standardising  for Volatility

Standardising for Volatility is a powerful idea: It means the adjustment of the position size of the different assets based on their respective volatility, so every trade holds the same expected risk.

This way the investor can have a balanced portfolio where each component has an equal risk. It implies, also, that a trading rule can be used on different assets if applied with the same standardized risk.

Leverage

One of the most attractive aspects of The Forex industry is the huge of allowed leverage. With the new trading limits, a retail trader can control up to three hundred thousand dollars with a small ten thousand dollar account. Although this seems to be beneficial, it is the real cause for the high per cent failure among FX traders. If a trader doesn’t know how to control risk, he’s surely overtrading.

The trader must know the dollar risked on every trade. The dollar risk is obtained multiplying the pip risk by the number of pips distance between entry and stop-loss, and this amount should be multiplied by the position size in lots.

Dollar_Risk = pipRisk x(Entry-Stop) x Position Size

As an example:

Entry – Stop = 10 Pips

Pip Risk = 10 dollars

Position Size = 2 lots

Dollar_Risk = 10 x 10 x 2 = $200

As a rule of thumb, the trader should divide the desired maximum drawdown of his system by 20 and limit his position size to MaxDrawdown/20 %

For example, if the current account balance is 10,000 dollars and the trader do not want to risk more than 20% of it in a max drawdown, then he must trade no more than 1% of the balance. That is limit his risk to $100 on that trade.

The profitability rule

A trading system is profitable over a period if the amount won is higher than the amount lost:

∑Won -∑Lost >0 (1)

The average winning trade is the sum Won divided by Nw, the number of winning traders.

= ∑Won / N (2)

The average losing trade  is then:

= ∑Lost / NL,  (3)  where NL is the number of losing trades.

Thus, equation (1) becomes:

WNLNL, > 0 (4)

The number of losing trades is the total number of trades minus the winning trades:

NL = N – Nw  (5)

Therefore, substituting (5) and dividing by N, equation (4) becomes:

WNw / N – L(N-Nw) / N > 0 (6)

If we define the win ratio as the number of winners Ndivided by the total trades N

P = Nw / N

then  the loss ratio is NL = N – Ndivided by N. The result should be 1-P, as the sum of both ratios should be equal to 1

(N-Nw) / N = 1-P,

and  (6) becomes:

WP– L(1-P) > 0   ->    W/L x P – (1-P) > 0 (7)

Finally, if we define a mean Reward to risk ratio as Rwr= W/L  Then we get

P  > 1 / (1+ Rwr)  (8)

Equation 8 is the formula that tells the trader the minimum per cent winners required on a system to be profitable if its mean reward to risk ratio is Rwr.

Of course, using (8) we could solve the problem of the minimum reward-to-risk ratio Rwr required for a system with per cent winners P.

Rwr  > (1-P)/P (9)

Sections of a trading system

In coming articles, we’ll be developing all the sections of a trading system. Here we are just drawing a sketch of the different parts of a successful system.

A Trading System should hold basically a rule to enter the market and a rule to exit it. Here we present a brief description of the possible rules:

  • A setup rule: A rule defines under which conditions a trade is allowed, for example, a trend following rule.
  • A filter rule: A filter to forbid the trade under special conditions, for instance, on low volume, or high volatility, overbought or oversold conditions or certain systematically unprofitable trading hours.
  • An entry rule: It can be set using price action, moving averages, MACD, Bollinger Bands, statistical formulas, and so on.
  • A stop loss, to limit losses in case the trade goes wrong. Optionally a trailing stop.
  • A profit target: Profit target may be monetary, per cent, based in supports or resistances, on the touch of a moving average or just a trailing stop-loss.
  • A position sizing rule. This rule, as mentioned before, should make sure the risk is evenly and correctly set.
  • Optionally, A re-entry rule. The rule decides a re-entry if the stopped trade turns again on the original trade direction.

References:

Professional Automated Trading, Eugene A. Durenard

Systematic Trading, Robert Carver

Profitability and Systematic Trading, Michael Harris

Computer Analysis of the Futures Markets, Charles LeBeau, George Lucas

Building Winning Algorithmic Trading Systems, Kevin J. Davey

 

2 COMMENTS

  1. You confess a successful system for trading and try to make it clear, I don’t want to confess and say ” My best or successful strategy”
    Just ask you to predict any pair or pairs for any time frames and i will predict that pair then I show you which method can predict the direction of that pair or pairs accurately

    • Hi, thanks for your comment.
      I do not believe in “predictions”. What I try to say in the article is that first, we have to adapt the candidate system to ourselves. Secondly, we need to measure its performance to try to see if the system is profitable and how different is it from a coin toss, or random system. There are statistical methods to do that. Van Tharp SQN is one of them, Sharpe Ratio is another one. Then I speak about diversification as a method to reduce the risk. I discuss, also, the duality per cent winners and reward-to-risk ratio. The article present math formulas to compute what is the minimum per cent winners you need for your usual reward factor; and also what reward factor do you need if what is known is the per cent winners (hardly the case, but who knows?). Finally, I list the elements of a trading strategy or system.
      The trading job is not to predict, but to play a game of chance where the odds should be in your favour. This article only deals with the measurements and precautions you need to observe to have certain control of your trading activity.

LEAVE A REPLY

Please enter your comment!
Please enter your name here