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:
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.
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.