# Agent 9 — Financial Reporter Agent

**Build Priority:** 7
**Time to Build:** 1 day
**Impact:** ⭐⭐⭐ — Builds owner trust
**Cost/Month:** $0

## What It Does

Generates the monthly owner financial statement (Section 11 of the SOP). Pulls booking data, calculates fees, and produces a clean one-page report.

## Inputs

- Airbnb transaction history (CSV export or API)
- Expense tracking (Google Sheet or QuickBooks)
- Management fee percentage

## Outputs

Monthly PDF report for each owner showing:
- Gross booking revenue
- Platform fees
- Management fee calculation
- Cleaning costs
- Maintenance + supplies
- Net payout to owner
- Emailed on the 1st of each month

## How to Build

```python
class FinancialReporter:
    def generate_monthly_report(self, property_id, month, year):
        # 1. Pull Airbnb payout CSV
        payouts = pd.read_csv(f'airbnb_payouts_{property_id}_{year}.csv')
        month_payouts = payouts[payouts['date'].dt.month == month]

        # 2. Pull expenses from tracking sheet
        expenses = self.get_expenses(property_id, month, year)

        # 3. Calculate
        gross = month_payouts['amount'].sum()
        airbnb_fee = month_payouts['host_fee'].sum()
        management_fee = gross * 0.20
        net = gross - airbnb_fee - management_fee - expenses['cleaning'] - expenses['maintenance'] - expenses['supplies']

        # 4. Generate PDF
        report = self.render_pdf({
            'gross': gross, 'airbnb_fee': airbnb_fee, 'management_fee': management_fee,
            'net': net, 'occupancy': self.calculate_occupancy(property_id, month),
            'avg_nightly': self.calculate_adr(property_id, month),
        })

        # 5. Email to owner
        self.email_report(property_id, report)
```

## Deployment

**Schedule:** `0 9 1 * *` — 9am on the 1st of every month (Hermes cron)
