Exemplo n.º 1
0
    def _get_adjusted_prices_without_checking(self, instrument_code):
        item = self._arctic.library.read(instrument_code)

        ## Returns a data frame which should have the right format
        data = item.data

        instrpricedata = futuresAdjustedPrices(data)

        return instrpricedata
    def _get_adjusted_prices_without_checking(self, instrument_code):
        item = self._arctic.library.read(instrument_code)

        ## Returns a data frame which should have the right format
        data = item.data

        instrpricedata = futuresAdjustedPrices(data)

        return instrpricedata
Exemplo n.º 3
0
    def _get_adjusted_prices_without_checking(self, instrument_code):
        filename = self._filename_given_instrument_code(instrument_code)

        instrpricedata = pd_readcsv(filename)
        instrpricedata.columns = ["price"]
        instrpricedata = instrpricedata.groupby(level=0).last()
        instrpricedata = pd.Series(instrpricedata.iloc[:, 0])

        instrpricedata = futuresAdjustedPrices(instrpricedata)

        return instrpricedata
    def _get_adjusted_prices_without_checking(self, instrument_code):
        filename = self._filename_given_instrument_code(instrument_code)

        try:
            instrpricedata = pd_readcsv(filename)
        except OSError:
            self.log.warning("Can't find adjusted price file %s" % filename)
            return futuresAdjustedPrices.create_empty()

        instrpricedata.columns = ["price"]
        instrpricedata = instrpricedata.groupby(level=0).last()
        instrpricedata = pd.Series(instrpricedata.iloc[:, 0])

        instrpricedata = futuresAdjustedPrices(instrpricedata)

        return instrpricedata
Exemplo n.º 5
0
    def _get_adjusted_prices_without_checking(self, instrument_code):
        filename = self._filename_given_instrument_code(instrument_code)

        try:
            instrpricedata = pd_readcsv(filename)
        except OSError:
            self.log.warning("Can't find adjusted price file %s" % filename)
            return futuresAdjustedPrices.create_empty()

        instrpricedata.columns = ["price"]
        instrpricedata = instrpricedata.groupby(level=0).last()
        instrpricedata = pd.Series(instrpricedata.iloc[:, 0])

        instrpricedata = futuresAdjustedPrices(instrpricedata)

        return instrpricedata