Skip to main content

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

Project description

FedTools

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

From Python:

pip install FedTools

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

Usage

From Python: Returns a Pandas DataFrame 'dataset', which contains all Meeting Minutes, indexed by Date and a '.pkl' file saved within "DIRECTORY".

pip install FedTools
from FedTools import MonetaryPolicyCommittee
dataset = MonetaryPolicyCommittee().find_statements()

MonetaryPolicyCommittee().pickle_data("DIRECTORY")

Returns a Pandas DataFrame 'dataset', which contains all Beige Books, indexed by Date and a '.pkl' file saved within "DIRECTORY".

pip install FedTools
from FedTools import BeigeBooks
dataset = BeigeBooks().find_beige_books()

BeigeBooks().pickle_data("DIRECTORY")

Returns a Pandas DataFrame 'dataset', which contains all Federal Reserve Minutes since 1993, indexed by Date and a '.pkl' file saved within "DIRECTORY".

pip install FedTools
from FedTools import FederalReserveMins
dataset = FederalReserveMins().find_minutes()

FederalReserveMins().pickle_data("DIRECTORY")

To edit input default arguments:

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

dataset = monetary_policy.find_statements()

# serialise, save to "DIRECTORY":
monetary_policy.pickle_data("DIRECTORY")

-------------------------------------------------------------------------------------------------------------------

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


dataset = beige_books.find_beige_books()

# serialise, save to "DIRECTORY":
beige_books.pickle_data("DIRECTORY")

-------------------------------------------------------------------------------------------------------------------

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

dataset = fed_mins.find_minutes()

# serialise, save to "DIRECTORY":
fed_mins.pickle_data("DIRECTORY")

All parameters above are optional, 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)
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.5.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

FedTools-0.0.5-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file FedTools-0.0.5.tar.gz.

File metadata

  • Download URL: FedTools-0.0.5.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for FedTools-0.0.5.tar.gz
Algorithm Hash digest
SHA256 2a75ba40ed8bbe318c511dece45c1901bff39db15c4ade52e7889e4d8397db43
MD5 98273016b9b53615674b9c91ae4f1bf6
BLAKE2b-256 b7380a64050bdfea951609c2b76f08e6b8efa1efa1451fe3ccb68c481d390e79

See more details on using hashes here.

File details

Details for the file FedTools-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: FedTools-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for FedTools-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 3a60ebefb33197e3d3111c17697a4fc898d5602d9496d957ba1d96f0b4b3a93b
MD5 d89376e40e3f2b686af1923101ee3304
BLAKE2b-256 06b64007d7ad0fb93ab34539832c3c42fc248d1ab3a50833e42704e8ec9ff0ac

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