Categories
Forex Videos

Forex Position Sizing Part 12 – Two Tier Optimal F Part 2


Position Sizing XIII- Two-Tier Optimal f Part II

 

In Two-Tier Optimal f part I, we discussed the virtues and drawbacks of optimal f trading. In this part II video, we will present a methodology that will almost ensure that our initial capital is preserved with the possibility of astonishing growth factors on our trading account. This content is exclusive, and, so far, you will not see it explained elsewhere.

 

System requirements:

This methodology is valid only with profitable strategies. This method is not a miracle solution for losing systems.

It works best when the risk is homogeneous. That is, the dollar risk is a constant R factor to the rewards.

The better the system, the higher the and smoother are the rewards.

 

The Two-tier Strategy

1.- We split the trading account un two portions. One portion ( 25% of the total in our case) will be used with Optimal f positioning. The other part will be applied to a 1% risk positioning.

2.- After a determined goal (2X, 5X, 10X, 20X of the Opt-f portion), the account will be rebalanced ( by adding both sub-balances together) and then re-split(25%-75%) to start a new cycle. The cycle will also reboot itself if the Opt-f section’s balance goes below 25% of the value at the beginning of that cycle.

 

What was the procedure to test the two-tier Opt-f position system?

We took the current Signal Table closes signals and created two 10K trading histories of what would have been one year of trading activity. Thus, resulting in two collections of 10,000m years of trading data. One of the collections was to be used with the Optimal f position sizing portion, and the other one was employed in the 75%-portion of the account. The Python code for the entire simulation is shown below.

We did this procedure using several targets for the balance of the portion traded using Opt-f: 2X, 5X, 10X, and 20X. We focused the results on the following parameters: Average final capital, max final capital, min final capital, average trades need to 10X total capital appreciation, average max drawdown, The drawdown with 1% probability of occurrence. In the below table, we also present the results of the 1% risk and 100% Opt-f strategies. ( click the image to enlarge).

 

 

Discussion

We see that the 1% risk strategy is not bad at all since it can multiply by five the initial balance in one year. It does this with an average max drawdown of 8.79 percent, with the odds of reaching a 16.2% drawdown on one every 100 years. We see also that, on average, it needs 664 trades to multiply by ten the initial capital.  

On all two-tier columns, we see a remarkable fact that the min final capital is 10,486. That meant that in all the 10K years of simulated market action, not a single one ended below the initial 10K balance. Thus, this strategy seems to protect us against the loss of the initial capital. That is a terrific psychological reinforcement to withstand the high max drawdowns it presents.  The use of the 2X goal is the best choice for the less bold investors, as this method offers an average max drawdown of 38.32%, with a 1% chance of reaching 59% drawdown.  After one year, the average final capital is $8.5 million, with a starting capital of only 10K.  This positioning strategy multiplies by ten the capital, on average, every 113 trades. The second best choice is a 5X goal.  That will more than double the yearly returns at the expense of a near 50% drawdown on average.   On the table, we can see that the more we increase the goals to rebalance, the more the account growth, but also the max drawdown.

We can see that these strategies’ growth is orders of magnitude lower than fully Optf position sizing. Still, the attractiveness of this strategy is that the odds of being smaller than 10K after one year of trading are virtually none.

More ideas

We used 1% as the size used in 75% of the total capital in the preceding trading sizing proposals. Of course, we could modify that to better profit from the total capital with almost no increase in drawdown and fully preserving our initial capital. You can make your own simulations on this to find the best fit for you. As examples, let’s present three more simulations using Optf/10, Optf/ 5, and Optf/2 with 2X rebalancing goals. 

 

In the image above, we see that using Optf/5 in 75% of the capital will deliver huge profits with 40%-63% Drawdown figures and 79 trades to 10X capital appreciation. All this with almost no chance to blow up the account. 

Final words

This video shows exclusive and never taught position sizing methodologies that protect the initial capital and offer vastly superior results to the 1% risk standard methodology.  But you must be aware that we are assuming the trading strategy is effective long term. The trader will also need to find the safest optimal f value by performing the proper computer simulations.

That also shows that position sizing is part of a trading system that really helps you achieve your monetary objectives. And for optimizing it, you need to know the optimal f of the system you’re using.

Of course, the market will limit the trading size we can reach without influencing it, but as theory, these methodologies are real wealth multipliers for the serious trader.

To employ a two-tier methodology in the real market, you will need to be fully organized, have an appropriate spreadsheet to follow the trade results, have two split balances, and compute the size of the coming positions.

Categories
Forex Videos

Position Sizing Part 12 – Two Tier Optimal F – I

Position Sizing XII- Two-Tier Optimal f Part I

 

In our past video presentation about the Kelly Criterion and Optimal f position sizing methods, we have learned that using these position size methods bring the maximal growth factor to any trading account using a profitable strategy. But, optimal fraction position sizes also presented drawdowns of over 90%, making them unsuitable for any trader except for a robot.

Nevertheless, optimal fraction position size shows the fastest growth rate, meaning achieving a determined goal in minimal time. Consequently, if we were to devise a methodology to reduce drawdown at tolerable levels, diminishing the risk of ruin to zero, and boost the basic 1-percent risk equity progression to unseen levels, we could take advantage of a terrific methodology and produce psychologically acceptable growth optimization.  That is the object of the current video presentation. 

To make this analysis, we used the currently available data from our Live trading signals. That way, our study is as close to a real system as it can be. 

At the time of this writing, we have delivered 203 signals since March 20. Thus, about 51 signals per month, that is, 2.5 signals per trading day. The general statistics were:

STRATEGY STATISTICAL PARAMETERS: 
 Nr. of Trades        : 203.00
 Percent winners      : 65.52%
 Profit Factor        : 2.10
 Average Reward Ratio : 1.11
 Sample Statistics:      
 Mathematical Expectation : 0.3800
 Standard dev            : 1.3682
VAN K THARP SQN           : 2.7774

To find the safest optimal f, we did a Monte Carlo resampling of the original trade sequence. The resampling was done with what would have been one trading year using 10,000 resamples, supplying us with 10,000 years of synthetic market activity.

The resulting optimal fractions were plotted and shown below. We can see a Gaussian bell curve centered at 0.62.

But the average f is not a safe fraction because 50% of the values lie below the average. We seek an optimal f that guarantees as much as possible that no future values lie below it.

Opt f Key Values   
       max: 91.33%
   average: 62.58%
       min: 23.57%

Thus, to be safe, we want the minimum f, which is 23.57%. 

The Live Trade Signals using a fixed 1% risk per trade

To create a reference from which to compare our proposal, we have computed what would have been four years of trading activity using our Live Signals

The next figure shows the equity curves resulting from the 10K resamples, corresponding to a 1% dollar risk on each trade and over what would have been approximately one year of activity.

We see that starting with $10,000, the end capital of the equity curves range from $19,967 up to over $140,000, although the average ending capital is $53,122.

      Average ending Capital : 53,122.77
          Max ending Capital : 154,077.50 
           Min ending Capital: 19,967.23

 

From these data, we can also create an interesting statistic to answer the question of how many trades are needed to reach a determined goal. In this case, we present the Trades to reach 10X. The curve results from computing this value on all 10K equity curves and computes the odds relative to the number of trades.

In the case of the 1% risk, we see that the average time to reach 10X, the initial capital is about 650 trades, with a minimum of 400 days and a maximum of 1000 days. Not bad at all. But that can be improved dramatically using a mix of conservative and aggressive position sizing.

The optimal F Positioning Strategy

Using the optimal f positioning strategy, a bold investor will navigate in the turbulent waters of one of these equity curves:

The chart is on a semi-log scale because the range of values is too vast to handle on a linear chart. We see that the y-axis show scientific notation, but do not fret. The number of trailing zeros of the equity corresponds with the last digit is in superscript. For instance, in the previous figure, we see that the ending capital after one year of trades ranges from below $1,000 to a theoretical value with 22 trailing zeros.

The next figure shows the cumulated probability of reaching a certain number of trailing zeros:

We observe that a small portion of the equity curves end below 4 digits, meaning they are net losers.  The following data clarifies this by showing relevant figures:

      Average ending Capital : 517.14 billion
          Max ending Capital : 43,096,478,975,341.38 billion 
           Min ending Capital: 153.51
     Capital ending above 517 billion : 55.63 % of the equity curves
     Capital ending above 1 million :  92.51 %
     Capital ending above 100,000 : 92.96 %
     Capital ending below 10,000 :  6.8507 %
     Capital ending below 5,000 :  3.4253 %

And, next, the chart that shows the power of trading using optimal f. The chart shows the time to reach 10X the initial capital,

The graph shows that the average time to reach 10X growth (50% probability) went from about 620 days down to 42 days. The same growth achieved in one-tenth of the time!

The Two-tier risk system.

The proposed system aims to profit from the rapid growth of an optimal fraction position sizing while minimizing the risk of blowing up the account. In this video, we will outline the idea and, in the following videos, will present its results and also the optimal requirements to make it work and minimize the risk.

