Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Edgar_Herrera, VoroneTZ, Akow), 973 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 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