public int getSize() {
        return barSeries.getBarCount() - 1;
    }
@Test
    public void returnSize() {
        for (Returns.ReturnType type : Returns.ReturnType.values()) {
            // No return at index 0
            BarSeries sampleBarSeries = new MockBarSeries(numFunction, 1d, 2d, 3d, 4d, 5d);
            Returns returns = new Returns(sampleBarSeries, new BaseTradingRecord(), type);
            assertEquals(4, returns.getSize());
        }
    }