Execute

This is a function of the LagCorrectedQuery class.

Description

This function returns the complete, lag-corrected data query.

Parameters

ParameterTypeMeaning
startdatetimeThe starting time for the query
endstringThe end time for the query
samplesintThe number of samples for the query

Returns

A Pandas dataframe of synchronised data, with a numeric index.

Note that the sample parameter is simply a guide. The returned data-frame may have a significantly different number of rows.

Usage

The Execute function uses the Lag Query (set with RateLagQuery or AmountLagQuery) to find the correct time-lags between each of the sub-queries (set with AddQuery).

It then runs each sub-query over subtly different time-frames and merges them all into a single Pandas dataframe.

Note that the start and end times should be relative to the end asset (or all those assets with a lag of zero).