def get_balance_in_period(self, start: Datum, end: Datum):
        """
        Calculates the balance for the given time period.
        The balance is taken to be 0 at the beginning of the period and then all the
        transactions are added together until the end date/time.
        """
        assert isinstance(start, Datum)
        assert isinstance(end, Datum)

        total = Decimal(0)

        splits = self.get_splits_in_period(start, end)

        for split in splits:
            total += split.quantity * self.account.sign
        return total