public Num getGrossReturn() {
        if (isOpened()) {
            return zero();
        } else {
            return getGrossReturn(exit.getPricePerAsset());
        }
    }
@Test
    public void testGetGrossReturnForShortPositionsUsingBarCloseOnNaN() {
        MockBarSeries series = new MockBarSeries(DoubleNum::valueOf, 100, 95);
        Position position = new Position(new Trade(0, TradeType.SELL, NaN, NaN), new Trade(1, TradeType.BUY, NaN, NaN));
        assertNumEquals(DoubleNum.valueOf(1.05), position.getGrossReturn(series));
    }