This modules provides some functions to manage a backtest directory.

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

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


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.


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.


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.


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.