## reasonable approach of the Kelly formula

Discussions about Money Management and Risk Control.
Dominican_after_all
Contributor
Posts: 1
Joined: Sat Jan 01, 2005 4:16 pm
Location: Dominican Republic
Contact:

### reasonable approach of the Kelly formula

Hi ,

I just had an idea about a position sizing technique using the kelly formula that seems logic to me.

I would like to share it to everyone so we can analize it.

Attachments

Murray Ruggiero
Senior Member
Posts: 41
Joined: Mon Oct 11, 2004 3:35 pm

### Tutorial on Optimal f

I have included the code for calculating optimal f, which was not show in the video as an attachment to this entry in this forum.

I have implemented optimal f in TradersStudio using its global macro language. Optimal f utility goes beyond just money management. Many professional traders do not study it because it is not realistic to use for money management in real life, even though it produced legendary results for Larry Williams during the 1987 Robbins World Cup. One use of it which is little discussed is calculating a moving value of f, and if that shifts over time , it is a sign that the distribution of trades is not constant and that the system could fail in the near future.

If anyone has any questions , I will be happy to answer them in this forum.
Attachments
OptimalfFunc.txt

Roscoe
Roundtable Knight
Posts: 250
Joined: Sat Jan 24, 2004 2:06 am
Location: Houston TX

### Re: Tutorial on Optimal f

Murray Ruggiero wrote:If anyone has any questions , I will be happy to answer them in this forum.
Hi Murray,

I would be interested to hear your opinion of using Ralph Vinceâ€™s Estimated Geometric Mean (which requires first finding optimal f to calculate) as a system performance metric.

Murray Ruggiero
Senior Member
Posts: 41
Joined: Mon Oct 11, 2004 3:35 pm
I read Ralph books a long time ago and did not remember that he used f as a measure to optimize a systems performance against. What this is doing is balancing profit with the largest losing trade. This is an automated way of optimizing to remove a few large losing trades, which if the sample size is small could lead to dangerous curve fitting.

Since our goal is to find the best system for the future, not make the most money historically just finding a method, which removes a few large losers, is not the best idea. We could modify this concept by substituting a more robust measure than largest losing trade, yes its not optimal f any more but it better for the purpose of system optimization, One example would be to calculate drawdown using Monte Carlo simulation at the 5% level, or
- (average drawdown + 3*stddev(Drawdown)) over the population, assuming drawdown is reported as a postive number otherwise it would be
(average drawdown-3*stddev(Drawdown)). We would then use one of these calculations to replace the largest losing trade in the optimal f equation. These values will not produce a system which makes the most money historically based on f but will produce if sample size is large enough a good measure for optimization.

The problem is that this is a powerful methodology and could be dangerous if not used correctly. If we optimize over a large sample size of trades in the development set and over a large range of parameters, This modified f is valuable because it gives us a single measure of performance so we can more easily look at the surface of the optimization to judge robustness. This is impossible if you have many statistics to look at for a given set of parameters.

This leads to another issue the nature of optimization, do you optimize over all the data, 80% of the data and test on 20%, the problem is that if that 20% is flat, that does not mean that the system is not any good. Finally you could use walk forward testing. I am discussing this money management and optimization issues over the next month or so in my forums at www.TradersStudio.com , it is free for you to access them you only need to register on the site. Since TradersStudio macro language allows you to code up these ideas, my users will supply good feedback and testing for these concepts.

Roscoe
Roundtable Knight
Posts: 250
Joined: Sat Jan 24, 2004 2:06 am
Location: Houston TX
Thanks Murray, I will code up your suggested variation to the Weighted Geometric Mean and see how it looks. My aim in all of this is to find a test metric that allows meaningful assessment of the robustness of a system, and using Mr. Vinceâ€™s unweighted HPR (which describes each trade as a multiplier of the entry price, expressed as a percentage + 1) as a base makes instinctive sense to me. I share your reservations as regards the use of the largest loss when calculating the weighted HPR to determine optimal f.

I also look at the ratio of the average unweighted HPR / StdDev(unweighted HPR) as a means of finding just â€œhow averageâ€

Murray Ruggiero
Senior Member
Posts: 41
Joined: Mon Oct 11, 2004 3:35 pm