Time Series API

Build Time Series APIs into your digital experience for quick investment and earnings summaries.

Configure Computed Data Points

Computed data points calculate their values when you make the request. They accept extra query parameters that control the calculation, in addition to the parameters that apply to every request. This page explains those parameters and shows how to use them.

Standard data points don't use these parameters. For the difference between the two types, see Core Concepts.

Which Parameters Apply

The following data points are computed. Each accepts a different set of parameters.

Parameterreturncumulative-returnrolling-returngrowthprice
performanceTypeYesYesYesYesYes
annualDaysYesYesYesYes
annualizedYesYes
preCurrencyYesYesYesYes
requireContinueDataYesYesYesYes
stepSizeYesYes
windowSizeYes
initialInvestmentYes

The growth and price data points are currently in trial.

Parameter Reference

ParameterTypeDefaultDescription
performanceTypestringtotalThe performance stream to use: total, market or gross. You can pass a second value as a fallback. See Performance Type.
annualizedbooleanWhether to annualize the results.
annualDaysnumber365.25The number of days in a year for annualized calculations. Common values are 252 for business days and 365 for calendar days.
preCurrencystringThe currency to use before currency conversion, as an ISO 4217 code. See Pre-Euro Currency Conversion.
requireContinueDatabooleanWhether continuous data is required for the calculation.
stepSizenumber1The step size for rolling calculations.
windowSizeintegerThe length of the rolling window. Minimum 1. Used with rolling-return.
initialInvestmentnumber10000The starting value for the calculation. Used with growth.

Performance Type

The performanceType parameter sets which performance stream the calculation uses. The values are total, market and gross, and the default is total.

You can pass up to two values. The first is the preferred type, and the second is a fallback that is used if the preferred type returns no data. If you pass one value, no fallback is attempted.

GET /direct-web-services/time-series/v1/performance/return/0P00000CSY
  ?startDate=2020-01-01
  &endDate=2024-12-31
  &frequency=monthly
  &performanceType=total,gross

The response returns the performanceType that was applied in the timeSeries object, so you can see which stream was used when a fallback applies.

Rolling Returns

Use rolling-return to calculate returns over a moving window. windowSize sets the length of the window, and stepSize sets how far the window moves between calculations.

The following request calculates 12-month rolling returns, moving one month at a time.

GET /direct-web-services/time-series/v1/performance/rolling-return/0P00000CSY
  ?startDate=2015-01-01
  &endDate=2024-12-31
  &frequency=monthly
  &performanceType=total
  &windowSize=12
  &stepSize=1

Cumulative Returns

Use cumulative-return to calculate the return accumulated over the time range. Set annualized to true to annualize the result, and use annualDays to change the number of days in a year used for annualization.

GET /direct-web-services/time-series/v1/performance/cumulative-return/0P00000CSY
  ?startDate=2020-01-01
  &endDate=2024-12-31
  &frequency=monthly
  &annualized=true
  &annualDays=365

Growth of an Investment

Use growth to show how an initial investment would have grown. The default starting value is 10000, and you can change it with initialInvestment.

GET /direct-web-services/time-series/v1/performance/growth/0P00000CSY
  ?startDate=2020-01-01
  &endDate=2024-12-31
  &frequency=monthly
  &initialInvestment=50000

Pre-Euro Currency Conversion

When currencyId is EUR and startDate is before 1999, set preCurrency for computed data points, so that periods before the euro can be converted from the original currency.

GET /direct-web-services/time-series/v1/performance/return/0P00000CSY
  ?startDate=1995-01-01
  &endDate=2024-12-31
  &frequency=monthly
  &currencyId=EUR
  &preCurrency=DEM