Proprietary Calendar Format Handling (eg. Summit) sub-system is for modifying QuantLib calendars. This is simple system. It provides a means of reading text files to adjust or create QuantLib calendars.
It originally used information from Summit. The file formats that the code reads are not proprietary to Misys (or Summit) so this code should work for other sources of calendar information.Type Manipulation and Column Name re-mapping sub-system provides a means of wrapping and rendering single plain-old-data values in a single boost::any so that they can be rendered as strings and converted to and from different types.
Importantly, it allows template functions to be added by the application programmer (that's you) to add more plain-old-data values. Some custom types have already been added, here are two: one is from a template for numeric types that can have different scales, another is for a US date string.
This sub-system might appear complicated, but the basic requirements are simple:
The last of these three is important: it uses strings as the intermediate values. So:
The dates don't work like this: they use a base class boost::gregorian::date, so
And then you can use
The whole point of these data type conversions is to support Containers for Comma-Separated Variable Data.Containers for Comma-Separated Variable Data) provides a means of loading and processing CSV files to support filtering, sorting, pivotting and range extraction of numeric data using C++ STL algorithms.
A facility to load CSV files has been added. It is a framework of utilities that the application programmer works within. It uses boost::iostreams to provide for
These CSV files are loaded into a boost::multi_array of boost::any objects by the application programmer's code. Each cell initially contains a string.
This boost::multi_array is then placed into a DataFrame (the name and the intent is borrowed from GNU-R's data-structure.) And this eepgwde::detail::DataFrame has sub-types that can be used to process the data column-by-column or row-by-row.
Processing by columns allows for a data-type to forced on a column. If the CSV file has been defined and compiled into the library (see Defining CSV files for input), then it can be completely rendered using: eepgwde::detail::DataFrame::render()
After that, you can convert the DataFrame contents to a vector of eepgwde::detail::DataFrame::Record and then subject it to the STL algorithms.
std::partition() and std::remove_if can be used to remove bad records.
The records can then use std::sort and std::stable_sort so that they can be used as input to a eepgwde::detail::Pivotter. This uses columns strike and maturity in a DataFrame to pivot the data: eepgwde::detail::StrikeMaturity.
There are also methods that allow for a DataFrame to be converted to a QuantLib::Matrix.