Ralph Vince’s Optimal F Positioning Sizing

Forums ProRealTime English forum ProBuilder support Ralph Vince’s Optimal F Positioning Sizing

Viewing 15 posts - 1 through 15 (of 24 total)
  • #30763

    With regard to money management your largest drawdown hasn’t happened yet but it will and it will increase with your capital growth. The best course of action would be to use Ralph Vince’s Optimal F strategy to only reinvest the square root of the capital growth, i.e. your capital goes from 10k to 20k but you don’t double the size of your trades (position size), i.e. you only trade the sq root of the increase in capital growth and attribute that ratio to position sizing: The sq root of 2(x) = 1.4. You will effectively be trading a £14,000 account. Therefore position size has not grown as fast as your capital and this will avoid large future drawdowns that will always typically be 50% more than you backtest results ever hinted out.

    Can anyone code this for PRT as I have looked for it here but it’s not in the library:

    This is a good Optimal F position size overview:

    http://www.zorro-trader.com/manual/en/kelly.htm

     

    Thanks for any help, input.

    #30825

    The link provided don’t explain how to calculate the Optimal F, because it is automatically calculated by this platform kernel.

    This is the academic paper of Ralph Vince to explain how to get it: http://www.ralphvince.com/optimalf.pdf

    I think I can make something as a function to plug into Probacktest program. But it’s kind difficult at first glance I must admit.

     

    #30833

    This Optimal F is not the one of Ralph Vince 😉

    As they precise, this is the Optimal F of Zorro trader

    #30851

    It reminds me of Kelly criterion.


    @Bard

    Please share with us a complete description, in common words, to calculate it and I’ll code a function to add in any automated trading system, thanks in advance 🙂

    #30868

    Thanks Nicolas, that’s some “interesting” mathematics in the paper… yes I realise now scanning through it that there is more to it because of the portfolio aspect. I was reading this International Federation of Technical Analysis paper: http://ifta.org/public/files/journal/d_ifta_journal_11.pdf (page 21) which gives a good overview and also suggests an improvement on Vince’s method.

    I was actually going to suggest the same, to simplify things, if code was created that would be system specific. i.e. instead of calculating position sizing algos for multiple trading systems (as Vince intended) you perhaps write a code in the meantime that will tie the equity growth and trade size together by the Optimal F formula just for one trading system at a time?  (so the code can be added into that specific system). I will continue researching it and see what i can dig up.
    I still think, even as a “quick fix,” the Zorro approach would mitigate large future drawdowns that typically always exceed your backtest drawdowns by 50%!

    #30870

    Re: The differences between the Kelly Ratio and Optimal F: (from page 22 of link above)

    “Clearly, the Kelly Criterion when restated in terms of products (1a)(pls see screenshot) so that it is compared formulaically on an apples to apples basis with Optimal f (2)(see screenshot), rather than sums of logarithms (1)(see screenshot), is not the same. They do not yield the same answers for the values that maximize them except in the special case.

    The value for f which maximizes (1,1a,1b[r=0]) is the same as the f which maximizes (2) only in what is referred to herein as the “special case” in trading defined as:

    1) -W = the price of the underlying instrument when purchased, and
    2) The position to be assumed is a long position only.

    When one or both of these conditions are not met, the Kelly Criterion (1,1a,1b[r=0]) not only results in a different value (for the optimal fraction to bet) than does the Optimal f solution (2), but can often result in a number that is greater than unity. This is because, as explained later, the Kelly Criterion doesn’t produce an “optimal fraction to bet,” but rather a leveraging factor. These numbers are identical only in the “special case.”

    In the more common cases, the value that solves for the Kelly Criterion is not the optimal “fraction” of a trading account to risk. In all cases, the Optimal f solution will yield the correct growth- optimal fraction to wager. Thus, the Optimal f solution is a more generalized solution of which the Kelly Criterion is a subset, applicable in trading only when both conditions of the “special case” are satisfied. When these conditions are not both met (as is typically the case in trading) one must rely on the more generalized Optimal f solution (2) to yield the optimal fraction to risk.

    Both conditions of the special case are met in a gambling situation. In such situations, the value for f which maximizes (1,1a,1b[r=0]) is the same as the f which maximizes (2), and thus the Kelly Criterion yields the same value as the answer provided by the Optimal f solution.”

     

    #30880

    Do you have a wordpress WP Edit plugin, it might make posting / editing on this site easier (-:
    (Typically, when I ‘m not getting a “adding a url issue” or the “page jumping down” I get spacing issues – as seen above and for some reason now this post can now no longer be edited – although surely it should have remained editable until I logged out? or left the page?)

    #30883

     

    This would be cool to have in PRT.

    Here is a link to the simple version of optimalf as Ralph Vince suggests it for everybody who can not do the math, yet:

    http://www.dummies.com/personal-finance/investing/investing-strategies/the-optimal-f-money-management-style/

    #30891

    Thanks Derek, I came across this article too. I think the following two articles by:
    http://www.brainyforex.com/position-sizing-methods.html and http://traders.com/Documentation/FEEDbk_docs/1998/07/Abstracts_new/Zamansky/Zamansky9807.html
    might help @Nicolas to code a solution that gets rid of the problem of “wild swings” in equity and large drawdowns that can occur even when using Ralph Vince’s Optimal F.

    BRAINY FOREX:
    Optimal F

    Like the Kelly formula, optimal f position sizing method is a specialized form of fixed fractional (fixed risk) position sizing. Optimal f position sizing method uses the fixed fraction that maximizes the geometric rate of equity growth. This method was developed by Ralph Vince 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. 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 unit. As with the Kelly formula, optimal f position sizing is included primarily for educational purposes.

    Secure F

    Leo Zamansky and David Stendahl tried to overcome large drawdowns Optimal f by adding a special limit of maximal allowable drawdown. Secure F solves a task:

    Net Profit -> Max (similarly Optimal f) under condition Max Drawdown <= Max Allowed Drawdown.

    The difference between the Secure F and the Optimal f position sizing methods is that in case of Secure F the drawdown will be taken into account.  Value of Secure F can never be higher that the value of Optimal f.

    Number of units = (Secure F * Current Capital/starting risk per unity of assets)/Security Price
    where starting risk = maximal loss at trade(in %).

    Example:

     

    ———————————————————————————————————————————————————————————————–

    TRADERS . COM

    Here’s how to find a new fractional value of capital to invest in every trade to maximize returns subject to a constraint on drawdown, using a variation of the optimal f money management strategy:

    Vince introduces optimal f, and to find the value of optimal f, we need to maximize what Vince calls terminal wealth relative (TWR). The problem can be formulated thus:

    (Please see Zaminsky screenshot)

    ———————————————————————————————————————————————————————————————–

    NOTE:
    The IFTA conclusion below also addresses the issue of not knowing where the the optimal point will be in the future (we’re using past probabilities).
    A solution has been provided (see italics) in the IFTA Research Paper’s Conclusion: (page 26)

    “The above findings (singularities and discontinuities in geometric growth) have important implications for a trader wishing to implement Optimal f in his future trading. One of the major impediments to implementing the usage of Optimal f for geometric growth in trading is the lack of knowledge as to where the optimal point will be in the future.

    Since the Optimal f case will necessarily bound the future optimal point between zero and p (the sum of the probabilities of the winning scenarios), the trader need only perceive what p will be in the future. From there, trading a value for f of p/2 will minimize the cost of missing the peak of the Optimal f curve in the future.

    This occurs because each point along the Optimal f curve varies with the increase in the number of plays (time), T, as GT, where G is the geometric mean holding period multiple as given in Equation (2)(see previous screenshot). Thus, at T=2, the price paid for being at any future f value other than the optimal value is squared, at T=3, the penalty is cubed. Just as with the measure of statistical variance, outliers cost proportionally more. Although the trader cannot judge what will be the future value for Optimal f, by using the value of p/2 as the future estimate of the Optimal f, the trader minimizes this cost and is able to make a “best guess” estimate of what the future value for Optimal f will be.

    Note that the trader uses a predicted value for p in determining his future “best guess” for f . The greatest amount the trader might miss actually is the optimal point in the future and is the greater of p/2 or what we call p’, which is what p actually comes in as in the future window, p’ – p/2. These extreme cases manifest when the trader opts for f = p/2 and the future Optimal f=0, or, the trader opts for f = p/2 and the future Optimal f=p’. Thus, the greatest outlier, when the trader is opting to use a “best guess” for his future Optimal f = p /2 is minimized as the greater of p/2 and p’-p/2.

    Because the Kelly Criterion Solution is unbounded to the right, we are not afforded this outcome unless, we convert it to its Optimal f analog.

    At no losses, the Kelly Criterion solution is infinitely high, and only by convention can we conclude that the corresponding Optimal f is 1.0. The point of singularity we witness in Optimal f is mathematical, the discontinuity, by convention.”

    #47156

    I want to resurrect this thread. I’m also interested in optimal f position sizing but see no real possibility to incorporate it PRT. The best I have come up with so far is to calculate it in excel and then update the position size in the code manually.

    Has anybody a better solution?

    #47366

    That’s right, without Arrays capabilities, it should be very difficult to make an accurate calculation of the TWR..

    #47372

    I actually had an idea how to calculate the TWR without arrays. Not sure that it’ll work though. I will see if I can solve it.

    For the application of this (or any other) MM it would be really great if one could see the account equity in PRT. 🙁

    #47424

    @Despair: Have you made a comparison of the results between the simple and the full method of calculating the optimal f?

    Maybe, the difference is small and can be neglected when rounded on small position sizes.

    #47431

    I’m working on this. I will come with results soon.

    1 user thanked author for this post.
    #47433

    I just use a manually optimized factor of 1 for all my position sizes 😀

    Still, or because of that, really looking forward to your results!

Viewing 15 posts - 1 through 15 (of 24 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login