Align_periods not working?

I’m trying to download a series using the following URL:

https://api.db.nomics.world/v22/series?series_ids=ECB/RTD/M.S0.N.C_SP500.X&format=json&observations=1&align_periods=1

Apparently, the align_periods flag has no effect (there are quite a few gaps in the observations and these are not filled with NAs). This happens both with JSON and CSV export. Am I missing something?

Due to 2 recent issues (#709 and #860) related to series alignment, we fixed the alignment algorithm via those 2 merge requests: !45 and !46.

Series alignment does not fill the holes in the series periods with NAs – this is called “completion”. And completion was too much error-prone and was the main reason of the 2 issues mentioned above.

Series alignment “just” creates a common period axis among all the matching series, enabling for example a representation of many series on the same table.

This is explained in the documentation: https://db.nomics.world/docs/web-api/#time-series-completion and https://db.nomics.world/docs/web-api/#time-series-alignment

If my answer is not precise enough, could you give more details about what you would expect from DBnomics web API?

Ah ok, sorry, there was a misunderstanding on my side. I was under the impression that the “align_periods” flag was used to perform “completion”, but obviously this is not the case. From your reply, then, I gather that the “align_periods” switch has no effect when you download just one series. Am I right?

Also: I understand that inserting NAs in “gappy” series is the responsibility of the original provider and if the original series needs completion, then DB.NOMICS will provide it as is and it’s up to the end user to fill the gaps as appropriate. This was not the original policy, though, right?

From your reply, then, I gather that the “align_periods” switch has no effect when you download just one series. Am I right?

Correct!

Also: I understand that inserting NAs in “gappy” series is the responsibility of the original provider and if the original series needs completion, then DB.NOMICS will provide it as is and it’s up to the end user to fill the gaps as appropriate. This was not the original policy, though, right?

Before the mentioned updates, series completion was done by default for tabular formats and had to be enabled explicitly for JSON with complete_series=1 (which is not what you did, based on the URL you provided). Now this feature is completely removed and indeed provider data is provided as is.

Thank you, Cristophe. This is very useful.