You can ask LUSID to aggregate performance returns for a portfolio over a particular period, for example the preceding 5 days, the year to date, since fund inception, or all of these.
To aggregate performance for a transaction portfolio, you must first upload your own simple performance returns to record the net gain or loss of the portfolio, either per day (the default) or per month.
To aggregate performance for a reference portfolio, you do not need to upload your own performance return data but you must ensure quotes for each constituent instrument in the portfolio are uploaded to the LUSID quote store.
Uploading a simple performance return for a transaction portfolio
Note: You do not need to upload simple performance returns for a reference portfolio.
To create or update a simple performance return for a transaction portfolio, obtain an API token and call the UpsertPortfolioReturns API, specifying the scope
and code
of the transaction portfolio and then the returnScope
and returnCode
of a particular set of simple performance returns, to which you can add as many individual returns as you like. You should supply a PerformanceReturn
object in the body of your API request with the following data:
Field | Status | Explanation |
| Required | An effective datetime marking the end of the return period. |
| Required | The net gain or loss of the investment over |
| Optional | The market value at the start of |
| Optional | Specify the market value at the end of |
| Optional | The default is |
You can specify any number you like for the rateOfReturn
. For example, you could calculate it as a simple percentage difference between the opening and closing market values:
rateOfReturn = (closingMarketValue – openingMarketValue) / openingMarketValue
Note an individual simple performance return may not have either an openMarketValue
or a closingMarketValue
(these fields are optional). If no openingMarketValue
is provided, then LUSID calculates it as follows:
If it is the first performance return, then:
If
rateOfReturn
is0
, thenopeningMarketValue
is0
as well.If
rateOfReturn
has a value thenopeningMarketValue
is calculated using the formula:openingMarketValue = closingMarketValue / (rateOfReturn + 1)
If it is not the first performance return, then
openingMarketValue
is the previousclosingMarketValue
.
If no closingMarketValue
is provided, then LUSID calculates it using the formula:
closingMarketValue = (rateOfReturn + 1) * openingMarketValue
Note you can:
List all the simple performance returns you have uploaded to a transaction portfolio using the GetPortfolioReturns API.
Delete a particular simple performance using the DeletePortfolioReturns API.
Calculating aggregated performance return for a transaction or reference portfolio
Call the GetPortfolioAggregatedReturns API, passing in the scope
and code
of the portfolio and, optionally, fromEffectiveAt
and toEffectiveAt
dates to restrict the returns to aggregate.
Note: If the portfolio is a composite portfolio, LUSID automatically aggregates performance for all constituent portfolios. Note if you want the dispersion metric you should call the GetAggregatedReturnsDispersionMetrics API instead, providing the composite has at least six constituent portfolios and each has been in for the whole year. If you want to analyse how the composite return has been calculated afterward, call the GetCompositeBreakdown API.
You should supply an AggregatedReturnsRequest
object in the body of your API request with the following data to control how LUSID aggregates returns:
Field | Status | Explanation |
| Required | You must provide at least one |
| Required for a transaction portfolio | This is the |
| Optional | This is the |
| Optional | The default is |
| Optional | The default is |
| Optional | The default is |
| Optional | The date from which to include performance returns if this is different from the date when returns begin. Can be a date string or a portfolio property. Defaults to the actual inception date. |
| Optional | The holiday calendar code(s) that should be used to determine the date schedule as a comma-separated list (for example |
| Optional | Converts the results to the specified currency. If omitted, results are in the portfolio currency. Can be a ISO 4217 currency code string or a portfolio property. |
| Optional | Defaults to
|
For the metrics
field (above), supply at least one PerformanceReturnsMetric
object containing the following data:
Field | Status | Explanation | ||||||||||||||||||||||||||||||||
| Optional | Defaults to
| ||||||||||||||||||||||||||||||||
| Required | Specify the window to aggregate. This should be a string constituting either a constant window, a multi-X metric, or a Since metric. Constant window
Multi-X metric Since months may be of varying length, there is special handling for the last day of the month. Month-end dates look back to prior month-end dates. So, one month rolling for the 28th February will look back to the 31st of January, not the 28th January.
Since metric
| ||||||||||||||||||||||||||||||||
| Optional | Defaults to False; returns are only aggregated if the date range is fully covered by the return history. For example, a one year return is only aggregated if the portfolio has returns posted for at least one year. | ||||||||||||||||||||||||||||||||
| Optional | Defaults to False. Specify True to annualise the result. | ||||||||||||||||||||||||||||||||
| Optional | Defaults to False. Specify True if | ||||||||||||||||||||||||||||||||
| Optional | Specify a decimal number. The result will be calculated using the formula | ||||||||||||||||||||||||||||||||
| Optional | Specify a name to display for the metric in the response. |