NAME
Quant::Framework::Utils::Test
DESCRIPTION
This module is used when testing Quant::Framework modules to create new documents. A set of pre-defined templates are provided which can be used to create test documents. Also it is possible to change some/all of the test document by passing corresponding key/values to create_doc.
SYNOPSIS
use Quant::Framework::Utils::Test;
#using default values from test data file
Quant::Framework::Utils::Test::create_doc("corporate_actions");
#changing some of values in the test data file
Quant::Framework::Utils::Test::create_doc("corporate_actions",
{ symbol => 'ABCD',
chronicle_reader => $reader,
chronicle_writer => $writer,
actions => {
"62799500" => {
"monitor_date" => "2014-02-07T06:00:07Z",
"type" => "ACQUIS",
"monitor" => 1,
"description" => "Acquisition",
"effective_date" => "15-Jul-14",
"flag" => "N"
},
}
});
create_doc
Create a new document in the test database
params:
$yaml_db => The name of the entity in the YAML file (eg. promo_code)
$data_mod => hasref of modifictions required to the data (optional)
create_underlying_config
Creates an instance of UnderlyingConfig (for EURUSD or GDAXI) for tesing purposes.