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 (AndrewAMD, Nymphodora, Quad), 919 guests, and 6 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
Add Monte Carlo data array to PERFORMANCE struct #486630
09/12/22 14:19
09/12/22 14:19
Joined: Feb 2017
Posts: 1,718
Chicago
AndrewAMD Online OP
Serious User
AndrewAMD  Online OP
Serious User

Joined: Feb 2017
Posts: 1,718
Chicago
Can the results of the Monte Carlo test be added to the PERFORMANCE struct?

Specifically, make a struct like this, and declare an array of length=10:
Code
typedef MONTECARLO_RESULTS{
    var vConfidenceLevel;  // percent
    var vAR;               // percent
    var vDDMax;   // in account currency
    var vCapital; // in account currency
} MONTECARLO_RESULTS;

// add to PERFORMANCE struct:
MONTECARLO_RESULTS MonteCarloResults[10];
This way, I can build a drawdown analysis into my script.

To be clear, this is the data I want to capture:
Code
Confidence level     AR   DDMax  Capital
 10%                236%  1440$  1390$
 20%                227%  1550$  1470$
 30%                218%  1680$  1570$
 40%                209%  1830$  1680$
 50%                202%  1940$  1760$
 60%                193%  2140$  1900$
 70%                186%  2340$  2040$
 80%                174%  2730$  2320$
 90%                166%  3080$  2580$
 95%                146%  4010$  3580$
100%                104%  5640$  4710$

Re: Add Monte Carlo data array to PERFORMANCE struct [Re: AndrewAMD] #486644
09/13/22 12:34
09/13/22 12:34
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
The MonteCarlo factors are contained in g->pMonteCarlo, the 3 results can be derived from them. We'll include a script snippet in the next update.

Re: Add Monte Carlo data array to PERFORMANCE struct [Re: AndrewAMD] #486655
09/13/22 18:07
09/13/22 18:07
Joined: Feb 2017
Posts: 1,718
Chicago
AndrewAMD Online OP
Serious User
AndrewAMD  Online OP
Serious User

Joined: Feb 2017
Posts: 1,718
Chicago
This sounds useful, thanks!

Re: Add Monte Carlo data array to PERFORMANCE struct [Re: AndrewAMD] #486660
09/15/22 03:26
09/15/22 03:26
Joined: Feb 2017
Posts: 1,718
Chicago
AndrewAMD Online OP
Serious User
AndrewAMD  Online OP
Serious User

Joined: Feb 2017
Posts: 1,718
Chicago
While you're at it, can you also add to the documentation how to read g->pEquity and g->pDrawDown? From what I can tell, all of the interesting data is at positions LookBack inclusive through Bar inclusive. Like this:
Code
function evaluate(){
	int i;
	for(i=LookBack;i<=Bar;i++){
		printf("#\n[%d] e:%0.2f, dd:%0.2f",i,(g->pEquity)[i],(g->pDrawDown)[i]);
	}
}
This way, we can do all kinds of analysis on the final equity curve.

Re: Add Monte Carlo data array to PERFORMANCE struct [Re: AndrewAMD] #486960
12/01/22 14:58
12/01/22 14:58
Joined: Feb 2017
Posts: 1,718
Chicago
AndrewAMD Online OP
Serious User
AndrewAMD  Online OP
Serious User

Joined: Feb 2017
Posts: 1,718
Chicago
It looks like the new Performance script just parses the performance report.

When is the performance report generated, exactly? I was hoping to gather the info at the end of a script instead of from a separate script.

Re: Add Monte Carlo data array to PERFORMANCE struct [Re: AndrewAMD] #486962
12/04/22 07:13
12/04/22 07:13
Joined: Apr 2008
Posts: 585
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 585
Austria
As to the first question, the curves are documented under Strategy Statistics: EquityAtBar etc.

The performance report is generared after the evaluate call (I believe). For parsing it in the same script you can use the cleanup function.

Re: Add Monte Carlo data array to PERFORMANCE struct [Re: Petra] #486964
12/06/22 17:20
12/06/22 17:20
Joined: Feb 2017
Posts: 1,718
Chicago
AndrewAMD Online OP
Serious User
AndrewAMD  Online OP
Serious User

Joined: Feb 2017
Posts: 1,718
Chicago
Originally Posted by Petra
As to the first question, the curves are documented under Strategy Statistics: EquityAtBar etc.

The performance report is generared after the evaluate call (I believe). For parsing it in the same script you can use the cleanup function.
Ah, I think you mean ResultsAtBar, ProfileAtBar, and DrawDownAtBar. Yes, that is what I was looking for, thanks!

ResultsDaily also seems similarly useful, hmm.


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