Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (SBGuy), 652 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 4
Page 4 of 4 1 2 3 4
Re: Dual Momentum Algorithm - The way Zorro would have done it [Re: jmlocatelli] #469599
11/24/17 04:21
11/24/17 04:21
Joined: Sep 2017
Posts: 235
H
Hredot Offline OP
Member
Hredot  Offline OP
Member
H

Joined: Sep 2017
Posts: 235
Great question jmlocatelli!
As is, the code assigns an equal share of funds to each asset bought.
You have the option to use assetWeight[assetSorted[i]]/totalSlope instead of just dividing by enterNum to calculate the Lot amount.
That would assign funds to each asset bought proportional to its momentum value in comparison with other bought assets.

Last edited by Hredot; 11/24/17 04:21.
Re: Dual Momentum Algorithm - The way Zorro would have done it [Re: Hredot] #477702
07/22/19 21:23
07/22/19 21:23
Joined: Mar 2019
Posts: 357
D
danatrader Offline
Senior Member
danatrader  Offline
Senior Member
D

Joined: Mar 2019
Posts: 357
// Note: The following is optimized for 2x leveraging!
Lots=(Capital+WinTotal-LossTotal)*Leverage/(4*enterNum*price()*LotAmount);

How would you optimize it for 5 times leverage?

Re: Dual Momentum Algorithm - The way Zorro would have done it [Re: Hredot] #481500
09/22/20 03:21
09/22/20 03:21
Joined: May 2020
Posts: 6
A
Alvin Offline
Newbie
Alvin  Offline
Newbie
A

Joined: May 2020
Posts: 6
I hope it's not too late to revive this topic.

First of all, congrats to OP for coding your own dual momentum strategy!

I'm also working my own flavor dual momentum recently. The biggest problem I have is understanding how to properly do a reality check on a trend following, reinvesting strategy such as dual momentum.

Is it necessary to detrend PRICES for the benchmark result of reality check? As this will remove the trend, it really messes up the results. Any advise and maybe explanation on when and why this would be necessary?

// Reality Check
NumTotalCycles = 1000;
if (TotalCycle > 1) Detrend = PRICES+SHUFFLE;
else Detrend = PRICES;
set(LEAN,PRELOAD);

Or is it enough to just do it this way?

// Reality Check
NumTotalCycles = 1000;
if (TotalCycle > 1) Detrend = SHUFFLE;
set(LEAN,PRELOAD);

Page 4 of 4 1 2 3 4

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