Gamestudio Links
Zorro Links
Newest Posts
Zorro version 3.0 prerelease!
by Grant. 02/24/26 22:21
WFO Training with parallel cores Zorro64
by Martin_HH. 02/24/26 19:51
ZorroGPT
by TipmyPip. 02/23/26 21:52
Camera always moves upwards?
by clonman. 02/21/26 09:29
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
5 registered members (TipmyPip, clint000, Grant, chsmac85, Martin_HH), 5,858 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Asset loop of length 1 -> missing per-asset average performance. #447706
12/30/14 05:23
12/30/14 05:23
Joined: Sep 2013
Posts: 504
California
G
GPEngine Offline OP
User
GPEngine  Offline OP
User
G

Joined: Sep 2013
Posts: 504
California
Strategy 1 [Test]
Code:
function run() {
  NumYears = 1;
  while(asset(loop("GBP/USD"))) {
    while(algo(loop("ALGO1", "ALGO2"))) {
      TakeProfit = 100 * PIP;
      Stop = 100 * PIP;
      if (Bar % 99 == 0) {
	enterLong();
      }
    }
  }
}


Produces
Code:
Portfolio analysis  OptF  ProF  Win/Loss  Wgt%

ALGO1 avg           .000  0.91   29/31    50.0  
ALGO2 avg           .000  0.91   29/31    50.0  

GBP/USD:ALGO1       .000  0.91   29/31    50.0  
GBP/USD:ALGO1:L     .000  0.91   29/31    50.0  
GBP/USD:ALGO1:S     .000  ----    0/0     -0.0  
GBP/USD:ALGO2       .000  0.91   29/31    50.0  
GBP/USD:ALGO2:L     .000  0.91   29/31    50.0  
GBP/USD:ALGO2:S     .000  ----    0/0     -0.0


Expected a "avg" line for each of 2 algos and 1 asset that were looped over.
Observed that the line like "GBP/USD avg 0.91 58/62" is absent.

I arrived at this expectation after observing that Strategy 2 [Test]:
Code:
function run() {
  NumYears = 1;
  while(asset(loop("GBP/USD", "EUR/USD"))) {
    while(algo(loop("ALGO1"))) {
      TakeProfit = 100 * PIP;
      Stop = 100 * PIP;
      if (Bar % 99 == 0) {
	enterLong();
      }
    }
  }
}


Produces
Code:
Portfolio analysis  OptF  ProF  Win/Loss  Wgt%

EUR/USD avg         .000  0.41   19/41    89.8  
GBP/USD avg         .000  0.91   29/31    10.2  

ALGO1 avg           .000  0.62   48/72   100.0  

EUR/USD:ALGO1       .000  0.41   19/41    89.8  
EUR/USD:ALGO1:L     .000  0.41   19/41    89.8  
EUR/USD:ALGO1:S     .000  ----    0/0     -0.0  
GBP/USD:ALGO1       .000  0.91   29/31    10.2  
GBP/USD:ALGO1:L     .000  0.91   29/31    10.2  
GBP/USD:ALGO1:S     .000  ----    0/0     -0.0

which does contain a line for each of the 2 assets and the 1 algo even though there is only 1 algo.

So a loop of 1 asset behaves differently than a loop of 1 algo. I would rather they both behave like the second example. Nothing special should happen for a loop of length 1, compared to 2. I still want an average stat even if there is only 1 asset.

Re: Asset loop of length 1 -> missing per-asset average performance. [Re: GPEngine] #447724
12/31/14 07:55
12/31/14 07:55
Joined: Jul 2000
Posts: 28,075
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,075
Frankfurt
As to my knowledge, the per-asset averages are only displayed when multiple assets are used. With a single asset, the asset average is identical to the strategy results.

Re: Asset loop of length 1 -> missing per-asset average performance. [Re: jcl] #447734
12/31/14 16:01
12/31/14 16:01
Joined: Sep 2013
Posts: 504
California
G
GPEngine Offline OP
User
GPEngine  Offline OP
User
G

Joined: Sep 2013
Posts: 504
California
I am pointing to the inconsistency between that behavior and the one for single vs. multiple Algos.
It's probably doesn't make a difference if you are only testing one Strategy. But I'm using grep (or gawk, perl, etc) across a directory full of performance reports to draw aggregate statistics, rankings. I was surprised to see some Assets were missing from "grep 'avg'" output.
I would have to write special parser to know, okay, when there is no avg .../... listed in the report, draw from the other numbers.

Re: Asset loop of length 1 -> missing per-asset average performance. [Re: GPEngine] #447748
01/02/15 08:48
01/02/15 08:48
Joined: Jul 2000
Posts: 28,075
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,075
Frankfurt
Ah, I see. It makes sense to print the average even with a single asset - I'll put that on our todo list.

Re: Asset loop of length 1 -> missing per-asset average performance. [Re: jcl] #447750
01/02/15 16:36
01/02/15 16:36
Joined: Sep 2013
Posts: 504
California
G
GPEngine Offline OP
User
GPEngine  Offline OP
User
G

Joined: Sep 2013
Posts: 504
California
Another one for your consideration.
Can you please add a line for BarPeriod to the performance report

Re: Asset loop of length 1 -> missing per-asset average performance. [Re: GPEngine] #447801
01/06/15 12:09
01/06/15 12:09
Joined: Jul 2000
Posts: 28,075
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,075
Frankfurt
Will do.


Moderated by  Petra 

Gamestudio download | 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