Skip to main content

A Python library for downloading and processing FFIEC Call Reports

Project description

FFIEC Call Reports Library

A Python library for downloading and processing FFIEC Call Reports. This library provides a simple interface to download call reports from the FFIEC's Central Data Repository (CDR) and process them into a usable format.

Installation

pip install ffiec-call-reports

Quick Start

from ffiec_call_reports import FFIECClient
from datetime import datetime

# Initialize client
client = FFIECClient(username="your_username", passphrase="your_passphrase")

# Download a single call report
report = client.get_call_report(
    rssd_id=1842065,
    period_end_date="2019/03/31"
)

# Get specific metrics
total_assets = report.get_metric("RCFD2170")  # Total Assets
total_loans = report.get_metric("RCFD1400")   # Total Loans

# Download multiple reports
reports = client.get_multiple_call_reports(
    rssd_ids=[1842065, 1842066],
    period_end_date=datetime(2019, 3, 31)
)

# Save to CSV
report.to_csv("call_report.csv")

Features

  • Download call reports for single or multiple institutions
  • Process XBRL data into pandas DataFrames
  • Map metric IDs to human-readable descriptions
  • Extract specific metrics easily
  • Save reports to CSV format
  • Streamlit web interface for easy access

Web Interface

The library includes a Streamlit web interface for easy access. To run it:

streamlit run src/app_streamlit.py

Usage Examples

Basic Usage

from ffiec_call_reports import FFIECClient

# Initialize client
client = FFIECClient(username="your_username", passphrase="your_passphrase")

# Download a report
report = client.get_call_report(1842065, "2019/03/31")

# Get the data as a DataFrame
df = report.to_dataframe()

Working with Multiple Reports

from ffiec_call_reports import FFIECClient, get_mapping_dict, apply_mapping
import pandas as pd

# Initialize client
client = FFIECClient(username="your_username", passphrase="your_passphrase")

# Download multiple reports
reports = client.get_multiple_call_reports(
    rssd_ids=[1842065, 1842066, 1842067],
    period_end_date="2019/03/31"
)

# Combine all reports
all_data = pd.concat([report.to_dataframe() for report in reports])

# Apply mapping
mapping_dict = get_mapping_dict()
mapped_data = apply_mapping(all_data, mapping_dict)

Extracting Specific Metrics

# Get a single metric
total_assets = report.get_metric("RCFD2170")

# Get multiple metrics
metrics = report.get_metrics([
    "RCFD2170",  # Total Assets
    "RCFD1400",  # Total Loans
    "RCFD1410"   # Commercial & Industrial Loans
])

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ffiec_call_reports-0.1.0.tar.gz (7.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ffiec_call_reports-0.1.0-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file ffiec_call_reports-0.1.0.tar.gz.

File metadata

  • Download URL: ffiec_call_reports-0.1.0.tar.gz
  • Upload date:
  • Size: 7.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for ffiec_call_reports-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ade4570c8499de5330edaca2d6d78db37bcb0ddf65ad80df8e688867bf57560d
MD5 8defccb3031c4a4ae61d41bf483d36d9
BLAKE2b-256 1d4cf6f15b36353e03f9d3c10b6bfa6c5b5b0d016ae1ccc37b9c60deea05341c

See more details on using hashes here.

File details

Details for the file ffiec_call_reports-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ffiec_call_reports-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c9558a3e49cc6a3124458a243402bc1c38414c8f560575ba96cd4c72cc02d650
MD5 aa986e1cf41dd7337b3ca40f107089ec
BLAKE2b-256 d437a86409522a7443e6a704b845ad01d7e4bad8239629f08442eb667608315c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page