Package com.polytechnik.trading
Interface DataInterfaceDirect<DTYPE>
public interface DataInterfaceDirect<DTYPE>
One more interface to a basis.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondouble
Last price (with offset), actual price isgetPLast(DTYPE)
+getPOffset(DTYPE)
.double
getPOffset
(DTYPE odata) Price offset.long
Exponent time scale.long
Last time.long
getTotalVolume
(DTYPE odata) Total Volume.void
Set the value of timeserie moments.void
setMT
(double[] m, int nmoms) Sets exact values of \int Q(x) dmu.
-
Method Details
-
setM
Set the value of timeserie moments.- Parameters:
m
- A buffer to save the moments of at leastnmoms
size.n
- Price power before the moment.mom
- Time seqience ID fromDataInterfaceDirectTradesHistorical
.odata
- The object that stores the data.nmoms
- The number of moments to save.
-
setMT
void setMT(double[] m, int nmoms) Sets exact values of \int Q(x) dmu. The setM(final double [] m,0,M_T,odata,nmoms) set sample value of \int Q(x) dmu, and this method sets exact value. The results should be very close for a reasonable grid.- Parameters:
m
- A buffer to save the moments of at leastnmoms
size.nmoms
- The number of moments to save.- See Also:
-
getPOffset
Price offset. All price moments are calculated relatively this offset, this greatly increases numerical stability. To obtain "actual" price from the values saved in odata -- add the value returned by this method.- See Also:
-
getPLast
Last price (with offset), actual price isgetPLast(DTYPE)
+getPOffset(DTYPE)
. -
getTLast
Last time. -
getTau
Exponent time scale. -
getTotalVolume
Total Volume.
-