Functions Data

UpdateTimeSeries

The UpdateTimeSeries() function updates TimeSeries data in the Quintessence database.

Related functions:  TimeSeries


Syntax:

Qx.UpdateTimeSeries(Data, Entity, Factor, Unit, Period, [IAAD], Attributes, Source, Options, [ShowError])
  • In Excel with Quintessence add-in versions prior to 25.1, use: UpdateTimeSeries()
  • In the Quintessence Editor (Studio) using Quintessence language, use: UpdateTimeSeries()
  • In the Quintessence Editor (Studio) using Python language, use: Qx.UpdateTimeSeries()
 See parameter descriptions

DataThe range containing the new values to upload.
EntityAn entity in the Quintessence database is any element with associated data
that is identified by a code, such as an instrument, portfolio, country, or manager.
FactorThe type of TimeSeries values requested.
UnitThe code of the unit type associated with the TimeSeries.
Period
The period related to the values under consideration. Possible values:
• NA – Not Applicable
• D – Day
• W – Week
• M –  Month
• B – Bi-Monthly
• Q – Quarter
• S – Semi-Annual
• Y – Year
IAAD
(optional)
The as at date specifies the point in time for the information.
Any data declared after the IAAD is ignored.
AttributesThe attribute(s) of the values under consideration.
SourceThe source provider of the data.
OptionsSets the insertion strategy. Valid value:
OnChange

May also be combined with:
Snapshot
Example: OnChange, Snapshot
ShowError
(optional)
If TRUE, an error message is displayed when the function fails.

Remarks:

  • Unless changed by an administrator, the default parameter is:
    • IAAD: today
  • This function is executed by clicking Execute Selected or Execute Sheet in the Quintessence ribbon.

Examples:

The examples provided below are based on fictitious data for illustrative purposes only.

> Example 1: Adding a new TimeSeries value


Initial data:

EntityFactorUnitPeriodAttributesSourceValue
date
Declaration
date
Value
XDUClose PriceZARDFinalSource12015/02/012015/02/02100
XDUClose PriceZARDFinalSource12015/02/022015/02/03149

A new value is declared:

  • Value date: 3 Feb 2015
  • Declaration date: 4 Feb 2015
  • Value: 124

Data (A1:B1):

3-Feb-15124

Formula:

=Qx.UpdateTimeSeries(A1:B1, "XDU", "Close Price", "ZAR", "D", "2015-02-04", "Final", "Source1", "OnChange", TRUE)

Result:

EntityFactorUnitPeriodAttributesSourceValue
date
Declaration
date
Value
XDUClose PriceZARDFinalSource12015/02/012015/02/02100
XDUClose PriceZARDFinalSource12015/02/022015/02/03149
XDUClose PriceZARDFinalSource12015/02/032015/02/04124
> Example 2: Updating an existing TimeSeries value


Initial data:

EntityFactorUnitPeriodAttributesSourceValue
date
Declaration
date
Value
XDUClose PriceZARDFinalSource12015/02/012015/02/02100
XDUClose PriceZARDFinalSource12015/02/022015/02/03149
XDUClose PriceZARDFinalSource12015/02/032015/02/04124

An updated value is declared:

  • Value date: 2 Feb 2015
  • Declaration date: 4 Feb 2015
  • Value: 150

Data (A1:B1):

2-Feb-15150

Formula:

=Qx.UpdateTimeSeries(A1:B1, "XDU", "Close Price", "ZAR", "D", "2015-02-04", "Final", "Source1", "OnChange", TRUE)

Result:

EntityFactorUnitPeriodAttributesSourceValue
date
Declaration
date
Value
XDUClose PriceZARDFinalSource12015/02/012015/02/02100
XDUClose PriceZARDFinalSource12015/02/022015/02/04150
XDUClose PriceZARDFinalSource12015/02/032015/02/04124
> Example 3: Updating Snapshot TimeSeries values


Initial data:

EntityFactorUnitPeriodAttributesSourceValue
date
Declaration
date
Value
XDUClose PriceZARDForecastSource12025/02/022015/02/04150
XDUClose PriceZARDForecastSource12026/02/022015/02/04151
XDUClose PriceZARDForecastSource12027/02/022015/02/04149

An updated value is declared:

  • Value date: 2 Feb 2026
  • Declaration date: 4 Feb 2015
  • Value: 148

Data (A1:B3):

2-Feb-25150
2-Feb-26148
2-Feb-27149

Formula:

=Qx.UpdateTimeSeries(A1:B3, "XDU", "Close Price", "ZAR", "D", "2015-02-04", "Forecast", "Source1", "OnChange, Snapshot", TRUE)

Result:

EntityFactorUnitPeriodAttributesSourceValue
date
Declaration
date
Value
XDUClose PriceZARDForecastSource12025/02/022015/02/04150
XDUClose PriceZARDForecastSource12026/02/022015/02/04148
XDUClose PriceZARDForecastSource12027/02/022015/02/04149