Kelly Criterion & Positions Sizing [Overview]

Discussion in 'Risk Management' started by SOFEX, Sep 27, 2024.

  1. SOFEX

    SOFEX

    What is position sizing & why is it important?
    Position size refers to the amount of risk – money, contracts, equity, etc. – that a trader uses when entering a position on the financial market. While it is highly dependent on a trader's personal risk tolerance and trading style, there are some pitfalls that new traders must consider before entering positions.

    In fact, this article may not contain new information for experienced trades on the forum, since it mainly aims to help those that are new and learning how to manage their capital more securely, and not over

    Common ways to size positions are:
    • Using a set amount of capital per trade. A trader enters with $100 for example, every time. This means that no matter what the position is, the maximum risk of it will be that set capital.
      It is the most straight-forward way to size positions, and it aims at producing linear growth in their portfolio.
    • Using a set amount of contracts per trade. A trader enters with 1 contract of the given asset per trade. When trading Bitcoin, for example, this would mean 1 contract is equal to 1 Bitcoin.
      This approach can be tricky to backtest and analyse, since the contract’s dollar value changes over time. A trade that has been placed at a given time when the dollar price is high may show as a bigger win or loss, and a trade at a time when the dollar price of the contract is less, can be shown as a smaller win or loss.
    • Percentage of total equity – this method is used by traders who decide to enter with a given percentage of their total equity on each position.
      It is commonly used in an attempt to achieve ‘exponential growth’ of the portfolio size.
      However, the following fictional scenario will show how luck plays a major role in the outcome of such a sizing method.

      Let’s assume, for illustration purpose, that the trader has chosen to enter with 50% of their total capital per position and their profit is 100% per win.

      This would mean that with an equity of $1000, a trader would enter with $500 the first time.

      This could lead to two situations for the first trade:
      – The position is profitable, and the total equity now is $1500
      – The position is losing, and the total equity now is $500.

      When we look at these two cases, we can then go deeper into the trading process, looking at the second and third positions they enter.

      If the first trade is losing, and we assume that the second two are winning:
      a) 500 * 0.5 = 250 entry, total capital when profitable is 750
      b) 750 * 0.5 = 375 entry, total capital when profitable is $1125

      On the other hand, If the first trade is winning, and we assume that the second two are winning too:
      a) 1500 * 0.5 = 750 entry, total capital when profitable is $2250
      b) 2250 * 0.5 = 1125 entry, total capital when profitable is $3375

      Let’s recap: The trader enters with 50% of the capital and, based on the outcome of the first trade, even if the following two trades are profitable, the difference between the final equity is:

      a) First trade lost: $1125
      b) First trade won: $3375

      This extreme difference of $2250 comes from the single first trade, and whether it’s profitable or not. This goes to show that luck is extremely important when trading with percentage of equity, since that first trade can go any way.
    [​IMG]
    *In the diagram, last trade should be Trade #3.

    Traders often do not take into account the luck factor that they need to have to reach exponential growth
    . This leads to very unrealistic expectations of performance of their trading strategy.

    What is the Kelly Criterion?
    The percentage of equity strategy, as we saw, is dependent on luck and is very tricky. The Kelly Criterion builds on top of that method, however it takes into account factors of the trader’s strategy and historical performance to create a new way of sizing positions.

    This mathematical formula is employed by investors seeking to enhance their capital growth objectives. It presupposes that investors are willing to reinvest their profits and expose them to potential risks in subsequent trades. The primary aim of this formula is to ascertain the optimal allocation of capital for each individual trade.

    The Kelly criterion encompasses two pivotal components:
    Winning Probability Factor (W): This factor represents the likelihood of a trade yielding a positive return. In the context of TradingView strategies, for example, this refers to the Percent Profitable.

    Win/Loss Ratio (R): This ratio is calculated by the maximum winning potential divided by the maximum loss potential. It could be taken as the Take Profit / Stop-Loss ratio. It can also be taken as the Largest Winning Trade / Largest Losing Trade ratio from the backtesting tab of TradingView.

    The outcome of this formula furnishes investors with guidance on the proportion of their total capital to allocate to each investment endeavor.
    Commonly referred to as the Kelly strategy, Kelly formula, or Kelly bet, the formula can be expressed as follows:

    Kelly % = W – (1 – W) / R

    Where:
    Kelly % = Percent of equity that the trader should put in a single trade
    W = Winning Probability Factor
    R = Win/Loss Ratio

    This Kelly % is the suggested percentage of equity a trader should put into their position, based on this sizing formula. With the change of Winning Probability and Win/Loss ratio, traders are able to re-apply the formula to adjust their position size.

    Let’s see an example of this formula.
    Let’s assume our Win/Loss Ration (R) is the Ratio Avg Win / Avg Loss from the TradingView backtesting statistics. Let’s say the Win/Loss ratio is 0.965.

    Also, let’s assume that the Winning Probability Factor is the Percent Profitable statistics from TradingView’s backtesting window. Let’s assume that it is 70%.

    With this data, our Kelly % would be:

    Kelly % = 0.7 – (1 – 0.7) / 0.965 = 0.38912 = 38.9%

    Therefore, based on this fictional example, the trader should allocate around 38.9% of their equity and not more, in order to have an optimal position size according to the Kelly Criterion.

    The Kelly formula, in essence, aims to answer the question of “What percent of my equity should I use in a trade, so that it will be optimal”. While any method it is not perfect, it is widely used in the industry as a way to more accurately size positions that use percent of equity for entries.

    Caution disclaimer
    Although adherents of the Kelly Criterion may choose to apply the formula in its conventional manner, it is essential to acknowledge the potential downsides associated with allocating an excessively substantial portion of one’s portfolio into a solitary asset. In the pursuit of diversification, investors would be prudent to exercise caution when considering investments that surpass 20% of their overall equity, even if the Kelly Criterion advocates a more substantial allocation.
     
    Picaso likes this.
  2. Lambo criterion & positions sizing
    • All capital in one symbol no stops.:)
     
    taowave and SOFEX like this.
  3. SOFEX

    SOFEX

    :cool:And a bible.
     
    Sekiyo likes this.
  4. TrAndy2022

    TrAndy2022

    Position Sizing

    Overview

    Position size is the number of shares or contracts bought or sold for a given trade. If your position size is too large, a string of losses could force you to stop trading. With the built-in leverage of futures or forex, trading too many contracts can even cause you to lose more money than you have in your account. On the other hand, if your position size is too small, you'll be underutilizing your account equity, and your performance will suffer. Finding the proper balance is a part of good money management, and most experts agree that money management is one of the most critical aspects of trading.

    In Market System Analyzer (MSA), the position sizing method for a market system is selected using the Position Sizing command of the Analysis menu. For a portfolio, the position sizing methods for the market systems comprising the portfolio are selected using the Position Sizing command on the Portfolio menu. See Chapter 14, Menu Commands, for the specifics of each Position Sizing command.

    With each position sizing method available in MSA, except for fixed size and constant value position sizing, the number of contracts increases as profits accrue and decreases as the equity drops during a drawdown. Position sizing methods that use this approach are known as antimartingale methods. Antimartingale methods take advantage of the positive expectancy of a winning trading system or method. If you have an "edge" with your trading (i.e., your trading method is inherently profitable), you should use an antimartingale method, such as those listed above. The alternatives, known as martingale methods, decrease the amount at risk after a win and increase the amount at risk after a loss. A commonly used example is "doubling down" after a loss in gambling. Martingale methods are often used by gamblers, who trade against the house's advantage.

    Provided you have a profitable trading method, antimartingale methods are always preferable over the long run because they're capable of growing your trading account geometrically. However, it's sometimes possible to lower your risk by taking advantage of patterns of wins and losses, similar to martingale methods. MSA offers two options for doing this: dependency rules and equity curve trading. Both of these methods adjust the position sizing while maintaining the selected position sizing method. While martingale methods are not recommended, these adjustments to the antimartingale methods can sometimes prove beneficial.

    When a position sizing method is applied in MSA, the equity curve in the main chart uses that method to accumulate the equity from trade to trade to simulate continuous trading over that series of trades. This approach is intended for evaluating market systems and position sizing methods. However, a different approach is needed for trading on a day to day basis, where it's necessary to determine the number of shares/contracts for the next (upcoming) trade. In MSA this is referred to as real time position sizing (see Real Time Position Sizing, below). This capability is provided with the Trade Size command (Analysis menu for market systems; Portfolio menu for portfolios), which is a kind of position sizing calculator. You can use the 42 Trade Size command to determine the position size for the next trade based on your current account equity and applying the currently selected position sizing method, parameters, and related settings.

    Regardless of the position sizing method chosen, the number of shares or contracts in MSA is limited by the margin requirements, provided margin data have been entered on the Analysis Setup window. This insures that the number of shares or contracts could actually be traded with a real money account. To turn off this limit, enter a value of zero for the futures margin or stock/forex margin percentage. The position size is also limited to the trade size limit specified on the Account Settings tab of the Analysis Setup window.

    When applying position sizing to a portfolio, MSA uses the settings retrieved from the market-system documents unless a setting made via the Portfolio menu overrides a marketsystem setting.

    For information on applying the position sizing methods of MSA within TradeStation strategies, see the Appendix: Position Sizing Code for TradeStation and MultiCharts.

    None
    The default position sizing method in MSA is “None.” This is the first method listed on the Position Sizing Method window. In this case, the position size is taken directly from the trade size field of the input data. If the trade size was not provided in the input data, the default trade size entered on the Analysis Setup window is used.

    Fixed Size
    This is the simplest method of position sizing. With this method, you simply choose the number of shares or contracts, and that number is used for each trade. This option is included because (1) it provides a good baseline for comparison to more sophisticated position sizing methods, and (2) many traders are comfortable trading a fixed lot size.

    The Monte Carlo analysis feature of MSA can be used to provide a credible prediction of future performance with a fixed position size. Suppose, for example, that you only want to increase the lot size after your account equity has doubled. You could use the Monte Carlo results to obtain the average trade size at 95% confidence and use that to determine how many trades it would take to double your equity. You could also use the position sizing optimization feature with fixed size position sizing to determine the number of shares or contracts that maximizes your net profit, for example, subject to a limit on the maximum drawdown.

    Constant Value
    With constant value position sizing, each position is sized so that it has a specified value, such as $1000 per trade. This method can be used when you want to allocate a specified amount of equity to each trade. The constant value method will determine the number of shares/contracts corresponding to your specified amount. For example, if you plan to purchase a stock at a price of $25 and you want to spend $35,000, you would trade 35000/25 or 1400 shares. In this case, the constant value amount is 35000; each trade will be sized so that the position value is $35,000. 43 As with fixed size position sizing, this method does not increase position size based on equity. The position size will vary only with the price of the instrument being traded. Also note that this method requires the entry price for each trade.

    Fixed Amount of Equity
    In this position sizing method, you choose the amount of account equity to trade one share, contract, or unit. The amount is “per unit” if the “Trade in units” option has been selected on the Options tab of the Analysis Setup window. For example, if the dollar amount is $5,000 and the trading vehicle is futures, you would trade one contract for every $5,000 in the account. If the account equity is currently $50,000, you would trade 10 contracts on the next trade.

    As another example, suppose the trading vehicle is stocks, the option to trade in units of 100 shares has been selected, and the account equity is $30,000. If the dollar amount of equity is $6,000 per unit, then you would trade five units or 500 shares. If the position size calculated in this manner is fractional, the number is rounded down to the nearest integer. For example, for a fixed dollar amount per contract of $4,000 and an account equity of $25,000, the program would calculate 25,000/4,000 = 6.25, which rounds down to six contracts.

    It's important to understand that the calculation for the position size is performed prior to each trade using the current value of account equity. For example, if you start with an account size of $10,000 and there are several winners in a row, you may have, say, $15,000 in the account after the 10th trade. For the 11th trade, the position size calculation is based on the account balance of $15,000. As with all position sizing methods in MSA (except fixed size and constant value), the number of shares or contracts increases with higher account balances and decreases as the equity drops during a drawdown.

    Percent Volatility
    The percent volatility method sizes each trade so that the value of the volatility, as represented by the average true range (ATR), is a specified percentage of account equity. This method is attributable to Van K. Tharp. See, for example, his book "Trade Your Way to Financial Freedom," 2 nd ed., McGraw-Hill, New York, 2007, pp. 426-8.

    As an example, consider a futures trading system where the ATR is 7.2 points, and the value of each point is $50. The ATR values can be calculated over any period you choose and are read in with the trade data using the ATR data input field. With a specified volatility percentage of 4% and account equity of $20,000, the position size for the next trade would be 0.04 x 20000/(50 x 7.2) or 2.22. The result is 2 contracts for the next trade.

    TradeStation/MultiCharts users can use the WriteTrades function, discussed in the previous chapter, to write out the ATR value corresponding to each trade.

    Kelly Formula
    The Kelly formula is a specialized form of fixed fractional position sizing, described below, which uses an approximate formula – the Kelly formula – to determine the fixed fraction that maximizes the equity growth rate. Fixed fractional position sizing risks a specified fraction of account equity on each trade. The Kelly formula specifies a particular value of the fixed fraction. This “Kelly f value” is given by the following equation:

    Fk = ((WL + 1) * Pw – 1)/WL 44

    where WL is the ratio of the average winning trade to the average losing trade and Pw is the probability of a winning trade.

    For example, if the average winning trade is $300, the average losing trade is $400, and the percentage of winning trades is 65%, the Kelly f value would be ((0.75 + 1) * .65 – 1)/0.75 or 0.183. This means that 18.3% of the account would be risked on each trade.

    To determine the position size, the trade risk is assumed to be equal to the largest historical loss. For example, if the largest loss experienced by the system in question was $1,200 trading one contract, and the account equity was $35,000, then 18.3% of $35,000 is $6,405. This is the amount to risk on the trade according to the Kelly formula. With a trade risk of $1,200, this means we can trade 6405/1200 or 5 contracts.

    MSA automatically calculates the Kelly f value for the current sequence of trades. The value is displayed in the Position Sizing window in the Parameters section when the Kelly formula is selected from the list of position sizing methods.

    Please note the following:
    1. The Kelly formula is approximate in that it assumes all wins are the same size and all losses are the same size. The optimal f method, described below, removes this assumption.

    2. The formula does not take equity drawdowns into account and may produce very large drawdowns in equity. In many cases, the position size will be limited by margin requirements when using the Kelly formula.

    3. The Kelly formula is not generally considered to be a practical or viable method of position sizing and is only included for comparison to other methods and for educational purposes.

    Fixed Fractional
    The idea behind fixed fractional position sizing is that the number of shares or contracts is based on the risk of the trade. Fixed fractional position sizing is also known as fixed risk position sizing because it risks the same percentage or fraction of account equity on each trade. For example, you might risk 2% of your account equity on each trade. Fixed fractional position sizing has been written about extensively by Ralph Vince. See, for example, his book "Portfolio Management Formulas," John Wiley & Sons, New York, 1990.

    The risk of a trade is defined as the dollar amount that the trade would lose per contract/share if it were a loss. Commonly, the trade risk is taken as the size of the money management stop applied, if any, to each trade. If your system doesn’t use protective (money management) stops, the trade risk can be taken as the largest historical loss per contract/share. This was the approach Vince adopted in his book Portfolio Management Formulas.

    As an example, consider a stock trading system that uses a 2 point stop. It might enter long at a price of 48 with a sell stop at 46, for example. The risk per share would be $2. With a fixed fraction of 5% and account equity of $20,000, fixed fractional position sizing would risk 0.05 * 20000 or $1,000 on the next trade. Since the risk per share is $2, this means 1000/2 or 500 shares would be purchased.

    Fixed fractional position sizing is often used with leveraged instruments, such as futures. It’s one of the only position sizing methods that directly incorporates the trade risk (also see the Profit Risk method).

    Optimal f
    Like the Kelly formula, optimal f position sizing is a specialized form of fixed fractional (fixed risk) position sizing. Optimal f position sizing uses the fixed fraction that maximizes the geometric rate of equity growth. This method was developed by Ralph Vince (see reference in previous section) as a more accurate version of the Kelly formula. Unfortunately, optimal f has many of the same drawbacks as the Kelly formula. Namely, the optimal f value often results in drawdowns that are too large for most traders to tolerate. As with the Kelly formula, the position size based on the optimal f is often so high that it’s limited by margin requirements.

    The optimal f value is calculated according to an iterative procedure that maximizes the geometric growth rate for the current sequence of trades. MSA performs this calculation automatically and displays the resulting optimal f value on the Position Sizing window under Parameters when the Optimal f method is selected. The calculation for the position size is the same as for the Kelly formula except that the optimal f value is used in place of the Kelly f value. The trade risk is taken as the largest historical loss per share/contract.

    As with the Kelly formula, optimal f position sizing is included primarily for educational purposes. As a practical alternative to optimal f, consider using the optimization feature of MSA with fixed fractional position sizing. Select rate of return as the optimization parameter to maximize, and check the box for applying a limit to the maximum allowable drawdown. Optimize using Monte Carlo analysis to find a much smaller and therefore less risky fixed fraction than optimal f.

    Profit Risk Method
    The profit risk method is similar to fixed fractional position sizing. In fixed fractional position sizing, the dollar amount risked on a trade is a percentage of the current account equity. In the profit risk method, the dollar amount risked on a trade is a percentage of the starting account equity plus a percentage of the total closed trade profit. Once the risk amount is determined, the number of shares or contracts is calculated the same way as in fixed fractional trading; namely, the amount to be risked is divided by the trade risk per share/contract.

    As an example, consider a futures trade where the risk of the upcoming trade is $300 per contract. This amount might correspond to the size of the money management stop that will be used during the trade or it might be the largest loss per contract that the trading method has ever produced. Now suppose that the trading account started with a balance of $25,000 and is currently at a value of $45,000 (a total closed trade profit of $20,000). The percentages for the profit risk method might be 2% of initial equity and 5% of profits. This means that the total amount to risk on the trade would be 0.02 x 25000 + 0.05 x 20000 or $1,500. Since the trade risk is $300 per contract, the number of contracts to trade is 1500/300 or 5 contracts.

    Compared to fixed fractional position sizing, the profit risk method is sometimes more convenient because it separates the account equity into initial equity and closed trade profit. The percentage applied to the initial equity provides a baseline level of position sizing independent of trading profits. Note that if both percentages are the same, the profit risk method will produce the same result as the fixed fractional method.

    If the optimization feature of Market System Analyzer is used with the profit risk method, only the parameter for the percentage of profits will be optimized. The parameter for the percentage of the initial equity will be unchanged by the optimization.

    Fixed Ratio
    In fixed ratio position sizing the key parameter is the delta. This is the amount of profit per share/contract/unit to increase the number of shares/contracts/units by one. A delta of $3,000, for example, means that if you're currently trading one contract, you would need to increase your account equity by $3,000 to start trading two contracts. Once you get to two contracts, you would need an additional profit of $6,000 to start trading three contracts. At three contracts, you would need an additional profit of $9,000 to start trading four contracts, and so on.

    Fixed ratio position sizing was developed by Ryan Jones in his book "The Trading Game," John Wiley & Sons, New York, 1999. Based on an equation presented by Jones, it's possible to derive the following equation for the number of contracts in fixed ratio position sizing:

    N = 0.5 * [((2 * N0 – 1)^2 + 8 * P/delta)^0.5 + 1]

    where N is the position size, N0 is the starting position size, P is the total closed trade profit, and delta is the parameter discussed above. The carat symbol (^) represents exponentiation; that is, the quantity in parentheses is raised to the power following the carat (x^2 is “x squared; x^0.5 is “square root of x”).

    A few points are worth noting. The profit, P, is the accumulated profit over all trades leading up to the one for which you want to calculate the number of shares/contracts/units. Consequently, the position size for the first trade is always N0 because you always start with zero profits (P = 0). The account equity is not a factor in this equation. Changing the starting account size, for example, will not change the number of shares/contracts/units, provided there is enough equity to avoid dropping below zero.

    The trade risk is also not a factor in this equation. If trade risks are defined for the current sequence of trades, they will be ignored when fixed ratio position sizing is in effect. All that matters is the accumulated profit and the delta. The delta determines how quickly the shares/contracts/units are added or subtracted. If the “trade in units” option is selected, delta will be the profit per unit to increase the number of units by one. For stock trading, without the trade-in-units option, the delta will be the profit per share to increase the number of shares by one.

    Note that the equation above is applicable only to the case where a single delta is used for both increasing and decreasing the number of shares/contracts. MSA allows you to decrease at a different rate. This is accomplished by specifying a delta fraction for decreasing. The delta fraction is multiplied by the original delta to determine the delta for decreasing the position size. The delta fraction is set to the value 1.0 by default, which implies the two deltas will be the same.

    If a delta fraction less than 1.0 is entered, the levels of increase and decrease will be closer together, which will cause the position size to decrease more frequently in drawdowns as the equity drops. This will provide more protection from drawdowns but less ability to recover. If a delta fraction greater than 1.0 is entered, the level of decrease will be farther from the level of increase, so the position size will not drop as quickly or change as often during a drawdown. This will provide less protection during drawdowns but make is easier to recover.

    Note that if the optimization feature of MSA is used with fixed ratio position sizing, only the delta parameter will be optimized. The delta fraction will be unchanged by the optimization.

    Generalized Ratio
    As the name suggests, generalized ratio position sizing is a generalized version of fixed ratio position sizing. Generalized ratio position sizing uses an additional parameter – the exponent – to alter the characteristics of the fixed ratio equation. Generalized ratio position sizing is unique to MSA. The number of shares/contracts/units in generalized ratio position sizing is given by the following equation:

    N = 0.5 * [(1 + 8 * P/delta)^m + 1]

    where N is the number of shares/contracts/units, P is the total closed trade profit, m is the exponent, which must be greater than or equal to zero, and delta is as described for the fixed ratio method. The carat symbol (^) represents exponentiation; that is, the quantity in parentheses is raised to the power of m.

    With an exponent of ½, the generalized ratio method is the same as the fixed ratio method with an initial position size of one. With exponent values less than ½ the position size increases more slowly with increasing profits than with the fixed ratio method. With exponents greater than ½, the position size increases more quickly than with the fixed ratio method. An exponent value of one provides the same proportionality as the fixed fractional method. An exponent value of zero gives one share/contract/unit for each trade.

    The number of shares/contracts/units always starts at one with generalized ratio position sizing. This can be seen in the equation above. If the profit, P, is zero, N is equal to 1. For this reason, generalized ratio position sizing is more suitable for smaller accounts. Also, for stock trading, the “trade in units” option should be selected so that the initial number of shares will be equal to one unit. If the unit size is 100 shares, for example, the generalized ratio method will start with 100 shares.

    Note that if the optimization feature of MSA is used with generalized ratio position sizing, only the delta parameter will be optimized. The exponent, m, will be unchanged by the optimization.

    Margin Target
    Margin target position sizing sets the size of each position so that the chosen percentage of account equity will be allocated to margin. For example, if you choose a margin target of 30%, then 30% of the account equity will be allocated to margin. For futures trading, the trading margin is specified on a per-contract basis. The margin requirement for trading one contract of the E-mini S&P futures might be $4,000, for example. For an account equity value of $30,000, a 30% margin target would mean that 0.3 x 30,000 or $9,000 would be allocated to margin. With a margin requirement of $4,000, the number of contracts would be 9000/4000 or 2 contracts (rounded down from 2.25). In other words, a position size of two contracts requires a margin amount ($8,000) that is as close to 30% of equity as possible without exceeding that target.

    For stock trading, the margin requirement is calculated as a percentage of the purchase price of the position. If the margin requirement is 100% (no leverage), you need to pay the full amount of the trade. For example, a stock trade that enters at a price of $23 would require $23 per share. However, a typical retail margin account in the US can be margined up to 50%, 48 which mean that the margin requirement for a $23 stock would be only $11.5 per share. If the margin target is, say, 40%, and the account equity is $25,000, then $10,000 should be allocated to margin (i.e., 0.4 x 25000). For a $23 stock and a margin requirement of 50%, you would trade 10000/11.5 or 869 shares. In other words, 869 shares would require margin of about $10,000, which is 40% of the account equity of $25,000.

    If the margin is undefined or the entry price is undefined for stocks, the position size for the margin target method will default to the maximum allowable position size, as defined on the Account Settings tab of the Analysis Setup window.

    Leverage Target
    The leverage target position sizing method sets the position size so that the leverage of the resulting position matches the selected target. Leverage is defined as the ratio of the value of the position to the account equity. For example, if 1000 shares of a $30 stock are purchased with a $25,000 account, the leverage would be $30,000/$25,000 or 1.2. Leverages greater than 1.0 imply margin percentages less than 100%. A margin percentage of 50%, for example, is equivalent to a leverage of 2 (“2 to 1” or “2:1”). For stocks, the relationship between the minimum margin requirement in percent and the maximum allowable leverage is provided on the Account Settings tab of the Analysis Setup window.

    This method requires the entry price and, for futures, the point value (defined on the Input Data tab of the Analysis Setup window). If the entry prices have not been defined or the point value for futures has not been entered, the position size will be zero.

    Percent of Equity
    This method is intended primarily for stocks. The number of shares is chosen so that the value of the position is equal to the selected percentage of account equity. For example, if the percent of equity is 40%, the position size will have a value equal to 40% of the account equity. If the account equity is $30,000, the position would have a value of 0.4 x 30000 or $12,000. If the share price is $25, the position size would be 12000/25 or 480 shares. In other words, a position size of 480 shares at $25 per share has a value of $12,000, which is 40% of the equity value of $30,000. As with the leverage target method, this method requires the entry price and, for futures, the point value. If the required data are not available, the position size will be zero.

    Max Drawdown Method
    This method was devised by trader Larry Williams and described in his book “The Definitive Guide to Futures Trading, Volume II,” Windsor Books, New York, 1989, pp. 184-6. The basic idea is to make sure you have enough equity in your account to weather the worst-case drawdown. At a minimum, you would need enough equity to cover the size of the worst-case drawdown plus the margin requirement. For futures trading, this means that in order to trade one contract, you would need at least the one-contract margin requirement plus the worstcase, one-contract drawdown. Larry Williams recommended taking 150% of the worst-case drawdown plus margin for the first contract.

    Each subsequent contract is added when the equity increases by 150% of the worst-case drawdown. This insures that you always have enough equity to avoid losing everything even if the worst-case drawdown repeats itself. In fact, even if the drawdown is 150% of the historical worst-case value and it happens at the most inopportune time (which is immediately 49 after adding a new contract), you would still be left with enough equity to cover the margin for one contract. In MSA, the percentage of maximum drawdown, such as William’s recommended value of 150%, is selected by the user. You can set this percentage to any positive value.

    Although originally devised for futures trading, this method works equally well for stocks. If the entry price for a stock trade is not available or the margin has not been specified, the required equity for the first share/contract/unit will be zero. In the unlikely case that the historical sequence of trades has zero drawdown, the position size will default to the maximum allowable value specified on the Account Settings tab of the Analysis Setup window.

    Maximum Possible
    This method sets the position size to the maximum possible number of shares or contracts based on margin requirements. In other words, you’ll trade as many contracts or shares as you can afford.

    For example, consider a futures trade where the margin requirement for one contract is $3000. For a $25,000 account, the maximum possible number of contracts is 25000/3000 or eight contracts. For a stock trade with an entry price of $14, a margin requirement of 50% and an account size of $35,000, the maximum possible number of shares would be 5000 shares (35000/(0.5 x 14)).

    If the margin, or the entry price if trading stocks, has not been defined, this method defaults to the maximum allowable position size specified on the Account Settings tab of the Analysis Setup window.

    Equity Curve Crossovers
    MSA includes an equity crossover feature that allows you to modify the position sizing based on crossovers of a moving average of the equity curve. The equity curve crossover rules are available on the Equity Curve Crossovers tab of the Position Sizing window, as shown below for a market-system document. The same rules can be applied to a portfolio’s equity curve using the same command from the Portfolio menu. For a portfolio, you can optionally deactivate any equity curve crossover rules active in individual market-system files.

    The basic idea is to either trade more or fewer shares or contracts when the equity curve crosses above or below its moving average. Three rules for implementing this are available. The first rule, "Stop trading when equity crosses above/below moving average; resume trading on crossover in opposite direction" is the most basic and commonly used method. If this rule is selected, you must choose either "above" or "below" to indicate whether to stop trading when equity crosses above or below the moving average. Choose "below" if your system or method tends to produce streaks of wins and losses, so that when it starts to lose, it's best to stop trading until it starts winning again. Choose "above" if your system or method tends to "revert to the mean"; i.e., after several wins, it starts to lose, and vice-versa. Note that the dependency analysis can be used to determine if your system has either of these tendencies with statistical significance. If the first rule is chosen, the other two rules are deactivated.

    Screenshot 2024-09-30 at 12.54.40 PM.png

    The second and third rules produce a more subtle change in position sizing than the first one. Whereas the first rule starts and stops trading on crossovers of equity with the moving average, the second and third rules reduce or increase the position size on moving average crossovers. Selecting the second rule will increase the position size for the currently selected method by X% when the equity crosses above/below the moving average. Selecting the third rule will decrease the position size by Y% when the equity crosses above/below the moving average. The second and third rules can be selected together or one or the other can be selected alone. The increase or decrease in the position size is relative to the current value of position size.

    If both rules are selected together, make sure that if one rule uses "above", the other uses "below." For example, the second rule might be to increase the position size 50% when equity crosses above the moving average. The third rule might be to decrease the position size by 30% when equity crosses below the moving average. In this case, the parameter is either 50% higher or 30% lower than the baseline value. Alternatively, you can alter the position size on crossovers in one direction but not the other by selecting only one of the second and third rules. For example, if you only select the second rule with a percentage value of 40% and select "above," then the position size will be 40% higher on crossovers above the moving average and will return to the baseline value on crossovers below the moving average.

    Under “options” on the Equity Curve Crossovers tab, you can enter the length of the moving average of the equity curve and the type of moving average. The length is the number of trades used to calculate the moving average. MSA has four optional moving average types: simple, exponential, weighted, and TRIX (triple exponential). There is also an option to show the moving average on the chart. The length entry and the option to show the moving average are also available through the Format Chart command.

    Real Time Position Sizing
    Real time position sizing refers to calculating the size of a trading position (i.e., the number of shares of stock/forex or contracts of futures) prior to placing a trade. This is in contrast to the position sizing calculations performed during simulations or back-testing of a trading system or method, such as the calculations performed by MSA in constructing the equity curve for the 51 chart window. MSA provides the Trade Size command of the Analysis menu to enable real time position sizing for individual market systems and the same command on the Portfolio menu for real-time position sizing of portfolios.

    The Trade Size window for market systems is shown below.

    Screenshot 2024-09-30 at 12.55.36 PM.png

    To begin, enter the current value of your account equity in the first box. If fixed fractional (fixed risk) or the profit risk position sizing method has been chosen, enter the trade risk in the second box. If the “trade in units” option has been selected, the trade risk will be the risk per unit; e.g., the risk per 100 shares. As explained previously, the trade risk is the dollar amount the trade would lose per share/contract if it were a loss. This is most often determined from the placement of a money management stop order or from the size of the largest historical loss. If required by the selected position sizing method, enter the market price or expected entry price of the trading vehicle and the average true range (ATR) on the bar prior to entry.

    Once these data have been entered, click the “Calculate” button in the Results section or press the Enter key on your keyboard. The number of shares or contracts will be displayed, along with several other values; namely, the required margin (for futures) or cost of the trade (for stocks/forex), the commissions and fees associated with the trade, position risk, position value, account leverage, and the account equity that will be available after deducting the trade cost/margin and commissions and fees. You can enter different values for the account equity and trade risk (if applicable) to recalculate the results. Click Close to close the window when finished.

    The calculations are performed using the position sizing method, parameters, and settings currently in effect. These settings include the options on the Analysis Setup and Position Sizing windows, including the equity curve crossover rules, as well as the dependency rules. The calculation is performed as if the trade in question was the next trade in the current sequence. That is, the trade for which the position size is calculated is assumed to be the trade that immediately follows the last trade in the current sequence. If, for example, the negative dependency rule has been selected -- "skip the next trade after a win, take the next trade after a loss" -- and the last trade in the current sequence is a win,

    Trade Size will calculate zero shares/contracts for the next trade. The calculation may also produce a zero position size if the equity curve crossover rule is in effect (depending on the selected rule and the equity curve) or if the entered value of equity is so low that the position size rounds down to zero from a fraction. Trade Size can also be used as a stand-alone position sizing calculator. In this mode, simply run MSA without opening a .msa file or entering any data into the program. With no data in the program, select "File -> New -> New MSA File" then select your position sizing method and options from the Analysis menu. Press F11 (or select Trade Size from the Analysis menu) to open the Trade Size window. Enter the data and click “Calculate,” as explained above.

    In most cases, the best way to use this feature is to maintain a .msa file containing an up-todate list of the trades from the system or method of interest. Use MSA to analyze the trades and optimize the position sizing method, preferably limiting the analysis to a range of trades and saving the rest for out-of-sample testing. Select any other rules, such as dependency rules or equity crossover rules, and verify the analysis with out-of-sample testing and Monte Carlo analysis. At this point, assuming the last trade in the current sequence is the most recent trade from your system or method, you can run Trade Size with the optimized position sizing parameters and rules to calculate the number of shares or contracts for the next trade. Enter each new trade into MSA to make sure any selected dependency or equity crossover rules reflect the actual trade history. Keeping the list of trades up-to-date also enables you to reoptimize as frequently as after each trade if desired. You should maintain a separate .msa file for each market system you follow with the program in order to store all your analysis settings.

    The Trade Size window for portfolios is shown below.

    Screenshot 2024-09-30 at 12.56.14 PM.png

    To use this window, enter the current value of your account equity in the space provided. Then enter the data for each market system in the boxes where it indicates "Enter data for next trade for market system (MS)". Use the Next MS button to move to the next market system until the data have been entered for each market system. Finally, click the “Calculate Position Sizes” button. The results are displayed in the table above the calculate button. The results include the name and number of the market system, the position risk ("Pos Risk") if applicable, the calculated position size for the next trade ("New Size"), the margin or cost for both the indicated position size ("New Cost/Margin") and for the open positions ("Open Cost/Margin"), and the commissions and fees corresponding to the calculated position sizes ("New Comm&Fees"). Note that the word “margin” is typically used with futures while “cost” is used with stocks/forex, as with the Trade Size command for market systems. This reflects the fact that futures trades require a margin deposit, whereas stocks and forex are typically bought or sold based on the position’s value.

    There are also columns indicating whether any of the calculated position size is due to a dependency or crossover rule. The columns labeled "Dep" and "Cross" show the position size due to dependency and crossover rules, respectively, from the market-system settings. The columns "Port Dep" and "Port Cross" show the position size due to dependency and crossover rules, respectively, from the portfolio settings. The values in these columns are shown with a "+" sign if the position size added to the total or "-" if it subtracted from the total. If the rule determined that the trade should be skipped, the word "Skip" is shown in the column. For example, a value of "+1" in the Dep column would indicate that a dependency rule in the market-system file increased the position by 1 contract for that market system. A value of - 500 in the Port Cross column would indicate that the portfolio equity curve crossover rule decreased the position size by 500 shares. The word "Skip" in the Port Dep column would indicate that a portfolio dependency rule determined that the next trade for that market system should be skipped.

    Below the rows for the market system results, totals over all market systems are provided for the open and new cost/margins, commissions and fees for the new trades, and the position risk and position value for the new trades. In addition, the available equity after subtracting the total new cost/margins and total new commissions and fees is also shown.

    Most of the required data, such as the trade risk and the entry price, are the same as described above for the Trade Size command for market systems. However, for portfolios, it’s also necessary to account for any open positions. This is the purpose of the check box “Open trade. Position size”. If there is an open position for the market system, the size of the position should be entered here. If no entry is expected for the market system, it can be excluded from the calculations by checking the box “No new entry; exclude MS”. This will ensure that no equity is allocated to this market system when determining the position sizes for the other market systems.
     
    Last edited by a moderator: Sep 30, 2024
    SOFEX likes this.
  5. TrAndy2022

    TrAndy2022

    Kelly Formula The Kelly formula is a specialized form of fixed fractional position sizing, described below, which uses an approximate formula – the Kelly formula – to determine the fixed fraction that maximizes the equity growth rate. Fixed fractional position sizing risks a specified fraction of account equity on each trade. The Kelly formula specifies a particular value of the fixed fraction. This “Kelly f value” is given by the following equation: Fk = ((WL + 1) * Pw – 1)/WL 44 where WL is the ratio of the average winning trade to the average losing trade and Pw is the probability of a winning trade. For example, if the average winning trade is $300, the average losing trade is $400, and the percentage of winning trades is 65%, the Kelly f value would be ((0.75 + 1) * .65 – 1)/0.75 or 0.183. This means that 18.3% of the account would be risked on each trade. To determine the position size, the trade risk is assumed to be equal to the largest historical loss. For example, if the largest loss experienced by the system in question was $1,200 trading one contract, and the account equity was $35,000, then 18.3% of $35,000 is $6,405. This is the amount to risk on the trade according to the Kelly formula. With a trade risk of $1,200, this means we can trade 6405/1200 or 5 contracts. MSA automatically calculates the Kelly f value for the current sequence of trades. The value is displayed in the Position Sizing window in the Parameters section when the Kelly formula is selected from the list of position sizing methods. Please note the following: 1. The Kelly formula is approximate in that it assumes all wins are the same size and all losses are the same size. The optimal f method, described below, removes this assumption. 2. The formula does not take equity drawdowns into account and may produce very large drawdowns in equity. In many cases, the position size will be limited by margin requirements when using the Kelly formula. 3. The Kelly formula is not generally considered to be a practical or viable method of position sizing and is only included for comparison to other methods and for educational purposes.
     
  6. SOFEX

    SOFEX

    That's pretty vague I think you should expand on that...:sneaky:
     
    taowave, ironchef, rb7 and 3 others like this.
  7. 2rosy

    2rosy

    Simple percentage. Builtin compounding.
     
    Zwaen likes this.
  8. SOFEX

    SOFEX

    With compounding every single trade you are very much relying on luck for the first trade(s) to be profitable, otherwise you will lose more on the first few than you will win on the next ones assuming you keep the % capital used of compounding the same every trade. The Kelly Formula gives you an idea of how to calculate that % so you optimally adjust every entry..
     
  9. 2rosy

    2rosy

    You're assuming people know their edge. I don't think they do. I just own indexes that trend up and buy the dip
     
    Sekiyo and SOFEX like this.
  10. ondafringe

    ondafringe

    WTF!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     
    #10     Sep 27, 2024
    VPhantom, taowave, EdgeHunter and 2 others like this.