Sub topic 4
Record Transactions Consistently
This chapter assumes you can read an online bank or card statement, do simple arithmetic, and use basic spreadsheet features. You will create a transaction record that uses the same fields and rules every time. Consistency matters more than detail. A simple record that you maintain is more useful than a complex record that you abandon.
Use a stable set of fields
A transaction record is one row describing one money movement. Start with these fields:
| Field | Purpose | Example |
|---|---|---|
| Date | When the transaction posted or occurred | 2026-10-04 |
| Description | A recognizable name for the transaction | Grocery store |
| Account | Where the money moved | Checking |
| Category | What the transaction represents | Groceries |
| Amount | The signed money movement | -86.40 |
| Note | Optional context | Weekly shopping |
Use the posting date from the statement when reconciling. If you also need to know when you made a purchase, add a separate transaction-date field. Do not put two meanings into one date field.
Choose one sign convention
A sign convention is a rule for representing increases and decreases. A practical convention is:
- Income is positive.
- Spending is negative.
- Transfers between your own accounts are recorded separately or excluded from income and spending totals.
- Refunds are positive spending reversals.
- Credit card purchases are spending when they occur, not when the card bill is paid, if you track card activity directly.
For example, a $2,500 paycheck is 2500.00, and $86.40 spent at a grocery store is -86.40. With this convention, adding the records gives net cash flow:
income + spending = net cash flow
A positive net value means more money came in than went out during the period. A negative value means spending exceeded income.
Handle common transaction cases
Record the economic event once, then apply a consistent rule to exceptions.
- A transfer from checking to savings is not income. It increases one account and decreases another.
- A credit card payment is not new spending if you already recorded the card purchases. It is a transfer from checking to the card account.
- A returned purchase is a positive amount in the original spending category, such as
25.00for Groceries. - A pending charge should not be counted as final until it posts, unless your tracking method clearly labels pending items and removes duplicates.
- A monthly subscription remains in the same category even when the price changes. Record the actual amount.
- A cash withdrawal is a withdrawal from the bank account. Categorize the later cash purchases if you track them, but do not count both the withdrawal and the purchases as spending.
Calculate totals from the record
The following example reads a CSV record. It uses Decimal, a number type designed for exact decimal arithmetic. This avoids the small rounding errors that can occur with ordinary floating-point numbers.
import csv
from collections import defaultdict
from decimal import Decimal
from io import StringIO
data = """date,description,category,amount
2026-10-01,Paycheck,Income,2500.00
2026-10-02,Rent,Housing,-1200.00
2026-10-04,Grocery store,Groceries,-86.40
2026-10-09,Coffee shop,Dining,-4.75
2026-10-15,Paycheck,Income,2500.00
2026-10-17,Electric bill,Utilities,-92.10
"""
totals = defaultdict(Decimal)
for row in csv.DictReader(StringIO(data)):
totals[row["category"]] += Decimal(row["amount"])
income = totals.pop("Income", Decimal("0"))
spending = -sum(totals.values())
net = income - spending
print(f"Income: {income}")
print(f"Spending: {spending}")
print(f"Net: {net}")
for category, amount in sorted(totals.items()):
print(f" {category}: {-amount}")The output reports income, total spending, net cash flow, and spending by category. Keep the original transaction rows. Do not store only the totals, because totals cannot reveal a duplicate, missing entry, or incorrect category.
Exercise
Exercise
Using the sign convention above, what is the net cash flow for income of $3,000, rent of -$1,200, groceries of -$250, and a refund of $40?
Show answer
Net cash flow is $1,590: 3,000 - 1,200 - 250 + 40 = 1,590.