Skip to main content

An open source library for the extraction of Federal Reserve Data.

Project description

FedTools

Downloads Downloads

An open source Python library for the scraping of Federal Reserve data.

By default, all modules within FedTools use 10 threads to increase scraping speed. By default, the Output is a Pandas DataFrame, indexed by release date of the materials. Additional serialised storage methods are optional.

Installation

pip install Fedtools

Import the classes:

from FedTools import MonetaryPolicyCommittee
from FedTools import BeigeBooks
from FedTools import FederalReserveMins

Usage

Returns a Pandas DataFrame dataset, which contains all Meeting Minutes, indexed by Date:

from FedTools import MonetaryPolicyCommittee

dataset = MonetaryPolicyCommittee().find_statements()
MonetaryPolicyCommittee().pickle_data("directory.pkl")

Returns a Pandas DataFrame dataset, which contains all Beige Books, indexed by Date:

from FedTools import BeigeBooks

dataset = BeigeBooks().find_beige_books()
BeigeBooks().pickle_data("directory.pkl")

Returns a Pandas DataFrame dataset, which contains all Federal Reserve Minutes since 1993, indexed by Date:

from FedTools import FederalReserveMins

dataset = FederalReserveMins().find_minutes()
FederalReserveMins().pickle_data("directory.pkl")

Edit Default Input Arguments

###Monetary Policy Committee

To modify the MonetaryPolicyCommittee default parameters, each of the below can be adjusted:

monetary_policy = MonetaryPolicyCommittee(
            main_url = 'https://www.federalreserve.gov', 
            calendar_url = 'https://www.federalreserve.gov/monetarypolicy/fomccalendars.htm',
            start_year = 1994,    
            historical_split = 2014,
            verbose = True,
            thread_num = 10)
            
dataset = monetary_policy.find_statements()

BeigeBooks

To modify the BeigeBooks default parameters, each of the below can be adjusted:

beige_books = BeigeBooks(
            main_url = 'https://www.federalreserve.gov', 
            beige_book_url='https://www.federalreserve.gov/monetarypolicy/beige-book-default.htm',
            start_year = 1996,        
            historical_split = 2019,
            verbose = True,
            thread_num = 10)
                 
dataset = beige_books.find_beige_books()

FederalReserveMins

To modify the FederalReserveMins default parameters, each of the below can be adjusted:

fed_mins = FederalReserveMins(
            main_url = 'https://www.federalreserve.gov', 
            calendar_url ='https://www.federalreserve.gov/monetarypolicy/fomccalendars.htm',
            start_year = 1995,        
            historical_split = 2014,
            verbose = True,
            thread_num = 10)

dataset = fed_mins.find_minutes()

Parameter Explanation

All parameters within the package have default values which can be overriden, with a short explanation of each parameter outlined below:

Argument Description
main_url Federal Reserve Open Monetary Policy (FOMC) website URL. (str)
calendar_url URL containing a list of FOMC Meeting dates and Minutes release dates. (str)
beige_book_url URL containing a list of Beige Book release dates. (str)
start_year first year from which to begin collecting data. (int)
historical_split first year considered as historical (Check Here for FOMC and Minutes or Check Here for Beige Books). (int)
verbose boolean determining printing during scraping. (bool)
thread_num the number of threads to use for web scraping. (int)

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

Fedtools-0.0.7.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

Fedtools-0.0.7-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file Fedtools-0.0.7.tar.gz.

File metadata

  • Download URL: Fedtools-0.0.7.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for Fedtools-0.0.7.tar.gz
Algorithm Hash digest
SHA256 8df92e1629795075f2b665e44e05ff2eec00d19e16cd01c66e8e0cad42b9ed43
MD5 99f5361e39c9af4b82fd24eedd97bbf3
BLAKE2b-256 3b25dec08164bb5d4e4323793b7af519b51a003d624a6a8e8636051330f6ab25

See more details on using hashes here.

File details

Details for the file Fedtools-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: Fedtools-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for Fedtools-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 c78475e0cfa0272bd0bef269505dece75c6dc1a82dc56c395c1658dc8b9103fe
MD5 400a312b88735463e219462c0e6650bc
BLAKE2b-256 90331ae370b3b16f5dda84412b3847e6f40f213d47641df2e5a28199fe0baa66

See more details on using hashes here.

Supported by

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