Class BarSeries
java.lang.Object
com.quantfinlib.core.BarSeries
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbar(int i) static BarSeries.Builderdoubleclose(int i) double[]closes()static BarSeriesdoublehigh(int i) double[]highs()doubledouble[]Log returns; length = size - 1.doublelow(int i) double[]lows()static BarSeriesBuilds a series from close prices only (open = high = low = close).doubleopen(int i) double[]opens()double[]returns()Simple (arithmetic) returns; length = size - 1.intsize()slice(int from, int toExclusive) Copy of the bar range [from, toExclusive) as a new series (for train/test splits).symbol()longtimestamp(int i) long[]Zero-copy accessors: internal arrays, treat as read-only.doublevolume(int i) double[]volumes()
-
Method Details
-
builder
-
of
-
fromBars
-
symbol
-
size
public int size() -
timestamp
public long timestamp(int i) -
open
public double open(int i) -
high
public double high(int i) -
low
public double low(int i) -
close
public double close(int i) -
volume
public double volume(int i) -
lastClose
public double lastClose() -
bar
-
timestamps
public long[] timestamps()Zero-copy accessors: internal arrays, treat as read-only. -
opens
public double[] opens() -
highs
public double[] highs() -
lows
public double[] lows() -
closes
public double[] closes() -
volumes
public double[] volumes() -
slice
Copy of the bar range [from, toExclusive) as a new series (for train/test splits). -
returns
public double[] returns()Simple (arithmetic) returns; length = size - 1. -
logReturns
public double[] logReturns()Log returns; length = size - 1.
-