post https://api-lib.bambu.life/api/generalCalculator/v2/twrr/calcPortfolioTwrr
Calculates time weight returns of portfolio.
The following table describes the parameters for this API:
Name | DataType | Description | Mandatory | Sample Value | No. of decimals |
---|---|---|---|---|---|
cashflow | number | Cash flow for the day | Y | 100, 0, 50 | 2 |
prevNav | number | Previous day Net Asset Value | Y | 100 | 2 |
closeNav | number | Closing day Net Asset Value | Y | 120 | 2 |
date | date | Date of transaction | Y | 2019-01-30T02:29:06.348Z | |
id | number | identifier for the record | Y | 1,10 | 0 |
The following table describes the outputs for this API:
Name | DataType | Description | Sample Value | No. of decimals | Notes |
---|---|---|---|---|---|
startDate | date | start date of the sequence | 2019-01-28T02:29:06.348Z | ||
endDate | date | end date of the sequence | 2019-01-30T02:29:06.348Z | ||
twrr | number | Time Weighted Rate of Return | 0.199999, 0.2 | 6 | Number limited to 6 decimals |
results | Array | Array of TWRR results which includes the daily rate and the date | { "dailyReturn": 0.1, "date": "2019-01-28T02:29:06.348Z" }, { "dailyReturn": 0.199999, "date": "2019-01-30T02:29:06.348Z" } | ||
dailyReturns | number | return rate for the current date | 0.199999, 0.1 | 6 | Number limited to 6 decimal places (intended to be displayed as a percentage) |
date | date | Date of daily rate applied | 2019-01-30T02:29:06.348Z |