The critical value here is the percentage of times the optimal f ends below 10K in a determined period.  Here we will take 80 trades instead of one-year of trading, as this shows a more realistic use in a Two-tier system.

40-trade figures:

    Average ending Capital : 213,793 
        Max ending Capital : 5,127 billion 
         Min ending Capital: 154

     Odds of

             Ending above 46,474    : 51.74 %
             Ending above 1,000,000 : 29.61 %
             Ending above 100,000   : 62.82 %
             Ending below 10,000    : 13.35 %
             Ending below 5,000     : 10.40 %

The key idea is based on the odds of the trading capital ending below the initial 10K value. In the case of sequences of 80 trades, we see that the odds are roughly 13.3%, and the odds of ending below 50% of the original figure is just 10.4%. 

That is the risk for the opportunity to have an average of $213,793 ending capital, which is over 21X. The risk/ reward ratio of the proposition is 214/5, which is 43. That means we can be wrong up to 42 times and recover after just one good trading sequence. Our initial proposal is to take 1/4 of the capital to allocate for an opt f positioning strategy.

The Two-tier optimal f proposal 

  1. Take 25% of your current trading balance and use it for the optimal f strategy. Use the rest 75% for 1% risk trades or let it be in cash. (more variations possible)
  2. Let computations of the optimal f strategy be separated in its own pocket to compute the subsequent trades.
  3. The account will be rebalanced after a determined goal has been achieved or goes below a predetermined level ( in our case, we will rebalance if the Optf part drops below ¼ of the initial capital on each cycle).
  4. After rebalancing, a new cycle of 25%-75% allocation begins.

In our next video, we will deal with the results and trade parameters of this combined strategy, as well as our advice on which features are desirable to make this strategy optimal.

 

Categories
Crypto Daily Topic Forex Daily Topic Forex Videos

Position Sizing Part 1 Drawdown – Why You Keep Blowing Your Account!


Position Sizing. Drawdown- The dark side of Trade

 

This video will be dedicated to explaining the relation between performance and drawdown.  It is an essential topic since most of the trading community ignores the fact that the drawdown of a trading strategy or system is not an independent value. It is position sizing dependent. Furthermore, the profitability of a trading system is also dependent on the size of the position.

Imagine several investors trying to choose a copy-trading service, and you need to rank the potential candidates. Which parameter do you think most of them would choose to grade the quality of that group of systems?  Total returns? Average trade return? Percent winners? Drawdowns?

The majority would rank them by total returns, without any further analysis on how the returns were obtained. This could lead them to select the worst candidate instead. 

The fact is that returns and risks are interlinked in all investments.  You cannot increment returns without increasing the risk. Consequently, traders and investors must analyze both simultaneously.

Let’s look at the characteristics of returns vs. drawdown using a simple position sizing method applied to the trades of one year using a sound system such as our Live Signals Service. 

Let’s see first how this system behaves using just one mini-lot size, which corresponds to $1 per pip gained or lost. 

The figure corresponds to a trader having $1,000 initial capital, using a constant one micro-lot trade. To compute the maximum drawdown, we created 10,000 synthetic account paths using Monte Carlo resampling. The corresponding max drawdown distribution is shown below.

The Average Max Drawdown is 1.94 % with a very tiny possibility a 8% drawdown.

Let’s see how this system performs under increasing lot sizes:

1 mini-lot size

The corresponding drawdown curve  is shown below:

In this case, the average max drawdown goes to 11.77%. But, there is a 30% chance (about one in three) that max drawdown goes to 20%, and in about 2.5% of the occasions, the max drawdown went as high as 40%.

Let’s use now one lot

And the corresponding max drawdown curve is

In this case, the average max drawdown is 40%, but there is a 20% chance of a 65% drawdown and a 5% chance of an 85% drawdown.  40% drawdown is about the limit a usual trader can endure, but inevitably a 65% drawdown would force most traders to stop trading, even when we can see that the system is profitable.

We can see that even using a constant trading size, the drawdown grows with the position size. Of course, we can observe that the returns also grow. Furthermore, profits grow at a much higher rate than risk.  From the preceding examples, any astute observer can notice that moving from one micro-lot to one lot, 1-year returns went from $1,158 to $115,840, a 100X increment, while the drawdown moved from about 2% to 40%, a 20X increase.  

Therefore, the theory behind position sizing is aimed at optimizing both return and drawdown. Of course, there is no single solution to this problem. The solution must fit the particular psychology of the trader. 

Categories
Crypto Daily Topic Forex Daily Topic Position-sizing Guide

Forex Academy’s Guide to Position Size

After completing our series on position size, we would like to summarize what we have learned and make conclusions.

Starting this video series, we have understood that position size is the most crucial factor in trading. On Position Size: The most crucial factor in trading, we learned that deciding the position’s size is not intuitive. In an experiment made by Ralf Vince using forty PHDs with a system with 60 percent winners, only two ended up making money. Thus, if even PHDs couldn’t making money on a profitable strategy, Why do you think you’re going to do it right? You need to follow a set of rules not to fool yourself.

The Golden rules of trading

The trading environment seems simple, but it’s tough. You have total freedom to choose entries, exits, and the size of your trade. Some brokers even offer you up to 500x leverage. But you’re not free from yourself and your psychological weakness, Therefore, you need to set up a set of rules to stop the market to play with you. In “The golden rules of Forex trading” III, and III, we propose specific rules it is advisable to follow to succeed in trading. These include never open a position without knowing your dollar risk, defining your profits in terms of reward/risk factors, and limit your losses to less than 1R, a risk unit. We also advise to keep a record of trades and identify your strategy’s basic stats: Average profit, the standard deviation of the profits, and drawdown.

The dark side of the trade

In our video, The Dark Side of Trade, we explain the relation between position size, results, and drawdown, showing that position size plays a vital role in both aspects. In the video, We show that while results grow geometrically ( 100x), drawdown increase arithmetically, 10X. But the lesson here is that the size of the position must be chosen with the drawdown in mind. That is, we should choose a position size so that the max drawdown could be limited to a desirable size. 

The Gamblers Fallacy 

on Position Size – The Gamblers Fallacy, we explain why it is wise to consider position sizing independently of the previous results. We explain that a new trading result does not usually depend on prior results; thus, modulating the trade size, such as do Martingale systems, is not only useless but dangerous because winning or losing streak ends are unpredictable.

The Advantage!

Even when most retail traders don’t realize it, the “how much” question is the advantage or critical factor to achieve your trading goals because the size of the position defines both the trading results and the risk, or max drawdown, in your trading portfolio. We mention in Position Sizing III- The Advantage that in 1991 the Financial Analyst Journal published a study on the performance of 82 portfolio managers over a 10-year period. The conclusion was that 90% of their portfolio differences were due to “asset allocation,” a nice word for “investment size.”

In this article, we also presented the simplified MCP model to compute the right lots to trade as:

M = C/P, where M is the number of lots, C is the (Cash at) Risk, and P is the Pip distance from entry to stop-loss. The cash will depend on the percent you’re willing to risk and the cash available in your trading account. 

Equity Calculation Models

In our next video of this series, Position Size IV – Equity Calculation Models, We explain several models to calculate several simultaneous positions: 

  • The Core Supply Model, in which you determine the nest trade’s size using the remaining cash as the basis for computing C.  
  • The Balanced Total Supply Model, in which C is determined by the remaining cash plus all the profits secured by a stop-loss.
  • The Total Supply Model, in which the available cash is computed by adding all open position’s gains and losses plus the remaining cash.
  • The Boosted Supply Model uses two pockets: the Conservative Money Pocket and the Boosted Monet Pocket. 

The Percent Risk Model

The Percent Risk Mode is the basic position sizing model, barring the constant size model. on Position Sizing Part 5, we analyze how various equity curves arise when using different percent risk sizes and how drawdown changes with risk. Finally, we presented an example using 2.5 percent risk for an average max drawdown of 21 percent.

The Kelly Criterion

Our next station is  The Kelly Criterion. The linked article explains how the Kelly Criterion is used to find the optimal bet amount to achieve maximal growth, based on the winner’s percentage and the Reward/risk ratio. The Kelly criterion was meant for constant reward bets, and as such, it cannot be used in trading, but it tells us the limit above which the size of the position increases the risk while decreases the profits. We should be aware of that limit considering that most retail Forex traders trade beyond it and blow out their accounts miserably.

Optimal fixed fraction trading

Optimal fixed fraction trading, Optimal f for short, is the adaptation of the Kelly criterion to the financial markets. The optimal f methodology was developed by Ralf Vince. In Position Size VII: Optimal Fixed Fraction Trading, we explain the method and give the Python code to find the Optimal fraction of a stream of trading results. The key idea behind the code is that the optimal fraction is the one that generates the maximal growth factor on a set of trades. That is, Opt F delivers the maximal geometric mean of the trading results.

Optimal f properties

But nothing in life seems easy. Optimal f has dark corners that we should be aware of. In Position size VIII – Optimal F Revisited, we analyze the properties of this positioning methodology. We understood that, due to the trading results’ random nature, we should find a safer way to find the optimal fraction to trade. This article presented a safer way to compute it using Monte Carlo resampling and take the minimum value as optimal f. This way, the risk of ruin is minimized while preserving the strong growth factor Opt f provides.

