def simple_balance(self, as_of=None, raw=False, leg_query=None, **kwargs):
legs = self.legs<EOL>if as_of:<EOL><INDENT>legs = legs.filter(transaction__date__lte=as_of)<EOL><DEDENT>if leg_query or kwargs:<EOL><INDENT>leg_query = leg_query or models.Q()<EOL>legs = legs.filter(leg_query, **kwargs)<EOL><DEDENT>return legs.sum_to_balance() * (<NUM_LIT:1> if raw else self.sign) + self._zero_balance()<EOL>
Get the balance for this account, ignoring all child accounts

        Args:
            as_of (Date): Only include transactions on or before this date
            raw (bool): If true the returned balance should not have its sign
                        adjusted for display purposes.
            leg_query (models.Q): Django Q-expression, will be used to filter the transaction legs.
                                  allows for more complex filtering than that provided by **kwargs.
            kwargs (dict): Will be used to filter the transaction legs

        Returns:
            Balance