Gamestudio Links
Zorro Links
Newest Posts
Dialog box darstellung?
by tagimbul
18 minutes 53 seconds ago
2D/3D Game & Animation Artists AVAILABLE @ Indie price
by zagreusent
Today at 13:12
More than One "File_Open_Read" - Problem?
by Reconnoiter
Today at 11:51
How to keep track of Memory usage
by Reconnoiter
Today at 11:41
ShadeC EVO (Lightmap)
by 20BN
Today at 11:33
AUM Magazine
Latest Screens
Triton Wing
Computer Repair Simulator
Collider (working title)
Space Rider
Who's Online
23 registered (3run, Ch40zzC0d3r, 3dgs_snake, 20BN, Iglarion, Ayumi, Enayn, alibaba, AndrewAMD, FXcoderCM), 427 Guests and 6 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
defghi296516, serran0, michal_p, francismake, sqirtle
17663 Registered Users
Topic Options
Rate This Topic
#466018 - 05/21/17 04:54 Optimal F in a Portfolio – Does Zorro Overrisk?
Ger1 Offline

Registered: 03/28/17
Posts: 8
Optimal F in a Portfolio – Does Zorro Overrisk?

After reading Ralph Vince’s publications I believe that the implementation of Optimal F in workshop 6 is not correct and might, in case of a multicomponent portfolio, lead to excessive risk (we are far to the right of the peak of the optimal f curve).
When setting FACTORS the optimal fractions for re-investment are calculated and as the manual states, these factors are calculated independently for each asset and algo. This means that we get the optimal fraction for re-investment of each asset and algo if we only traded this one algo and asset on its own (e.g. in Workshop 6: we only trade the trend strategy on EUR/USD, results of USD/JPY and countertrend are ignored).
However, if we add additional strategies (algos) and assets to the script the optimal f from before is not optimal anymore in context of a whole portfolio due to correlations between the various components.
Ralph Vince’s uses a simple example in his paper “The Leverage Space Model” (p.19)

He uses a coin-toss experiment were with tails one loses $1 and with head one wins $2. The probability of occurrence of either event obviously is 50%.
If we calculate optimal f we get a result of 0.25. This means that for maximum growth we have to invest $1 for every $4 at stake.
Now, if we extend this experiment and throw 2 (!) coins at the same time the optimal fraction to invest changes, even if there is NO correlation at all. In case of 0 correlation the optimal f would not be 0.25 anymore BUT 0.23 (if we invest the calculated 0.25 from before we already OVERRISK).

This gets worse in case that these two games are perfectly correlated (meaning that if one coin lands on head the other one will land on head too). In this case it would be the same as playing only one game. If we invested in each game the optimal f that we calculated for the isolated game (that is, optimal f = 0.25) we’d effectively invest 0.5 not 0.25 anymore (as described above, in case of a perfect correlation, the two coin tosses that we perform at the same time can be seen as 1). Looking at the optimal f curve (figure 12 in the paper) we are far to the right of the optimal f value if we invest 0.5 and consequently severely OVERRISK.

My question to the Zorro developers is whether I am missing something or whether there is a specific reason of why optimal F is implemented in such a way in workshop 6.
I specifically refer to (Margin = 0.5 * OptimalF * Capital * sqrt(1 + ProfitClosed/Capital))
As ProfitClosed calculates the profit for each component separately (and thus, effectively creates separated sub-accounts for each algo/asset component) would you suggest to split the initial capital into X parts as well? Through this procedure it would not be required to implement the Leverage Space Model which considers joint probabilities of trade results of X components.

Thanks in advance.

#466371 - 06/12/17 10:42 Re: Optimal F in a Portfolio – Does Zorro Overrisk? [Re: Ger1]
jcl Offline

Chief Engineer

Registered: 07/22/00
Posts: 25548
Loc: Frankfurt
A good observation. The reason why OptimalF reduces from 0.25 to 0.23 in uncorrelated events is that you toss the two coins at the same time. If you would toss them a time apart, the capital change from the first toss would affect the investment in the second toss and therefore the OptimalF factor would be again 0.25.

In Workshop 6, a coin toss is equivalent to opening a trade. Since trades are normally opened at different times, it's a situation more equivalent to uncorrelated single coin tosses than to multiple simultaneous coin tosses. The analogy is not perfect because trades overlap, but due to the 0.5 factor we don't overrisk.

#466496 - 06/18/17 01:26 Re: Optimal F in a Portfolio – Does Zorro Overrisk? [Re: jcl]
Ger1 Offline

Registered: 03/28/17
Posts: 8
Thanks for your reply jcl.

Your statement would make sense to me if only a very small number of algos/assets with no correlation were traded.

I am fully aware that a simultaneous coin toss play does not completely represent trading due to different timing of events, but to illustrate the point I'd like to use it for an extreme example.

As mentioned above, we evaluated that the optimal F for the coin toss experiment (I will call it market system A) is 0.25. Now I am trading further strategies (I'll call them market system B, C and D) and incidentally the optimal F is 0.25 too. Further the largest loss for all market systems is $1.

Again, this means for each trade I put in $1 for every $4 I got in my stake (OptimalF/Largest Loss * Balance). In case that market systems A - D have a trade open at the same time, 100% of my trading capital are invested.

All that is required to wipe out my entire account is all 4 market systems having their largest loss at the same time.
Unless my market systems are completely anti-correlated this won't take too long. Now it might be argued that trades are usually not opened at the same time, but if one system opens a trade and another system has not closed the trade yet this has exactly the same effect as I could not re-balance my account yet.

This is an extreme case but it illustrates the point that optimal F of a single system traded alone is not the same as the optimal F of that system traded in combination with other systems in a whole portfolio.

And as Ralph Vince states (he uses 10 strategies over 10 markets ==> 10*10 = 100 components), I could be optimal on 99 of these 100 components, yet so far off on one component on the Leverage Space that I am losing money.

A quick and dirty solution according to this article ( is to assume the worst case scenario that all correlations of all of the markets in our portfolio go to 1.00.

Optimal F of each market system would then be the optimal F of each market system traded alone divided by the total number of market systems in our portfolio.

From my example above, the optimal F of market systems A - D would then not be 0.25 for each but 0.0625 (0.25/4).


Gamestudio download | chip programmers | Zorro platform | shop | resources | magazine | manual | support faq | bugs | beta features

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at)