Class CorrelationLib

java.lang.Object
com.strategyquant.tradinglib.CorrelationLib

public class CorrelationLib extends Object
The Class CorrelationLib.
  • Field Details

    • Log

      public static final org.slf4j.Logger Log
      The Constant Log.
  • Constructor Details

    • CorrelationLib

      public CorrelationLib()
  • Method Details

    • getPeriod

      public static TimePeriod getPeriod(OrdersList orderList1, OrdersList orderList2)
      Gets the period.
      Parameters:
      orderList1 - the order list1
      orderList2 - the order list2
      Returns:
      the period
    • getPeriod

      public static TimePeriod getPeriod(OrdersList orderList)
      Gets the period.
      Parameters:
      orderList - the order list
      Returns:
      the period
    • generatePeriods

      public static TimePeriods generatePeriods(int correlationPeriod, long from, long to)
      Generate periods.
      Parameters:
      correlationPeriod - the correlation period
      from - the from
      to - the to
      Returns:
      the time periods
    • printPeriod

      public static String printPeriod(long time, int correlationPeriod)
      Prints the period.
      Parameters:
      time - the time
      correlationPeriod - the correlation period
      Returns:
      the string
    • getCorrectPeriod

      public static long getCorrectPeriod(long ms, int period)
      Gets the correct period.
      Parameters:
      ms - the ms
      period - the period
      Returns:
      the correct period