PARAMETERS

Times-series parameters

You can slice, transform and otherwise customize your time-series dataset prior to download by appending various optional parameters to your query.

ParameterRequiredTypeValuesDescription
database_codeyesstringCode identifying the database to which the dataset belongs.
dataset_codeyesstringCode identifying the dataset.
limitnointUse limit=n to get the first n rows of the dataset. Use limit=1 to get just the latest row.
column_indexnointRequest a specific column. Column 0 is the date column and is always returned. Data begins at column 1.
start_datenostringyyyy-mm-ddRetrieve data rows on and after the specified start date.
end_datenostringyyyy-mm-ddRetrieve data rows up to and including the specified end date.
ordernostringasc
desc
Return data in ascending or descending order of date. Default is desc.
collapsenostringnone
daily
weekly
monthly
quarterly
annual
Change the sampling frequency of the returned data. Default is none; i.e., data is returned in its original granularity.
transformnostringnone
diff
rdiff
rdiff_from
cumul
normalize
Perform elementary calculations on the data prior to downloading. Default is none. Calculation options are described below.

Collapse: Quandl returns the last observation for any given time period. So if you collapse a daily time-series to monthly, you will get a sample of the original daily time-series where the observation for each month is the last daily data point available for that month. Note that this can cause errors for fields like open price since the daily open price on the last day of the month is not equal to the monthly open price.

Transform: Available transformations are listed in the table below.

Transformations

NameEffectFormula
noneno effectz[t] = y[t]
diff row-on-row changez[t] = y[t] – y[t-1]
rdiff row-on-row % changez[t] = (y[t] – y[t-1]) / y[t-1]
rdiff_fromlatest value as % incrementz[t] = (y[latest] – y[t]) / y[t]
cumulcumulative sumz[t] = y[0] + y[1] + … + y[t]
normalizescale series to start at 100z[t] = y[t] ÷ y[0] * 100

📘

NOTE:

In the above table, y[0] refers to the starting date specified by start_date or limit and not the starting date of the underlying raw time-series. Similarly, y[latest] refers to the latest date specified by end_date.