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

        CashFlow cashFlow = new CashFlow(sampleBarSeries, tradingRecord);

        assertNumEquals(1, cashFlow.getValue(0));
        assertNumEquals(0.5, cashFlow.getValue(1));
        assertNumEquals(0.0, cashFlow.getValue(2));
        assertNumEquals(-0.1, cashFlow.getValue(3));
    }