Record Class AlmgrenChriss.Trajectory
java.lang.Object
java.lang.Record
com.quantfinlib.microstructure.AlmgrenChriss.Trajectory
- Enclosing class:
AlmgrenChriss
public static record AlmgrenChriss.Trajectory(double[] holdings, double[] trades, double kappa, double expectedCost, double costVariance)
extends Record
The optimal schedule:
holdings[j] is the position after
interval j (holdings[0] = X, holdings[N] = 0); trades[j] is
sold in interval j+1. Costs are in price·shares units versus the
arrival price.-
Constructor Summary
ConstructorsConstructorDescriptionTrajectory(double[] holdings, double[] trades, double kappa, double expectedCost, double costVariance) Creates an instance of aTrajectoryrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of thecostVariancerecord component.final booleanIndicates whether some other object is "equal to" this one.doubleReturns the value of theexpectedCostrecord component.final inthashCode()Returns a hash code value for this object.double[]holdings()Returns the value of theholdingsrecord component.doublekappa()Returns the value of thekapparecord component.final StringtoString()Returns a string representation of this record class.double[]trades()Returns the value of thetradesrecord component.
-
Constructor Details
-
Trajectory
public Trajectory(double[] holdings, double[] trades, double kappa, double expectedCost, double costVariance) Creates an instance of aTrajectoryrecord class.- Parameters:
holdings- the value for theholdingsrecord componenttrades- the value for thetradesrecord componentkappa- the value for thekapparecord componentexpectedCost- the value for theexpectedCostrecord componentcostVariance- the value for thecostVariancerecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
holdings
public double[] holdings()Returns the value of theholdingsrecord component.- Returns:
- the value of the
holdingsrecord component
-
trades
public double[] trades()Returns the value of thetradesrecord component.- Returns:
- the value of the
tradesrecord component
-
kappa
public double kappa()Returns the value of thekapparecord component.- Returns:
- the value of the
kapparecord component
-
expectedCost
public double expectedCost()Returns the value of theexpectedCostrecord component.- Returns:
- the value of the
expectedCostrecord component
-
costVariance
public double costVariance()Returns the value of thecostVariancerecord component.- Returns:
- the value of the
costVariancerecord component
-