CLI
finagg’s command-line interface (CLI). A selection of tools for aggregating popular data and features from each of the supported APIs.
General
Usage: finagg install [OPTIONS]
Set API keys/user agents, drop and recreate tables, and install the
recommended datasets into the SQL database.
Options:
-s, --skip [bea|fred|indices|sec|yfinance|fundam]
Subpackage installations to skip. Useful to
avoid reinstalling data that you don't want
to when using the general install command.
-sid, --series TEXT FRED economic series whose data is attempted
to be downloaded and inserted into the SQL
tables. Multiple series can be specified by
providing multiple `series` options, by
separating series with a comma (e.g.,
`GDP,FEDFUNDS`), or by providing IDs in a
CSV file by specifying a file path (e.g.,
`fred_series.txt`). The CSV file can be
formatted such that there's one string per
line or multiple strings per line (delimited
by a comma). The strings specified by this
option are combined with the strings
specified by the `series-set` option.
-ss, --series-set [economic] Set of FRED economic series whose data is
attempted to be downloaded and inserted into
the SQL tables. 'economic' indicates the
recommended and most popular series (e.g.,
consumer price index, gross domestic
product, etc.).
--stock-data Whether to only install stock data (SEC,
Yahoo! Finance, and fundamental stock data).
-t, --ticker TEXT Ticker whose data is attempted to be
downloaded and inserted into the SQL tables.
Multiple tickers can be specified by
providing multiple `ticker` options, by
separating tickers with a comma (e.g.,
`AAPL,MSFT,NVDA`), or by providing tickers
in a CSV file by specifying a file path
(e.g., `bank_tickers.txt`). The CSV file can
be formatted such that there's one ticker
per line or multiple tickers per line
(delimited by a comma). The tickers
specified by this option are combined with
the tickers specified by the `ticker-set`
option.
-ts, --ticker-set [indices|sec]
Set of tickers whose data is attempted to be
downloaded and inserted into the SQL tables.
'indices' indicates the set of tickers from
the three most popular indices (DJIA, Nasdaq
100, and S&P 500). 'sec' indicates all the
tickers that have data available through the
SEC API (which is approximately all
publicly-traded US companies). 'indices'
will effectively only attempt to download
and install data for relatively popular and
large market cap companies, while 'sec' will
attempt to download and install data for
nearly all publicly-traded US companies.
Choosing 'indices' will be fast, while
choosing 'sec' will be slow but will include
more diverse data.
-z, --from-zip Whether to install raw data from bulk data
zip files that're compiled by the SEC
nightly. Installing all SEC data with this
option can take upwards of 1.5 hours to
complete.
-n, --processes INTEGER Number of backgruond processes to run in
parallel when installing data. Note, not all
tables support installations with
multiprocessing.
-r, --recreate-tables Whether to reset the tables associated with
the install options by dropping and
recreating them.
-v, --verbose Sets the log level to DEBUG to show
installation errors for each ticker.
--help Show this message and exit.
BEA
Usage: finagg bea install [OPTIONS]
Set the BEA API key.
Options:
--help Show this message and exit.
FRED
Usage: finagg fred install [OPTIONS]
Set the FRED API key, drop and recreate tables, and install the recommended
tables into the SQL database.
Options:
--raw [series] Raw tables to install. `series` indicates raw
FRED economic series observations/measurements
(e.g., consumer price index, gross domestic
product, etc.). At least `series` must be
specified to enable installing refined data
using the `refined` flag.
--refined [economic] Refined tables to install. This requires raw
data to be installed beforehand using the
`--raw` flag or for the `--raw` flag to be set
when this option is provided.
-a, --all Whether to install all defined tables
(including all refined tables).
-sid, --series TEXT FRED economic series whose data is attempted
to be downloaded and inserted into the SQL
tables. Multiple series can be specified by
providing multiple `series` options, by
separating series with a comma (e.g.,
`GDP,FEDFUNDS`), or by providing IDs in a CSV
file by specifying a file path (e.g.,
`fred_series.txt`). The CSV file can be
formatted such that there's one string per
line or multiple strings per line (delimited
by a comma). The strings specified by this
option are combined with the strings specified
by the `series-set` option.
-ss, --series-set [economic] Set of FRED economic series whose data is
attempted to be downloaded and inserted into
the SQL tables. 'economic' indicates the
recommended and most popular series (e.g.,
consumer price index, gross domestic product,
etc.).
-r, --recreate-tables Whether to reset the tables associated with
the install options by dropping and recreating
them.
-v, --verbose Sets the log level to DEBUG to show
installation errors for each series.
--help Show this message and exit.
Popular Indices
Usage: finagg indices install [OPTIONS]
Drop and recreate tables, and install popular indices's ticker data into the
SQL database.
Options:
-a, --all Whether to install all defined tables.
--djia Whether to install the DJIA ticker table.
--djia Whether to install the DJIA ticker table.
--sp500 Whether to install the S&P 500 ticker table.
--nasdaq100 Whether to install the Nasdaq 100 ticker table.
--help Show this message and exit.
SEC
Usage: finagg sec install [OPTIONS]
Set the SEC API key, drop and recreate tables, and install the recommended
tables into the SQL database.
Options:
--raw [submissions|tags] Raw tables to install. `submissions`
indicates company metadata (e.g., company
name, industry code, etc.) while `tags`
indicates SEC EDGAR tags (e.g., earnings-
per-share, current assets, etc.).Both
`submissions` and `tags` must be specified
to enable installing refined data using the
`refined` flag.
--refined [annual|annual.normalized|quarterly|quarterly.normalized]
Refined tables to install. This requires raw
SEC data to be installed beforehand using
the `--raw` flag or for the `--raw` flag to
be set when this option is provided.
-a, --all Whether to install all defined tables
(including all refined tables).
-t, --ticker TEXT Ticker whose data is attempted to be
downloaded and inserted into the SQL tables.
Multiple tickers can be specified by
providing multiple `ticker` options, by
separating tickers with a comma (e.g.,
`AAPL,MSFT,NVDA`), or by providing tickers
in a CSV file by specifying a file path
(e.g., `bank_tickers.txt`). The CSV file can
be formatted such that there's one ticker
per line or multiple tickers per line
(delimited by a comma). The tickers
specified by this option are combined with
the tickers specified by the `ticker-set`
option.
-ts, --ticker-set [indices|sec]
Set of tickers whose data is attempted to be
downloaded and inserted into the SQL tables.
'indices' indicates the set of tickers from
the three most popular indices (DJIA, Nasdaq
100, and S&P 500). 'sec' indicates all the
tickers that have data available through the
SEC API (which is approximately all
publicly-traded US companies). 'indices'
will effectively only attempt to download
and install data for relatively popular and
large market cap companies, while 'sec' will
attempt to download and install data for
nearly all publicly-traded US companies.
Choosing 'indices' will be fast, while
choosing 'sec' will be slow but will include
more diverse data.
-z, --from-zip Whether to install raw data from bulk data
zip files that're compiled by the SEC
nightly. Installing all SEC data with this
option can take upwards of 1.5 hours to
complete.
-n, --processes INTEGER Number of backgruond processes to run in
parallel when installing data. Note, not all
tables support installations with
multiprocessing.
-r, --recreate-tables Whether to reset the tables associated with
the install options by dropping and
recreating them.
-v, --verbose Sets the log level to DEBUG to show
installation errors for each ticker.
--help Show this message and exit.
Yahoo! Finance
Usage: finagg yfinance install [OPTIONS]
Install Yahoo! Finance stock price and price feature data.
Options:
--raw [prices] Raw tables to install. `prices` indicates
daily historical stock price data. `prices`
must be specified to enable installing
refined data using the `refined` flag.
--refined [daily] Refined tables to install. This requires raw
data to be installed beforehand using the
`--raw` flag or for the `--raw` flag to be
set when this option is provided.
-a, --all Whether to install all defined tables
(including all refined tables).
-t, --ticker TEXT Ticker whose data is attempted to be
downloaded and inserted into the SQL tables.
Multiple tickers can be specified by
providing multiple `ticker` options, by
separating tickers with a comma (e.g.,
`AAPL,MSFT,NVDA`), or by providing tickers
in a CSV file by specifying a file path
(e.g., `bank_tickers.txt`). The CSV file can
be formatted such that there's one ticker
per line or multiple tickers per line
(delimited by a comma). The tickers
specified by this option are combined with
the tickers specified by the `ticker-set`
option.
-ts, --ticker-set [indices|sec]
Set of tickers whose data is attempted to be
downloaded and inserted into the SQL tables.
'indices' indicates the set of tickers from
the three most popular indices (DJIA, Nasdaq
100, and S&P 500). 'sec' indicates all the
tickers that have data available through the
SEC API (which is approximately all
publicly-traded US companies). 'indices'
will effectively only attempt to download
and install data for relatively popular and
large market cap companies, while 'sec' will
attempt to download and install data for
nearly all publicly-traded US companies.
Choosing 'indices' will be fast, while
choosing 'sec' will be slow but will include
more diverse data.
-n, --processes INTEGER Number of backgruond processes to run in
parallel when installing data. Note, not all
tables support installations with
multiprocessing.
-r, --recreate-tables Whether to reset the tables associated with
the install options by dropping and
recreating them.
-v, --verbose Sets the log level to DEBUG to show
installation errors for each ticker.
--help Show this message and exit.
Usage: finagg yfinance update [OPTIONS]
Update Yahoo! Finance stock price and price feature data.
Options:
--raw [prices] Raw tables to update. `prices` indicates daily
historical stock price data. `prices` must be
specified to enable updating refined data using the
`refined` flag.
--refined [daily] Refined tables to update. This requires raw data to
be updated beforehand using the `--raw` flag or for
the `--raw` flag to be set when this option is
provided.
-a, --all Whether to update all defined tables (including all
refined tables).
-t, --ticker TEXT Ticker whose data is attempted to be downloaded and
inserted into the SQL tables. Multiple tickers can
be specified by providing multiple `ticker`
options, by separating tickers with a comma (e.g.,
`AAPL,MSFT,NVDA`), or by providing tickers in a CSV
file by specifying a file path (e.g.,
`bank_tickers.txt`). The CSV file can be formatted
such that there's one ticker per line or multiple
tickers per line (delimited by a comma).
-n, --processes INTEGER Number of backgruond processes to run in parallel
when updating. Note, not all tables support updates
with multiprocessing.
-v, --verbose Sets the log level to DEBUG to show update errors
for each ticker.
--help Show this message and exit.
Fundamental Features
Usage: finagg fundam install [OPTIONS]
Drop and recreate tables, and install recommended tables into the SQL
database.
Options:
--refined [fundam|fundam.normalized]
Refined tables to install. This requires
Yahoo! Finance and SEC refined tables to be
installed beforehand.
-a, --all Whether to install all defined tables
(including all refined tables).
-n, --processes INTEGER Number of backgruond processes to run in
parallel when installing data. Note, not all
tables support installations with
multiprocessing.
-r, --recreate-tables Whether to reset the tables associated with
the install options by dropping and
recreating them.
-v, --verbose Sets the log level to DEBUG to show
installation errors for each series.
--help Show this message and exit.