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

        CashFlow cashFlow = new CashFlow(sampleBarSeries, tradingRecord);

        assertNumEquals(1, cashFlow.getValue(0));
        assertNumEquals(1, cashFlow.getValue(1));
        assertNumEquals(0.9, cashFlow.getValue(2));
        assertNumEquals(0.8, cashFlow.getValue(3));
    }