Market’s money

Traders define their recent trading gains as “market’s money. A clever way to profit from the usual winning streaks is to use the market’s money to increase the position size in a planned manner. In Position Sizing IX: Improving the Percent Risk Model-Playing with market’s money,

we present the N-Step Up position sizing strategy, an innovative algorithm that adds the gains obtained in previous trades to boost the profits. This way, it could increase the profitability by 10X with a max drawdown increase of roughly 2.8X, from 8.02% to 22.5%. This article analyzes four models: one, two, and three steps with 100% reinvestment and three steps with 50% reinvestment.

Scaling in and out

Our next section, Position sizing X: Scaling-in and scaling-out techniques, is dedicated to scaling in and out methods. Scaling in and out are techniques to increase the position size while maintaining the risk at bay. They work best with trending markets, for instance, the current crypto and gold markets. The main idea is to use the market’s money to add to our current position while trailing our stops. 

System Quality and Max Position Size

System quality has a profound influence over the risk, and, hence, over the maximum position size, a trader can take. In Position Sizing XI- System Quality and Max Position Size Part I and part II, we presented a study on how the trading strategy’s quality influences the maximum position size a trader should take. To accomplish this, we created nine systems with the same percentage of winners, 50 percent. We used Van K Tharp SQN formula to compute their quality and adjusted the reward to risk on each system to create nine variations with SQN from 1 to 5 in 0.5 steps. 

Then, since traders have different risk limits, we defined as ruin, a max drawdown below ten preset levels from 5 to 50 in 5-step.   

 Our procedure was to create a Monte Carlo resampling of the synthetic results, which simulated 10 thousand years of trading history on each system.  

Since a trading strategy or system is a mix between the trading logic and the trader’s discipline and experience, we can estimate that the overall outcome results from the interaction of the logic and the treader. Thus, we can accurately associate a lower SQN with lowing experienced traders and higher SQN to more professional traders. The study’s concussions suggest a limit of 0.5 percent risk on newbies, whereas more experienced traders could boost their trading risk to an overall 4.5%.

Two-tier Optimal f Positioning

After this journey, we have understood that Using Ralf Vince’s optimal f position sizing method means maximally growing a portfolio. Still, the risk of a 95% drawdown makes it unbearable for any human being. Only non-sentient robots can withstand such heavy drops. In Position sizing XII- Two-tier Optimal f, we analyzed the growth speed of a 1% risk size, and we compare it with the Optimal f. We were interested in the average time to reach a 10X final capital. We saw that on a system with 65.5% winners and a profit factor of 2 ( average Reward/risk ratio of 1.1), using 1 percent risk, it would take650 days ( about two years) on average, whereas, using optimal f sizes, this growth was reached in 42 days, less than one-tenth of the time!.

The two-tier Optimal f positioning method uses the boosted supply model, and is a compromise between maximal growth and risk. The main objectives were to preserve the initial capital while maintaining the Optimal f method’s growth characteristics as much as possible.

The two-tier optimal f creates two pockets in the trading account. 

  1. The first pocket, representing 25% of the total trading capital, will be employed for the optimal f method. The rest, 75%, will use the conservative model of the 1 percent model.
  2. After a determined goal ( 2X, 5X, 10X, 20X), the account is rebalanced and re-split to begin a new cycle.

In Position sizing XII- Two-tier Optimal f part II, we presented the Python code to accurately test the approach using Monte Carlo resampling, creating 10,000 years of trading history.

 The results obtained proved that this methodology preserved the initial capital. This feat is quite significant because it shows the trader will dispose of unlimited trials without blowing out his account. Since the odds of ending in the lowest possible scenario are very low, there is almost the certainty of extremely fast growths.

Finally, we also analyzed other mixes in the two-tier model, using Optf / 10, Optf/5, and Optf/2 instead of 1%, with goals of 10X growth to rebalance. These showed extraordinary results as well while preserving the initial capital. B.

Drawdowns

The trader should also consider the drawdowns involved before deciding which strategy best fit his tastes because, while this methodology lowers it, in some cases, it goes, on average, beyond 60%. We have found that the best balance between growth and risk was the combination of 75% Optf/10 and 25% Optf, which gave an average final capital of $21.775 million with an average drawdown of 37%.

To profit from this methodology, the trader must ensure the long-term profitability of his system. Secondly, he must perform a Monte Carlo analysis to find the lowest optimal f value. Finally, he should create an adequate spreadsheet to follow the plan.

Final words

After reading all this, we hope you know the importance of position sizing for your success goals as a trader.

One caveat: We have left some topics out, such as martingale methods, which many traders use and are the main cause of account blown out. Please adhere to the philosophy that position sizing should be thought of as a tool to reach your goals and handle your risk and drawdowns. As shown in The Dark Side of the trade, position sizing should be separated from the previous trades’ results.

Categories
Forex Videos

Forex Position Sizing 11 Part 2

 

Forex Position Sizing 11 Part 2

In Part I, we have discussed how position size should depend on the trading system’s quality and how that quality can be assessed. Then, we presented a practical method to simulate nine different systems with SQN from 1 to 5, to be used in our position size simulator. In part II, we will explain how to simulate 10,000 years of trades and the maximum position size required for a desired max drawdown level.

Risk of Ruin

The term “ruin” is usually associated with the burn-out of a trading account. In this case, we will associate it with the odds of reaching a determined level of drawdown. The level at which a trader no longer would trust the system or considers himself unfit to trade.
Since this drawdown figure is particular to every trader, we will consider drawdown points starting from 5% and up to 50% in 5% steps.

The study

We have designed a computer simulation using Monte Carlo resampling of the original 10,000 trades computed for every system created. The simulation will create 10,000 resamples of 500 trades, each simulating one year of activity, thus creating 10,000 years of market activity.
We initially created a range of position sizes, starting from 0.2% up to 10% in 0.2 steps. As we saw that the max position sizing was below 5%, we have created a second round using position sizes from 0.2% to 5% in 0.1% steps and defined as ruin if in more than 1% of the 10K simulations the max drawdown reached the predefined level (from 5% to 50%). The table shows the max position size allowed for a defined max drawdown (ruin).

We have made a second simulation using 10% instead of 1% as the trigger level. Thus, the later table summarizes 10% odds (1 in 10 years of activity) that the max drawdown of a system touches the predefined levels.


Discussion

Considering both tables, a novice trader should be cautious and go to the safe side while learning the job. Thus, If I were new to trading, I’d assume the system’s quality to be low for two reasons. One, My system is the combination of technical signals and my interpretation of them and random factors. Also, the theoretical results of a back-tested system are always higher than the real-time results. Two, being new in this field, I still do not know my psychological reactions to losing streaks and drawdowns.

Thus, my first choice would be SQN 1 and 10% drawdown using the second table, which gives me one year in ten of 10% drawdown and one in 100 years of a 15% drawdown, but usually much less than 10%. That will mean my preferred position size will be 0.5% risk on the current account balance. After achieving 100 live trades and experience with drawdowns, we should recalculate our strategy’s parameters and consider a new position size.

A trader with 2-3 years of forex experience would prefect his strategies and reactions to the market action. Thus, an SQN 3 system is within reach. He would also accept up to 25%-30% drawdown risk. For a trader like this, a 2.5% risk would be quite reasonable.

Successful traders with over ten years of forex experience, combining fundamental and technical analysis with his trained intuition, will likely reach an SQN 4 level and taking the slight risk of 40% drawdown. To successful traders, a position size of 4-4.5% is acceptable if they feel the right pair begins moving as they planned.

As we can see, your personal experience, risk tastes, and system performance are the variables you should consider when deciding which position size best fit your needs.
Finally, this study considers that the trades are made one by one; therefore, the position size should be split into the number of open trades usually taken by the system.

Categories
Forex Videos

Forex Position Sizing 11 Part 1 – System Quality and Max Position Size!

Position Sizing XI- System Quality and Max Position Size

In this video presentation, which will be made in two parts, we will analyze the role the quality of a system has over how much risk we can have on trades, and compute the position sizes needed to avoid surpassing a desired max drawdown level.
It seems quite understandable that the system’s quality is directly correlated to the amount of potential profits it can deliver. What is less evident to many traders is it is also related to the drawdowns, and thus, to the risk amount it can withstand before drawdown goes below the trigger point beyond which a trader feels it is too much.

Measuring the quality of a system

To evaluate the quality of a system, we need to acquire a certain amount of past trades, so as to have enough data points to apply simple statistical tests. It is recommended to have a minimum of 100 trades, although as more trades are collected, the statistical results would be much accurate.

There are several ways to compute the quality of any system. The more common takes the ratio of the mathematical expectation (ME) over its standard deviation (SD) multiplied by the squar e root of n, the number of trades. This method’s results, though, vary with the n. For the purpose of evaluating the performance of trading systems, it is better just to take the ME/SD ratio and multiply it by ten. This is the method proposed by Van K. Tharp, which he calls System Quality Number (SQN)

