The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

Finance::GeniusTrader::BackTest::Spool

This modules provides some functions to manage a backtest directory.

$spool = Finance::GeniusTrader::BackTest::Spool->new($data_directory);

Create and initialize a BackTest::Spool object with a specific directory, where backtest data are stored.

$spool->use_cache(0|1)

Tell if data are cached before being written. Default to 1. In that case you have to call $spool->sync from time to time to write data on the disk.

$spool->update_index()

Force an update of the index data. Use that if a long time has elapsed since the read and the index may have been updated.

$spool->add_alias_name($sysname, $alias);

This function will link an alias and a system name.

$spool->get_alias_name($sysname)

Return the alias name of the system if it exists.

$spool->add_results($sysname, $code, $stats, $portfolio, [$set]);

This function will add new data or update old ones in the spooler.

$spool->sync()

Write the cache on disk.

$hash = $spool->list_available_data([$set]);

This function will return a list of systems/codes available. $hash->{$sysname} = [ list of codes ];

$spool->get_stats($sysname, $code);

This function will return all stats available for a given $sysname and $code.

$spool->get_portfolio($sysname, $code);

This function will return a portfolio for a given $sysname and $code.