com.apama.algos.twap
Event VolumeCurve
The VolumeCurve is designed to hold the details for a curve produced based on historical data.
This curve is represented by a sequence of quantities per bucket. Other data included with each curve are its start/end time, identifier (name), and openSize/closeSize. For the implementation of the TWAP execution algorithm, a VWAP strategy is used with a flat volume curve.
-
Since:
- CMF 1.1.4
-
Version:
- 9.12
closeSize
wildcard integer closeSize
endHour
wildcard integer endHour
endMinute
wildcard integer endMinute
name
wildcard string name
openSize
wildcard integer openSize
quantities
sequence<integer > quantities
startHour
wildcard integer startHour
startMinute
wildcard integer startMinute
getCount
integer getCount()
getCurveBinPortion
float getCurveBinPortion(integer sliceIndex)
-
Parameters:
-
sliceIndex
getCurveSliceDuration
integer getCurveSliceDuration()
getDuration
integer getDuration()
getTotalinCurve
integer getTotalinCurve()
getVolumeBinTimes
sequence<integer > getVolumeBinTimes()
getVolumePortionSize
float getVolumePortionSize(com.apama.algos.Time sTime, com.apama.algos.Time eTime, sequence<integer > volumeBinStartTimes)
Action that accepts certain start hour/minute and end hour/minute and returns the percentage of volume that should be allocated for this period according to the twap volume curve.
You can optionally pass the start/end times of the volume curve to this function to save it from recalculating each time.
-
Parameters:
-
sTime
-
eTime
-
volumeBinStartTimes
setCurveFromParams
void setCurveFromParams(string name, integer startHour, integer startMinute, integer endHour, integer endMinute, integer openSize, integer closeSize)
-
Parameters:
-
name
-
startHour
-
startMinute
-
endHour
-
endMinute
-
openSize
-
closeSize
setFromValueSequence
boolean setFromValueSequence(sequence<string > curveString)
-
Parameters:
-
curveString