For a curve which consists of a set of overlapping forecasts, how can I return one timeseries that g
Best Answer
-
In RDMS this is called “flattening”.
There are two main types of curve data in RDMS: “actual” and “forecast”. Both have a CurveID and ValueDate/Value pairs, but an “actual” curve has only one set of pairs, with one ForecastDate (which is 2000-01-01 00:00:00 by convention), whereas a “forecast” curve will have multiple such timeseries, each with a different ForecastDate.
Consider a forecast curve ID 123456 that contains, for each ForecastDate, a set of seven day-ahead forecast prices:
Using endpoints such as /v1/CurveValues/Aggregated, by default this returns the latest forecast only, being the most recent set of seven forward-looking values. Earlier forecasts can be returned by setting the MaxForecastDate parameter to a specific date/time, in which case the most recent seven-day forecast at or prior to that time will be returned. However, each individual forecast will only ever contain seven values.
With “flattening”, we can convert a set of Forecasts into a single timeseries by returning not only the most recent forecast values, but also, for days prior to this, the most recent available forecast value for that ValueDate. To do this, we use the Flatten Boolean parameter (Flatten=true).
So for example:
https://myserver.rdms.refinitiv.com/api/v1/CurveValues/Aggregated/123456/Days/1
will return the seven daily values from the most recent forecast.
However:
https://myserver.rdms.refinitiv.com/api/v1/CurveValues/Aggregated/123456/Days/1?Flatten=true
Will return the same seven values, but also, for all days prior to these, the most recent forecast value available for each ValueDate.
From the above, it follows that the Flatten parameter has no effect on Actuals curves, because there is only a single “forecast” anyway.
For performance reasons, care should be taken to use the MinValueDate parameter to restrict the date range returned to the range required, rather than leaving it to default and trim the result on the client side.
(Note for those familiar with the legacy “ScenarioID 1” form of flattening: The Flatten parameter makes the use of ScenarioID 1 redundant. It also allows for the possibility of curves that have ScenarioIDs other than 0 to also be flattened)
0
Categories
- All Categories
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