I have now implemented the APD measure myself and incorporated it into CPI
by multiplying the existing CPI by the APD value. Code added and changed in
PerformanceManager.java includes:
public double getAvgProfitToDrawdown() {
double apd = 0;
if (trades > 0) {
apd = netProfit / maxDrawdown;
}
return apd;
}
public double getCPI() {
double performanceIndex = getPerformanceIndex();
double kellyCriterion = getKellyCriterion();
double aveDuration = getAveDuration();
double avgProfitToDrawdown = getAvgProfitToDrawdown();
if (aveDuration != 0 && performanceIndex > 0 && kellyCriterion > 0)
{
double netProfit = getNetProfit();
double cpi = performanceIndex * (kellyCriterion / 100) *
(netProfit / 1000) * avgProfitToDrawdown;
cpi /= Math.sqrt(Math.sqrt(aveDuration));
return cpi;
} else {
return 0;
}
}
There are eight other .java Programs that need to be changed. Just search
the source folder for files containing the word CPI and you will
immediately see what needs to be changed.
On Tuesday, December 24, 2013 7:37:54 AM UTC+1, Borg Alexander wrote:
>
>
>
> On Friday, August 9, 2013 12:53:00 AM UTC+2, Eugene Kononov wrote:
>>
>>
>> On the other hand, the sandard deviations of the returns and the number
>>> of trades is irrelevant for APD. These are, among the returns, the
>>> cornerstones of PI.
>>> The best thing would be to have a combination of these two measurements.
>>> What do you think?
>>>
>>
>> I agree. The most relevant metrics to me are PI, Kelly, APD, and average
>> duration. In the next release, all four of these will be reflected in CPI
>> (cumulative performance index).
>>
>>
>>
>>> Anyway please take a close look at my code.
>>>
>>
>> In about a week, I am planning to release another JBT version. That will
>> have my implementation of the MaxDD and APD. I suggest we take it as base
>> and see if it agrees with your MaxDD calculations.
>>
>>
>>
> Hi Eugene,
>
> did you already implement a metric that includes drawdown that you could
> share?
>
> Since August I made no more tests because of this (and also because I have
> very little time as two small companies somehow depend on my work).
>
> But I would love to make some optimizations that include drawdown.
>
> Thank you, Alexander
>
>
--
You received this message because you are subscribed to the Google Groups
"JBookTrader" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/jbooktrader.
For more options, visit https://groups.google.com/groups/opt_out.