@Override
    public Num calculate(BarSeries series, Position position) {
        return getTradeCost(series, position, series.numOf(initialAmount));
    }
@Test
    public void fixedCostWithOnePosition() {
        MockBarSeries series = new MockBarSeries(numFunction, 100, 95, 100, 80, 85, 70);
        Position position = new Position();
        Num criterion;

        criterion = getCriterion(1000d, 0d, 0.75d).calculate(series, position);
        assertNumEquals(0d, criterion);

        position.operate(1);
        criterion = getCriterion(1000d, 0d, 0.75d).calculate(series, position);
        assertNumEquals(0.75d, criterion);

        position.operate(3);
        criterion = getCriterion(1000d, 0d, 0.75d).calculate(series, position);
        assertNumEquals(1.5d, criterion);

        position.operate(4);
        criterion = getCriterion(1000d, 0d, 0.75d).calculate(series, position);
        assertNumEquals(1.5d, criterion);
    }