PDL::Finance::TA
PDL::Finance::TA is a perl module allowing the user to perform technical analysis on financial data stored as PDLs.
0.01
The movavg() function takes two arguments, a pdl object and the number of elements over which to calculate the moving average. It can be invoked in two ways:
movavg()
use PDL; use PDL::Finance::TA 'movavg'; my $ma_13 = $p->movavg(13); # the 13-day moving average my $ma_21 = movavg($p, 21); # the 21-day moving average
For a nice example on how to use moving averages and plot them see "movavg.pl" in examples.
Copyright (C) 2013-2014. Vikas N Kumar <vikas@cpan.org>. All Rights Reserved.
This is free software; You can redistribute it or modify it under the terms of Perl itself.
To install PDL::Finance::TA, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PDL::Finance::TA
CPAN shell
perl -MCPAN -e shell install PDL::Finance::TA
For more information on module installation, please visit the detailed CPAN module installation guide.