SQN = 10 x ME/SD

SQN makes the system quality evaluation Independent of the number of trades. The only requirement is to ensure a collection of at least 100 trades.

Normalising the data

Of course, for this method to have sense, the data collected has to be normalized. That means, all trades must be normalized to one trading unit, that is, all trades must be taken at the same position one lot ( or one mini, micro-lot). To further normalize it we should take the reward/risk ratio instead of the raw profits.

Let’s say we have a list of trades, made using the same position size. Thus the collection can be normalized with the following Python code:

loss = [ x for x in trades if x < 0]    # the collection of all losing trades
avloss = -np.mean(loss)    # taking the average of loses ( sign changed)
norm_trades = [trade/avloss for trade in trades]

Now, we have all trades normalized for the application of the average and standard deviation. Furthermore, the average obtained will reflect the expected one-dollar-risk average profit on every trade.

Position Size and Downside Potential

in our previous videos on position sizing, we have already shown that all things being equal, the position size is what determines the max drawdown of a determined sequence of trades. Being capital preservation the primary goal of every trader, knowing how much downsizing will deliver a specified system is critical to optimize the returns, but taking care drawdowns do not pass the psychological point beyond which the trader considers the system has failed.

Simulating a trading system

To generate a synthetic trading system of the desired quality, it is relatively simple in Python. All trading systems can be modeled by two parameters: The winners’ percent and the payoff, or average reward/risk ratio. To make it more standardized, we have set the percent winners in all the generated systems to 50%, modifying only the payoff.

We created nine systems with SQN figures from 1 to 5 in 0.5 steps. The first system is of low quality, but perfectly tradeable. In fact, we consider SQN 1 to be an average trading system. SQN 2 is already a very nice system. All systems beyond SQN 2 are great systems, and if by chance you own an SQN 5 type system, please keep it safe because it is a real gold mine.
The basic Python code to make 10,000 trades with 50% winners is:

t = np.random.binomial(1, 0.5, 10000) # Creating a random sequence of heads and tails

This is half the job. We need to add a payoff to complete it. In the case of SQN 1 this is the code:

payoff = 1.27
trades = [payoff * x if x > 0 else -1 for x in t ] # creating the W-L sequence

 

Please note that, even when we aimed at 50% profitable trades, the inherent randomness of the process resulted in only 49.09% of them profitable. Also, we used the same sequence for the payoff application and get the different SQN figures; this makes this analysis more robust, as only one parameter was changed.

 

Categories
Forex Videos

Forex Position sizing Part 10 – Scaling in and scaling out techniques!

 

Position sizing X: Scaling-in and scaling-out techniques

Scaling in and scaling out are usual techniques to increase the position while maintaining the risk stable. In this video presentation, we are going to explain how to do scaling in and out 3properly.
Scaling-in can be thought of as a means to reduce the risk while increasing the size of the position. Let’s say that you have a trading system optimal with a 10% total position sizing, and you expect to have no more than four open positions at a given time. Under these premises, the risk per position is 2.5%, but this may bring the overall drawdown to over 25%, which is too high for your tastes.

Pyramiding (scaling in) allows you to approximate your position to 2.5 % while using the market’s money to lower your risk to 1.25%, so your drawdown is reduced accordingly.

Scaling-In

There are several ways to scale in. The basic idea is to add another position to an open trade after a determined profit milestone has been reached. This milestone is usually linked to volatility ( or range). Consequently, the stop-loss settings should also be related to volatility. Traders also associate it with new breakouts after consolidation or any other trend continuation signal. Finally, traders could consider adding a new position after the price moves a determined amount in his favor. One way is to wait for a 1R move, move the stop to BE, and add a position.
For example, let’s suppose a trader has a $10,000 account and wants to trade the EURUSD pair, actually trading at 1.1265. On the chart, the trader sees that the 4H range is 27 pips; thus, he sets the stop-loss setting to 81 pips (3X the 4H range). Let’s suppose that his analysis led him to conclude that the following action will completely fade the last upward movement. So, he opens a short trade (sell) with a profit target to 1.885 and an initial stop-loss of 1.1345 for about 3.3R trade. He begins to risk $125, which is 1.562 lots. The price starts moving in his favor, so he sets a new sell order for another 1.562 lots 27 pips below the open, another sell order 27 pips below this second sell order, and a final sell order at 27 pips below the previous order.
At the same time, the stops are moved 27 pips down every time a sell order is triggered. After the third trade, the trader has 4,6 lots., The last one has a $125 risk, the previous one has currently $83.3, and the initial order shows a $41.66 risk. That is so because the stop-loss was moved progressively from its initial value in 27 pip steps. So, even when the total risk should have been $375, the position has tripled after the pyramiding, but the risk has just doubled ($250), which is 2.5% risk the trader was seeking. Of course, there are plenty of variations on this theme. We might choose to split it into more steps 3, 4, 5. Or add positions at larger advances in our favor.

Scaling out

At some point, if the trader continues to add lots to his position, he may risk a swift movement against his position, wiping all then gains. Scaling out is the trader’s right method to plan ahead of time the potential support/resistance zones and set these levels as partial profit targets. Scaling out may be applied using the same volatility concepts. After the last entry, the trader may start scaling out when another measure of volatility or range has been reached, but technical levels should also be analyzed, so a blend of both can be made to make them optimal.

Scaling-In techniques

Scaling-In can be initiated using the following methods:

  1. Volatility/range based
  2. A percentage of the initial risk
  3. Successive continuation signals of the prevailing trend, after consolidation or rejection.
  4. A new entry every time the stop is moved to break-even for risk-free rides.
  5. It can be combined with profit targets to create a series of pyramiding entries: For instance, on the buy-side: 1.-Buy, 2.- Sell at resistance, 3.- buy 2,3,4… units at the pullback. Conversely, so on the sell-side, Sell, buy on support and sell appropriate 2,3,4… units at pullups.

Also worth mentioning is, traders should limit the total number of scale-ins within the desired risk limits, and never above the optimal f of the strategy.

Pyramiding works best on trending markets. But, it can be applied to any large movement to lower initial risk, and only add more positions if the trade continues moving in the desired direction.

Categories
Forex Videos

Position Sizing IX: Improving the Percent Risk Model-Playing with market’s money

 

Position Sizing IX: Improving the Percent Risk Model-Playing with market’s money

 

One way to improve the returns of a position sizing strategy without increasing our capital risk is to play with the market’s money. In this video, we are going to develop this idea as a way to improve the percent-risk model.

The market’s money

We define as “market’s money” the gains resulting from the profits of previous trade or winning streak. This is a mentality shift. Instead of viewing recent profits as your own money, you momentarily consider them as a gift of the market to increase the trading size riskless. This has a slight resemblance to moving your stops to break even and let the trade go on. After that action, the rest of the trade evolution is riskless. The concept of the market’s money is especially attractive when the trading strategy has a high percentage of winners because high probability strategies show a higher likelihood of winning streak versus losing streaks.
There are several ways to use this concept, but in this video, we will focus our attention on its use with the Percent-risk model. Precisely, we will use the money gained in the previous successful trades to increase the size of the next trade without increasing the risk of our base money.

The N-Step up position Sizing Strategy

The N-Step-up method uses the N previous successful trades’ gains to increase the size of the next trade. After N trades, the profit is added to the general wallet, to start a new cycle. If there is a loss, the cycle resets and begins again.

The flowchart of this methodology is shown below.
The key idea is that, even when it ends at a loss in the N step, the risk incurred is the only the risk made in the starting position, But if the N-cycle ends as a win, on a 1R reward/risk situation, it will end up with R+2R+3R+… NR gains. On a 2R reward/risk strategy, it will be 2R+6R+ 14R +…
We will try this methodology using the Live Signals Service performance and 1% basic risk to see how the N-Step Up improves it.

Original 1% Strategy

The graph below shows the equity curve growth using a 1% risk over one year of trading, assuming 2 daily trades on average.

When we use Monte Carlo resampling to get 10,000 different 1-year histories, we get the following information.

Average ending Capital: 75,359.86
Max ending Capital : 219,145.26
Min ending Capital: 26,811.62

Probability of Capital ending above 78,604: 43.98 %
Probability of Capital ending above 26,812: 99.99 %
Probability of Capital ending above 10,000: 100.00 %

In the figure below, we can see the likelihood of max drawdown for the 1% Risk model:

Average Max Drawdown: 8.02 %
Maximum Max Drawdown: 27.46 %
Min Max Drawdown: 3.67 %

Probability of a 10% drawdown: 15.44%
Probability of a 20& drawdown: 0.03%
Probability of a 30% drawdown: 0.00%

We can see that the expected max drawdown is 8.38%, with a one in five years ending at 10% and almost no chance to reach 20 percent. Let’s see how this can be improved with one, two, and three N-Step cycles.

The below chart shows the original, plus 1-, 2- and 3-step up position sizing strategies, using semi-log scales to make them fit together in a single chart.

We can see that the advantage of using the methodology is evident, as the 3-Step-up sizing strategy reaches an ending capital of up to one order of magnitude higher (10X), as compared to the basic 1% Risk method.

