Gamestudio Links
Zorro Links
Newest Posts
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
M1 Oversampling
by 11honza11. 04/20/24 20:57
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (frutza, Quad, AndrewAMD), 385 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 1 of 3 1 2 3
Z9 system performance 2008-2014 #469985
12/18/17 02:37
12/18/17 02:37
Joined: Dec 2017
Posts: 129
Halifax, NS
K
kujo Offline OP
Member
kujo  Offline OP
Member
K

Joined: Dec 2017
Posts: 129
Halifax, NS
Hi,

I was interested in Z9 system performance before 2012. However, it's not possible to change a start date yet (waiting for version 1.74). So, I decided to tweak data a bit and shift dates. As a result, data is from 2007/04/11 to 2014/03/27 with timestamps 2010/12/30 - 2017/12/15. Again, it was needed to feed earlier data to Z9 system.

The results are below:


The asset list is default

Attached Files
Z9.txt (361 downloads)
Z9_CSJ_test.txt (352 downloads)
Last edited by kujo; 12/18/17 02:46.
Re: Z9 system performance 2008-2014 [Re: kujo] #469986
12/18/17 03:39
12/18/17 03:39
Joined: Sep 2017
Posts: 235
H
Hredot Offline
Member
Hredot  Offline
Member
H

Joined: Sep 2017
Posts: 235
Great creative solution to a real problem with backtesting Z9!

It is actually rather funny to see that my first attempt DualMomentumV1.1 code performs considerably better over the same time period (the only changes I made was setting Lookback=12*20; instead of 24*20, and adjusting the dates). And I should point out that I personally consider the below performance to be complete garbage and a waste of time and money to trade live in that time period:


the asset list is the original one for Z9 (with SPY still on it). See attachments for the results.

Attached Files
AssetsZ9.csv (261 downloads)
DualMomentumV1.1.txt (391 downloads)
DualMomentumV1.1_test.txt (353 downloads)
Last edited by Hredot; 12/18/17 03:52.
Re: Z9 system performance 2008-2014 [Re: Hredot] #469987
12/18/17 07:52
12/18/17 07:52
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
This is the Z9 performance 2008-2017, with VOO replaced by SPY.



Within the next 2 days the new Zorro version will come out where you can set the Z9 start date with the asset list. It has also some modifications, f.i. capital is now reinvested and CAGR is displayed.

Re: Z9 system performance 2008-2014 [Re: jcl] #469990
12/18/17 14:04
12/18/17 14:04
Joined: Sep 2017
Posts: 235
H
Hredot Offline
Member
Hredot  Offline
Member
H

Joined: Sep 2017
Posts: 235
jcl, this is amazing news! Thank you for implementing capital reinvestment!
I hope there will be a parameter to decide which power of the returns to reinvest.
For instance, the default setting could be "1/2" for reinvesting the square root of returns. But please allow for the option to adjust it:

Instead of
Code:
sqrt(...)



Use
Code:
pow(...,P)



where P=0.5 initially and can be changed by a slider.

Do you think you could make that happen?

Re: Z9 system performance 2008-2014 [Re: Hredot] #469991
12/18/17 14:15
12/18/17 14:15
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
The power depends on the ratio of max margin to max drawdown. If DD >> Margin, use the square root, if Margin >> DD, directly invest all profits. The Z9 backtest uses P = 0.9.

Re: Z9 system performance 2008-2014 [Re: jcl] #469994
12/18/17 14:40
12/18/17 14:40
Joined: Sep 2017
Posts: 235
H
Hredot Offline
Member
Hredot  Offline
Member
H

Joined: Sep 2017
Posts: 235
This is just perfect, I like the update already! Thank you so much!
Eagerly waiting for it! grin

PS:

Somehow, the performance is still quite different on the same time period, despite Z9 now reinvesting. Thats kind of strange...


Re: Z9 system performance 2008-2014 [Re: Hredot] #470007
12/19/17 03:12
12/19/17 03:12
Joined: Dec 2017
Posts: 129
Halifax, NS
K
kujo Offline OP
Member
kujo  Offline OP
Member
K

Joined: Dec 2017
Posts: 129
Halifax, NS
Hredot, thanks for sharing your results! They really help to understand what's going on from the inside!


Jcl, thanks for Z9 update, performance looks more stable. I have some questions:

1. There are new types in an asset list: 0 - stock ETF, 1 - bond ETF. Could you please clarify types 2 and 3?

2. As I understood, Z9 reinvests Capital * pow(1 + (WinTotal -LossTotal) / Capital), 0.9). Is it correct?

3. If I want to withdraw profits monthly how to calculate optimal withdrawal amount in this case? How to withdraw it with the new Z9 system?



Last edited by kujo; 12/19/17 03:13.
Re: Z9 system performance 2008-2014 [Re: kujo] #470012
12/19/17 11:39
12/19/17 11:39
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
2 is for non-us indexes and 3 for a lead index that represents the US market. The formula is correct, although Z9 calculates the same in a different way. For withdrawing, you need normally no complex formula. The difference between pow(0.9) and pow(1) in the backtest is marginal.

Re: Z9 system performance 2008-2014 [Re: jcl] #470017
12/19/17 13:40
12/19/17 13:40
Joined: Dec 2017
Posts: 129
Halifax, NS
K
kujo Offline OP
Member
kujo  Offline OP
Member
K

Joined: Dec 2017
Posts: 129
Halifax, NS
Originally Posted By: jcl
The difference between pow(0.9) and pow(1) in the backtest is marginal.


Thanks, as I understand the new Z9 is heavily focused on reinvestments because difference between pow(0.9) and pow(1) will be not so big: not much to withdraw.

Also I have a question about a margin call conditions. Below is a piece of Z9_test.log and a first trade:
Originally Posted By: jcl

TLT 1.00 0 -> 123
[TLT::L2301] Long 123@81.06330 at 00:00:00
Vol $9973 Bonds $9973 Margin 4986 Levg 2.0

[424: Thu 08-09-18 00:00] 5000 +51.50 1/0 (81.83)
[425: Fri 08-09-19 00:00] 5000 -94.87 0/1 (81.04)
[426: Mon 08-09-22 00:00] 5000 -409 0/1 (77.65)
[427: Tue 08-09-23 00:00] 5000 -410 0/1 (76.88)
[428: Wed 08-09-24 00:00] 5000 -446 0/1 (77.45)



To avoid margin call MarginVal should be < Equity.

MarginVal on [428: Wed 08-09-24 00:00] equals (9973 - 446) * 0.5 = 4763.5, where 9973 - volume , 446 - open loss, 0.5 - 50% margin requirement.

Equity on [428: Wed 08-09-24 00:00] equals 5000 - 446 = 4554, where 5000 - current balance, 446 - open loss.

In this case Equity(4554) < MarginVal(4763). So, it's a margin call.
I wonder where my calculation are wrong?

Re: Z9 system performance 2008-2014 [Re: kujo] #470018
12/19/17 14:19
12/19/17 14:19
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
Margin call detection is switched off with Z8 and Z9. Otherwise you'd naturally get margin calls all the time, since the Capital slider sets up the margin, not the balance. The minimum that you need on your account is displayed under "Required Capital".

Page 1 of 3 1 2 3

Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

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

Powered by UBB.threads™ PHP Forum Software 7.7.1