# 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.

Parameter | Required | Type | Values | Description |
---|---|---|---|---|

database_code | yes | string | Code identifying the database to which the dataset belongs. | |

dataset_code | yes | string | Code identifying the dataset. | |

limit | no | int | Use `limit=n` to get the first n rows of the dataset. Use `limit=1` to get just the latest row. | |

column_index | no | int | Request a specific column. Column 0 is the date column and is always returned. Data begins at column 1. | |

start_date | no | string | yyyy-mm-dd | Retrieve data rows on and after the specified start date. |

end_date | no | string | yyyy-mm-dd | Retrieve data rows up to and including the specified end date. |

order | no | string | asc desc | Return data in ascending or descending order of date. Default is `desc` . |

collapse | no | string | none 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. |

transform | no | string | none diff rdiff rdiff_from cumul normalize | Perform elementary calculations on the data prior to downloading. Default is `none` . Calculation options are described below. |

**Collapse**: Nasdaq Data Link 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

Name | Effect | Formula |
---|---|---|

none | no effect | z[t] = y[t] |

diff | row-on-row change | z[t] = y[t] – y[t-1] |

rdiff | row-on-row % change | z[t] = (y[t] – y[t-1]) / y[t-1] |

rdiff_from | latest value as % increment | z[t] = (y[latest] – y[t]) / y[t] |

cumul | cumulative sum | z[t] = y[0] + y[1] + … + y[t] |

normalize | scale series to start at 100 | z[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`

.

Updated over 5 years ago