def add_rows_to_existing_data(self,
                                  new_futures_per_contract_prices,
                                  check_for_spike=True):
        """
        Merges self with new data.
        Only newer data will be added

        :param new_futures_per_contract_prices: another futures per contract prices object

        :return: merged futures_per_contract object
        """

        merged_futures_prices = merge_newer_data(
            pd.DataFrame(self),
            new_futures_per_contract_prices,
            check_for_spike=check_for_spike,
            column_to_check=FINAL_COLUMN,
        )

        if merged_futures_prices is data_error:
            return data_error

        merged_futures_prices = futuresContractPrices(merged_futures_prices)

        return merged_futures_prices
Beispiel #2
0
    def add_rows_to_existing_data(self, new_fx_prices):
        """
        Merges self with new data.
        Only newer data will be added

        :param new_fx_prices:

        :return: merged fxPrices
        """

        merged_fx_prices = merge_newer_data(self, new_fx_prices)
        merged_fx_prices = fxPrices(merged_fx_prices)

        return merged_fx_prices
Beispiel #3
0
    def add_rows_to_existing_data(self, new_futures_per_contract_prices):
        """
        Merges self with new data.
        Only newer data will be added

        :param new_futures_per_contract_prices: another futures per contract prices object

        :return: merged futures_per_contract object
        """

        merged_futures_prices = merge_newer_data(
            self, new_futures_per_contract_prices)
        merged_futures_prices = futuresContractPrices(merged_futures_prices)

        return merged_futures_prices
Beispiel #4
0
    def add_rows_to_existing_data(self, new_fx_prices, check_for_spike=True):
        """
        Merges self with new data.
        Only newer data will be added

        :param new_fx_prices:

        :return: merged fxPrices
        """

        merged_fx_prices = merge_newer_data(self, new_fx_prices, check_for_spike=check_for_spike)
        if merged_fx_prices is data_error:
            return data_error
        merged_fx_prices = fxPrices(merged_fx_prices)

        return merged_fx_prices