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.1.tar.gz (10.4 kB 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.1-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ffiec_call_reports-0.1.1.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • 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.1.tar.gz
Algorithm Hash digest
SHA256 561de52d3962491d5487a51ddb1d4f14d3732e15e0fb799f6111b4df3b338551
MD5 adea38d6b735a4504ff0703ebe2349c3
BLAKE2b-256 0a04605dc2afa39dd99af8513cf8ace355168a6c6deff2eb436b80b90adc0023

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ffiec_call_reports-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 74fb12c73e40d02a41079579468c52771bd2de382998baf4ecdda4491583d4f7
MD5 aae10b3bb9bb208022d19180ee974545
BLAKE2b-256 a7963196c4c53bd15ecd871ce6377e5039467c7be9aa66c5992b83336df19f0e

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