3 registered members (VoroneTZ, monk12, Quad),
829
guests, and 4
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
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
OP
Serious User
|
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:
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: 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]
#486660
09/15/22 03:26
09/15/22 03:26
|
Joined: Feb 2017
Posts: 1,718 Chicago
AndrewAMD
OP
Serious User
|
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: 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: Petra]
#486964
12/06/22 17:20
12/06/22 17:20
|
Joined: Feb 2017
Posts: 1,718 Chicago
AndrewAMD
OP
Serious User
|
OP
Serious User
Joined: Feb 2017
Posts: 1,718
Chicago
|
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.
|
|
|
|