Sorry, I got my terminology mixed up. The measure measured is the UPR, and not the Martin Ratio/Ulcer Index. I calculate it at the same intervals as the backtests. I calculate it as follows:
my (@upvalues, @ddvalues);
foreach my $value (@logreturns) {
push @upvalues, MkStats::max ($value - $MAR/100, 0);
push @ddvalues, MkStats::min ($value - $MAR/100, 0);
}
my $up = MkStats::mean (\@upvalues);
my $dd = MkStats::stdev (\@ddvalues);
$upr = $up / $dd;
It's perl code with extra error checking removed for clarity.
Which do you use? Sorry, I
Which do you use?
Sorry, I got my terminology mixed up. The measure measured is the UPR, and not the Martin Ratio/Ulcer Index. I calculate it at the same intervals as the backtests. I calculate it as follows:
It's perl code with extra error checking removed for clarity.