Repository: quantopian/zipline
File: zipline/data/minute_bars.py (Python)

Code before:

    @abstractmethod
    def get_value(self, sid, dt, field):
        """
        Retrieve the value at the given coordinates.

        Parameters
        ----------
        sid : int
            The asset identifier.
        dt : datetime64-like
            The minute label for the desired data point.
        field : string
            The OHLVC name for the desired data point.

        Returns
        -------
        value : float|int
            The value at the given coordinates, `float` for OHLC, `int` for
            'volume'.
        """

    @abstractmethod
    def get_last_traded_dt(self, asset, dt):
        """
        Retrieve the most recently traded minute for the given asset,
        when viewing the data from the input minute. The last traded minute is
        the provided minute if a trade occured on that minute.

        Parameters
        ----------
        asset : zipline.asset.Asset
            The asset for which to get the last traded minute.
        dt : datetime64-like
            The minute at which to start searching for the last traded minute.

        Returns
        -------
        last_traded : pd.Timestamp
            The minute of the last trade for the given asset, using the input
            dt as a vantage point.
        """

    @abstractmethod
    def load_raw_arrays(self, fields, start_dt, end_dt, sids):
        """
        Retrieve the arrays of pricing data for the given coordinates of
        `fields` (OHLCV), minute range (`start_dt` -> `end_dt`) and sids.

        Parameters
        ----------

Review comment (suggestion):
Is there a reason this is a separate entry from `get_value`?  I would think, conceptually, that this would just delegate to `get_value(field='last_traded')`.


Code after:
        pass

    @abstractmethod
    def get_value(self, sid, dt, field):
        """
        Retrieve the value at the given coordinates.

        Parameters
        ----------
        sid : int
            The asset identifier.
        dt : pd.Timestamp
            The minute label for the desired data point.
        field : string
            The OHLVC name for the desired data point.

        Returns
        -------
        value : float|int
            The value at the given coordinates, ``float`` for OHLC, ``int``
            for 'volume'.
        """
        pass

    @abstractmethod
    def get_last_traded_dt(self, asset, dt):
        """
        Get the latest minute on or before ``dt`` in which ``asset`` traded.

        If there are no trades on or before ``dt`` returns ``pd.NaT``

        Parameters
        ----------
        asset : zipline.asset.Asset
            The asset for which to get the last traded minute.
        dt : pd.Timestamp
            The minute at which to start searching for the last traded minute.

        Returns
        -------
        last_traded : pd.Timestamp
            The minute of the last trade for the given asset, using the input
            dt as a vantage point.
        """
        pass

    @abstractmethod
    def load_raw_arrays(self, fields, start_dt, end_dt, sids):
        """
        Retrieve the arrays of pricing data for the given coordinates of
        ``fields`` (OHLCV), minute range [``start_dt``, ``end_dt``] and sids.