Package com.strategyquant.tradinglib
Class CorrelationLib
java.lang.Object
com.strategyquant.tradinglib.CorrelationLib
The Class CorrelationLib.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic TimePeriods
generatePeriods(int correlationPeriod, long from, long to)
Generate periods.static long
getCorrectPeriod(long ms, int period)
Gets the correct period.static TimePeriod
getPeriod(OrdersList orderList)
Gets the period.static TimePeriod
getPeriod(OrdersList orderList1, OrdersList orderList2)
Gets the period.static String
printPeriod(long time, int correlationPeriod)
Prints the period.
-
Field Details
-
Log
public static final org.slf4j.Logger LogThe Constant Log.
-
-
Constructor Details
-
CorrelationLib
public CorrelationLib()
-
-
Method Details
-
getPeriod
Gets the period.- Parameters:
orderList1
- the order list1orderList2
- the order list2- Returns:
- the period
-
getPeriod
Gets the period.- Parameters:
orderList
- the order list- Returns:
- the period
-
generatePeriods
Generate periods.- Parameters:
correlationPeriod
- the correlation periodfrom
- the fromto
- the to- Returns:
- the time periods
-
printPeriod
Prints the period.- Parameters:
time
- the timecorrelationPeriod
- the correlation period- Returns:
- the string
-
getCorrectPeriod
public static long getCorrectPeriod(long ms, int period)Gets the correct period.- Parameters:
ms
- the msperiod
- the period- Returns:
- the correct period
-