Gamestudio Links
Zorro Links
Newest Posts
Miliseconds capturing
by Dion. 02/06/23 13:27
Weekly Pivots
by paulk. 02/03/23 18:02
Corvitextu texture browser released...
by NeoDumont. 02/02/23 22:35
How many markets with Zorro free?
by XRaf. 02/02/23 15:33
Experiencing Issues with 2.53.6
by vinitrinh. 02/02/23 10:07
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (Michael_Schwarz, qin, AndrewAMD), 559 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Puezzin, Quant2, qin, ktroch, dagliottone
18890 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,602
Chicago
AndrewAMD Online OP
Serious User
AndrewAMD  Online OP
Serious User

Joined: Feb 2017
Posts: 1,602
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,933
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,933
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,602
Chicago
AndrewAMD Online OP
Serious User
AndrewAMD  Online OP
Serious User

Joined: Feb 2017
Posts: 1,602
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,602
Chicago
AndrewAMD Online OP
Serious User
AndrewAMD  Online OP
Serious User

Joined: Feb 2017
Posts: 1,602
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,602
Chicago
AndrewAMD Online OP
Serious User
AndrewAMD  Online OP
Serious User

Joined: Feb 2017
Posts: 1,602
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: 571
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 571
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,602
Chicago
AndrewAMD Online OP
Serious User
AndrewAMD  Online OP
Serious User

Joined: Feb 2017
Posts: 1,602
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