Gamestudio Links
Zorro Links
Newest Posts
Starting Zorro
by brax
Yesterday at 21:20
Sam Foster Sound | Experienced Indie Game Composer for Hire
by titanicpiano14
Yesterday at 19:09
Lost Key
by jcl
Yesterday at 13:58
Aum119 is ready
by Iglarion
Yesterday at 13:09
Zorro on Linux
by Nanitek
Yesterday at 11:08
AUM Magazine
Latest Screens
RPG PARTY
Triton Wing now available on Steam
AckCon'17: Lotter vs The World
Triton Wing
ZeaL
Who's Online
13 registered (Ch40zzC0d3r, AndrewAMD, Dico, ezaffa, NeoDumont, jenGs, Realspawn, Hredot, preacherX, jyd), 501 Guests and 4 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
vivekkumar, Hale75, victrades, htj, anufriyev
17781 Registered Users
Topic Options
Rate This Topic
#466018 - 05/21/17 04:54 Optimal F in a Portfolio – Does Zorro Overrisk?
Ger1 Offline
Newbie

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

Hi,
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)
http://www.automated-trading-system.com/wp-content/uploads/2010/03/Vince-LeverageSpaceModel.pdf

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.
Cheers

Top
#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: 25816
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.

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

Registered: 03/28/17
Posts: 29
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 (http://www.futuresmag.com/2012/05/31/managing-portfolio-risk-leverage-space?page=5) 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).

Top
#467105 - 07/16/17 02:30 Re: Optimal F in a Portfolio – Does Zorro Overrisk? [Re: Ger1]
Ger1 Offline
Newbie

Registered: 03/28/17
Posts: 29
Any feedback on above??

Top
#467122 - 07/17/17 11:25 Re: Optimal F in a Portfolio – Does Zorro Overrisk? [Re: Ger1]
jcl Offline

Chief Engineer

Registered: 07/22/00
Posts: 25816
Loc: Frankfurt
Same answer as above. It depends on whether the systems are always in the market or only trade punctually. If they are always in the market, you must treat them as separate systems and reduce the capital accordingly. If they only trade punctually, you can treat them as a single system and trade with all your capital.

Top
#467145 - 07/18/17 09:18 Re: Optimal F in a Portfolio – Does Zorro Overrisk? [Re: jcl]
Ger1 Offline
Newbie

Registered: 03/28/17
Posts: 29
Thanks a lot jcl! This makes sense to me.

From your experience, what is the best way to achieve this?

Would you do something like this?

Margin = .5*OptimalF*Balance/NumOpenTotal;

In other words decreasing your trade size based on how many trades are open.

Or would it be better to limit the total trade number to rather than reducing risk per trade?

Cheers

Top
#467170 - 07/19/17 09:33 Re: Optimal F in a Portfolio – Does Zorro Overrisk? [Re: Ger1]
jcl Offline

Chief Engineer

Registered: 07/22/00
Posts: 25816
Loc: Frankfurt
No, I would not use an algorithm at all for reinvesting in live trading mode. You normally want manual control over reinvestment, so in all trade systems that I know you manually enter the invested capital. OptimalF is then used only for distributing the capital among the assets and algos of the portfolio.

Top



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) 3dgamestudio.net