@Override
    public Num getValue(int index) {
        return values.get(index);
    }
@Test
    public void cashFlowShortSellBigLossWithNegativeCashFlow() {
        BarSeries sampleBarSeries = new MockBarSeries(numFunction, 3, 20);
        TradingRecord tradingRecord = new BaseTradingRecord(Trade.sellAt(0, sampleBarSeries),
                Trade.buyAt(1, sampleBarSeries));

        CashFlow cashFlow = new CashFlow(sampleBarSeries, tradingRecord);

        assertNumEquals(1, cashFlow.getValue(0));
        assertNumEquals(-4.6667, cashFlow.getValue(1));
    }