An easy step by step tutorial about how to extract an Auction Time Series in Matlab SDK.
Artesian gives you straightforward access to the data history to perform an analysis and produce a plan in the most compatible way.
Let’s see step-by-step how to proceed.
The goal
Extract the data of an Auction Time Series Market Data.
Artesian gives you straightforward access to the data history to perform an analysis and produce a plan in the most compatible way.
Let’s see step-by-step how to proceed.
Import and configuration of Artesian
To use all the features of Artesian, we must first authenticate. We need to install the Artesian toolbox, which is required to instantiate the authentication towards Artesian (line 1 of the script) and read the data.
Once the toolbox is installed, we can configure Artesian by entering the essential link and the API key.
To extract these two essential data, refer to the reference tutorial “How to Configure Artesian Matlab SDK “.
Once the Artesian configuration is complete, we can configure the Query Service (line 3)
cfg = ArtesianServiceConfig("https://arkive.artesian.cloud/{tenantName}/", "{api-key}")
qs = QueryService(cfg)
The creation of the Auction extraction
Once we have configured Artesian and the Query Service, we can start thinking about what data and how we want to extract it.
The basic information from Artesian is the ID or a list of IDs relating to the Market Data of interest obtained through the UI.
Fundamental parameters to decide
Once we decide on the IDs we are interested in extracting; we can begin to evaluate how we want to extract them. The fundamental parameters to be determined are:
The Time Range of extraction: Artesian offers various possibilities; for each, you must consider that the time reference at the end of the extraction is always exclusive. For this specific example, let’s consider the AbsoluteDateRange(“2021-09-25”, “2021-09-26”).
With our chosen extraction parameters, it is ready to be launched, and the data obtained can be viewed.
q = qs.CreateAuction() ...
.ForMarketData([100085139,100085140]) ...
.InAbsoluteDateRange("2021-09-25", "2021-09-26") ...
.Execute();
Other options for data extraction
Regarding the selection of the extraction ranges, Artesian supports the following options:
“AbsoluteDateRange” an absolute fixed period of time (e.g.: from “2018-08-01” to “2018-08-13” will allow you to extract data from “2018-08-01” to “2018-08-12”).
“RelativePeriod” represents a relative period of time, before or after today (e.g..: considering that today is “2021-03-31”, requesting the period “P-5D” will mean extracting the data from “2021-03-26” to “2021-03-30”. Requesting the period “P5D” will mean extracting the data from “2021-03-31” to “2021-04-04”). For the syntax, it is possible to refer to the ISO8601 standard; in addition to the simple “RelativePeriod”, it is possible to use the “RelativePeriodRange” (e.g.: from“P-5D” to “P5D” it will extract the data from “2021-03-26” to “2021-04-04”).
“RelativeInterval”: is a fixed dimension “rolling” time span. The possible options are: “RollingWeek”, “RollingMonth”, “RollingQuarter” or “RollingYear” or the last 7, 30, 90, 365 days of data (with the current day included); “WeekToDate”, “MonthToDate”, “QuarterToDate” or “YearToDate” or considering from the current day to the beginning of the week, month or year.
.InAbsolUteDateRange("2022-03-06","2022-03-07")
.InRelativePeriod("P5D")
.InRelativePeriodRange("P-3D","P10D")
Alternative to the SDK extraction
As an alternative to the SDK extraction, we can extract the data directly from the portal in Excel format.
It is sufficient to employ just once and then have it entirely reproducible and automated in our workflow.
Not only does it save you time, but it allows you to minimize human errors caused by repeated operations on substantial amounts of data or different Excel files.
An undeniable advantage that allows us to focus on data analysis instead of its management and optimization.