Class RobustCointegration


  • public class RobustCointegration
    extends Object
    This class runs the robust cointegration algorithm on a pair of prices to determine if their cointegration relationship is stable enough to trade.
    • Field Detail

      • REMAINING_ROWS_PCT_THRESHOLD

        protected static final double REMAINING_ROWS_PCT_THRESHOLD
        See Also:
        Constant Field Values
    • Constructor Detail

      • RobustCointegration

        public RobustCointegration()
    • Method Detail

      • computeCointegratingBeta

        protected static double computeCointegratingBeta​(Matrix prices)
      • computeShortTermCointegratingBeta

        protected static double computeShortTermCointegratingBeta​(Matrix prices,
                                                                  double tailed)
      • getTailedMatrix

        protected static Matrix getTailedMatrix​(Matrix A,
                                                double tailed)
      • filterUnchangedPrices

        protected static Matrix filterUnchangedPrices​(Matrix prices0)
                                               throws NoPairFoundException
        Filters out prices that are unchanged between consecutive times.
        Parameters:
        prices0 - the prices to be filtered
        Returns:
        the filtered prices
        Throws:
        NoPairFoundException - when no pair is found