[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trendiness



PureBytes Links

Trading Reference Links

Sorry I am so tardy responding to this thread.

It may be that TS/EL is not the best tool for exploring numerically
intensive problems even for simple statistical simulations. Perl, not
known as a numerical language, but easy to learn, can do this stuff fairly
quickly. For example, creating and charting a bunch of 10,000 or
100,000 Bernoulli trials takes only a few seconds. And the Perl code that
does this is pretty simple: 

    use strict; my ($sum, @x);
    use Chart::Plot;
    use Math::Random qw(random_uniform_integer); 

    for (my $j=0; $j<10; $j++) {
        for (my $i=1; $i<=10000; $i++) {
            $sum += -1 + 2 * random_uniform_integer (1,0,1);
            unless ($i%10) { push @x, $i; push @y, $sum; }
        }

        my $img = Chart::Plot->new(800,600); 
        $img->setData (\@x, \@y, "noPoints line");
        open (OUT,">plot$j.gif"); binmode OUT; print OUT $img->draw(); close OUT;
        $sum = 0; @x = @y = ();
    }

See 

    http://www.speakeasy.org/~cgires/trading/random/

for a number of example charts. For serious statistical analysis, my
favorite platform is R, 

    http://www.r-project.org/