@Override
    public Num calculate(BarSeries series, Position position) {
        return criterion.calculate(series, position).dividedBy(enterAndHoldCriterion.calculate(series, position));
    }
@Test
    public void calculateWithOnlyOnePosition() {
        MockBarSeries series = new MockBarSeries(numFunction, 100, 95, 100, 80, 85, 70);
        Position position = new Position(Trade.buyAt(0, series), Trade.sellAt(1, series));

        AnalysisCriterion buyAndHold = getCriterion(new ReturnCriterion());
        assertNumEquals((100d / 70) / (100d / 95), buyAndHold.calculate(series, position));
    }