@Override
    public Num calculate(Position position, int currentIndex) {
        Num pricePerAsset = position.getEntry().getPricePerAsset();
        Num multiplier = pricePerAsset.one();
        if (position.isClosed()) {
            multiplier = pricePerAsset.numOf(2);
        }
        return pricePerAsset.numOf(feePerTrade).multipliedBy(multiplier);
    }
@Test
    public void calculatePerPrice() {
        double feePerTrade = RANDOM.nextDouble();
        FixedTransactionCostModel model = new FixedTransactionCostModel(feePerTrade);
        Num cost = model.calculate(PRICE, AMOUNT);

        assertNumEquals(cost, DoubleNum.valueOf(feePerTrade));
    }