@property<EOL><INDENT>def sign(self):<DEDENT>
return -<NUM_LIT:1> if self.type in (Account.TYPES.asset, Account.TYPES.expense) else <NUM_LIT:1><EOL>
Returns 1 if a credit should increase the value of the
account, or -1 if a credit should decrease the value of the
account.

This is based on the account type as is standard accounting practice.
The signs can be derrived from the following expanded form of the
accounting equation:

    Assets = Liabilities + Equity + (Income - Expenses)

Which can be rearranged as:

    0 = Liabilities + Equity + Income - Expenses - Assets

Further details here: https://en.wikipedia.org/wiki/Debits_and_credits