Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 975 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Upgrading - Testing for Margin setting? #452665
06/21/15 16:55
06/21/15 16:55
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,609
Hi jcl. On the Trading page under Switching Strategies, the 2nd bullet says:

Code:
If the new strategy has a different Required Capital than the old one - this is often the case for the Z systems - run a test with the old one at the current Margin setting, note the capital, then install the new one with Margin adjusted so that the same capital is required.



Is this correct? In prior threads the upgraded system/strategy was to be Tested to the Required Capital that was originally started with.

For example, say a strategy was started with a Margin setting of 50 reflecting an initial Required Capital invested of $1,000. The strategy has done well, and profits have been reinvested per the square root rule such that Margin is now at 75. If one is now going to upgrade and Tests per the above with Margin 75, won't the resulting Required Capital be too large, essentially ignoring the trading time that has passed, violating the square root rule, and leading to greater risk of margin call?

If on the other hand the above method is OK (possibly equivalent to the other method?), how does one apply the square root rule going forward? Initial capital is used in the formula - in the example above is that the original $1,000 or the newly-calculated Required Capital?

Thanks.

Re: Upgrading - Testing for Margin setting? [Re: DdlV] #452682
06/22/15 10:46
06/22/15 10:46
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
The method is ok. You have already observed the square root rule by increasing the margin to only 75. The capital on your account must therefore be higher than the required capital for Margin 75. So you can continue with the new system and identical capital setting.

Re: Upgrading - Testing for Margin setting? [Re: jcl] #452695
06/22/15 14:20
06/22/15 14:20
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,609
OK. But what about the application of the square root rule going forward?

The old system Tests to CR of $1k for Margin 50. It will Test to a higher CR for Margin 75 - say $3k to make the numbers simple. Using the $3k from this last old system Test and Testing on the new version gives Margin of, say, 42. I trade the new system at Margin 42 for a while longer, and make even more $$$ (of course! laugh ).

Now, when using the square root rule formulas, what do I use for C=Capital? The original $1k? Or the new $3k? I need to stick with the $1k, correct?

Thanks.

Re: Upgrading - Testing for Margin setting? [Re: DdlV] #452699
06/22/15 14:36
06/22/15 14:36
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Yes. The C in the formula is your initial capital regardless of how many Zorro versions you have installed inbetween.

Re: Upgrading - Testing for Margin setting? [Re: jcl] #452701
06/22/15 14:37
06/22/15 14:37
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,609
Thanks.

Re: Upgrading - Testing for Margin setting? [Re: DdlV] #452703
06/22/15 15:06
06/22/15 15:06
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,609
Hi jcl. Please bear with one more follow-on question: What about adjusting Margin for reinvesting profits?

The formula was ReinvestedProfitsMargin=(CurrentCapital/OriginalCapital)*OriginalMargin. CurrentCapital is calculated from Profit, Withdrawals, and OriginalCapital, so no problem. But what about OriginalMargin? That can't be the original Margin from who knows how many versions ago that Tests differently than the new version, can it? Doesn't it need to be the Margin that Tests on the new version to CR~=OriginalCapital?

Thanks.

Re: Upgrading - Testing for Margin setting? [Re: DdlV] #452725
06/23/15 11:41
06/23/15 11:41
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
That formula is only valid when the relation of Margin and Capital is approximately linear.

When changing versions, better don't use that formula but determine Margin as described above.

Re: Upgrading - Testing for Margin setting? [Re: jcl] #452729
06/23/15 13:27
06/23/15 13:27
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,609
Thanks jcl. But I don't think we're on the same page. I understand between versions there are potential discontinuities and the formula can't be directly applied. However...

Q1: While running a given version and not upgrading to a different version, I wish to reinvest profits. Since I'm still in "linear land" since I haven't changed versions, the formula applies, correct?

Q2: If the above is correct and the formula applies during the time period of running a given version, what do I use for OriginalMargin after an upgrade(s) has occurred?

Going back to the example numbers and expanding the example:

I start Zx 1.17 with $1k because it Tests to CR of $1k for Margin 50. Zx of course laugh does a wonderful job and balance rises to $3k. Since I'm still on 1.17 I apply the linear formula and get a new Margin of (say) 75.

Now 1.32 comes out. Following your prescription above, I Test 1.17 at Margin 75 and come up with CR of (say) $2k. I run a bunch of Tests on 1.32 and find that Margin 103 gives CR ~= $2k. So I upgrade to 1.32 and set Margin to 103.

1.32 does even better than 1.17 (of course laugh ) and after a bit my balance is $10k. I want to reinvest profits. Since I'm still running 1.32 and in its "linear land", the formula above applies - except: What number do I use for OriginalMargin?

Q3: Or, if the "linear land" formula becomes completely invalid after any upgrade, what formula do I then use to compute new Margin for reinvesting?

Thanks.

Re: Upgrading - Testing for Margin setting? [Re: DdlV] #452730
06/23/15 14:32
06/23/15 14:32
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Q1 - Yes. Q2 and Q3 - No, for the Margin setting use the method from the manual, with the backtest.

Re: Upgrading - Testing for Margin setting? [Re: jcl] #452735
06/23/15 15:36
06/23/15 15:36
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,609
Thanks jcl. But that's a bit too cryptic for my level of understanding currently. frown

By "the manual", do you mean the Money Management page? The only thing it says about updating Margin is NewMargin=sqrt(CurrentBalance/OriginalCapital)*OriginalMargin.

Let's be concrete again, starting with that page's example. I start Zorro and strategy Zn version <original> with $1k, Margin 50. The account doubles and to reinvest per the formula I now set NewMargin=sqrt(2000/1000)*50~=70.

Now I upgrade Zorro and Zn to version <new>. I Test version <original> with Margin 70 and get (say) CR=$1.5k. I Test many different Margin values on version <new> and find that Margin=103 gives CR~=$1.5k. So I start Trading version <new> with Margin=103.

The account doubles again, and I want to reinvest using the formula from the manual. Which of these is correct?

a) NewMargin=sqrt(4000/1000)*50
b) NewMargin=sqrt(4000/1000)*103
c) other

Thanks.

Page 1 of 2 1 2

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1