...
Key Principles
Principle | Decision / Discussion |
---|
Status
Flexible aggregation over time |
|
Scope one Portfolio |
|
colour | Green |
---|---|
title | Specified |
Benchmark Data |
|
Frequency |
|
|
Status | ||||
---|---|---|---|---|
|
| |
Calendar Days |
|
Period Definitions |
|
Return Types |
|
|
|
Status | ||||
---|---|---|---|---|
|
| |
Completeness & |
|
|
|
|
|
|
Status | ||||
---|---|---|---|---|
|
|
Incomplete month periods |
|
|
|
|
Status | ||||
---|---|---|---|---|
|
Interface "PortfolioReturns"
Status
Status | ||||
---|---|---|---|---|
|
Usage & Contents |
|
---|
Path
/portfolio/returns
Parameters
portfolioId*
string
The id of the portfolio (or consolidation) in the data source
startDate*
string (date)
The start date of the period for which return data is requested
endDate*
string (date)
The end date of the period for which return data is requested
includeDailyReturns
boolean
(default: false)
Response to include daily return data (where available)
includeBenchmark
boolean
(default: false)
Response to include benchmark return data
(customBenchmarkId)
string
Future parameter to query data of the portfolio measured against another benchmark
Example call
/portfolio/returns?portfolioId=E0002&startDate=2011-04-01&endDate=2019-03-31
Response structure
If the API can fulfill the request (response status code 200 = OK) the response must have the following high-level structure and must follow the respective json-schema.
High-level Structure
Code Block | ||
---|---|---|
| ||
{
"request": { ... },
"dataVersioning": {...},
"returns": [ ... ]
} |
Note |
---|
|
Schema
Error handling
If the request can't be fulfilled an appropriate response status code (4xx or 5xx) must be used. Possible errors could be
bad request structure → expected status = 400
portfolioId not found or reportingDate in future → expected status = 404
etc.
The body of the response should contain information about the reason of the error in plain text or as json object.
Reporting Business Logic |
| ||
---|---|---|---|
Consistency Rules | The following rules should be adhered to by any response and will |
language | js |
---|
be checked when consuming a response: |
Consistency Rules
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Reporting Business Logic
cumulation over time (monthly → quarterly, YTD, ITD etc.) or rather de-cumulating index values to monhtly / quarterly returns
alignment of data frequencies (monthly ITD history with daily for more current periods)
relative return calculation for different return types
formatting of returns (in %, in bps)
Example
Code Block | ||
---|---|---|
| ||
{
"request": {
"path": "/portfolio/returns",
"parameters": {
"portfolioId": "E0001",
"period": { "startDate": "2019-03-15", "endDate": "2019-03-31" },
"includeDailyReturns": true,
"includeBenchmark": true
}
},
"dataVersioning": "include here any data needed for data lineage like dataquality-level, timestamps, data file versions, program versions",
"returns": {
"indexStartValues": {"grossIndexStart": 1.00, "netIndexStart": 1.00, "bmIndexStart": 1.00},
"indexedReturns": [
{"year": 2019, "monthly": [
{ "month": 3, "grossIndex": 0.998610167389151, "netIndex": 0.998411811861891, "bmIndex": 0.99832365534172 , "daily": [
{ "day": 15, "grossIndex": 1.0045101948, "netIndex": 1.0045101948, "bmIndex": 1.0044517811 },
{ "day": 16, "grossIndex": 1.0045101948, "netIndex": 1.0045101948, "bmIndex": 1.0044517811 },
{ "day": 17, "grossIndex": 1.0045101948, "netIndex": 1.0045101948, "bmIndex": 1.0044517811 },
{ "day": 18, "grossIndex": 1.00649181104652, "netIndex": 1.00649181104652, "bmIndex": 1.00642390043263 },
{ "day": 19, "grossIndex": 1.00752296895238, "netIndex": 1.00752296895238, "bmIndex": 1.00739509929527 },
{ "day": 20, "grossIndex": 1.00095942480408, "netIndex": 1.00095942480408, "bmIndex": 1.00084622231232 },
{ "day": 21, "grossIndex": 1.00349696955389, "netIndex": 1.00349696955389, "bmIndex": 1.00335123601851 },
{ "day": 22, "grossIndex": 0.989428389700745, "netIndex": 0.989428389700745, "bmIndex": 0.989231476718871 },
{ "day": 23, "grossIndex": 0.989428389700745, "netIndex": 0.989428389700745, "bmIndex": 0.989231476718871 },
{ "day": 24, "grossIndex": 0.989428389700745, "netIndex": 0.989428389700745, "bmIndex": 0.989231476718871 },
{ "day": 25, "grossIndex": 0.983761504593607, "netIndex": 0.983761504593607, "bmIndex": 0.983544720209762 },
{ "day": 26, "grossIndex": 0.993059858670534, "netIndex": 0.993059858670534, "bmIndex": 0.992871364286443 },
{ "day": 27, "grossIndex": 0.990423681175259, "netIndex": 0.990423681175259, "bmIndex": 0.990199383224224 },
{ "day": 28, "grossIndex": 0.991777636303084, "netIndex": 0.991777636303084, "bmIndex": 0.991461936056625 },
{ "day": 29, "grossIndex": 0.991777636303084, "netIndex": 0.991777636303084, "bmIndex": 0.99832365534172 },
{ "day": 30, "grossIndex": 0.991777636303084, "netIndex": 0.991777636303084, "bmIndex": 0.99832365534172 },
{ "day": 31, "grossIndex": 0.998610167389151, "netIndex": 0.998411811861891, "bmIndex": 0.99832365534172 } ]
}
]
}
]
}
}
|
Potential Problems
Incorrect MTD index values: If we get MTD index values built only from MTD return data, such MTD index values could be wrong if they are not adjusted to the monthly corrected data.
Persistent "kinks" in cumulated performance: If only month-end data is corrected but not the first N days of the new month we get a multi-day kink that shows up in the cumulated (daily) performance chart
Interface "Portfolio Instrument or Segment Returns"
Status
Status | ||||
---|---|---|---|---|
|
Usage
Query performance / return data on sector or instrument level for a given period used to produce
PO009: Performance overview - cumulated by dimension
PR001: Performance and contribution by position
PR002: Performance overview by position
Discussion
do we need this interface or can it be integrated into "Portfolio Performance"?
Info |
---|
|
can we aggregate from instrument to segment level (and do we want to?)
if no, should we allow to fetch mutliple (the portfolio's standard) segmentations in one call?
Data Contents
monthly (and optionally daily) returns on instrument/segment level
for portfolio and benchmark
all available return types (gross, net, ?)
Parameters
portfolioId
period
inculdeDailyReturns
includeBenchmark
Reporting Business Logic
aggregation from instrument to segment level???
cumulation over time (daily/monthly → quarterly, YTD, ITD etc.)
alignment of data frequencies (monthly ITD history with daily for more current periods)
relative return calculation for different return types
formatting of returns (in %, in bps)
Example
Path |
| ||||||
---|---|---|---|---|---|---|---|
Parameters |
| string | The id of the portfolio (or consolidation) in the data source | ||||
| string (date) | The start date of the period for which return data is requested | |||||
| string (date) | The end date of the period for which return data is requested | |||||
| boolean (default: false) | Response to include daily return data (where available) | |||||
| boolean (default: false) | Response to include benchmark return data | |||||
| string | parameter to query data of the portfolio measured against another benchmark | |||||
Example call |
| ||||||
Schema |
| ||||||
Example |
|
Interface "InstrumentReturns"
Usage & Contents |
| ||||||
---|---|---|---|---|---|---|---|
Reporting Business Logic | |||||||
Consistency rules |
| ||||||
Path |
| ||||||
Parameters |
| string (date) | The start date the reporting is produced for | ||||
| string (date) | The end date the reporting is produced for | |||||
| string[] | The list of instruments the return series should be generated | |||||
| boolean (default: false) | Response to include daily return data (where available) | |||||
Example call |
| ||||||
Schema |
| ||||||
Example |
|