Gamestudio Links
Zorro Links
Newest Posts
Optimize in a ranked asset portfolio
by dBc. 10/24/20 19:20
Close attempts
by jcl. 10/24/20 10:27
GET_TRADES - TRADE array buffer size?
by jcl. 10/24/20 10:25
Comparison of FX costs across brokers
by kalmar. 10/23/20 20:42
Plugin Binance - margin trade
by Grat. 10/22/20 09:12
Simulating MOC orders correctly in TRADEMODE
by jbhunter. 10/21/20 13:12
Missing Data - USD/MXN
by AndrewAMD. 10/21/20 13:08
AUM Magazine
Latest Screens
Paradox Vector
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
Who's Online Now
3 registered members (Dooley, AndrewAMD, Mio), 474 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
mr_T0ma5, AVL, ruins, speech, danalec
18528 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: 295
D
danatrader Online
Member
danatrader  Online
Member
D

Joined: Mar 2019
Posts: 295
// 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: 5
A
Alvin Offline
Newbie
Alvin  Offline
Newbie
A

Joined: May 2020
Posts: 5
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