Class HConstruction<T extends Comparable<? super T>>
- java.lang.Object
-
- tech.nmfin.meanreversion.hvolatility.HConstruction<T>
-
- 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.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Method Detail
-
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
- See Also:
- "eq. 6"
-
volatility
public double volatility()
Gets the H volatility.- Returns:
- the H volatility
- See Also:
- "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
- See Also:
- "eq. 24"
-
expectedPnL
public double expectedPnL()
Gets the expected PnL when playing the H strategy in mean-reverting model.- Returns:
- the expected PnL when playing the H strategy in mean-reverting model
-
-