quantlab.dataset.massive.raw.read_watermark#

quantlab.dataset.massive.raw.read_watermark(vendor_root, data_type)[source]#

Return the day a data type’s downloads are complete through, or None.

Every trading day up to the watermark was downloaded and verified. A trade file may since have been deleted by its conversion: the watermark, not the files present, says what was downloaded.

The watermark (watermark_file, a dated watermark of quantlab.utils.watermark holding data_type and through) is written by quantlab.acquisition.massive.raw_tier.write_day_file_watermark.

Examples

>>> import tempfile
>>> read_watermark(tempfile.mkdtemp(), "trades") is None
True

With write_day_file_watermark(root, "trades", date(2024, 11, 29)) done:

read_watermark(root, "trades")
# datetime.date(2024, 11, 29)