KX Community

Find answers, ask questions, and connect with our KX Community around the world.
KX Community Guidelines

Home Forums kdb+ Loading data for combinations of instruments and date ranges (rolled series) Re: Loading data for combinations of instruments and date ranges (rolled series)

  • erichards

    Member
    February 1, 2023 at 12:00 am

    Thank you for the prompt and thorough response. This is undoubtedly useful for loading various instruments with different ranges.

    In our specific example of rolled series there would only be one day of overlap between contracts. I am wondering if there is a way of constructing this as a single-query, rather than looping by date ranges. This would allow KDB to decompose the query over different segments/threads as appropriate.

    Perhaps this could be done by exploding the contract/date combinations as you suggest, and looking up into this table. However I’m not sure how to do this without losing the efficiency gained from filtering by date first. Could a join help?