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:


        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.

Reply

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre> <img> <div> <quote>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
1 + 11 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.