Let’s see how they perform regarding returns and drawdowns:

1-Step Up Return Stats:

Average ending Capital: 236,427.55
Max ending Capital : 1,306,952.10
Min ending Capital: 34,015.66


1-Step Up Drawdown figures:

Average Max Drawdown: 13.29 %
Maximum Max Drawdown: 33.94 %
Min Max Drawdown: 5.64 %

Probability of a 10% drawdown: 86.21%
Probability of a 20& drawdown: 4.15%
Probability of a 30% drawdown: 0.00%


2-Step Up Return Stats:

Average ending Capital: 625,846.08
Max ending Capital : 8,601,130.02
Min ending Capital: 53,941.54


2-Step Up Drawdown figures:

Average Max Drawdown: 18.02 %
Maximum Max Drawdown: 43.04 %
Min Max Drawdown: 8.31 %

Probability of a 10% drawdown: 99.59%
Probability of a 20& drawdown: 28.29%
Probability of a 30% drawdown: 0.03%


3-Step Up Return Stats:

Average ending Capital : 1,597,715.25
Max ending Capital : 34,224,341.81
Min ending Capital: 53,439.67


3-Step Up Drawdown figures:

Average Max Drawdown: 22.52 %
Maximum Max Drawdown: 58.01 %
Min Max Drawdown: 9.79 %

Probability of a 10% drawdown: 99.99%
Probability of a 20& drawdown: 64.23%
Probability of a 30% drawdown: 0.63%

A variation of this strategy could be made by re-investing only 50% of the profits. This method will significantly lower the returns, although it will also smooth the equity curve. As an example, let’s see the reward and risk figures of a 3-Step Up with 50% reinvestment:

Average ending Capital: 199,952.02
Max ending Capital : 1,181,977.34
Min ending Capital: 34,950.58

Drawdown:

Average Max Drawdown: 12.10 %
Maximum Max Drawdown: 31.89 %
Min Max Drawdown: 5.37 %

Probability of a 10% drawdown: 74.30%
Probability of a 20& drawdown: 1.94%
Probability of a 30% drawdown: 0.00%

We can see that this method is quite similar in performance and drawdown to the 1-Step Up with 100% re-investment, but is not worthwhile, since it reduces the returns to half, while drawdown is only lowered from 13.29% to 12.1%.

Conclusions

We can see that even 1-Step up improves substantially the performance of a strategy (about 4X) with only an increase in the drawdown from 8.% to 13.3%.
We can see also that the best choice for this strategy is 2-Step Up, with a balanced mix returns (average ending equity of $625,846 over an average Max Drawdown of 18%); this is a 10X improvement from the basic 1% sizing strategy with only about 2.2X of drawdown. But, aggressive traders may choose the 3-Step Up strategy, which doubles the 2-Step Up model’s returns with an increase in drawdown from 18% to just 22.5% ( a 25% increment).

Categories
Forex Daily Topic Forex System Design

Designing a Trading Strategy – Part 5

Introduction

In a previous article, we presented the effect of incorporating additional rules in a trading strategy during the design process. In particular, we intuitively proposed a rule that opens a position using a size considering a percentage level of equity in the trading account.

In this educational article, corresponding to the last part of the series dedicated to designing trading strategies, we will expand position sizing concepts.

Position Sizing

The determination of the position size in each trade corresponds to the third element of a trading strategy. This decision will determine the capital that the investor will risk in each trade.

The position sizing corresponds to the volume committed in each trade. This volume can be the number of contracts, shares, lots, or another unit associated with the asset to be traded. The complexity of the position sizing is based on the efficient determination of the position to ensure maximum profitability with an acceptable risk level for the investor.

Programming the Position Sizing

To visualize the difference between some methods of position sizing, we will apply the criteria to the strategy of crossing moving averages analyzed in previous articles:

Fixed Size: This method is probably the most typical when developing a trading strategy. The rule consists of applying a fixed volume per trade. For example, consider the position size of 0.1 lot per trade, the code for our strategy is as follows:

