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
5 registered members (Nymphodora, AndrewAMD, TipmyPip, Quad, Imhotep), 824 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
Rate Thread
Can you change Detrend between cycles? #467675
08/21/17 05:48
08/21/17 05:48
Joined: Feb 2017
Posts: 369
D
Dalla Offline OP
Senior Member
Dalla  Offline OP
Senior Member
D

Joined: Feb 2017
Posts: 369
I'm tried modifying one of my scripts to run first with Detrend = 0, and then the rest of the runs with Detrend = SHUFFLE. The idea was to first get the profit of the strategy, and then run a robustness test (from Alice4b) in the rest of the runs using input from the first run.

Code:
if(Test) {
		NumTotalCycles = 11;
		if (TotalCycle > 1) {
			Detrend = SHUFFLE;
		}
	}



Alice4b code, modified to use input from first cycle

Code:
function evaluate()
{
  static int TestProfit = 0;
  if (TotalCycle == 1) {
    TestProfit = Balance;
  } else {
    //var TestProfit = 13559;
    static int Count = 0;
    if(Balance > TestProfit)
    Count++;

    var Bucket = floor(Balance/250);
    Bucket *=3;
    plotBar("Profit",Bucket,250*Bucket,1,SUM+BARS+LBL2,RED);
    plotBar("TestProfit",3*floor(TestProfit/250)+1,250*floor(TestProfit/250),1,BARS+LBL2,BLUE);

    if(TotalCycle == NumTotalCycles) {
      var Probability = (100.*Count)/NumTotalCycles;
      printf("n-------------------------------------------");
      printf("nBase system profit was: %f",TestProfit);
      printf("nReality Check: %.1f%% Random Probability",Probability);
      if(Probability <= 1)
      printf("nSystem result is significant");
      else if(Probability <= 5)
      printf("nSystem result is possibly significant");
      else
      printf("nSystem result is not statistically significant");
      printf("n-------------------------------------------");
    }
  }
}



When running this I get error 030 after the first run.
Is it not possible to achieve what I'm trying to do?
What should I do instead?

Re: Can you change Detrend between cycles? [Re: Dalla] #467678
08/21/17 10:59
08/21/17 10:59
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Detrend must be set before the price history is loaded. It can not be shuffled afterwards. You could create a copy of the asset, shuffle only the copy, and switch to the copy at the second cycle.


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