Package com.opengamma.strata.report

Reporting Framework

This package and its sub-packages define a reporting framework used to format and report the results of calculations.

Reports are generated using a report template and a set of calculation results. A report contains a table of data where the rows are the inputs to the calculations, for example trades, and the columns contain data from the calculation results or the trades.

Report templates

Report templates specify the type of the report and the columns included in the report. A report template is defined using an .ini file.

The first section of the .ini file defines the settings for the report. Currently this only contains the type of the report:

   [Settings]
   reportType = trade
 
The report columns are defined by the remaining sections in the .ini file. The section header defines the column name and the value attribute is an expression defining the value in the column. The following snippet from a trade report for FRA trades defines three columns: Settlement Date, Index and Par Rate.
   [Settlement Date]
   value = Trade.settlementDate

   [Index]
   value = Product.index.name

   [Par Rate]
   value = Measures.ParRate
 
The value expression is consists of multiple sections separated by dots. The first section specifies the object which is the source of the data in the column. The supported values are: The remaining parts of the expression are evaluated against the source object to find the value to display in the column. For example, if the expression is 'Product.index.name' and the results contain FraTrade instances the following calls will be made for each trade in the results:
  • FraTrade.getProduct() returning a Fra
  • Fra.getIndex() returning an IborIndex
  • IborIndex.getName() returning the index name
The cell in the report will contain name of the index referenced by the FRA.