extern double TradeSize = 0.1;

   //Open Buy Order, instant signal is tested first
   if(Cross(0, iMA(NULL, PERIOD_CURRENT, Period1, 0, MODE_LWMA, PRICE_CLOSE, 0) >
 iMA(NULL, PERIOD_CURRENT, Period2, 0, MODE_SMA, PRICE_CLOSE, 0))
 //Moving Average crosses above Moving Average
   )
     {
      RefreshRates();
      price = Ask;
      SL = SL_Pips * myPoint; //Stop Loss = value in points (relative to price)   
      if(IsTradeAllowed())
        {
         ticket = myOrderSend(OP_BUY, price, TradeSize, "");
         if(ticket <= 0) return;
        }
      else //not autotrading => only send alert
         myAlert("order", "");
      myOrderModifyRel(ticket, SL, 0);
     }
   
   //Open Sell Order, instant signal is tested first
   if(Cross(1, iMA(NULL, PERIOD_CURRENT, Period1, 0, MODE_LWMA, PRICE_CLOSE, 0) <
 iMA(NULL, PERIOD_CURRENT, Period2, 0, MODE_SMA, PRICE_CLOSE, 0))
 //Moving Average crosses below Moving Average
   )
     {
      RefreshRates();
      price = Bid;
      SL = SL_Pips * myPoint; //Stop Loss = value in points (relative to price)   
      if(IsTradeAllowed())
        {
         ticket = myOrderSend(OP_SELL, price, TradeSize, "");
         if(ticket <= 0) return;
        }
      else //not autotrading => only send alert
         myAlert("order", "");
      myOrderModifyRel(ticket, SL, 0);

Percentage of Risk per Trade: this criterion considers the account’s size given the account’s capital and estimates the stop loss distance needed to execute the trade according to the devised strategy. The common practice is to risk 1% of the equity currently available in the trading account. In this case, the implementation of the strategy is as follows:

double MM_Percent = 1;
double MM_Size(double SL) //Risk % per trade, SL = relative Stop Loss to
 calculate risk
  {
   double MaxLot = MarketInfo(Symbol(), MODE_MAXLOT);
   double MinLot = MarketInfo(Symbol(), MODE_MINLOT);
   double tickvalue = MarketInfo(Symbol(), MODE_TICKVALUE);
   double ticksize = MarketInfo(Symbol(), MODE_TICKSIZE);
   double lots = MM_Percent * 1.0 / 100 * AccountBalance() /
 (SL / ticksize * tickvalue);
   if(lots > MaxLot) lots = MaxLot;
   if(lots < MinLot) lots = MinLot;
   return(lots);
  }

Position Sizing to Equity: this method executes the trading order according to the trading account’s equity. For example, the developer could place one lot per $100,000 in the trading account. This method will increase or reduce each transaction’s volume as the capital of the trading account evolves.

extern double MM_PositionSizing = 100000;
double MM_Size() //position sizing
  {
   double MaxLot = MarketInfo(Symbol(), MODE_MAXLOT);
   double MinLot = MarketInfo(Symbol(), MODE_MINLOT);
   double lots = AccountBalance() / MM_PositionSizing;
   if(lots > MaxLot) lots = MaxLot;
   if(lots < MinLot) lots = MinLot;
   return(lots);
  }

There are other methods, such as martingale and anti-martingale, discussed in a forthcoming educational article. For now, we present your definition.

  • Martingale: this rule is based on the money management of gambling. This method doubles the position size after each losing trade and starts at one position after each win. This method is extremely dangerous and should be avoided.
  • Anti-Martingale: this method opposes martingale, that is, doubles the position size after each winning trade and starts with a position after a losing trade. This method plays with what the trader considers to be “market’s money.” It is advisable to reset the size after a determined number of steps since the logic bets on a winning streak, which will end at some point. A 3-step is good enough to increase profits substantially. 4-step may be an absolute maximum on most trading strategies.

Conclusions

Position sizing is one of the critical decisions that the trading strategy developer must make. This choice will influence both the trading account’s growth and the capital risk to be exposed in each trade.

On the other hand, we have seen three examples of position sizing, representing a criteria guide that the trading strategy developer can use.

Finally, the developer of the trading strategy should explore and evaluate which is the best option of position sizing to use, taking into account the benefits of each of the impacts on the strategy’s execution.

Suggested Readings

  • Jaekle, U., Tomasini, E.; Trading Systems: A New Approach to System Development and Portfolio Optimisation; Harriman House Ltd.; 1st Edition (2009).
  • Pardo, R.; The Evaluation and Optimization of Trading Strategies; John Wiley & Sons; 2nd Edition (2008).
Categories
Forex System Design

Designing a Trading Strategy – Part 4

Introduction

In our previous article, we presented diverse types of filters, which work as additional rules. We also showed how to incorporate these filters into a trading strategy so that they can help improve its performance. 

In this educational article, the fourth section of the series dedicated to developing a trading strategy, we will discuss the profit management.

Profit Management

Profit management is an aspect of risk management that characterizes by its high level of complexity. The difficulty lies in that profit management seeks to preserve the profits obtained during the trade and also to prevent a premature exit from a market that still moves in a trend not over yet.

There are two available methods with which the trading strategist may manage the profits realized in an opened position. These are the trailing stop and the profit target order.

Trailing Stop

This type of order is dynamic. It moves only in the same direction of the position as it moves in the direction of the trend. In other words, a trailing stop will move upward in a buy positioning and downward in a sell trade. 

Another characteristic of the trailing stop is that it steadily advances during the life of the trade. It will never retrace when the price develops a movement against the trade’s direction.

The trailing stop has two components, which are detailed as follows:

  • Trailing stop: corresponds to the number of pips in which the stop loss order will move once the price moves in the trade direction. For example, if an order has set a 40-pip stop-loss, and the price advances 30 pips in favor of the trend, the new stop-loss will shift to 10 pips below the opening price. In general, there are several ways to establish a trailing stop: by fixed pip variation and by volatility using the Average True Range (ATR) indicator, or using SAR (Stop and reverse) stops. 
  • Step: this corresponds to the variation in pips that the dynamic stop will move behind the price when it has been activated.

Profit Target Order

The second mechanism to manage profits is by using a profit target order. This type of order is conditioned to the prince advance to a predetermined level. Likewise, compared with the trailing stop case, this order is not affected by the price decrease. However, its activation is subjected to the price reaching a specific level.

 A profit target order can be set using a specific number of pips, by a multiple of the Average True Range (ATR), a percentage of price increase ( or decrease), specific levels of resistance or support, or a specific dollar gain.

Using the Trailing Stop in a Trading Strategy

This example illustrates the impact of using a trailing stop with a two moving averages crossover strategy, corresponding to LWMA(5) and SMA(55) periods using the EURUSD pair.

 We have evaluated the performance of a 40-pip trailing stop with a variable step from 1 to 15 pips. The results are as follows.

In the table above, we distinguish the impact on drawdown reduction with respect to the base scenario, after the incorporation of a trailing stop rule to the MA crossover strategy. The base case, on which the exit rule is the MA cross in the opposite direction to the opening of the position, exhibits a 22.66% drawdown. However, the addition of trailing stops led to a reduced 10.44% drawdown and a net profit of -525.88 (USD).

Each trailing stop step variation scenario, including the base exit scenario of the trading strategy, is shown in the following figure.

Finally, we observe that a 7-pip step provides the lowest losses. We also highlight that as the step increases, the drawdown also increases, confirming the growing losses.

Conclusions

The application of Profit Management represents a significant challenge for the developer of the trading strategy. This complexity arises due to a wide variety of combinations that can be used to ensure the strategy’s gains as each trade moves in the trend direction.

In this context, as we have seen, the parameter setting to be considered, the trailing stop, profit target orders, or its combination, should be carefully evaluated before applying them to the trading strategy, to ensure the optimal settings.

In the next educational article, we will present the fifth and last part of the series dedicated to developing trading strategies that will explain the position sizing process.

Suggested Readings

  • Jaekle, U., Tomasini, E.; Trading Systems: A New Approach to System Development and Portfolio Optimisation; Harriman House Ltd.; 1st Edition (2009).
  • Pardo, R.; The Evaluation and Optimization of Trading Strategies; John Wiley & Sons; 2nd Edition (2008).
Categories
Forex Videos

Forex Position Sizing Part 8 – Optimal F Revisited – Why You Must Know it?

Position Sizing VIII – Optimal F Revisited: Why You Must Know it?

Now that we know the properties of optimal f, many of you may ask why we bother with this theme, that Optimal f is just a theoretical limit nobody would even approach.

Well, that may be true ( or not). Nonetheless, information is power, and knowing the optimal f of our strategy or system is quite informative. To begin with, maybe unknowingly, you are trading beyond the optimal point.

The next graph shows several distributions’ f-curves with different percent winners and payoff (reward/risk ratios) that may match different trading systems.


In the graph, we can see that one of them, shown in red, is unprofitable, so the best position size is zero. The first profitable distribution shows its optimal f in the vicinity of 5%. That may indicate the system is poor, and a trader will be beyond its optimal f when several simultaneous trades are taken.
By knowing the optimal f of the strategy we are using, we can assess its quality and figure if we breach the optimal trading limit, risking too much. Thus, optimal f will allow us to compare the real power of a trading system, measured by its geometric mean. The best attainable geometric mean will indicate which trading system to choose among a list of candidates.

A safer way to compute optimal f?

Ralf Vince defines Optimal f as the divisor of the biggest loss, the result of which is divided by the total cash to know how many pips or contracts to have in the next trade. But he assumes that the worst loss has already happened. It is much better for a trader to assume it has not happened.

Due to the properties of the random processes, the statistical properties vary from sample to sample. There is no way to assess the real value, and that is true for all statistical distributions of trading systems.

Montecarlo resampling

With the use of computers and high-level programming languages such as Python, we have on our hands the possibility to create variations of the sequence of trades we took in real life. The use of Monte Carlo resampling will show a more realistic picture of a trading system, signaling its limits and allowing us to be on the safe side.
As an example, let’s examine the performance of forex.academy’s Live Signal service.
The system shows the following basic stat parameters:
STRATEGY STATISTICAL PARAMETERS :

Nr. of Trades: 145.00
Percent winners: 67.59%
Profit Factor: 2.41
Reward Ratio: 1.16

The code to create several thousand different histories is simple. We use Cython to speed up the process. Cython translates Python into C:

The gethistories() function returns a container with the desired number of trade histories, and with the number of desired trades on each history. This function returns just wins and losses, not capital accumulation.

Using a fixed trade size of 0.1 lots, applied to 10,000 paths, resulting from the Monte Carlo resampling of the original path, on a hypothetical account starting with $5,000, we obtain the following graph, representing about one year of trade activity.


The “smoke cloud” seen is typical of resampling. In the figure, we can see that some paths are luckier than others. The less lucky path shows a final equity of about $19,200, while the most profitable goes over $29,700. This will result in differing optimal f values. That happens because the laws of chance change the sequence’s values; so, every sequence will have its optimal fraction. We look for the lowest optimal f, which will minimize the risk of overtrading.

Finding a safer opt f

This procedure will also help us better assess the optimal f. That means we will compute all the optimal f of the resampled paths. As shown in the histogram below, we obtain a distribution of values that follows a normal distribution.


We can, then, compute the mean, max, and min of the optimal f collection. In this case, are:

  • max opt f: 0.915
  • mean opt f: 0.672
  • min Opt f: 0.39

What we look for with this procedure is to find out the minimum opt f value, since we want to minimize the risk of overtrading. In this case, our min opt f is 0.39, which is large enough to be on the safe side when using multiple positions.
For computer geeks, this is the Python code to do optimal f

Using these three functions, we can easily compute the opt f values of a collection of trade sequences in just one line of code. The second line is just to plot its histogram.


Here rawHist is a container of these sequences or histories. Optf is used to store the values obtained.
Stay tuned! The next episodes will explore more position sizing strategies.

Categories
Forex Videos

Forex Position Sizing Part 7 – Optimal Fixed Fraction Trading!

 

Position Sizing VII – Optimal Fixed Fraction Trading (I)

In the previous video, we have discussed the virtues and drawbacks of the Kelly Criterion. But, the Kelly Criterion formula is valid for fixed outcomes, such as bets, in which the gambler wins or loses predefined amounts, and the probability of success is known. In this video, we are going to explain Ralf Vince’s Optimal f. Optimal f is Ralf’s way of applying the concept of Optimal Fixed Fraction to the markets.

Investing in the markets generates a sequence of wins and losses. If this sequence has a positive mathematical expectation when using a normalized risk unit, ” […] there exists an optimal fraction between zero and one as a divisor of your biggest loss to bet on each and every event.” (Ralf Vince, The handbook of Portfolio Mathematics).

Many people think that the more you bet, the more you’re going to make. That is true in risk-free investing, but it is evident that if you risk 100% of your capital in a trade and lose, you’re losing all your funds. As we have seen in the previous video, there exists an optimal bet size that creates the highest multiplier for your initial capital. This value is different for strategies with distinct parameters.

The figure below shows the return curves of two games after 100 bets. The first blue one corresponds to the fair coin toss game with a 2:1 payoff. The amber curve corresponds to a game with 30% winning percent and 4:1 payoff. We can see that the top of the curves representing the optimal fraction to trade is different, as expected.


How to find the optimal f under market conditions

As said, the Kelly Criterion is valid when the size of the payoff and probability of success is known. When it is not, such as in trading, the procedure to find the optimal fraction is making iterations using different bet sizes to determine the historical best value. Ralf Vince proposes to find it using the Geometrical Mean (GM). He calls HPR to the return of a single trade:

HPR = 1 + f *(-trade/biggest loss)

The product of HPRs is what the calls The Total Wealth Return (TWR)

TWR = ∏(1 + f *(-trade/biggest loss)), where ∏ stands for product.

GM = TWR ^(1/n)

Thus, the Geometrical Mean is the n-th root of TWR, Where n is the number of trades. This Geometric Mean is the growth factor of the strategy.
By looping through f values between zero and one we can find the f for which GM is the highest.

The graph represents the same two games shown above, but depicting the Geometric Mean curves for the different fractions from zero to one. Values below one represent a negative growth factor, meaning the trade size leads to the loss of the capital.
Doing this on Python is straightforward:


To summarize:

  1. We take a list of trades of our trading system, with a standard 1 unit position size
  2. We create a loop from 0 to 100 compute the individual HPR of the trades using the different fractions.
  3. We compute the HPR for each trade fraction
  4. We compute its geometric mean (GM)
  5. We find the optimal f, which is the fraction that delivers the highest GM

Once found, we compute the optimal trade units using the formula

Units = Largest Loss / f.

for example, if our largest loss is $100 and f= 0.2, then Units = $100/0.2 , or $500. This means to trade one unit for every $500 in the cash balance of your trading account.
We see that the optimal fraction is a divisor of your biggest loss that gives you the dollars needed in your account for every unit of trade (lot or contract)
In the next video, we will continue discovering the properties of the optimal f, stay tuned…

Categories
Forex Videos

Position Sizing Part 6 – The Kelly Criterion! How To Find Your Optimum Risk In Forex!

Position Sizing VI: The Kelly Criterion

The Kelly Criterion is a formula that finds the optimal amount to bet based on the percent of winners and the reward/risk ratio. It was published by the Texan-born scientist John L. Kelly, in a paper entitled “A New Interpretation of Information Rate.” The formula is as follows:

f% = P – [(1-P)/R]

were, P is the probability of winning, and R is the reward/risk ratio.

For instance, in a coin toss game in which you win $2 when heads and lose $1 when tails,

f% = 0.5 -[(1-0.5)/2] = 0.5 -0.25 = 0.25%

The formula indicates that you need to bet 25% of the available cash for optimal growth.


Fig 1 – Final equity as a function of the percent bet. Coin-toss game with a 2/1 profit factor after 100 bets, starting with $1.

The fig 1 shows that in a winning game, there is an optimal bet which allows for the maximal growth of the capital. We can see also that after the optimal bet value is surpassed, the risk increases while returns decrease. Therefore, betting beyond optimal is harmful.
Another interesting fact is that the growth curve is steeper as the number of bets (trades) grows, and decreasing the position size by small amounts will significantly harm the overall growth.

The virtues of trading using the Kelly Criterion

Trading using the Kelly Criterion produces the fastest growth. As an example, the next image shows the progression of the equity curve with the same sequence of gains and losses, using 15% and 25% trade sizes in the mentioned coin-toss game. Please, remember, the game started with 1 dollar, so the figure shown in vertical axis of the image is a multiplier. If you’ve started with $1,000 at the end of the 100 tosses, you’ll end with $30 million using the Kelly Criterion (amber curve).


In the image, we can see that the 25% trade had a 30,000X profit in 100 bets, whereas the 15% trade size has a mere 2,200X. That difference grows with the number of bets. We can see also that the difference is not that much in the first sixty trades, but it explodes after trade nr. 70 and especially after trade nr. 90. Thus, the Kelly Criterion does not show its effects in the short-term; thus, trader should let it go long-term.

The downside of the Kelly Criterion

One downside of using the Kelly Criterion is that even on a fair coin-toss game with 2:1 reward/risk ratio in which we know the exact optimal position size (25%), the random nature of the coin toss would make it seem as if the optimal size should be different. The following figure shows 20 different coin toss curves of 100 bets using real random sequences.


The figure is set to log scale because the difference in the outcomes are so high that a linear scale does not reveal what we are looking for. In the image, we can see that the lower curves show its peak below the theoretical 25, while the more successful outcomes show optimal fractions of up to 42. This explains how difficult it is to find the optimal fraction on a trading system in which we only know the historic parameters, not the true parameters.
Linked to this, comes what we already have said: using the optimal fraction sizes may result in huge drawdowns.

Drawdowns

Similar to the growth curves shown, drawdowns cannot be fully predicted but using Monte Carlo simulations, we can create a good approximation of the typical and maximum values. On the next figure, plotting the histogram of max drawdowns, we can see that the typical value for the Kelly Criterion sizing is about 85% drawdown.


In the next figure, we can see the max drawdown probability plot. We observe that the likelihood of a max drawdown of at least 95% is about five percent in sequences of 100 bets, or once every 20 occasions. Therefore, we should assume the possibility of it happening over time is a sure thing.


So, if the Method is not tradeable, why waste our time?
Although it is rather hard to trade using optimal fractions, we can make use of the concept of maximal equity growth. So, stay tuned for practical applications of the Kelly Criterion in the future.

Categories
Forex Videos

Position Sizing Part 5! Optimise your returns using the Percent Risk Model

Position Sizing V: Optimize your returns using the Percent Risk Model

Besides the constant position size, the Percent Risk Model is the most used method. The Percent Risk Model allows us to define the number of lots (or mini/micro Lots) as a fixed percentage of the available cash in the trading account.

The risk is defined as the loss incurred if the trade hits the stop-loss order. Thus, every trade must have at least a pre-defined entry and stop-loss. The monetary value in pips from the entry point to the stop-loss is the risk of the trade. The size is determined by MCP simple formula, as already stated in a previous video presentation.
M=C/P
M is the number of mini-lots, C is the cash at risk, the percent risk decided by the trader, and P is the pip distance from entry to stop-loss.

C, the cash at risk, can vary widely, and it will determine the profitability of the strategy and, also, the max drawdown incurred.

From the MCP formula, we can deduct that M increases as P decreases. So tight stops wold allow traders to increase M without increasing the dollar risk C, but, before analyzing this methodology, we have to emphasize that the stop-loss setting must be set at its optimal place. Setting them too close to the entry to increase the position size will force the trader to close a position that would be profitable with a proper stop setting.
In our site, Forex.academy, we have already published several methods to optimize the stops. We recommend you to give them a look.

Masteting Stop-Loss setting: How about using Kase Dev-Stops?

Maximum Adverse Excursion

The Case for Average True Range-based Stop-loss Settings

The Constant Size Risk Model

The Percent Risk Model is a compounding method. The constant-size trading method uses a single size, independent of the amount of cash available, so it has drawbacks. The first one is that the size of the position does not decrease on drawdowns. Imagine a trader risking One-tenth of the initial cash, experiencing a 10-losing streak. He will be wiped out! Also, If he is successful, this position sizing method does not allow him to use the money gained in the markets to make more profits. It is like having a constant account and withdrawing all the gains. Thus it is much more difficult to create wealth.

To see the importance of compounding, let’s look at the difference between a constant mini-lot size and a compounding 1% risk in one year of trading using the trade signals of our Live Signal Service, starting in both cases with $10,000:


In the image, we can see that while the profits of the constant-sizing methodology are linear, the equity curve of the percent-risk model is exponential. We can also observe by the ripples of the curve that the Percent Risk Model has higher drawdowns, which grow (moneywise) with the trading account’s growth. These are the main features of these sizing models.

Optimizing Our Percent Risk Model

The figure below, shows the hypothetical position sizing curves of 1%, 2%, 5%, 10%, and 20% risk models in log-scale, for the same segment of a trading system with 68% winners and 1.1 reward/risk factor, which shows similar figures as our Live Signal Service. We can see that the theoretical account growth can be made astronomical by increasing the position sizing. Unhappily, the future is not written in stone, and future returns can vary substantially from past performances. Thus, the trader must set his trading goals taking into consideration no only the growth but also the drawdown.

For instance, in the figure above, the steepest curve, corresponding to the 20% risk model, shows several 90% drawdown segments. Are you willing to accept to lose 90% of your hard-earned profits to push your returns to the sky? Indeed, there is a limit to the amount a trader can withstand to lose. Thus, it seems reasonable to define our desired maximum drawdown and set the percent risk accordingly.
Let’s say our risk appetite allows us to lose up to 25% Drawdown, and that our system is well below 10 losing streaks. An approximation of our ideal Percent Risk Model Size is to divide 25% by 10 and set our trade size to 2%.

To verify this figure, traders with programming abilities could create a code to produce a Monte Carlo simulation of futures trades. That is what we have done here. The curve below corresponds to the drawdown histogram of 10,000 synthetic trade histories.

Mean Drawdown: 21.02 %
Our little exercise tells us that the average max drawdown is 21.02%, but there is a 3% chance that we could experience a 30% drawdown in a year. A small sacrifice to convert $10,000 into $2.5 million in 12 months.
In a future video, we will discuss improvements on this basic model.

Categories
Forex Videos

Forex Position Sizing Part 3 – The Advantage!

Position Size III – The Advantage

After deciding the current price movement was a good trading signal, position sizing answers the question of “how much shall I take,” which is a crucial question to ask, especially on leveraged trading. But position sizing defines not only the Risk and drawdown but also the overall profitability of a trader.


Van K. Tharp usually presents his learners a game, There are commonly near 300 traders attending to his courses, and the game consists of a bag of 30 marbles with defined gains and losses representing trades. A marble is pulled out randomly and then replaced each time. Everyone gets the same results in terms of reward/risk ratios or R. The participants only have to choose the size of R. At the end of the game, except for those who went broke, everyone ended up with different equity, although the trades are the same.
Van K. Tharp also mentions a study by G. Brinson appearing in “Financial Analysts Journal” in 1991 that studied the performance of 82 portfolio managers over a 10-year period. Their primary variable was how much was invested in bonds, stocks, and cash. The study concluded that over 90% of the variability in performance was due to “asset allocation,” which is a word used by professionals to refer to how much to invest. That means position sizing modeling results in considerable variations in the performance of a trading strategy.


The Three Components of Position Sizing Settings

1.- Psychology:

People with no knowledge of position sizing methods modify the size of their position based on their current emotions. Traders with no regard for Risk usually overtrade. Their account balance is likely insufficient; thus, they go broke at the minimum flip of the market against them.

2.- Objectives:

A person with only profitability objectives will have a different result from a trader with a combination of profit/risk objectives.

3.- Position sizing Method

Some people use a single position size, no matter how large is his current trading account. Others use a percentage of the account balance, while others vary the position size, pyramiding or downsizing, as their trading results evolve.

The combination of these three elements can create a wide variety of models.

Simplifying the model

Indeed, there are trading strategies in which trades are correlated, or dependent, which may be improved by the use of trading sizes adapted to the past results, such as the Turtles trend-following methods, which might benefit from pyramiding schemes. Still, the majority of trading systems show independency. Thus, we are in favor of separating the decision part from the sizing part.

Thus, the trading system should deliver the entry and exit signals, with a precise R-risk- figure, its results as a stream of multiples of R. This allows the trader to measure and determine the profitability and drawdown, adapting the size of future trades to fit his trading objectives.

The MCP Model

A simple shortcut to help you define the size of every trade is the LCR formula.
C: Cash, a trader, is willing to risk. That part comes from your position sizing strategy. For example, if you’re ready to risk 1% of your current $3,500 trading balance, C will be 3,500×1% = $35

R: Risk of the trade: The dollar distance between entry and stop-loss level.
L: Position size in lots

L = C/R

In Forex, the definition of Risk is in pips. So, the first thing you need to know is the dollar risk of one pip. For instance, in the EURUSD, the dollar risk of one pip is $10 for one lot. If you think in mini-lots, this goes to $1, which is a nice figure since it is mathematically “transparent.” Also, the majority of pairs have a pip value close to $1 on mini-lot sizes; the only one exceeding this value is the EUR/GBP, which is $1.28. Therefore, we can simplify the formula to calculate P in mini-lots with the formula for practical uses.

M = C/P

Where M = mini-lots, C= cash at risk, P= Pip distance from entry to stop-loss.

As an example, If our C is $35, and we have 20 pips distance between entry and stop-loss,
M = $35/20 = 1.75 mini-lots.

This methodology is valid on systems with only one open position at a time. For more than one open positions, there are three additional modes needed to compute C. That will be left for another video. Stay tuned…

Categories
Forex Videos

Forex Position Size! The most crucial factor in trading!

Position Size: The most crucial factor in trading

 


Bob is an average guy that has seen the Forex markets as a way to get rich quickly. He has seen lots of accounts on copy-trading sites jumping from $1,000 to $1 million in less than one year and dreams about doing the same with his, but he lost it all in less than a month. Indeed it might be possible to raise an account from $1,000 to $1,000,000 in 12 months, but the odds of achieving that feat are low because the risk of bankruptcy is too high. Most people think they are smart but are mostly focused on forecasting the market. It is now natural to have the skills for position sizing decisions.

Even high intelligence does not help. Ralph Vince directed an experiment on position sizing utilizing forty PhDs. They were initially given $10,000 in a computer game with 100 bets having a 60% chance of winning each bet. The rules were that they would win or lose the amount they bet. The game had a clear edge for the players, but only 2 PhDs end up making money. The other 38 PhDs ended with less than the initial $10,000. The main reason for this result was that almost all the Ph.D. players risked too much money on each bet. The other interesting fact is that even when the game was profitable, almost nobody made money.
This result is what is typically found in the Forex markets. People start with a tiny account and want to obtain even double their initial funds every month. As a consequence, people apply extremely large position sizes that get their account wiped out at the first market turn against them.


Let’s say you have $4,000 in your account and risk $1,000 on each trade. A losing streak of four trades will wipe your account. Losing streaks are common in trading, and four losing positions in a row is a very common event. Even 10 to 20 consecutive losses are possible in some trading systems, that are quite profitable using appropriate position sizing, but deadly when overtrading.

This experiment shows that position sizing is the component of a trading system that allows the trader to optimize the profits. That means, from zero to one, there is an optimal fraction of the trading capital, which, when risked on each trade, will optimize the results of a trading strategy.


Of course, that optimal fraction may result in a max drawdown much higher than psychologically accepted by the trader. Thus, a limitation on the trade size should be set by this parameter.
The best description of what a proper position sizing strategy should do was written by Curtis Faith in his book Way of the Turtle: “the art of keeping your risk of ruin at acceptable levels while maximizing your profit potential.” If we combine profits and drawdowns into the concept of “trading objectives,” then, Position Sizing is the art of achieving the trading objectives.
Finally, the key goal any trader should aim at is to find a system with a positive edge and then trade it using position sizing levels that allow him to achieve his trading objectives.
In the following videos, we will explore several position sizing methodologies that will help forex traders optimize this crucial part of their trading profession.

Categories
Forex Videos

The Golden Rules of Trading III

 

The Golden Rules of Trading III – Trading like a Business

The majority of new participants approach Forex trading with no idea in mind but to trade and win. They did not make a plan, and their objectives aren’t clear as well. They enter the market with one dream: getting rich, starting with a $1,000 or less trading account. Usually, they did not make a plan, don’t know the needed skills, their strengths, and weaknesses, and think that trading is just predicting the market. The outcome of this mindset is failure and frustration. To succeed, trading must be considered as a business.
In this video, we are going to talk about the importance of treating trading like a business.


1.- Initial Assessment
You need to create an initial assessment document. On it, you’ll need to define the following:
Your current beliefs about yourself and the market. Your vision about you, your life, and your goals.
List your strengths ( what are you good at- programming, recognizing patterns, math skills…)
List the resources you will need
Determine your weaknesses and how to overcome them.


2.- Establish your objectives
Set your monthly profits goal, then divide it by 20 to determine your daily profits goal. Finally, establish how many market signals you take on average using your trading plan and decide on your average profit per trade.
Define your tolerance for drawdowns. Will you allow 10%, 26%, 40%, or higher max drawdown? Max drawdown is a critical value you should know for you to set your dollar risk per trade. That was dealt with already, but let’s remember the key fact: Max drawdown, together with the percent losers of your system will help you set a likely max losing streak. For example, a well known trend-following system with only 35% winners will sometimes show up to 20 losers in a row. If a trader using this system establishes its max drawdown to 30%, the dollar risk per trade must be set to 30%/20, which is 1.5% risk. Determine how much you will pay yourself and what percentage of your profits will be reinvested to grow your trading account.


3.- Operating rules and contingency plans:
Establish the maximum number of consecutive trades you’re going to take
Set the maximum daily dollar losses you will accept before stopping to trade for the day
Set the maximum dollar gains you are going to take before halting your day-to-day operations. That way, you keep your trading rational, avoiding losses due to your child’s side take control.
Define also your weekly and monthly loss sizes. In the case these amounts are reached, you should switch to paper trades until the next week or month.
Establish a trading record with the relevant information needed to measure and analyze your performance and the system’s improvement/adaptation to the current market conditions.
Define the reviewing period for the performance analysis of your systems. Use statistical methods to analyze them.

4.- Markets, Timeframes, diversification
Define the best timeframe for your needs and time availability. Please beware that shorter timeframes are more costly because the costs of trading (commissions, spreads, and slippage) do not change, but the trading ranges shrink, and so do your profits.
Define your basket of pairs to trade. Criteria for the list should include liquidity, volatility, and trendiness. Avoid illiquid markets or excessive volatility.
Ensure diversification to lower your overall risk. For instance, trading only major pairs will be sensitive to the dollar movements; thus, a sharp dollar move against you will affect all your trades at the same time. In this case, make sure you have 50% of your positions long the dollar and 50% short the dollar.
Know the big picture of all the pairs on your basket. We should remember that Fundamental Analysis is the driver of the underlying trend, and that surprising figures will trigger price shocks.

5.- A basket of Systems
Make sure your systems have an edge and that the average Reward/risk ratio is greater than one.
System diversification: Use at least two different and facing systems. One of them might be a trend-following system, while the second system fades the trend. That will help when there are no trends, and the pair is ranging. Sometimes one will lose, and the other one will win. If both systems are profitable, the long-term result will be the sum of their performance, but the downside is limited, as one of them will tame the other system’s losses.
Use the position sizing as explained above, ensuring that your maximum risk per trade is limited to fit your preferences for drawdown.
Continue developing new ideas and strategies, doing paper trading on them if the backtests are worthwhile.