# SuanShu, a Java numerical and statistical library

## Class HConstruction<T extends Comparable<? super T>>

• java.lang.Object
• Type Parameters:
T - time type

public class HConstruction<T extends Comparable<? super T>>
extends Object
A construction of extreme and trade points based on H discretization, ignoring changes smaller than H.
"Pastukhov, S. V., "On Some Probabilistic Statistical Methods in Technical Analysis," Theory of Probability and Its Applications (Impact Factor: 0.36). 01/2005; 49(2). DOI: 10.1137/S0040585X97981020"
• ### Method Summary

All Methods
Modifier and Type Method and Description
double expectedPnL()
Gets the expected PnL when playing the H strategy in mean-reverting model.
List<Double> extrema()
double K()
Gets the H property.
int N()
Gets the number of H inversions.
List<T> times()
List<Double> trades()
double variation()
Gets the H variation/fluctuation.
double volatility()
Gets the H volatility.
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• ### Method Detail

• #### times

public List<T> times()
• #### extrema

public List<Double> extrema()

public List<Double> trades()
• #### N

public int N()
Gets the number of H inversions.
Returns:
the number of H inversions
• #### variation

public double variation()
Gets the H variation/fluctuation.
Returns:
the H variation/fluctuation
"eq. 6"
• #### volatility

public double volatility()
Gets the H volatility.
Returns:
the H volatility
"eq. 8"
• #### K

public double K()
Gets the H property. The process is mean reverting if K < 2; arbitrage fee for K = 2; and trendy if K > 2
Returns:
the H property
public double expectedPnL()