Welcome to the Flametree Technologies Wiki
/
🔧
Configuring FIA
Configuring FIA
🔧

Configuring FIA

The mechanics of configuring FIA are covered in the following sections:

Definition
Link
Date formats for imported data
🔧Date formats
File names for imported data
🔧File names
Report configuration
🔧Report settings
Equity and hybrid attribution configuration
🔧Equity and hybrid attribution settings
Currency attribution settings
🔧Currency attribution settings
Fixed income attribution settings
🔧Fixed income attribution settings
Sector settings
🔧Sector settings
Miscellaneous settings
🔧Miscellaneous settings
File encryption
🔧File encryption

Data types

Data parameters used by the API are of the following standard types:

  • integer
  • double
  • long
  • boolean
  • string
  • vector<string>
  • vector < vector <string > >

Errors

If any of

  • Field does not exist
  • The assignment is badly formed
  • The field is assigned a value that is not appropriate, eg assigning a string to a boolean-valued variable
  • The field is assigned more than once

then FIA will flag a fatal error and processing will stop.

‣

Use cases

Consider the following use case for FIA.

We want to run single-level Brinson attribution on a portfolio against a benchmark, using Industry as the asset allocation variable. Portfolio and benchmark data are in files called fia_p.csv and fia_b.csv, and security data is in fia_s.csv.

To run this case from the command line, set up a configuration file as follows:

[FIA]
PortfolioFile=fia_p.csv
BenchmarkFile=fia_b.csv
SecurityFile=fia_s.csv
BrinsonAllocationSectors=Industry
SummaryAttributionReport=true
InteractiveAttributionReport=true
ReportSectors=Industry,Security
XLSreport=true
Configuration file

This specifies which data files you want to load into FIA, that you want to run Brinson attribution based on the 'Industry' sector, that you want to generate summary and interactive attribution reports in Excel, and that you want the interactive report to show industry-level and security-level data.

To run this case from Python code, read the three files into local arrays called p, b, s, and set up a Python file that contains the following assignments:

Python code for API

And to use the Web API, upload the files to the server, assign settings to JSON and include this in your calling file:

JSON settings for Web API

The aim of this page is not to describe each calling mechanism in detail; this is done elsewhere on the wiki. Instead, we stress the common features between each approach.

🔧Setting parameters using a configuration file🔧Setting parameters through the API🔧Setting parameters via the Web

How to use configuration settings

FIA is a highly flexible tool that can be called in multiple ways, depending on your requirements. The program may be run

  • from the command line, using a configuration file
  • from Python, Java, C# and other languages, using the Flametree API
  • over the Web, using a RESTful API

Whichever approach you select, FIA's core operating model is always the same.

FIA is first configured by assigning values to various parameters, such as

  • the names of files or arrays from which data is read;
  • which reports are to be generated, and what fields they should show;
  • attribution analysis flags, which set the sector to use for Brinson attribution, or the type of yield curve decomposition to use.

The program is then run and reports are generated. The mechanics of this process across various environments are described in 'Running FIA'.

In general, configuring FIA is a matter of making multiple assignments of the form

Field = Value

in a configuration file, or

FIA_set_xxx ( SYMBOLIC_CONSTANT_FOR_FIELD, Value );

in code. Here, Field and SYMBOLIC_CONSTANT_FOR_FIELD are labels for the quantity that is to be set, while Value can be an integer, a number, a label or string, a list of sectors, or a data array.

💡
The order in which assignments is made does not matter
💡
Fields and values are not case-sensitive.

FIA checks all configuration settings that you supply. If there is an error, the program will exit with an informative message. Please refer to the error page for more information about this topic.

‣
🔧Date formats🔧File names🔧Report settings🔧Equity and hybrid attribution settings🔧Currency attribution settings🔧Fixed income attribution settings🔧Sector settings🔧Miscellaneous settings🔧File encryption

FIA_python36.FIA_set_matrix( FIA_API_constants.FT_MATRIX_PORTFOLIO, p );
FIA_python36.FIA_set_matrix( FIA_API_constants.FT_MATRIX_BENCHMARK, b );
FIA_python36.FIA_set_matrix( FIA_API_constants.FT_MATRIX_SECURITY, s );
FIA_python36.FIA_set_bool ( FIA_API_constants.FT_BOOL_XLS_REPORT, True );
FIA_python36.FIA_set_string ( FIA_API_constants.FT_STRING_DATE_FORMAT, "%Y-%b-%d" );
FIA_python36.FIA_set_integer ( FIA_API_constants.FT_INT_BATCH_ID, 1 );
FIA_python36.FIA_set_bool ( FIA_API_constants.FT_BOOL_SUMMARY_ATTRIBUTION_REPORT, True );
FIA_python36.FIA_set_bool ( FIA_API_constants.FT_BOOL_INTERACTIVE_ATTRIBUTION_REPORT, True );
data = {
"PortfolioFile"	                : "fia_p.csv",
"BenchmarkFile"	                : "fia_b.csv",
"SecurityFile" 	                : "fia_s.csv",
"batch_id"		                  : "1",
"BrinsonAllocationSectors"      : "Industry",
"ResidualReturnLabel"           : "Stock selection",
"DateFormat"	                  : "%Y-%b-%d",
"SummaryAttributionReport"      : "true",
"InteractiveAttributionReport"  : "true",
"ReportSectors"                 : "Industry, Security",
"XLSreport"                     : "true",
"ZipFile"	                      : "brinson.zip"
}