├── .github └── workflows │ ├── pylint.yml │ ├── pytest.yml │ ├── python-publish.yml │ └── sphinx.yml ├── .gitignore ├── .readthedocs.yaml ├── LICENSE ├── MANIFEST.in ├── README.md ├── docs ├── .buildinfo ├── .nojekyll ├── Makefile ├── _autogen │ ├── finpandas.core.connections.rst │ ├── finpandas.core.datasources.rst │ ├── finpandas.core.rst │ ├── finpandas.dataframes.forms.rst │ ├── finpandas.dataframes.prices.rst │ ├── finpandas.dataframes.rst │ ├── finpandas.resources.rst │ ├── finpandas.rst │ ├── finpandas.utils.errors.rst │ ├── finpandas.utils.functional.rst │ ├── finpandas.utils.jobs.rst │ └── finpandas.utils.rst ├── _modules │ ├── finpandas │ │ ├── core │ │ │ ├── connections.html │ │ │ └── datasources.html │ │ ├── dataframes │ │ │ ├── forms.html │ │ │ └── prices.html │ │ └── utils │ │ │ ├── errors.html │ │ │ ├── functional.html │ │ │ └── jobs.html │ └── index.html ├── _pages │ ├── install.rst │ └── license.rst ├── _sources │ ├── finpandas.core.rst.txt │ ├── finpandas.dataframes.rst.txt │ ├── finpandas.resources.rst.txt │ ├── finpandas.rst.txt │ ├── finpandas.utils.rst.txt │ ├── index.rst.txt │ └── modules.rst.txt ├── _static │ ├── alabaster.css │ ├── basic.css │ ├── copybutton.js │ ├── css │ │ ├── badge_only.css │ │ ├── fonts │ │ │ ├── Roboto-Slab-Bold.woff │ │ │ ├── Roboto-Slab-Bold.woff2 │ │ │ ├── Roboto-Slab-Regular.woff │ │ │ ├── Roboto-Slab-Regular.woff2 │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.svg │ │ │ ├── fontawesome-webfont.ttf │ │ │ ├── fontawesome-webfont.woff │ │ │ ├── fontawesome-webfont.woff2 │ │ │ ├── lato-bold-italic.woff │ │ │ ├── lato-bold-italic.woff2 │ │ │ ├── lato-bold.woff │ │ │ ├── lato-bold.woff2 │ │ │ ├── lato-normal-italic.woff │ │ │ ├── lato-normal-italic.woff2 │ │ │ ├── lato-normal.woff │ │ │ └── lato-normal.woff2 │ │ └── theme.css │ ├── custom.css │ ├── doctools.js │ ├── documentation_options.js │ ├── file.png │ ├── jquery-3.5.1.js │ ├── jquery.js │ ├── js │ │ ├── badge_only.js │ │ ├── html5shiv-printshiv.min.js │ │ ├── html5shiv.min.js │ │ └── theme.js │ ├── language_data.js │ ├── minus.png │ ├── plus.png │ ├── pygments.css │ ├── searchtools.js │ ├── underscore-1.13.1.js │ ├── underscore-1.3.1.js │ └── underscore.js ├── conf.py ├── finpandas.core.html ├── finpandas.dataframes.html ├── finpandas.html ├── finpandas.resources.html ├── finpandas.utils.html ├── genindex.html ├── index.html ├── index.rst ├── make.bat ├── modules.html ├── objects.inv ├── py-modindex.html ├── search.html └── searchindex.js ├── docs_source ├── Makefile ├── _build │ ├── doctrees │ │ ├── environment.pickle │ │ ├── finpandas.core.doctree │ │ ├── finpandas.dataframes.doctree │ │ ├── finpandas.doctree │ │ ├── finpandas.resources.doctree │ │ ├── finpandas.utils.doctree │ │ ├── index.doctree │ │ └── modules.doctree │ └── html │ │ ├── .buildinfo │ │ ├── _modules │ │ ├── finpandas │ │ │ ├── core │ │ │ │ ├── connections.html │ │ │ │ └── datasources.html │ │ │ ├── dataframes │ │ │ │ ├── forms.html │ │ │ │ └── prices.html │ │ │ └── utils │ │ │ │ ├── errors.html │ │ │ │ ├── functional.html │ │ │ │ └── jobs.html │ │ └── index.html │ │ ├── _sources │ │ ├── finpandas.core.rst.txt │ │ ├── finpandas.dataframes.rst.txt │ │ ├── finpandas.resources.rst.txt │ │ ├── finpandas.rst.txt │ │ ├── finpandas.utils.rst.txt │ │ ├── index.rst.txt │ │ └── modules.rst.txt │ │ ├── _static │ │ ├── alabaster.css │ │ ├── basic.css │ │ ├── css │ │ │ ├── badge_only.css │ │ │ ├── fonts │ │ │ │ ├── Roboto-Slab-Bold.woff │ │ │ │ ├── Roboto-Slab-Bold.woff2 │ │ │ │ ├── Roboto-Slab-Regular.woff │ │ │ │ ├── Roboto-Slab-Regular.woff2 │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ ├── fontawesome-webfont.svg │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ ├── fontawesome-webfont.woff │ │ │ │ ├── fontawesome-webfont.woff2 │ │ │ │ ├── lato-bold-italic.woff │ │ │ │ ├── lato-bold-italic.woff2 │ │ │ │ ├── lato-bold.woff │ │ │ │ ├── lato-bold.woff2 │ │ │ │ ├── lato-normal-italic.woff │ │ │ │ ├── lato-normal-italic.woff2 │ │ │ │ ├── lato-normal.woff │ │ │ │ └── lato-normal.woff2 │ │ │ └── theme.css │ │ ├── custom.css │ │ ├── doctools.js │ │ ├── documentation_options.js │ │ ├── file.png │ │ ├── jquery-3.5.1.js │ │ ├── jquery.js │ │ ├── js │ │ │ ├── badge_only.js │ │ │ ├── html5shiv-printshiv.min.js │ │ │ ├── html5shiv.min.js │ │ │ └── theme.js │ │ ├── language_data.js │ │ ├── minus.png │ │ ├── plus.png │ │ ├── pygments.css │ │ ├── searchtools.js │ │ ├── underscore-1.13.1.js │ │ ├── underscore-1.3.1.js │ │ └── underscore.js │ │ ├── finpandas.core.html │ │ ├── finpandas.dataframes.html │ │ ├── finpandas.html │ │ ├── finpandas.resources.html │ │ ├── finpandas.utils.html │ │ ├── genindex.html │ │ ├── index.html │ │ ├── modules.html │ │ ├── objects.inv │ │ ├── py-modindex.html │ │ ├── search.html │ │ └── searchindex.js ├── conf.py ├── finpandas.core.rst ├── finpandas.dataframes.rst ├── finpandas.resources.rst ├── finpandas.rst ├── finpandas.utils.rst ├── index.rst ├── make.bat └── modules.rst ├── finpandas ├── __init__.py ├── core │ ├── __init__.py │ ├── connections.py │ └── datasources.py ├── dataframes │ ├── __init__.py │ ├── forms.py │ └── prices.py ├── resources │ ├── __init__.py │ ├── cik.json │ ├── constituents.csv │ ├── ticker.json │ └── title.json └── utils │ ├── __init__.py │ ├── errors.py │ ├── functional.py │ └── jobs.py ├── requirements.txt ├── samples ├── basics.py ├── multithreading.py └── tyler_demo.py ├── scripts ├── render_docs.sh ├── update.py ├── upload.py └── yf_tickers.py ├── setup.py └── tests ├── test_forms.py └── test_fundamentals.py /.github/workflows/pylint.yml: -------------------------------------------------------------------------------- 1 | name: Pylint 2 | 3 | on: [push] 4 | 5 | jobs: 6 | build: 7 | 8 | runs-on: ubuntu-latest 9 | 10 | steps: 11 | - uses: actions/checkout@v2 12 | - name: Set up Python 3.8 13 | uses: actions/setup-python@v1 14 | with: 15 | python-version: 3.8 16 | - name: Install dependencies 17 | run: | 18 | python -m pip install --upgrade pip 19 | pip install pylint dpath sqlalchemy==1.4.0b1 pandas pymysql 20 | - name: Analysing the code with pylint 21 | run: | 22 | pylint `find finpandas|grep .py$|xargs` 23 | -------------------------------------------------------------------------------- /.github/workflows/pytest.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: Pytest 4 | 5 | on: [push] 6 | 7 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 8 | jobs: 9 | # This workflow contains a single job called "build" 10 | build: 11 | # The type of runner that the job will run on 12 | runs-on: ubuntu-latest 13 | 14 | # Steps represent a sequence of tasks that will be executed as part of the job 15 | steps: 16 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 17 | - uses: actions/checkout@v2 18 | - name: Set up Python 3.8 19 | uses: actions/setup-python@v1 20 | with: 21 | python-version: 3.8 22 | 23 | - name: Install dependencies 24 | run: | 25 | python -m pip install --upgrade pip 26 | pip install dpath sqlalchemy==1.4.0b1 pandas pymysql 27 | 28 | - name: Test with pytest 29 | run: | 30 | pip install pytest 31 | pip install pytest-cov 32 | pytest tests/*.py --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html 33 | -------------------------------------------------------------------------------- /.github/workflows/python-publish.yml: -------------------------------------------------------------------------------- 1 | # This workflows will upload a Python Package using Twine when a release is created 2 | # For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries 3 | 4 | name: Upload Python Package 5 | 6 | on: 7 | release: 8 | types: [created] 9 | 10 | jobs: 11 | deploy: 12 | 13 | runs-on: ubuntu-latest 14 | 15 | steps: 16 | - uses: actions/checkout@v2 17 | - name: Set up Python 18 | uses: actions/setup-python@v2 19 | with: 20 | python-version: '3.x' 21 | - name: Install dependencies 22 | run: | 23 | python -m pip install --upgrade pip 24 | pip install setuptools wheel twine 25 | - name: Build and publish 26 | env: 27 | TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} 28 | TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} 29 | run: | 30 | python setup.py sdist bdist_wheel 31 | twine upload dist/* 32 | -------------------------------------------------------------------------------- /.github/workflows/sphinx.yml: -------------------------------------------------------------------------------- 1 | name: Sphinx 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | pull_request: 7 | branches: [ master ] 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - uses: actions/checkout@v2 15 | - name: Set up Python 3.8 16 | uses: actions/setup-python@v1 17 | with: 18 | python-version: 3.8 19 | - name: Install dependencies 20 | run: | 21 | python -m pip install --upgrade pip 22 | pip install sphinx sphinx_rtd_theme 23 | - name: Build docs 24 | run: | 25 | cd doc 26 | make html 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ############################## 2 | 3 | # IDEs 4 | .vscode 5 | .idea 6 | 7 | # Files 8 | 9 | 10 | ############################## 11 | 12 | 13 | # Byte-compiled / optimized / DLL files 14 | __pycache__/ 15 | *.py[cod] 16 | *$py.class 17 | 18 | # C extensions 19 | *.so 20 | 21 | # Distribution / packaging 22 | .Python 23 | build/ 24 | develop-eggs/ 25 | dist/ 26 | downloads/ 27 | eggs/ 28 | .eggs/ 29 | lib/ 30 | lib64/ 31 | parts/ 32 | sdist/ 33 | var/ 34 | wheels/ 35 | pip-wheel-metadata/ 36 | share/python-wheels/ 37 | *.egg-info/ 38 | .installed.cfg 39 | *.egg 40 | MANIFEST 41 | 42 | # PyInstaller 43 | # Usually these files are written by a python script from a template 44 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 45 | *.manifest 46 | *.spec 47 | 48 | # Installer logs 49 | pip-log.txt 50 | pip-delete-this-directory.txt 51 | 52 | # Unit test / coverage reports 53 | htmlcov/ 54 | .tox/ 55 | .nox/ 56 | .coverage 57 | .coverage.* 58 | .cache 59 | nosetests.xml 60 | coverage.xml 61 | *.cover 62 | *.py,cover 63 | .hypothesis/ 64 | .pytest_cache/ 65 | 66 | # Translations 67 | *.mo 68 | *.pot 69 | 70 | # Django stuff: 71 | *.log 72 | local_settings.py 73 | db.sqlite3 74 | db.sqlite3-journal 75 | 76 | # Flask stuff: 77 | instance/ 78 | .webassets-cache 79 | 80 | # Scrapy stuff: 81 | .scrapy 82 | 83 | # Sphinx documentation 84 | docs/_build/ 85 | 86 | # PyBuilder 87 | target/ 88 | 89 | # Jupyter Notebook 90 | .ipynb_checkpoints 91 | 92 | # IPython 93 | profile_default/ 94 | ipython_config.py 95 | 96 | # pyenv 97 | .python-version 98 | 99 | # pipenv 100 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 101 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 102 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 103 | # install all needed dependencies. 104 | #Pipfile.lock 105 | 106 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 107 | __pypackages__/ 108 | 109 | # Celery stuff 110 | celerybeat-schedule 111 | celerybeat.pid 112 | 113 | # SageMath parsed files 114 | *.sage.py 115 | 116 | # Environments 117 | .env 118 | .venv 119 | env/ 120 | venv/ 121 | ENV/ 122 | env.bak/ 123 | venv.bak/ 124 | 125 | # Spyder project settings 126 | .spyderproject 127 | .spyproject 128 | 129 | # Rope project settings 130 | .ropeproject 131 | 132 | # mkdocs documentation 133 | /site 134 | 135 | # mypy 136 | .mypy_cache/ 137 | .dmypy.json 138 | dmypy.json 139 | 140 | # Pyre type checker 141 | .pyre/ 142 | 143 | -------------------------------------------------------------------------------- /.readthedocs.yaml: -------------------------------------------------------------------------------- 1 | # .readthedocs.yaml 2 | # Read the Docs configuration file 3 | # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details 4 | 5 | # Required 6 | version: 2 7 | 8 | # Build documentation in the docs/ directory with Sphinx 9 | sphinx: 10 | configuration: docs/conf.py 11 | 12 | # Optionally build your docs in additional formats such as PDF 13 | formats: 14 | - pdf 15 | 16 | # Optionally set the version of Python and requirements required to build your docs 17 | python: 18 | version: 3.7 19 | install: 20 | - requirements: requirements.txt 21 | 22 | 23 | sphinx: 24 | builder: html 25 | configuration: docs/conf.py 26 | fail_on_warning: false # TODO 27 | 28 | 29 | submodules: 30 | include: all 31 | recursive: true 32 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Matthew Beveridge 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include finpandas/resources/*.json -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # finpandas 2 | NOTE: This package is currently under development and we cannot yet guarantee the accuracy of the outputted data and metrics. 3 | 4 | 5 | Toolkit for U.S. public sector financial analysis. Compare multiple companies across multiple years, in seconds, without having to download data locally. 6 | 7 | ## About 8 | **fundamentals:** for United States public fundamentals (10-Ks, 10-Qs, etc.) filed with the SEC. 9 | 10 | **stocks:** for historical stock pricing information on United States public companies. 11 | 12 | [Documentation](https://mattbeveridge.com/finpandas) 13 | 14 | ## Installation 15 | `finpandas` can be installed using `pip`: 16 | ``` 17 | git clone 18 | cd finpandas 19 | pip install . 20 | ``` 21 | 27 | 28 | ## Usage 29 | The workflow is the following: 30 | 31 | **Import.** 32 | ```python 33 | from finpandas import fundamentals, stocks, dispose 34 | ``` 35 | 36 | **Get data.** 37 | ```python 38 | # examine 10-K filings 39 | form10k = fundamentals.ten_k("AAPL", 2019) 40 | form10ks = fundamentals.ten_k("aapl", [2016, 2017, 2018]) 41 | 42 | # examine 10-Q filings 43 | form10q = fundamentals.ten_q("tsla", (2018, "Q3")) 44 | form10qs = fundamentals.ten_q("TSLA", [(2017, "Q1"), (2016, "Q2")]) 45 | form10qs = fundamentals.ten_q("tsla", [2016, 2017, 2018]) 46 | 47 | # examine historical stock prices 48 | stock_prices = stocks.prices("aapl", "2018-01-01", "2020-12-31") 49 | ``` 50 | 51 | 52 | **Manipulate the data.** 53 | ```python 54 | # example calculations 55 | balance_sheet = form10k.balance_sheet() 56 | roe = form10qs.return_on_equity() 57 | net_income = form10k.net_income() 58 | search = form10k.search("Amortization") 59 | ``` 60 | 61 | **Get data _efficiently_ (multithreading).** 62 | 63 | The largest efficiency bottleneck is the I/O speed, which is reduced through parallelized queries. 64 | ```python 65 | from finpandas.utils import Jobs 66 | 67 | # add jobs to the queue 68 | jobs = Jobs() 69 | jobs.add_job(fundamentals.ten_k, "aapl", [2017, 2018, 2019]) 70 | jobs.add_job(fundamentals.ten_q, "fb", 2010) 71 | 72 | # execute the queries 73 | results = jobs.execute() 74 | ``` 75 | 76 | **Close your connection.** 77 | ```python 78 | dispose() 79 | ``` 80 | 81 | For further examples, see [samples](samples). 82 | -------------------------------------------------------------------------------- /docs/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: eae911654236853762a8648994609e35 4 | tags: 645f666f9bcd5a90fca523b33c5a78b7 5 | -------------------------------------------------------------------------------- /docs/.nojekyll: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line, and also 5 | # from the environment for the first two. 6 | SPHINXOPTS ?= 7 | SPHINXBUILD ?= sphinx-build 8 | SOURCEDIR = . 9 | BUILDDIR = _build 10 | 11 | # Put it first so that "make" without argument is like "make help". 12 | help: 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 14 | 15 | .PHONY: help Makefile 16 | 17 | # Catch-all target: route all unknown targets to Sphinx using the new 18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 19 | %: Makefile 20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 21 | -------------------------------------------------------------------------------- /docs/_autogen/finpandas.core.connections.rst: -------------------------------------------------------------------------------- 1 | finpandas.core.connections module 2 | ================================= 3 | 4 | .. automodule:: finpandas.core.connections 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/_autogen/finpandas.core.datasources.rst: -------------------------------------------------------------------------------- 1 | finpandas.core.datasources module 2 | ================================= 3 | 4 | .. automodule:: finpandas.core.datasources 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/_autogen/finpandas.core.rst: -------------------------------------------------------------------------------- 1 | finpandas.core package 2 | ====================== 3 | 4 | .. automodule:: finpandas.core 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | 9 | Submodules 10 | ---------- 11 | 12 | .. toctree:: 13 | :maxdepth: 4 14 | 15 | finpandas.core.connections 16 | finpandas.core.datasources 17 | -------------------------------------------------------------------------------- /docs/_autogen/finpandas.dataframes.forms.rst: -------------------------------------------------------------------------------- 1 | finpandas.dataframes.forms module 2 | ================================= 3 | 4 | .. automodule:: finpandas.dataframes.forms 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/_autogen/finpandas.dataframes.prices.rst: -------------------------------------------------------------------------------- 1 | finpandas.dataframes.prices module 2 | ================================== 3 | 4 | .. automodule:: finpandas.dataframes.prices 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/_autogen/finpandas.dataframes.rst: -------------------------------------------------------------------------------- 1 | finpandas.dataframes package 2 | ============================ 3 | 4 | .. automodule:: finpandas.dataframes 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | 9 | Submodules 10 | ---------- 11 | 12 | .. toctree:: 13 | :maxdepth: 4 14 | 15 | finpandas.dataframes.forms 16 | finpandas.dataframes.prices 17 | -------------------------------------------------------------------------------- /docs/_autogen/finpandas.resources.rst: -------------------------------------------------------------------------------- 1 | finpandas.resources package 2 | =========================== 3 | 4 | .. automodule:: finpandas.resources 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/_autogen/finpandas.rst: -------------------------------------------------------------------------------- 1 | finpandas package 2 | ================= 3 | 4 | .. automodule:: finpandas 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | 9 | Subpackages 10 | ----------- 11 | 12 | .. toctree:: 13 | :maxdepth: 4 14 | 15 | finpandas.core 16 | finpandas.dataframes 17 | finpandas.resources 18 | finpandas.utils 19 | -------------------------------------------------------------------------------- /docs/_autogen/finpandas.utils.errors.rst: -------------------------------------------------------------------------------- 1 | finpandas.utils.errors module 2 | ============================= 3 | 4 | .. automodule:: finpandas.utils.errors 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/_autogen/finpandas.utils.functional.rst: -------------------------------------------------------------------------------- 1 | finpandas.utils.functional module 2 | ================================= 3 | 4 | .. automodule:: finpandas.utils.functional 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/_autogen/finpandas.utils.jobs.rst: -------------------------------------------------------------------------------- 1 | finpandas.utils.jobs module 2 | =========================== 3 | 4 | .. automodule:: finpandas.utils.jobs 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/_autogen/finpandas.utils.rst: -------------------------------------------------------------------------------- 1 | finpandas.utils package 2 | ======================= 3 | 4 | .. automodule:: finpandas.utils 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | 9 | Submodules 10 | ---------- 11 | 12 | .. toctree:: 13 | :maxdepth: 4 14 | 15 | finpandas.utils.errors 16 | finpandas.utils.functional 17 | finpandas.utils.jobs 18 | -------------------------------------------------------------------------------- /docs/_modules/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Overview: module code — finpandas documentation 7 | 8 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 43 | 44 |
48 | 49 |
50 |
51 |
52 |
    53 |
  • »
  • 54 |
  • Overview: module code
  • 55 |
  • 56 |
  • 57 |
58 |
59 |
60 |
61 | 74 |
75 |
76 | 77 |
78 | 79 |
80 |

© Copyright 2022, Matthew Beveridge.

81 |
82 | 83 | Built with Sphinx using a 84 | theme 85 | provided by Read the Docs. 86 | 87 | 88 |
89 |
90 |
91 |
92 |
93 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /docs/_pages/install.rst: -------------------------------------------------------------------------------- 1 | Install 2 | ======= 3 | 4 | :Version: |release| 5 | 6 | For now, you will need to install from GitHub: 7 | 8 | .. code-block:: bash 9 | 10 | git clone git@github.com:mattbev/finpandas.git 11 | cd finpandas 12 | pip install . 13 | 14 | In the future, this package will be released on PyPI. -------------------------------------------------------------------------------- /docs/_pages/license.rst: -------------------------------------------------------------------------------- 1 | License 2 | ======= 3 | 4 | MIT License 5 | 6 | Copyright (c) 2021 Matthew Beveridge 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a 9 | copy of this software and associated documentation files (the 10 | "Software"), to deal in the Software without restriction, including 11 | without limitation the rights to use, copy, modify, merge, publish, 12 | distribute, sublicense, and/or sell copies of the Software, and to 13 | permit persons to whom the Software is furnished to do so, subject to 14 | the following conditions: 15 | 16 | The above copyright notice and this permission notice shall be included 17 | in all copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | 27 | -------------------------------------------------------------------------------- /docs/_sources/finpandas.core.rst.txt: -------------------------------------------------------------------------------- 1 | finpandas.core package 2 | ====================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | finpandas.core.connections module 8 | --------------------------------- 9 | 10 | .. automodule:: finpandas.core.connections 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | :private-members: 15 | 16 | finpandas.core.datasources module 17 | --------------------------------- 18 | 19 | .. automodule:: finpandas.core.datasources 20 | :members: 21 | :undoc-members: 22 | :show-inheritance: 23 | :private-members: 24 | 25 | Module contents 26 | --------------- 27 | 28 | .. automodule:: finpandas.core 29 | :members: 30 | :undoc-members: 31 | :show-inheritance: 32 | :private-members: 33 | -------------------------------------------------------------------------------- /docs/_sources/finpandas.dataframes.rst.txt: -------------------------------------------------------------------------------- 1 | finpandas.dataframes package 2 | ============================ 3 | 4 | Submodules 5 | ---------- 6 | 7 | finpandas.dataframes.forms module 8 | --------------------------------- 9 | 10 | .. automodule:: finpandas.dataframes.forms 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | :private-members: 15 | 16 | finpandas.dataframes.prices module 17 | ---------------------------------- 18 | 19 | .. automodule:: finpandas.dataframes.prices 20 | :members: 21 | :undoc-members: 22 | :show-inheritance: 23 | :private-members: 24 | 25 | Module contents 26 | --------------- 27 | 28 | .. automodule:: finpandas.dataframes 29 | :members: 30 | :undoc-members: 31 | :show-inheritance: 32 | :private-members: 33 | -------------------------------------------------------------------------------- /docs/_sources/finpandas.resources.rst.txt: -------------------------------------------------------------------------------- 1 | finpandas.resources package 2 | =========================== 3 | 4 | Module contents 5 | --------------- 6 | 7 | .. automodule:: finpandas.resources 8 | :members: 9 | :undoc-members: 10 | :show-inheritance: 11 | :private-members: 12 | -------------------------------------------------------------------------------- /docs/_sources/finpandas.rst.txt: -------------------------------------------------------------------------------- 1 | finpandas package 2 | ================= 3 | 4 | Subpackages 5 | ----------- 6 | 7 | .. toctree:: 8 | :maxdepth: 4 9 | 10 | finpandas.core 11 | finpandas.dataframes 12 | finpandas.resources 13 | finpandas.utils 14 | 15 | Module contents 16 | --------------- 17 | 18 | .. automodule:: finpandas 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | :private-members: 23 | -------------------------------------------------------------------------------- /docs/_sources/finpandas.utils.rst.txt: -------------------------------------------------------------------------------- 1 | finpandas.utils package 2 | ======================= 3 | 4 | Submodules 5 | ---------- 6 | 7 | finpandas.utils.errors module 8 | ----------------------------- 9 | 10 | .. automodule:: finpandas.utils.errors 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | :private-members: 15 | 16 | finpandas.utils.functional module 17 | --------------------------------- 18 | 19 | .. automodule:: finpandas.utils.functional 20 | :members: 21 | :undoc-members: 22 | :show-inheritance: 23 | :private-members: 24 | 25 | finpandas.utils.jobs module 26 | --------------------------- 27 | 28 | .. automodule:: finpandas.utils.jobs 29 | :members: 30 | :undoc-members: 31 | :show-inheritance: 32 | :private-members: 33 | 34 | Module contents 35 | --------------- 36 | 37 | .. automodule:: finpandas.utils 38 | :members: 39 | :undoc-members: 40 | :show-inheritance: 41 | :private-members: 42 | -------------------------------------------------------------------------------- /docs/_sources/index.rst.txt: -------------------------------------------------------------------------------- 1 | .. finpandas documentation master file, created by 2 | sphinx-quickstart on Sat Jan 8 13:40:26 2022. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Welcome to finpandas's documentation! 7 | ===================================== 8 | 9 | .. toctree:: 10 | :maxdepth: 4 11 | :caption: Contents: 12 | 13 | finpandas 14 | 15 | 16 | Indices and tables 17 | ================== 18 | 19 | * :ref:`genindex` 20 | * :ref:`modindex` 21 | * :ref:`search` 22 | -------------------------------------------------------------------------------- /docs/_sources/modules.rst.txt: -------------------------------------------------------------------------------- 1 | finpandas 2 | ========= 3 | 4 | .. toctree:: 5 | :maxdepth: 4 6 | 7 | finpandas 8 | -------------------------------------------------------------------------------- /docs/_static/copybutton.js: -------------------------------------------------------------------------------- 1 | // Copyright 2014 PSF. Licensed under the PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 2 | // File originates from the cpython source found in Doc/tools/sphinxext/static/copybutton.js 3 | 4 | $(document).ready(function() { 5 | /* Add a [>>>] button on the top-right corner of code samples to hide 6 | * the >>> and ... prompts and the output and thus make the code 7 | * copyable. */ 8 | var div = $('.highlight-python .highlight,' + 9 | '.highlight-default .highlight,' + 10 | '.highlight-python3 .highlight') 11 | var pre = div.find('pre'); 12 | 13 | // get the styles from the current theme 14 | pre.parent().parent().css('position', 'relative'); 15 | var hide_text = 'Hide the prompts and output'; 16 | var show_text = 'Show the prompts and output'; 17 | var border_width = pre.css('border-top-width'); 18 | var border_style = pre.css('border-top-style'); 19 | var border_color = pre.css('border-top-color'); 20 | var button_styles = { 21 | 'cursor':'pointer', 'position': 'absolute', 'top': '0', 'right': '0', 22 | 'border-color': border_color, 'border-style': border_style, 23 | 'border-width': border_width, 'color': border_color, 'text-size': '75%', 24 | 'font-family': 'monospace', 'padding-left': '0.2em', 'padding-right': '0.2em', 25 | 'border-radius': '0 3px 0 0' 26 | } 27 | 28 | // create and add the button to all the code blocks that contain >>> 29 | div.each(function(index) { 30 | var jthis = $(this); 31 | if (jthis.find('.gp').length > 0) { 32 | var button = $('Click to Hide >>>'); 33 | button.css(button_styles) 34 | button.attr('title', hide_text); 35 | button.data('hidden', 'false'); 36 | jthis.prepend(button); 37 | } 38 | // tracebacks (.gt) contain bare text elements that need to be 39 | // wrapped in a span to work with .nextUntil() (see later) 40 | jthis.find('pre:has(.gt)').contents().filter(function() { 41 | return ((this.nodeType == 3) && (this.data.trim().length > 0)); 42 | }).wrap(''); 43 | }); 44 | 45 | // define the behavior of the button when it's clicked 46 | $('.copybutton').click(function(e){ 47 | e.preventDefault(); 48 | var button = $(this); 49 | if (button.data('hidden') === 'false') { 50 | // hide the code output 51 | button.parent().find('.go, .gp, .gt').hide(); 52 | button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'hidden'); 53 | button.css('text-decoration', 'line-through'); 54 | button.attr('title', show_text); 55 | button.data('hidden', 'true'); 56 | } else { 57 | // show the code output 58 | button.parent().find('.go, .gp, .gt').show(); 59 | button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'visible'); 60 | button.css('text-decoration', 'none'); 61 | button.attr('title', hide_text); 62 | button.data('hidden', 'false'); 63 | } 64 | }); 65 | }); -------------------------------------------------------------------------------- /docs/_static/css/badge_only.css: -------------------------------------------------------------------------------- 1 | .fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#FontAwesome) format("svg")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}} -------------------------------------------------------------------------------- /docs/_static/css/fonts/Roboto-Slab-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs/_static/css/fonts/Roboto-Slab-Bold.woff -------------------------------------------------------------------------------- /docs/_static/css/fonts/Roboto-Slab-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs/_static/css/fonts/Roboto-Slab-Bold.woff2 -------------------------------------------------------------------------------- /docs/_static/css/fonts/Roboto-Slab-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs/_static/css/fonts/Roboto-Slab-Regular.woff -------------------------------------------------------------------------------- /docs/_static/css/fonts/Roboto-Slab-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs/_static/css/fonts/Roboto-Slab-Regular.woff2 -------------------------------------------------------------------------------- /docs/_static/css/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs/_static/css/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /docs/_static/css/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs/_static/css/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /docs/_static/css/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs/_static/css/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /docs/_static/css/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs/_static/css/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /docs/_static/css/fonts/lato-bold-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs/_static/css/fonts/lato-bold-italic.woff -------------------------------------------------------------------------------- /docs/_static/css/fonts/lato-bold-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs/_static/css/fonts/lato-bold-italic.woff2 -------------------------------------------------------------------------------- /docs/_static/css/fonts/lato-bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs/_static/css/fonts/lato-bold.woff -------------------------------------------------------------------------------- /docs/_static/css/fonts/lato-bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs/_static/css/fonts/lato-bold.woff2 -------------------------------------------------------------------------------- /docs/_static/css/fonts/lato-normal-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs/_static/css/fonts/lato-normal-italic.woff -------------------------------------------------------------------------------- /docs/_static/css/fonts/lato-normal-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs/_static/css/fonts/lato-normal-italic.woff2 -------------------------------------------------------------------------------- /docs/_static/css/fonts/lato-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs/_static/css/fonts/lato-normal.woff -------------------------------------------------------------------------------- /docs/_static/css/fonts/lato-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs/_static/css/fonts/lato-normal.woff2 -------------------------------------------------------------------------------- /docs/_static/custom.css: -------------------------------------------------------------------------------- 1 | /* This file intentionally left blank. */ 2 | -------------------------------------------------------------------------------- /docs/_static/documentation_options.js: -------------------------------------------------------------------------------- 1 | var DOCUMENTATION_OPTIONS = { 2 | URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), 3 | VERSION: '', 4 | LANGUAGE: 'en', 5 | COLLAPSE_INDEX: false, 6 | BUILDER: 'html', 7 | FILE_SUFFIX: '.html', 8 | LINK_SUFFIX: '.html', 9 | HAS_SOURCE: true, 10 | SOURCELINK_SUFFIX: '.txt', 11 | NAVIGATION_WITH_KEYS: false 12 | }; -------------------------------------------------------------------------------- /docs/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs/_static/file.png -------------------------------------------------------------------------------- /docs/_static/js/badge_only.js: -------------------------------------------------------------------------------- 1 | !function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}({4:function(e,t,r){}}); -------------------------------------------------------------------------------- /docs/_static/js/html5shiv-printshiv.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @preserve HTML5 Shiv 3.7.3-pre | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed 3 | */ 4 | !function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=y.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=y.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),y.elements=c+" "+a,j(b)}function f(a){var b=x[a[v]];return b||(b={},w++,a[v]=w,x[w]=b),b}function g(a,c,d){if(c||(c=b),q)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():u.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||t.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),q)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return y.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(y,b.frag)}function j(a){a||(a=b);var d=f(a);return!y.shivCSS||p||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),q||i(a,d),a}function k(a){for(var b,c=a.getElementsByTagName("*"),e=c.length,f=RegExp("^(?:"+d().join("|")+")$","i"),g=[];e--;)b=c[e],f.test(b.nodeName)&&g.push(b.applyElement(l(b)));return g}function l(a){for(var b,c=a.attributes,d=c.length,e=a.ownerDocument.createElement(A+":"+a.nodeName);d--;)b=c[d],b.specified&&e.setAttribute(b.nodeName,b.nodeValue);return e.style.cssText=a.style.cssText,e}function m(a){for(var b,c=a.split("{"),e=c.length,f=RegExp("(^|[\\s,>+~])("+d().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),g="$1"+A+"\\:$2";e--;)b=c[e]=c[e].split("}"),b[b.length-1]=b[b.length-1].replace(f,g),c[e]=b.join("}");return c.join("{")}function n(a){for(var b=a.length;b--;)a[b].removeNode()}function o(a){function b(){clearTimeout(g._removeSheetTimer),d&&d.removeNode(!0),d=null}var d,e,g=f(a),h=a.namespaces,i=a.parentWindow;return!B||a.printShived?a:("undefined"==typeof h[A]&&h.add(A),i.attachEvent("onbeforeprint",function(){b();for(var f,g,h,i=a.styleSheets,j=[],l=i.length,n=Array(l);l--;)n[l]=i[l];for(;h=n.pop();)if(!h.disabled&&z.test(h.media)){try{f=h.imports,g=f.length}catch(o){g=0}for(l=0;g>l;l++)n.push(f[l]);try{j.push(h.cssText)}catch(o){}}j=m(j.reverse().join("")),e=k(a),d=c(a,j)}),i.attachEvent("onafterprint",function(){n(e),clearTimeout(g._removeSheetTimer),g._removeSheetTimer=setTimeout(b,500)}),a.printShived=!0,a)}var p,q,r="3.7.3",s=a.html5||{},t=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,u=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,v="_html5shiv",w=0,x={};!function(){try{var a=b.createElement("a");a.innerHTML="",p="hidden"in a,q=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){p=!0,q=!0}}();var y={elements:s.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:r,shivCSS:s.shivCSS!==!1,supportsUnknownElements:q,shivMethods:s.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=y,j(b);var z=/^$|\b(?:all|print)\b/,A="html5shiv",B=!q&&function(){var c=b.documentElement;return!("undefined"==typeof b.namespaces||"undefined"==typeof b.parentWindow||"undefined"==typeof c.applyElement||"undefined"==typeof c.removeNode||"undefined"==typeof a.attachEvent)}();y.type+=" print",y.shivPrint=o,o(b),"object"==typeof module&&module.exports&&(module.exports=y)}("undefined"!=typeof window?window:this,document); -------------------------------------------------------------------------------- /docs/_static/js/html5shiv.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed 3 | */ 4 | !function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.3-pre",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b),"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:this,document); -------------------------------------------------------------------------------- /docs/_static/js/theme.js: -------------------------------------------------------------------------------- 1 | !function(n){var e={};function t(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return n[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=n,t.c=e,t.d=function(n,e,i){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:i})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var i=Object.create(null);if(t.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var o in n)t.d(i,o,function(e){return n[e]}.bind(null,o));return i},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s=0)}([function(n,e,t){t(1),n.exports=t(3)},function(n,e,t){(function(){var e="undefined"!=typeof window?window.jQuery:t(2);n.exports.ThemeNav={navBar:null,win:null,winScroll:!1,winResize:!1,linkScroll:!1,winPosition:0,winHeight:null,docHeight:null,isRunning:!1,enable:function(n){var t=this;void 0===n&&(n=!0),t.isRunning||(t.isRunning=!0,e((function(e){t.init(e),t.reset(),t.win.on("hashchange",t.reset),n&&t.win.on("scroll",(function(){t.linkScroll||t.winScroll||(t.winScroll=!0,requestAnimationFrame((function(){t.onScroll()})))})),t.win.on("resize",(function(){t.winResize||(t.winResize=!0,requestAnimationFrame((function(){t.onResize()})))})),t.onResize()})))},enableSticky:function(){this.enable(!0)},init:function(n){n(document);var e=this;this.navBar=n("div.wy-side-scroll:first"),this.win=n(window),n(document).on("click","[data-toggle='wy-nav-top']",(function(){n("[data-toggle='wy-nav-shift']").toggleClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift")})).on("click",".wy-menu-vertical .current ul li a",(function(){var t=n(this);n("[data-toggle='wy-nav-shift']").removeClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift"),e.toggleCurrent(t),e.hashChange()})).on("click","[data-toggle='rst-current-version']",(function(){n("[data-toggle='rst-versions']").toggleClass("shift-up")})),n("table.docutils:not(.field-list,.footnote,.citation)").wrap("
"),n("table.docutils.footnote").wrap("
"),n("table.docutils.citation").wrap("
"),n(".wy-menu-vertical ul").not(".simple").siblings("a").each((function(){var t=n(this);expand=n(''),expand.on("click",(function(n){return e.toggleCurrent(t),n.stopPropagation(),!1})),t.prepend(expand)}))},reset:function(){var n=encodeURI(window.location.hash)||"#";try{var e=$(".wy-menu-vertical"),t=e.find('[href="'+n+'"]');if(0===t.length){var i=$('.document [id="'+n.substring(1)+'"]').closest("div.section");0===(t=e.find('[href="#'+i.attr("id")+'"]')).length&&(t=e.find('[href="#"]'))}if(t.length>0){$(".wy-menu-vertical .current").removeClass("current").attr("aria-expanded","false"),t.addClass("current").attr("aria-expanded","true"),t.closest("li.toctree-l1").parent().addClass("current").attr("aria-expanded","true");for(let n=1;n<=10;n++)t.closest("li.toctree-l"+n).addClass("current").attr("aria-expanded","true");t[0].scrollIntoView()}}catch(n){console.log("Error expanding nav for anchor",n)}},onScroll:function(){this.winScroll=!1;var n=this.win.scrollTop(),e=n+this.winHeight,t=this.navBar.scrollTop()+(n-this.winPosition);n<0||e>this.docHeight||(this.navBar.scrollTop(t),this.winPosition=n)},onResize:function(){this.winResize=!1,this.winHeight=this.win.height(),this.docHeight=$(document).height()},hashChange:function(){this.linkScroll=!0,this.win.one("hashchange",(function(){this.linkScroll=!1}))},toggleCurrent:function(n){var e=n.closest("li");e.siblings("li.current").removeClass("current").attr("aria-expanded","false"),e.siblings().find("li.current").removeClass("current").attr("aria-expanded","false");var t=e.find("> ul li");t.length&&(t.removeClass("current").attr("aria-expanded","false"),e.toggleClass("current").attr("aria-expanded",(function(n,e){return"true"==e?"false":"true"})))}},"undefined"!=typeof window&&(window.SphinxRtdTheme={Navigation:n.exports.ThemeNav,StickyNav:n.exports.ThemeNav}),function(){for(var n=0,e=["ms","moz","webkit","o"],t=0;t 2 | 3 | 4 | 5 | 6 | 7 | finpandas.resources package — finpandas documentation 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 59 | 60 |
64 | 65 |
66 |
67 |
68 | 76 |
77 |
78 |
79 |
80 | 81 |
82 |

finpandas.resources package

83 |
84 |

Module contents

85 |

resource files

86 |
87 |
88 | 89 | 90 |
91 |
92 |
96 | 97 |
98 | 99 |
100 |

© Copyright 2022, Matthew Beveridge.

101 |
102 | 103 | Built with Sphinx using a 104 | theme 105 | provided by Read the Docs. 106 | 107 | 108 |
109 |
110 |
111 |
112 |
113 | 118 | 119 | 120 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Welcome to finpandas’s documentation! — finpandas documentation 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 45 | 46 |
50 | 51 |
52 |
53 |
54 |
    55 |
  • »
  • 56 |
  • Welcome to finpandas’s documentation!
  • 57 |
  • 58 | View page source 59 |
  • 60 |
61 |
62 |
63 |
64 |
65 | 66 |
67 |

Welcome to finpandas’s documentation!

68 | 106 |
107 |
108 |

Indices and tables

109 | 114 |
115 | 116 | 117 |
118 |
119 |
122 | 123 |
124 | 125 |
126 |

© Copyright 2022, Matthew Beveridge.

127 |
128 | 129 | Built with Sphinx using a 130 | theme 131 | provided by Read the Docs. 132 | 133 | 134 |
135 |
136 |
137 |
138 |
139 | 144 | 145 | 146 | -------------------------------------------------------------------------------- /docs/index.rst: -------------------------------------------------------------------------------- 1 | finpandas Software Reference Manual 2 | =================================== 3 | 4 | Public financial analysis tools in Python. 5 | 6 | 7 | .. currentmodule:: 8 | finpandas 9 | 10 | 11 | .. toctree:: 12 | :glob: 13 | :maxdepth: 2 14 | :caption: Getting started: 15 | 16 | _pages/* 17 | 18 | 19 | .. toctree:: 20 | :glob: 21 | :maxdepth: 2 22 | :caption: Packages: 23 | 24 | _autogen/finpandas* 25 | 26 | 27 | Indices and tables 28 | ------------------ 29 | 30 | * :ref:`genindex` 31 | * :ref:`modindex` 32 | * :ref:`search` 33 | -------------------------------------------------------------------------------- /docs/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | pushd %~dp0 4 | 5 | REM Command file for Sphinx documentation 6 | 7 | if "%SPHINXBUILD%" == "" ( 8 | set SPHINXBUILD=sphinx-build 9 | ) 10 | set SOURCEDIR=. 11 | set BUILDDIR=_build 12 | 13 | if "%1" == "" goto help 14 | 15 | %SPHINXBUILD% >NUL 2>NUL 16 | if errorlevel 9009 ( 17 | echo. 18 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 19 | echo.installed, then set the SPHINXBUILD environment variable to point 20 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 21 | echo.may add the Sphinx directory to PATH. 22 | echo. 23 | echo.If you don't have Sphinx installed, grab it from 24 | echo.http://sphinx-doc.org/ 25 | exit /b 1 26 | ) 27 | 28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 29 | goto end 30 | 31 | :help 32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 33 | 34 | :end 35 | popd 36 | -------------------------------------------------------------------------------- /docs/modules.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | finpandas — finpandas documentation 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 44 | 45 |
49 | 50 |
51 |
52 |
53 | 60 |
61 |
62 | 109 |
110 | 111 |
112 | 113 |
114 |

© Copyright 2022, Matthew Beveridge.

115 |
116 | 117 | Built with Sphinx using a 118 | theme 119 | provided by Read the Docs. 120 | 121 | 122 |
123 |
124 |
125 |
126 |
127 | 132 | 133 | 134 | -------------------------------------------------------------------------------- /docs/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs/objects.inv -------------------------------------------------------------------------------- /docs/py-modindex.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Python Module Index — finpandas documentation 7 | 8 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 46 | 47 |
51 | 52 |
53 |
54 |
55 |
    56 |
  • »
  • 57 |
  • Python Module Index
  • 58 |
  • 59 |
  • 60 |
61 |
62 |
63 |
64 |
65 | 66 | 67 |

Python Module Index

68 | 69 |
70 | f 71 |
72 | 73 | 74 | 75 | 77 | 78 | 80 | 83 | 84 | 85 | 88 | 89 | 90 | 93 | 94 | 95 | 98 | 99 | 100 | 103 | 104 | 105 | 108 | 109 | 110 | 113 | 114 | 115 | 118 | 119 | 120 | 123 | 124 | 125 | 128 | 129 | 130 | 133 | 134 | 135 | 138 |
 
76 | f
81 | finpandas 82 |
    86 | finpandas.core 87 |
    91 | finpandas.core.connections 92 |
    96 | finpandas.core.datasources 97 |
    101 | finpandas.dataframes 102 |
    106 | finpandas.dataframes.forms 107 |
    111 | finpandas.dataframes.prices 112 |
    116 | finpandas.resources 117 |
    121 | finpandas.utils 122 |
    126 | finpandas.utils.errors 127 |
    131 | finpandas.utils.functional 132 |
    136 | finpandas.utils.jobs 137 |
139 | 140 | 141 |
142 |
143 |
144 | 145 |
146 | 147 |
148 |

© Copyright 2022, Matthew Beveridge.

149 |
150 | 151 | Built with Sphinx using a 152 | theme 153 | provided by Read the Docs. 154 | 155 | 156 |
157 |
158 |
159 |
160 |
161 | 166 | 167 | 168 | -------------------------------------------------------------------------------- /docs/search.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Search — finpandas documentation 7 | 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 46 | 47 |
51 | 52 |
53 |
54 |
55 |
    56 |
  • »
  • 57 |
  • Search
  • 58 |
  • 59 |
  • 60 |
61 |
62 |
63 |
64 |
65 | 66 | 73 | 74 | 75 |
76 | 77 |
78 | 79 |
80 |
81 |
82 | 83 |
84 | 85 |
86 |

© Copyright 2022, Matthew Beveridge.

87 |
88 | 89 | Built with Sphinx using a 90 | theme 91 | provided by Read the Docs. 92 | 93 | 94 |
95 |
96 |
97 |
98 |
99 | 104 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /docs/searchindex.js: -------------------------------------------------------------------------------- 1 | Search.setIndex({docnames:["finpandas","finpandas.core","finpandas.dataframes","finpandas.resources","finpandas.utils","index","modules"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":1,"sphinx.ext.todo":2,"sphinx.ext.viewcode":1,sphinx:56},filenames:["finpandas.rst","finpandas.core.rst","finpandas.dataframes.rst","finpandas.resources.rst","finpandas.utils.rst","index.rst","modules.rst"],objects:{"":{finpandas:[0,0,0,"-"]},"finpandas.core":{connections:[1,0,0,"-"],datasources:[1,0,0,"-"]},"finpandas.core.connections":{DatabaseConnection:[1,1,1,""]},"finpandas.core.connections.DatabaseConnection":{_commitdb:[1,2,1,""],_create_engine:[1,2,1,""],_host:[1,3,1,""],_port:[1,3,1,""],database:[1,3,1,""],dispose:[1,2,1,""],password:[1,3,1,""],query:[1,2,1,""],username:[1,3,1,""]},"finpandas.core.datasources":{Fundamentals:[1,1,1,""],Stocks:[1,1,1,""]},"finpandas.core.datasources.Fundamentals":{database:[1,3,1,""],ten_k:[1,2,1,""],ten_q:[1,2,1,""]},"finpandas.core.datasources.Stocks":{database:[1,3,1,""],price:[1,2,1,""],sector:[1,2,1,""]},"finpandas.dataframes":{forms:[2,0,0,"-"],prices:[2,0,0,"-"]},"finpandas.dataframes.forms":{Form10K:[2,1,1,""],Form10Q:[2,1,1,""],Form:[2,1,1,""]},"finpandas.dataframes.forms.Form":{_constructor:[2,2,1,""],_constructor_expanddim:[2,2,1,""],_constructor_sliced:[2,2,1,""],_format:[2,2,1,""],asset_sheet:[2,2,1,""],asset_turnover:[2,2,1,""],balance_sheet:[2,2,1,""],book_value:[2,2,1,""],cash_flow:[2,2,1,""],cash_turnover:[2,2,1,""],current_asset_turnover:[2,2,1,""],current_ratio:[2,2,1,""],debt_capitalization:[2,2,1,""],debt_sheet:[2,2,1,""],debt_to_assets:[2,2,1,""],debt_to_equity:[2,2,1,""],ebit:[2,2,1,""],ebitda:[2,2,1,""],effective_tax_rate:[2,2,1,""],gross_margin:[2,2,1,""],inventory_turnover:[2,2,1,""],liability_sheet:[2,2,1,""],net_income:[2,2,1,""],net_working_capital:[2,2,1,""],net_working_capital_per_share:[2,2,1,""],quick_ratio:[2,2,1,""],receivables_turnover:[2,2,1,""],return_on_assets:[2,2,1,""],return_on_equity:[2,2,1,""],revenue:[2,2,1,""],search:[2,2,1,""]},"finpandas.dataframes.forms.Form10K":{_format:[2,2,1,""]},"finpandas.dataframes.forms.Form10Q":{_format:[2,2,1,""]},"finpandas.dataframes.prices":{HistoricalPrices:[2,1,1,""],HistoricalStockPrices:[2,1,1,""]},"finpandas.dataframes.prices.HistoricalPrices":{_constructor:[2,2,1,""],_constructor_expanddim:[2,2,1,""],_constructor_sliced:[2,2,1,""],_format:[2,2,1,""]},"finpandas.dataframes.prices.HistoricalStockPrices":{_format:[2,2,1,""]},"finpandas.utils":{errors:[4,0,0,"-"],functional:[4,0,0,"-"],jobs:[4,0,0,"-"]},"finpandas.utils.errors":{NestedDepthError:[4,4,1,""],TickerNotFoundError:[4,4,1,""]},"finpandas.utils.functional":{SafeList:[4,1,1,""],count_object_methods:[4,5,1,""],get_profile_by_cik:[4,5,1,""],get_profile_by_ticker:[4,5,1,""],get_profile_by_title:[4,5,1,""],nested_depth:[4,5,1,""],ticker_or_cik_parser:[4,5,1,""]},"finpandas.utils.functional.SafeList":{get:[4,2,1,""]},"finpandas.utils.jobs":{Jobs:[4,1,1,""],parmap:[4,5,1,""],spawn:[4,5,1,""]},"finpandas.utils.jobs.Jobs":{add_job:[4,2,1,""],execute:[4,2,1,""]},finpandas:{core:[1,0,0,"-"],dataframes:[2,0,0,"-"],resources:[3,0,0,"-"],utils:[4,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","method","Python method"],"3":["py","attribute","Python attribute"],"4":["py","exception","Python exception"],"5":["py","function","Python function"]},objtypes:{"0":"py:module","1":"py:class","2":"py:method","3":"py:attribute","4":"py:exception","5":"py:function"},terms:{"10k":[1,2],"10q":[1,2],"2018":1,"2019":1,"2020":1,"3306":1,"999":2,"abstract":2,"class":[1,2,4],"default":[1,2,4],"function":[0,5,6],"int":[1,2,4],"public":[1,2],"return":[1,2,4],"static":2,"true":2,One:2,The:2,Used:[0,1,2],Will:2,_commitdb:1,_constructor:2,_constructor_expanddim:2,_constructor_sl:2,_create_engin:1,_format:2,_host:1,_port:1,aapl:1,account:2,add:[2,4],add_job:4,affect:2,after:2,align:2,all:[1,2,4],allow:[2,4],along:2,amazonaw:1,amort:2,analysi:1,analyz:0,ani:4,api:1,appl:1,arg:[1,2,4],argument:[2,4],arrai:2,as_list:2,asset:2,asset_sheet:2,asset_turnov:2,associ:2,automat:2,averag:2,axi:2,balanc:2,balance_sheet:2,base:[1,2,4],been:2,belong:2,between:2,blacktip:1,book:2,book_valu:2,bool:2,both:2,build:2,calcul:[2,4],call:4,callabl:4,came:2,capit:2,carri:2,cash:2,cash_flow:2,cash_turnov:2,central:[1,4],chang:2,cik:[1,4],close:1,column:2,com:1,command:1,commit:1,compani:[1,4],connect:[0,5,6],construct:2,contain:2,content:[5,6],conveni:4,copi:2,core:[0,2,5,6],correct:[1,4],correct_depth:4,correctli:2,could:4,count_object_method:4,cpeql2xeyjqq:1,current:2,current_asset_turnov:2,current_ratio:2,custom:4,dai:1,data:[0,1,2],databas:[1,4],databaseconnect:1,datafram:[0,1,5,6],datasourc:[0,5,6],datatyp:4,debt:2,debt_capit:2,debt_sheet:2,debt_to_asset:2,debt_to_equ:2,depreci:2,depth:4,descript:4,design:2,dict:2,dictionari:2,dimens:2,dimension:2,directli:1,dispos:1,distinct:2,dtype:2,due:2,each:4,east:1,ebit:2,ebitda:2,effect:2,effective_tax_r:2,either:4,end:1,engin:1,entiti:1,equiti:[1,2],equival:2,error:[0,5,6],establish:1,etc:2,even:2,exampl:[1,2],except:4,exclud:2,execut:[1,4],express:2,extensiondtyp:2,fail:4,fals:2,file:[1,3],filter:2,first:2,float64:2,flow:2,follow:4,form10k:[1,2],form10q:[1,2],form:[0,1,4,5,6],format:[1,2],found:4,frame:[1,2],from:[1,2],fund:1,fundament:[0,1,2],gener:2,get:[1,2,4],get_profile_by_cik:4,get_profile_by_tick:4,get_profile_by_titl:4,give:2,given:[1,2],glob:4,gross:2,gross_margin:2,group:2,guid:2,has:2,hashabl:2,have:2,helper:4,henc:2,histor:[1,2],historicalpric:2,historicalstockpric:2,host:2,iloc:2,inc:1,includ:2,incom:2,incorrect:4,index:[1,2,4,5],indic:1,infer:2,inform:1,input:[1,2,4],input_depth:4,instanc:1,int64:2,integ:2,interest:1,intern:4,interpret:2,invalid:4,inventori:2,inventory_turnov:2,involv:2,issu:[1,4],iter:[1,2,4],job:[0,5,6],just:4,kei:[1,2,4],keyword:2,label:2,length:2,liabil:2,liability_sheet:2,like:2,list:[2,4],maintain:2,make:2,manipul:2,map:4,margin:2,match:2,messag:4,method:[2,4],miss:2,modifi:2,modul:[5,6],month:1,more:2,multiprocess:4,must:2,mysql:1,name:[1,2,4],nan:2,ndarrai:2,need:2,nest:4,nested_depth:4,nesteddeptherror:[1,4],net:2,net_incom:2,net_working_capit:2,net_working_capital_per_shar:2,non:2,none:[1,2,4],note:2,number:4,numpi:2,obj:4,object:[1,2,4],one:1,onli:2,oper:[2,4],option:[1,2,4],order:[2,4],origin:2,otherwis:2,our:4,output:[2,4],over:[1,4],overridden:2,packag:[5,6],page:5,pair:1,panda:[1,2],parallel:4,parmap:4,parralel:4,password:1,perform:2,period:1,period_end:1,period_start:1,pipe:4,price:[0,1,5,6],print:4,profil:4,properti:2,provid:2,quarter:1,queri:1,quick:2,quick_ratio:2,rais:[1,4],rangeindex:2,rate:2,ratio:2,raw:2,rds:1,receiv:2,receivables_turnov:2,regex:2,regular:2,reindex:2,report:1,repres:2,represent:1,requir:4,resourc:[0,5,6],result:[1,2],return_on_asset:2,return_on_equ:2,revenu:2,roa:2,roe:2,safe:4,safelist:4,same:2,scalar:2,search:[2,5],sec:[0,1,2,4],sector:1,see:2,select:1,ser:2,seri:2,sheet:2,singl:1,sort:2,sourc:[1,2,4],spawn:4,specifi:2,sqlalchemi:1,start:1,state:1,statement:2,statist:2,stock:[1,2],stockhold:2,store:2,str:[1,2,4],string:1,subclass:[2,4],submodul:[0,5,6],subpackag:[5,6],subset:2,summari:4,support:2,sure:2,tabl:1,table_nam:1,tag:2,take:4,tax:2,ten_k:1,ten_q:1,thei:2,thi:2,though:2,ticker:[1,4],ticker_or_cik:[1,4],ticker_or_cik_pars:4,tickernotfounderror:4,time:2,titl:4,todo:2,total:2,tower:2,tupl:[1,4],turnov:2,two:2,type:2,unchang:2,union:[1,2,4],uniqu:2,unit:1,uom:2,usabl:2,usag:2,use:4,used:2,user:2,usernam:1,using:4,util:[0,1,5,6],valu:[2,4],view:2,well:2,what:4,when:[2,4],which:2,whole:2,work:2,xbrl:1,year:1,your:1},titles:["finpandas package","finpandas.core package","finpandas.dataframes package","finpandas.resources package","finpandas.utils package","Welcome to finpandas\u2019s documentation!","finpandas"],titleterms:{"function":4,connect:1,content:[0,1,2,3,4],core:1,datafram:2,datasourc:1,document:5,error:4,finpanda:[0,1,2,3,4,5,6],form:2,indic:5,job:4,modul:[0,1,2,3,4],packag:[0,1,2,3,4],price:2,resourc:3,submodul:[1,2,4],subpackag:0,tabl:5,util:4,welcom:5}}) -------------------------------------------------------------------------------- /docs_source/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line, and also 5 | # from the environment for the first two. 6 | SPHINXOPTS ?= 7 | SPHINXBUILD ?= sphinx-build 8 | SOURCEDIR = . 9 | BUILDDIR = _build 10 | 11 | # Put it first so that "make" without argument is like "make help". 12 | github: 13 | @make html 14 | @cp -a _build/html/. ../docs 15 | 16 | help: 17 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 18 | 19 | .PHONY: help Makefile 20 | 21 | # Catch-all target: route all unknown targets to Sphinx using the new 22 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 23 | %: Makefile 24 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 25 | -------------------------------------------------------------------------------- /docs_source/_build/doctrees/environment.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs_source/_build/doctrees/environment.pickle -------------------------------------------------------------------------------- /docs_source/_build/doctrees/finpandas.core.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs_source/_build/doctrees/finpandas.core.doctree -------------------------------------------------------------------------------- /docs_source/_build/doctrees/finpandas.dataframes.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs_source/_build/doctrees/finpandas.dataframes.doctree -------------------------------------------------------------------------------- /docs_source/_build/doctrees/finpandas.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs_source/_build/doctrees/finpandas.doctree -------------------------------------------------------------------------------- /docs_source/_build/doctrees/finpandas.resources.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs_source/_build/doctrees/finpandas.resources.doctree -------------------------------------------------------------------------------- /docs_source/_build/doctrees/finpandas.utils.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs_source/_build/doctrees/finpandas.utils.doctree -------------------------------------------------------------------------------- /docs_source/_build/doctrees/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs_source/_build/doctrees/index.doctree -------------------------------------------------------------------------------- /docs_source/_build/doctrees/modules.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs_source/_build/doctrees/modules.doctree -------------------------------------------------------------------------------- /docs_source/_build/html/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: eae911654236853762a8648994609e35 4 | tags: 645f666f9bcd5a90fca523b33c5a78b7 5 | -------------------------------------------------------------------------------- /docs_source/_build/html/_modules/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Overview: module code — finpandas documentation 7 | 8 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 43 | 44 |
48 | 49 |
50 |
51 |
52 |
    53 |
  • »
  • 54 |
  • Overview: module code
  • 55 |
  • 56 |
  • 57 |
58 |
59 |
60 |
61 | 74 |
75 |
76 | 77 |
78 | 79 |
80 |

© Copyright 2022, Matthew Beveridge.

81 |
82 | 83 | Built with Sphinx using a 84 | theme 85 | provided by Read the Docs. 86 | 87 | 88 |
89 |
90 |
91 |
92 |
93 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /docs_source/_build/html/_sources/finpandas.core.rst.txt: -------------------------------------------------------------------------------- 1 | finpandas.core package 2 | ====================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | finpandas.core.connections module 8 | --------------------------------- 9 | 10 | .. automodule:: finpandas.core.connections 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | :private-members: 15 | 16 | finpandas.core.datasources module 17 | --------------------------------- 18 | 19 | .. automodule:: finpandas.core.datasources 20 | :members: 21 | :undoc-members: 22 | :show-inheritance: 23 | :private-members: 24 | 25 | Module contents 26 | --------------- 27 | 28 | .. automodule:: finpandas.core 29 | :members: 30 | :undoc-members: 31 | :show-inheritance: 32 | :private-members: 33 | -------------------------------------------------------------------------------- /docs_source/_build/html/_sources/finpandas.dataframes.rst.txt: -------------------------------------------------------------------------------- 1 | finpandas.dataframes package 2 | ============================ 3 | 4 | Submodules 5 | ---------- 6 | 7 | finpandas.dataframes.forms module 8 | --------------------------------- 9 | 10 | .. automodule:: finpandas.dataframes.forms 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | :private-members: 15 | 16 | finpandas.dataframes.prices module 17 | ---------------------------------- 18 | 19 | .. automodule:: finpandas.dataframes.prices 20 | :members: 21 | :undoc-members: 22 | :show-inheritance: 23 | :private-members: 24 | 25 | Module contents 26 | --------------- 27 | 28 | .. automodule:: finpandas.dataframes 29 | :members: 30 | :undoc-members: 31 | :show-inheritance: 32 | :private-members: 33 | -------------------------------------------------------------------------------- /docs_source/_build/html/_sources/finpandas.resources.rst.txt: -------------------------------------------------------------------------------- 1 | finpandas.resources package 2 | =========================== 3 | 4 | Module contents 5 | --------------- 6 | 7 | .. automodule:: finpandas.resources 8 | :members: 9 | :undoc-members: 10 | :show-inheritance: 11 | :private-members: 12 | -------------------------------------------------------------------------------- /docs_source/_build/html/_sources/finpandas.rst.txt: -------------------------------------------------------------------------------- 1 | finpandas package 2 | ================= 3 | 4 | Subpackages 5 | ----------- 6 | 7 | .. toctree:: 8 | :maxdepth: 4 9 | 10 | finpandas.core 11 | finpandas.dataframes 12 | finpandas.resources 13 | finpandas.utils 14 | 15 | Module contents 16 | --------------- 17 | 18 | .. automodule:: finpandas 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | :private-members: 23 | -------------------------------------------------------------------------------- /docs_source/_build/html/_sources/finpandas.utils.rst.txt: -------------------------------------------------------------------------------- 1 | finpandas.utils package 2 | ======================= 3 | 4 | Submodules 5 | ---------- 6 | 7 | finpandas.utils.errors module 8 | ----------------------------- 9 | 10 | .. automodule:: finpandas.utils.errors 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | :private-members: 15 | 16 | finpandas.utils.functional module 17 | --------------------------------- 18 | 19 | .. automodule:: finpandas.utils.functional 20 | :members: 21 | :undoc-members: 22 | :show-inheritance: 23 | :private-members: 24 | 25 | finpandas.utils.jobs module 26 | --------------------------- 27 | 28 | .. automodule:: finpandas.utils.jobs 29 | :members: 30 | :undoc-members: 31 | :show-inheritance: 32 | :private-members: 33 | 34 | Module contents 35 | --------------- 36 | 37 | .. automodule:: finpandas.utils 38 | :members: 39 | :undoc-members: 40 | :show-inheritance: 41 | :private-members: 42 | -------------------------------------------------------------------------------- /docs_source/_build/html/_sources/index.rst.txt: -------------------------------------------------------------------------------- 1 | .. finpandas documentation master file, created by 2 | sphinx-quickstart on Sat Jan 8 13:40:26 2022. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Welcome to finpandas's documentation! 7 | ===================================== 8 | 9 | .. toctree:: 10 | :maxdepth: 4 11 | :caption: Contents: 12 | 13 | finpandas 14 | 15 | 16 | Indices and tables 17 | ================== 18 | 19 | * :ref:`genindex` 20 | * :ref:`modindex` 21 | * :ref:`search` 22 | -------------------------------------------------------------------------------- /docs_source/_build/html/_sources/modules.rst.txt: -------------------------------------------------------------------------------- 1 | finpandas 2 | ========= 3 | 4 | .. toctree:: 5 | :maxdepth: 4 6 | 7 | finpandas 8 | -------------------------------------------------------------------------------- /docs_source/_build/html/_static/css/badge_only.css: -------------------------------------------------------------------------------- 1 | .fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#FontAwesome) format("svg")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}} -------------------------------------------------------------------------------- /docs_source/_build/html/_static/css/fonts/Roboto-Slab-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs_source/_build/html/_static/css/fonts/Roboto-Slab-Bold.woff -------------------------------------------------------------------------------- /docs_source/_build/html/_static/css/fonts/Roboto-Slab-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs_source/_build/html/_static/css/fonts/Roboto-Slab-Bold.woff2 -------------------------------------------------------------------------------- /docs_source/_build/html/_static/css/fonts/Roboto-Slab-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs_source/_build/html/_static/css/fonts/Roboto-Slab-Regular.woff -------------------------------------------------------------------------------- /docs_source/_build/html/_static/css/fonts/Roboto-Slab-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs_source/_build/html/_static/css/fonts/Roboto-Slab-Regular.woff2 -------------------------------------------------------------------------------- /docs_source/_build/html/_static/css/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs_source/_build/html/_static/css/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /docs_source/_build/html/_static/css/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs_source/_build/html/_static/css/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /docs_source/_build/html/_static/css/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs_source/_build/html/_static/css/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /docs_source/_build/html/_static/css/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs_source/_build/html/_static/css/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /docs_source/_build/html/_static/css/fonts/lato-bold-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs_source/_build/html/_static/css/fonts/lato-bold-italic.woff -------------------------------------------------------------------------------- /docs_source/_build/html/_static/css/fonts/lato-bold-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs_source/_build/html/_static/css/fonts/lato-bold-italic.woff2 -------------------------------------------------------------------------------- /docs_source/_build/html/_static/css/fonts/lato-bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs_source/_build/html/_static/css/fonts/lato-bold.woff -------------------------------------------------------------------------------- /docs_source/_build/html/_static/css/fonts/lato-bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs_source/_build/html/_static/css/fonts/lato-bold.woff2 -------------------------------------------------------------------------------- /docs_source/_build/html/_static/css/fonts/lato-normal-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs_source/_build/html/_static/css/fonts/lato-normal-italic.woff -------------------------------------------------------------------------------- /docs_source/_build/html/_static/css/fonts/lato-normal-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs_source/_build/html/_static/css/fonts/lato-normal-italic.woff2 -------------------------------------------------------------------------------- /docs_source/_build/html/_static/css/fonts/lato-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs_source/_build/html/_static/css/fonts/lato-normal.woff -------------------------------------------------------------------------------- /docs_source/_build/html/_static/css/fonts/lato-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs_source/_build/html/_static/css/fonts/lato-normal.woff2 -------------------------------------------------------------------------------- /docs_source/_build/html/_static/custom.css: -------------------------------------------------------------------------------- 1 | /* This file intentionally left blank. */ 2 | -------------------------------------------------------------------------------- /docs_source/_build/html/_static/documentation_options.js: -------------------------------------------------------------------------------- 1 | var DOCUMENTATION_OPTIONS = { 2 | URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), 3 | VERSION: '', 4 | LANGUAGE: 'en', 5 | COLLAPSE_INDEX: false, 6 | BUILDER: 'html', 7 | FILE_SUFFIX: '.html', 8 | LINK_SUFFIX: '.html', 9 | HAS_SOURCE: true, 10 | SOURCELINK_SUFFIX: '.txt', 11 | NAVIGATION_WITH_KEYS: false 12 | }; -------------------------------------------------------------------------------- /docs_source/_build/html/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs_source/_build/html/_static/file.png -------------------------------------------------------------------------------- /docs_source/_build/html/_static/js/badge_only.js: -------------------------------------------------------------------------------- 1 | !function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}({4:function(e,t,r){}}); -------------------------------------------------------------------------------- /docs_source/_build/html/_static/js/html5shiv-printshiv.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @preserve HTML5 Shiv 3.7.3-pre | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed 3 | */ 4 | !function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=y.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=y.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),y.elements=c+" "+a,j(b)}function f(a){var b=x[a[v]];return b||(b={},w++,a[v]=w,x[w]=b),b}function g(a,c,d){if(c||(c=b),q)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():u.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||t.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),q)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return y.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(y,b.frag)}function j(a){a||(a=b);var d=f(a);return!y.shivCSS||p||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),q||i(a,d),a}function k(a){for(var b,c=a.getElementsByTagName("*"),e=c.length,f=RegExp("^(?:"+d().join("|")+")$","i"),g=[];e--;)b=c[e],f.test(b.nodeName)&&g.push(b.applyElement(l(b)));return g}function l(a){for(var b,c=a.attributes,d=c.length,e=a.ownerDocument.createElement(A+":"+a.nodeName);d--;)b=c[d],b.specified&&e.setAttribute(b.nodeName,b.nodeValue);return e.style.cssText=a.style.cssText,e}function m(a){for(var b,c=a.split("{"),e=c.length,f=RegExp("(^|[\\s,>+~])("+d().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),g="$1"+A+"\\:$2";e--;)b=c[e]=c[e].split("}"),b[b.length-1]=b[b.length-1].replace(f,g),c[e]=b.join("}");return c.join("{")}function n(a){for(var b=a.length;b--;)a[b].removeNode()}function o(a){function b(){clearTimeout(g._removeSheetTimer),d&&d.removeNode(!0),d=null}var d,e,g=f(a),h=a.namespaces,i=a.parentWindow;return!B||a.printShived?a:("undefined"==typeof h[A]&&h.add(A),i.attachEvent("onbeforeprint",function(){b();for(var f,g,h,i=a.styleSheets,j=[],l=i.length,n=Array(l);l--;)n[l]=i[l];for(;h=n.pop();)if(!h.disabled&&z.test(h.media)){try{f=h.imports,g=f.length}catch(o){g=0}for(l=0;g>l;l++)n.push(f[l]);try{j.push(h.cssText)}catch(o){}}j=m(j.reverse().join("")),e=k(a),d=c(a,j)}),i.attachEvent("onafterprint",function(){n(e),clearTimeout(g._removeSheetTimer),g._removeSheetTimer=setTimeout(b,500)}),a.printShived=!0,a)}var p,q,r="3.7.3",s=a.html5||{},t=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,u=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,v="_html5shiv",w=0,x={};!function(){try{var a=b.createElement("a");a.innerHTML="",p="hidden"in a,q=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){p=!0,q=!0}}();var y={elements:s.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:r,shivCSS:s.shivCSS!==!1,supportsUnknownElements:q,shivMethods:s.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=y,j(b);var z=/^$|\b(?:all|print)\b/,A="html5shiv",B=!q&&function(){var c=b.documentElement;return!("undefined"==typeof b.namespaces||"undefined"==typeof b.parentWindow||"undefined"==typeof c.applyElement||"undefined"==typeof c.removeNode||"undefined"==typeof a.attachEvent)}();y.type+=" print",y.shivPrint=o,o(b),"object"==typeof module&&module.exports&&(module.exports=y)}("undefined"!=typeof window?window:this,document); -------------------------------------------------------------------------------- /docs_source/_build/html/_static/js/html5shiv.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed 3 | */ 4 | !function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.3-pre",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b),"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:this,document); -------------------------------------------------------------------------------- /docs_source/_build/html/_static/js/theme.js: -------------------------------------------------------------------------------- 1 | !function(n){var e={};function t(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return n[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=n,t.c=e,t.d=function(n,e,i){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:i})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var i=Object.create(null);if(t.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var o in n)t.d(i,o,function(e){return n[e]}.bind(null,o));return i},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s=0)}([function(n,e,t){t(1),n.exports=t(3)},function(n,e,t){(function(){var e="undefined"!=typeof window?window.jQuery:t(2);n.exports.ThemeNav={navBar:null,win:null,winScroll:!1,winResize:!1,linkScroll:!1,winPosition:0,winHeight:null,docHeight:null,isRunning:!1,enable:function(n){var t=this;void 0===n&&(n=!0),t.isRunning||(t.isRunning=!0,e((function(e){t.init(e),t.reset(),t.win.on("hashchange",t.reset),n&&t.win.on("scroll",(function(){t.linkScroll||t.winScroll||(t.winScroll=!0,requestAnimationFrame((function(){t.onScroll()})))})),t.win.on("resize",(function(){t.winResize||(t.winResize=!0,requestAnimationFrame((function(){t.onResize()})))})),t.onResize()})))},enableSticky:function(){this.enable(!0)},init:function(n){n(document);var e=this;this.navBar=n("div.wy-side-scroll:first"),this.win=n(window),n(document).on("click","[data-toggle='wy-nav-top']",(function(){n("[data-toggle='wy-nav-shift']").toggleClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift")})).on("click",".wy-menu-vertical .current ul li a",(function(){var t=n(this);n("[data-toggle='wy-nav-shift']").removeClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift"),e.toggleCurrent(t),e.hashChange()})).on("click","[data-toggle='rst-current-version']",(function(){n("[data-toggle='rst-versions']").toggleClass("shift-up")})),n("table.docutils:not(.field-list,.footnote,.citation)").wrap("
"),n("table.docutils.footnote").wrap("
"),n("table.docutils.citation").wrap("
"),n(".wy-menu-vertical ul").not(".simple").siblings("a").each((function(){var t=n(this);expand=n(''),expand.on("click",(function(n){return e.toggleCurrent(t),n.stopPropagation(),!1})),t.prepend(expand)}))},reset:function(){var n=encodeURI(window.location.hash)||"#";try{var e=$(".wy-menu-vertical"),t=e.find('[href="'+n+'"]');if(0===t.length){var i=$('.document [id="'+n.substring(1)+'"]').closest("div.section");0===(t=e.find('[href="#'+i.attr("id")+'"]')).length&&(t=e.find('[href="#"]'))}if(t.length>0){$(".wy-menu-vertical .current").removeClass("current").attr("aria-expanded","false"),t.addClass("current").attr("aria-expanded","true"),t.closest("li.toctree-l1").parent().addClass("current").attr("aria-expanded","true");for(let n=1;n<=10;n++)t.closest("li.toctree-l"+n).addClass("current").attr("aria-expanded","true");t[0].scrollIntoView()}}catch(n){console.log("Error expanding nav for anchor",n)}},onScroll:function(){this.winScroll=!1;var n=this.win.scrollTop(),e=n+this.winHeight,t=this.navBar.scrollTop()+(n-this.winPosition);n<0||e>this.docHeight||(this.navBar.scrollTop(t),this.winPosition=n)},onResize:function(){this.winResize=!1,this.winHeight=this.win.height(),this.docHeight=$(document).height()},hashChange:function(){this.linkScroll=!0,this.win.one("hashchange",(function(){this.linkScroll=!1}))},toggleCurrent:function(n){var e=n.closest("li");e.siblings("li.current").removeClass("current").attr("aria-expanded","false"),e.siblings().find("li.current").removeClass("current").attr("aria-expanded","false");var t=e.find("> ul li");t.length&&(t.removeClass("current").attr("aria-expanded","false"),e.toggleClass("current").attr("aria-expanded",(function(n,e){return"true"==e?"false":"true"})))}},"undefined"!=typeof window&&(window.SphinxRtdTheme={Navigation:n.exports.ThemeNav,StickyNav:n.exports.ThemeNav}),function(){for(var n=0,e=["ms","moz","webkit","o"],t=0;t 2 | 3 | 4 | 5 | 6 | 7 | finpandas.resources package — finpandas documentation 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 59 | 60 |
64 | 65 |
66 |
67 |
68 | 76 |
77 |
78 |
79 |
80 | 81 |
82 |

finpandas.resources package

83 |
84 |

Module contents

85 |

resource files

86 |
87 |
88 | 89 | 90 |
91 |
92 |
96 | 97 |
98 | 99 |
100 |

© Copyright 2022, Matthew Beveridge.

101 |
102 | 103 | Built with Sphinx using a 104 | theme 105 | provided by Read the Docs. 106 | 107 | 108 |
109 |
110 |
111 |
112 |
113 | 118 | 119 | 120 | -------------------------------------------------------------------------------- /docs_source/_build/html/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Welcome to finpandas’s documentation! — finpandas documentation 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 45 | 46 |
50 | 51 |
52 |
53 |
54 |
    55 |
  • »
  • 56 |
  • Welcome to finpandas’s documentation!
  • 57 |
  • 58 | View page source 59 |
  • 60 |
61 |
62 |
63 |
64 |
65 | 66 |
67 |

Welcome to finpandas’s documentation!

68 | 106 |
107 |
108 |

Indices and tables

109 | 114 |
115 | 116 | 117 |
118 |
119 |
122 | 123 |
124 | 125 |
126 |

© Copyright 2022, Matthew Beveridge.

127 |
128 | 129 | Built with Sphinx using a 130 | theme 131 | provided by Read the Docs. 132 | 133 | 134 |
135 |
136 |
137 |
138 |
139 | 144 | 145 | 146 | -------------------------------------------------------------------------------- /docs_source/_build/html/modules.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | finpandas — finpandas documentation 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 44 | 45 |
49 | 50 |
51 |
52 |
53 | 60 |
61 |
62 | 109 |
110 | 111 |
112 | 113 |
114 |

© Copyright 2022, Matthew Beveridge.

115 |
116 | 117 | Built with Sphinx using a 118 | theme 119 | provided by Read the Docs. 120 | 121 | 122 |
123 |
124 |
125 |
126 |
127 | 132 | 133 | 134 | -------------------------------------------------------------------------------- /docs_source/_build/html/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattbev/finpandas/9ff08b7eace01ce8353a83f1daab6dcc18d0d5d2/docs_source/_build/html/objects.inv -------------------------------------------------------------------------------- /docs_source/_build/html/py-modindex.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Python Module Index — finpandas documentation 7 | 8 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 46 | 47 |
51 | 52 |
53 |
54 |
55 |
    56 |
  • »
  • 57 |
  • Python Module Index
  • 58 |
  • 59 |
  • 60 |
61 |
62 |
63 |
64 |
65 | 66 | 67 |

Python Module Index

68 | 69 |
70 | f 71 |
72 | 73 | 74 | 75 | 77 | 78 | 80 | 83 | 84 | 85 | 88 | 89 | 90 | 93 | 94 | 95 | 98 | 99 | 100 | 103 | 104 | 105 | 108 | 109 | 110 | 113 | 114 | 115 | 118 | 119 | 120 | 123 | 124 | 125 | 128 | 129 | 130 | 133 | 134 | 135 | 138 |
 
76 | f
81 | finpandas 82 |
    86 | finpandas.core 87 |
    91 | finpandas.core.connections 92 |
    96 | finpandas.core.datasources 97 |
    101 | finpandas.dataframes 102 |
    106 | finpandas.dataframes.forms 107 |
    111 | finpandas.dataframes.prices 112 |
    116 | finpandas.resources 117 |
    121 | finpandas.utils 122 |
    126 | finpandas.utils.errors 127 |
    131 | finpandas.utils.functional 132 |
    136 | finpandas.utils.jobs 137 |
139 | 140 | 141 |
142 |
143 |
144 | 145 |
146 | 147 |
148 |

© Copyright 2022, Matthew Beveridge.

149 |
150 | 151 | Built with Sphinx using a 152 | theme 153 | provided by Read the Docs. 154 | 155 | 156 |
157 |
158 |
159 |
160 |
161 | 166 | 167 | 168 | -------------------------------------------------------------------------------- /docs_source/_build/html/search.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Search — finpandas documentation 7 | 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 46 | 47 |
51 | 52 |
53 |
54 |
55 |
    56 |
  • »
  • 57 |
  • Search
  • 58 |
  • 59 |
  • 60 |
61 |
62 |
63 |
64 |
65 | 66 | 73 | 74 | 75 |
76 | 77 |
78 | 79 |
80 |
81 |
82 | 83 |
84 | 85 |
86 |

© Copyright 2022, Matthew Beveridge.

87 |
88 | 89 | Built with Sphinx using a 90 | theme 91 | provided by Read the Docs. 92 | 93 | 94 |
95 |
96 |
97 |
98 |
99 | 104 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /docs_source/conf.py: -------------------------------------------------------------------------------- 1 | # Configuration file for the Sphinx documentation builder. 2 | # 3 | # This file only contains a selection of the most common options. For a full 4 | # list see the documentation: 5 | # https://www.sphinx-doc.org/en/master/usage/configuration.html 6 | 7 | # -- Path setup -------------------------------------------------------------- 8 | 9 | # If extensions (or modules to document with autodoc) are in another directory, 10 | # add these directories to sys.path here. If the directory is relative to the 11 | # documentation root, use os.path.abspath to make it absolute, like shown here. 12 | # 13 | # import os 14 | # import sys 15 | # sys.path.insert(0, '/home/matt/Documents/research/finpandas/finpandas') 16 | 17 | 18 | # -- Project information ----------------------------------------------------- 19 | 20 | project = 'finpandas' 21 | copyright = '2022, Matthew Beveridge' 22 | author = 'Matthew Beveridge' 23 | 24 | 25 | # -- General configuration --------------------------------------------------- 26 | 27 | # Add any Sphinx extension module names here, as strings. They can be 28 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 29 | # ones. 30 | extensions = [ 31 | 'sphinx.ext.autodoc', 32 | 'sphinx.ext.viewcode', 33 | 'sphinx.ext.todo', 34 | ] 35 | 36 | # Add any paths that contain templates here, relative to this directory. 37 | templates_path = ['_templates'] 38 | 39 | # The language for content autogenerated by Sphinx. Refer to documentation 40 | # for a list of supported languages. 41 | # 42 | # This is also used if you do content translation via gettext catalogs. 43 | # Usually you set "language" from the command line for these cases. 44 | language = 'en' 45 | 46 | # List of patterns, relative to source directory, that match files and 47 | # directories to ignore when looking for source files. 48 | # This pattern also affects html_static_path and html_extra_path. 49 | exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] 50 | 51 | 52 | # -- Options for HTML output ------------------------------------------------- 53 | 54 | # The theme to use for HTML and HTML Help pages. See the documentation for 55 | # a list of builtin themes. 56 | # 57 | html_theme = 'sphinx_rtd_theme' 58 | 59 | # Add any paths that contain custom static files (such as style sheets) here, 60 | # relative to this directory. They are copied after the builtin static files, 61 | # so a file named "default.css" will overwrite the builtin "default.css". 62 | html_static_path = ['_static'] 63 | 64 | 65 | # -- Extension configuration ------------------------------------------------- 66 | 67 | # -- Options for todo extension ---------------------------------------------- 68 | 69 | # If true, `todo` and `todoList` produce output, else they produce nothing. 70 | todo_include_todos = True -------------------------------------------------------------------------------- /docs_source/finpandas.core.rst: -------------------------------------------------------------------------------- 1 | finpandas.core package 2 | ====================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | finpandas.core.connections module 8 | --------------------------------- 9 | 10 | .. automodule:: finpandas.core.connections 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | :private-members: 15 | 16 | finpandas.core.datasources module 17 | --------------------------------- 18 | 19 | .. automodule:: finpandas.core.datasources 20 | :members: 21 | :undoc-members: 22 | :show-inheritance: 23 | :private-members: 24 | 25 | Module contents 26 | --------------- 27 | 28 | .. automodule:: finpandas.core 29 | :members: 30 | :undoc-members: 31 | :show-inheritance: 32 | :private-members: 33 | -------------------------------------------------------------------------------- /docs_source/finpandas.dataframes.rst: -------------------------------------------------------------------------------- 1 | finpandas.dataframes package 2 | ============================ 3 | 4 | Submodules 5 | ---------- 6 | 7 | finpandas.dataframes.forms module 8 | --------------------------------- 9 | 10 | .. automodule:: finpandas.dataframes.forms 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | :private-members: 15 | 16 | finpandas.dataframes.prices module 17 | ---------------------------------- 18 | 19 | .. automodule:: finpandas.dataframes.prices 20 | :members: 21 | :undoc-members: 22 | :show-inheritance: 23 | :private-members: 24 | 25 | Module contents 26 | --------------- 27 | 28 | .. automodule:: finpandas.dataframes 29 | :members: 30 | :undoc-members: 31 | :show-inheritance: 32 | :private-members: 33 | -------------------------------------------------------------------------------- /docs_source/finpandas.resources.rst: -------------------------------------------------------------------------------- 1 | finpandas.resources package 2 | =========================== 3 | 4 | Module contents 5 | --------------- 6 | 7 | .. automodule:: finpandas.resources 8 | :members: 9 | :undoc-members: 10 | :show-inheritance: 11 | :private-members: 12 | -------------------------------------------------------------------------------- /docs_source/finpandas.rst: -------------------------------------------------------------------------------- 1 | finpandas package 2 | ================= 3 | 4 | Subpackages 5 | ----------- 6 | 7 | .. toctree:: 8 | :maxdepth: 4 9 | 10 | finpandas.core 11 | finpandas.dataframes 12 | finpandas.resources 13 | finpandas.utils 14 | 15 | Module contents 16 | --------------- 17 | 18 | .. automodule:: finpandas 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | :private-members: 23 | -------------------------------------------------------------------------------- /docs_source/finpandas.utils.rst: -------------------------------------------------------------------------------- 1 | finpandas.utils package 2 | ======================= 3 | 4 | Submodules 5 | ---------- 6 | 7 | finpandas.utils.errors module 8 | ----------------------------- 9 | 10 | .. automodule:: finpandas.utils.errors 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | :private-members: 15 | 16 | finpandas.utils.functional module 17 | --------------------------------- 18 | 19 | .. automodule:: finpandas.utils.functional 20 | :members: 21 | :undoc-members: 22 | :show-inheritance: 23 | :private-members: 24 | 25 | finpandas.utils.jobs module 26 | --------------------------- 27 | 28 | .. automodule:: finpandas.utils.jobs 29 | :members: 30 | :undoc-members: 31 | :show-inheritance: 32 | :private-members: 33 | 34 | Module contents 35 | --------------- 36 | 37 | .. automodule:: finpandas.utils 38 | :members: 39 | :undoc-members: 40 | :show-inheritance: 41 | :private-members: 42 | -------------------------------------------------------------------------------- /docs_source/index.rst: -------------------------------------------------------------------------------- 1 | .. finpandas documentation master file, created by 2 | sphinx-quickstart on Sat Jan 8 13:40:26 2022. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Welcome to finpandas's documentation! 7 | ===================================== 8 | 9 | .. toctree:: 10 | :maxdepth: 4 11 | :caption: Contents: 12 | 13 | finpandas 14 | 15 | 16 | Indices and tables 17 | ================== 18 | 19 | * :ref:`genindex` 20 | * :ref:`modindex` 21 | * :ref:`search` 22 | -------------------------------------------------------------------------------- /docs_source/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | pushd %~dp0 4 | 5 | REM Command file for Sphinx documentation 6 | 7 | if "%SPHINXBUILD%" == "" ( 8 | set SPHINXBUILD=sphinx-build 9 | ) 10 | set SOURCEDIR=. 11 | set BUILDDIR=_build 12 | 13 | if "%1" == "" goto help 14 | 15 | %SPHINXBUILD% >NUL 2>NUL 16 | if errorlevel 9009 ( 17 | echo. 18 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 19 | echo.installed, then set the SPHINXBUILD environment variable to point 20 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 21 | echo.may add the Sphinx directory to PATH. 22 | echo. 23 | echo.If you don't have Sphinx installed, grab it from 24 | echo.https://www.sphinx-doc.org/ 25 | exit /b 1 26 | ) 27 | 28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 29 | goto end 30 | 31 | :help 32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 33 | 34 | :end 35 | popd 36 | -------------------------------------------------------------------------------- /docs_source/modules.rst: -------------------------------------------------------------------------------- 1 | finpandas 2 | ========= 3 | 4 | .. toctree:: 5 | :maxdepth: 4 6 | 7 | finpandas 8 | -------------------------------------------------------------------------------- /finpandas/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | finpandas package. 3 | 4 | Used to analyze SEC fundamental data. 5 | """ 6 | 7 | from .core import Fundamentals, Stocks 8 | 9 | fundamentals = Fundamentals() 10 | stocks = Stocks() 11 | 12 | def dispose(): 13 | fundamentals.dispose() 14 | stocks.dispose() 15 | 16 | __all__ = [ 17 | "fundamentals", 18 | "stocks", 19 | ] 20 | -------------------------------------------------------------------------------- /finpandas/core/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | finpandas core utilities 3 | """ 4 | 5 | from .datasources import Fundamentals, Stocks 6 | -------------------------------------------------------------------------------- /finpandas/core/connections.py: -------------------------------------------------------------------------------- 1 | """ 2 | finpandas base module. 3 | """ 4 | 5 | from dataclasses import dataclass 6 | 7 | import pandas as pd 8 | import sqlalchemy 9 | 10 | 11 | @dataclass 12 | class DatabaseConnection: 13 | """ 14 | Establish a connection with the database. 15 | 16 | Args: 17 | username (str): your username 18 | password (str): your password 19 | """ 20 | 21 | database: str 22 | username: str = 'finpandas' 23 | password: str = None 24 | _host: str = "database-blacktip.cpeql2xeyjqq.us-east-2.rds.amazonaws.com" 25 | _port: int = 3306 26 | 27 | 28 | def __post_init__(self): 29 | self.engine = self._create_engine() 30 | 31 | 32 | def query(self, command:str):# -> sqlalchemy.engine.Result: 33 | """ 34 | query information directly from the database 35 | 36 | Args: 37 | command (str): the string mySQL command to execute 38 | 39 | Returns: 40 | sqlalchemy.engine.Result: the results of the query 41 | """ 42 | with self.engine.connect() as connection: 43 | return connection.execute(command) 44 | 45 | 46 | def dispose(self): 47 | """ 48 | closes the database connection 49 | """ 50 | self.engine.dispose() 51 | 52 | 53 | 54 | ########## Private Functions ########## 55 | 56 | 57 | def _commitdb(self, table_name:str, dataframe:pd.DataFrame): 58 | """ 59 | commit to the database 60 | 61 | Args: 62 | table_name (str): the name of the table to commit to 63 | dataframe (pd.DataFrame): the data to commit to the table 64 | """ 65 | dataframe.to_sql(table_name, self.engine, index=False, if_exists="append") 66 | 67 | 68 | def _create_engine(self) -> sqlalchemy.engine.Engine: 69 | """ 70 | establish connection to MySQL database 71 | 72 | Returns: 73 | sqlalchemy.engine.Engine: SQLAlchemy engine instance 74 | """ 75 | if self.password is not None: 76 | url = f'mysql+pymysql://{self.username}:{self.password}@{self._host}:{self._port}/{self.database}' 77 | else: 78 | url = f'mysql+pymysql://{self.username}@{self._host}:{self._port}/{self.database}' 79 | engine = sqlalchemy.create_engine(url) 80 | return engine 81 | -------------------------------------------------------------------------------- /finpandas/core/datasources.py: -------------------------------------------------------------------------------- 1 | """ 2 | Used for analysis of public companies filing with the 3 | United States SEC. 4 | """ 5 | 6 | from dataclasses import dataclass 7 | from typing import Iterable, Tuple, Union 8 | 9 | import pandas as pd 10 | 11 | from ..dataframes import Form10K, Form10Q, HistoricalStockPrices 12 | from ..utils import NestedDepthError, nested_depth, ticker_or_cik_parser 13 | from .connections import DatabaseConnection 14 | 15 | 16 | @dataclass 17 | class Fundamentals(DatabaseConnection): 18 | """ 19 | Fundamentals API 20 | 21 | Args: 22 | database (str, optional): database to connect to. Defaults to 'xbrl'. 23 | """ 24 | 25 | database: str = "xbrl" 26 | 27 | 28 | def ten_k(self, ticker_or_cik:Union[str,int], years:Union[int,Iterable[int]]) -> Form10K: 29 | """ 30 | get company 10-Ks for selected years 31 | 32 | Args: 33 | ticker_or_cik (Union[str,int]): company's ticker or SEC issued Central Index Key (CIK) 34 | years (Union[int,Iterable[int]]): a year or iterable of years of interest 35 | 36 | Returns: 37 | Form10K: a representation of the company's 10Ks 38 | """ 39 | cik = ticker_or_cik_parser(ticker_or_cik) 40 | 41 | if isinstance(years, int): 42 | year_where_clause = f"fy={years}" 43 | elif len(years) == 1: 44 | year_where_clause = f"fy={years[0]}" 45 | else: 46 | year_where_clause = f"fy IN {tuple(years)}" 47 | 48 | command = ("SELECT a.fy, a.fye, b.tag, b.value, b.uom, b.ddate " 49 | "FROM num b JOIN sub a ON a.adsh=b.adsh " 50 | f"WHERE cik={cik} AND form='10-K' AND {year_where_clause}") 51 | 52 | return Form10K(pd.read_sql_query(command, self.engine)) 53 | 54 | 55 | def ten_q( 56 | self, 57 | ticker_or_cik:Union[str,int], 58 | periods:Union[int,Iterable[int],Tuple[Union[str,int],Union[str,int]], 59 | Iterable[Tuple[Union[str,int],Union[str,int]]]] 60 | ) -> Form10Q: 61 | """ 62 | get company 10-Qs for selected periods 63 | 64 | Args: 65 | ticker_or_cik (Union[str,int]): company's ticker or SEC issued Central Index Key (CIK) 66 | periods (Union[int,Iterable[int],Tuple[Union[str,int],Union[str,int]],\ 67 | Iterable[Tuple[Union[str,int],Union[str,int]]]]): the year of interest, will get all 68 | quarters; years of interest, will get all quarters; (year, quarter) pair; 69 | (year, quarter) pairs of interest 70 | 71 | Raises: 72 | NestedDepthError: inputted periods is not one of the correct formats 73 | 74 | Returns: 75 | Form10Q: a representation of the company's 10Qs 76 | 77 | Example: 78 | Querying 10-Q reports for Apple Inc.:: 79 | 80 | df = instance.ten_q("AAPL", 2019) 81 | df = instance.ten_q("AAPL", [2018, 2019]) 82 | df = instance.ten_q("AAPL", (2019, "q1")) 83 | df = instance.ten_q("AAPL", [(2019, "q1"), (2019, "q2")] 84 | """ 85 | cik = ticker_or_cik_parser(ticker_or_cik) 86 | 87 | depth = nested_depth(periods) 88 | if depth == 0: 89 | periods = [(periods, quarter) for quarter in ["q1", "q2", "q3", "q4"]] 90 | elif depth == 1: 91 | if isinstance(periods, tuple): 92 | periods = [periods] 93 | else: 94 | periods = [(year,quarter) for year in periods for quarter in ["q1","q2","q3","q4"]] 95 | elif depth > 2: 96 | raise NestedDepthError(input_depth=depth, correct_depth=[0, 1, 2]) 97 | 98 | 99 | period_where_clause = "(" + \ 100 | "".join( 101 | f"(a.fy={year} AND a.fp='{quarter}') OR " for year,quarter in periods)[:-4] + \ 102 | ")" 103 | 104 | command = ("SELECT a.fy, a.fp, b.tag, b.value, b.uom, b.ddate " 105 | "FROM num b JOIN sub a ON a.adsh=b.adsh " 106 | f"WHERE cik={cik} AND form='10-Q' AND {period_where_clause}") 107 | 108 | return Form10Q(pd.read_sql_query(command, self.engine)) 109 | 110 | 111 | 112 | @dataclass 113 | class Stocks(DatabaseConnection): 114 | """ 115 | Stocks API 116 | 117 | Args: 118 | database (str, optional): database to connect to. Defaults to 'stocks'. 119 | """ 120 | 121 | database: str = "stocks" 122 | 123 | 124 | def price( 125 | self, 126 | ticker_or_cik:Union[str,int], 127 | period_start:str, 128 | period_end:str=None 129 | ) -> pd.DataFrame: 130 | """ 131 | queries the price of a given equity over a period 132 | 133 | Args: 134 | ticker_or_cik (Union[str,int]): company or fund's ticker or SEC 135 | issued Central Index Key (CIK) 136 | period_start (str): the starting day for the period, 137 | in year-month-day format (e.g. 2020-06-30). 138 | period_end (str, optional): the ending day for the period, 139 | in year-month-day format (e.g. 2020-06-30). Defaults to None, 140 | indicating a single day period_start. 141 | 142 | Returns: 143 | pd.DataFrame: a representation of the company's historical stock price 144 | """ 145 | cik = ticker_or_cik_parser(ticker_or_cik) 146 | if period_end is None: 147 | period_end = period_start 148 | 149 | command = (f"SELECT * from historical_eod WHERE cik={cik} " 150 | f"AND date BETWEEN '{period_start}' AND '{period_end}'") 151 | 152 | return HistoricalStockPrices(pd.read_sql_query(command, self.engine)) 153 | 154 | 155 | def sector(self, ticker_or_cik:Union[str,int]) -> str: 156 | """ 157 | queries the sector of a given entity 158 | 159 | Args: 160 | ticker_or_cik (Union[str,int]): company or fund's ticker or SEC 161 | issued Central Index Key (CIK) 162 | 163 | Returns: 164 | str: the sector 165 | """ 166 | cik = ticker_or_cik_parser(ticker_or_cik) 167 | 168 | command = (f"SELECT sector from sector WHERE cik={cik}") 169 | 170 | return pd.read_sql_query(command, self.engine).squeeze() 171 | -------------------------------------------------------------------------------- /finpandas/dataframes/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | modified dataframe classes 3 | """ 4 | 5 | from .forms import Form10K, Form10Q 6 | from .prices import HistoricalStockPrices 7 | -------------------------------------------------------------------------------- /finpandas/dataframes/prices.py: -------------------------------------------------------------------------------- 1 | """ 2 | Abstract data types for historical pricing. 3 | """ 4 | 5 | import pandas as pd 6 | 7 | 8 | # pylint: disable=too-many-ancestors 9 | class HistoricalPrices(pd.DataFrame): 10 | """ 11 | Abstract Data Type for historical prices. 12 | Subclass of pandas DataFrame. 13 | """ 14 | def __init__(self, dataframe:pd.DataFrame): 15 | """ 16 | Args: 17 | dataframe (pd.DataFrame): the historical data content 18 | """ 19 | super().__init__(self._format(dataframe)) 20 | 21 | 22 | @property 23 | def _constructor(self): 24 | return HistoricalPrices 25 | 26 | 27 | @property 28 | def _constructor_sliced(self): 29 | return pd.Series 30 | 31 | 32 | @property 33 | def _constructor_expanddim(self): 34 | return HistoricalPrices 35 | 36 | 37 | @staticmethod 38 | def _format(dataframe:pd.DataFrame) -> pd.DataFrame: 39 | return dataframe 40 | 41 | 42 | 43 | class HistoricalStockPrices(HistoricalPrices): 44 | """ 45 | Abstract Data Type for historical stock prices 46 | """ 47 | @staticmethod 48 | def _format(dataframe:pd.DataFrame) -> pd.DataFrame: 49 | """ 50 | group source content into a usable format 51 | 52 | Args: 53 | dataframe (pd.DataFrame): the raw content 54 | 55 | Returns: 56 | pd.DataFrame: the formatted content 57 | """ 58 | dataframe = dataframe.drop(["cik", "name"], axis=1) 59 | dataframe["date"] = dataframe["date"].map(lambda x: x.strftime('%Y-%m-%d')) 60 | return dataframe.set_index("ticker", drop=True) 61 | -------------------------------------------------------------------------------- /finpandas/resources/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | resource files 3 | """ 4 | -------------------------------------------------------------------------------- /finpandas/utils/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | utilities 3 | """ 4 | 5 | from .errors import NestedDepthError, TickerNotFoundError 6 | from .functional import * 7 | from .jobs import Jobs 8 | -------------------------------------------------------------------------------- /finpandas/utils/errors.py: -------------------------------------------------------------------------------- 1 | """ 2 | Custom errors. 3 | """ 4 | 5 | class TickerNotFoundError(Exception): 6 | """ 7 | Exception raised when the inputted ticker is not found 8 | 9 | Args: 10 | ticker (str): the ticker 11 | message (str, optional): printed output. Defaults to 12 | "the inputted ticker '{ticker}' could not be found". 13 | """ 14 | def __init__(self, ticker:str, message="inputted ticker '{ticker}' could not be found"): 15 | self.ticker = ticker 16 | self.message = message.format(ticker=self.ticker) 17 | super().__init__(self.message) 18 | 19 | 20 | class NestedDepthError(Exception): 21 | """ 22 | Exception raised when the inputted nested iterable is the incorrect depth 23 | 24 | Args: 25 | input_depth (int): the depth of the inputted iterable 26 | correct_depth (int): the correct depth of the inputted iterable 27 | message (str, optional): printed output. Defaults to 28 | "the nested depth of the iterable ({input_depth}) is invalid 29 | for required depth ({correct_depth})". 30 | """ 31 | def __init__(self, input_depth:int, correct_depth:int, 32 | message="iterable depth of ({input_depth}) invalid for required depth ({correct_depth})"): 33 | self.input_depth = input_depth 34 | self.correct_depth = correct_depth 35 | self.message = message.format( 36 | input_depth=self.input_depth, 37 | correct_depth=self.correct_depth 38 | ) 39 | super().__init__(self.message) 40 | -------------------------------------------------------------------------------- /finpandas/utils/functional.py: -------------------------------------------------------------------------------- 1 | """ 2 | helper functions 3 | """ 4 | 5 | import json 6 | from pathlib import Path 7 | from typing import Iterable, Tuple, Union 8 | 9 | import dpath.util 10 | 11 | from .errors import TickerNotFoundError 12 | 13 | 14 | class SafeList(list): 15 | """ 16 | subclass of list datatype that allows safe indexing 17 | """ 18 | def get(self, index:int, default:object=None) -> object: 19 | """ 20 | safe indexing method 21 | 22 | Args: 23 | index (int): [description] 24 | default (object, optional): what to return if indexing fails. Defaults to None. 25 | 26 | Returns: 27 | object: either the value at that index or a default value 28 | """ 29 | try: 30 | return self.__getitem__(index) 31 | except IndexError: 32 | return default 33 | 34 | 35 | def get_profile_by_cik(cik:Union[str,int]) -> Union[None,Tuple[int,str,str]]: 36 | """ 37 | gets the company profile using the CIK number 38 | 39 | Args: 40 | cik (Union[str,int]): the SEC issued Central Index Key (CIK) 41 | 42 | Returns: 43 | Union[None,Tuple[int,str,str]]: (cik, ticker, title) 44 | """ 45 | path = Path(__file__).resolve().parent.parent.joinpath('resources', 'cik.json') 46 | cik_json = json.load(open(path)) 47 | result = cik_json.get(str(cik), None) 48 | if result is None: 49 | return result 50 | return tuple(result.values()) 51 | 52 | 53 | def get_profile_by_ticker(ticker:str) -> Union[None,Tuple[int,str,str]]: 54 | """ 55 | gets the company profile using the ticker 56 | 57 | Args: 58 | ticker (str): the ticker of the company 59 | 60 | Returns: 61 | Union[None,Tuple[int,str,str]]: (cik, ticker, title) 62 | """ 63 | path = Path(__file__).resolve().parent.parent.joinpath('resources', 'ticker.json') 64 | ticker_json = json.load(open(path)) 65 | result = ticker_json.get(ticker.upper(), None) 66 | if result is None: 67 | return result 68 | return tuple(result.values()) 69 | 70 | 71 | def get_profile_by_title(title:str) -> Union[None,Tuple[int,str,str], 72 | Iterable[Tuple[int,str,str]]]: 73 | """ 74 | gets the company profile using the title 75 | 76 | Args: 77 | title (str): the company's name in glob form 78 | 79 | Returns: 80 | Union[None,Tuple[int,str,str],Iterable[Tuple[int,str,str]]]: (cik, ticker, title) 81 | """ 82 | path = Path(__file__).resolve().parent.parent.joinpath('resources', 'title.json') 83 | title_json = json.load(open(path)) 84 | result = dpath.util.values(title_json, title) 85 | if len(result) == 0: 86 | return None 87 | if len(result) == 1: 88 | return tuple(result[0].values()) 89 | return tuple(tuple(i.values()) for i in result) 90 | 91 | 92 | def ticker_or_cik_parser(ticker_or_cik:Union[str,int]) -> int: 93 | """ 94 | takes in a ticker or CIK number and returns just the CIK number. 95 | a convenience function for internal use. 96 | 97 | Args: 98 | ticker_or_cik (Union[str,int]): ticker or SEC issued Central Index Key (CIK) 99 | 100 | Raises: 101 | TickerNotFoundError: if the ticker is not found in our database 102 | 103 | Returns: 104 | int: the CIK number 105 | """ 106 | if isinstance(ticker_or_cik, int): 107 | cik = ticker_or_cik 108 | elif len(str(ticker_or_cik)) != 10 and \ 109 | str([s for s in ticker_or_cik if s.isdigit()]) != str(ticker_or_cik): 110 | # check if input is a ticker or a CIK. CIKs are 10 digit numbers, 111 | # tickers are <= 5 character alphanumeric strings 112 | # if this if statement is true, then the input is a ticker 113 | ticker = ticker_or_cik 114 | profile_results = get_profile_by_ticker(ticker) 115 | if profile_results is None: 116 | raise TickerNotFoundError(ticker) 117 | cik, _, _ = profile_results 118 | else: 119 | cik = ticker_or_cik 120 | 121 | return int(cik) 122 | 123 | 124 | def nested_depth(iterable:Iterable) -> int: 125 | """ 126 | calculate the nested depth of an iterable 127 | 128 | Args: 129 | iterable (Iterable): the iterable to calculate the depth of 130 | 131 | Returns: 132 | int: the depth 133 | """ 134 | depth_func = lambda L: isinstance(L, (list, tuple)) and max(map(depth_func, L)) + 1 135 | depth = depth_func(iterable) 136 | return depth if depth is not False else 0 137 | 138 | 139 | def count_object_methods(obj:object): 140 | """ 141 | get the number of callable object methods 142 | 143 | Args: 144 | obj (object): any object 145 | 146 | Returns: 147 | int: the number of object class methods 148 | """ 149 | return len([k for k,v in obj.__dict__.items() if callable(v)]) -------------------------------------------------------------------------------- /finpandas/utils/jobs.py: -------------------------------------------------------------------------------- 1 | """ 2 | Utility for multiprocessing finpandas jobs 3 | """ 4 | 5 | from typing import Callable, Any, Iterable 6 | 7 | from multiprocessing import Process, Pipe 8 | 9 | 10 | def spawn(f:Callable) -> Callable: 11 | """ 12 | [summary] 13 | 14 | Args: 15 | f (Callable): function to spawn a pipe for 16 | 17 | Returns: 18 | Callable: a function that executes the spawning of the pipe 19 | """ 20 | def fun(pipe:Pipe, x:Iterable[Any]) -> None: 21 | pipe.send(f(x)) 22 | pipe.close() 23 | return fun 24 | 25 | 26 | def parmap(f:Callable, X:Iterable[Any]) -> Iterable[Any]: 27 | """ 28 | parralelized mapping function 29 | 30 | Args: 31 | f (Callable): function to parallelize operation over 32 | X (Iterable): the arguments to the function, over N 33 | function calls. 34 | 35 | Returns: 36 | Iterable: the N function outputs 37 | """ 38 | pipe = [Pipe() for _ in X] 39 | proc = [Process(target=spawn(f), args=(c, x)) for x, (_, c) in zip(X, pipe)] 40 | [p.start() for p in proc] 41 | [p.join() for p in proc] 42 | return [p.recv() for (p, _) in pipe] 43 | 44 | 45 | class Jobs: 46 | def __init__(self) -> None: 47 | self.jobs = [] 48 | 49 | 50 | def add_job(self, f:Callable, *args) -> None: 51 | """ 52 | add a job to be executed 53 | 54 | Args: 55 | f (Callable): the function to execute with the job, 56 | followed in-order by any arguments. 57 | """ 58 | self.jobs.append((f, args)) 59 | 60 | 61 | def execute(self) -> Iterable[Any]: 62 | """ 63 | execute all jobs 64 | 65 | Returns: 66 | Iterable: the output of each job 67 | """ 68 | def run(job): 69 | f, args = job 70 | return f(*args) 71 | 72 | return parmap(run, self.jobs) 73 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | pandas 2 | pymysql 3 | sqlalchemy==1.4.* 4 | dpath 5 | regex 6 | 7 | requests 8 | tqdm 9 | yfinance 10 | concurrencytest 11 | testtools 12 | python-subunit -------------------------------------------------------------------------------- /samples/basics.py: -------------------------------------------------------------------------------- 1 | from finpandas import dispose, fundamentals, stocks 2 | 3 | company = 'AAPL' 4 | 5 | form = fundamentals.ten_k(company, years=[2018, 2019]) 6 | stocks = stocks.price(company, period_start='2018-01-01', period_end='2019-12-31') 7 | 8 | print(form) 9 | print(stocks) 10 | 11 | dispose() -------------------------------------------------------------------------------- /samples/multithreading.py: -------------------------------------------------------------------------------- 1 | import time 2 | 3 | from finpandas import fundamentals, dispose 4 | from finpandas.utils import Jobs 5 | 6 | 7 | def main(): 8 | 9 | # forms that we want 10 | companies = ['aapl', 'msft', 'fb'] 11 | years = [2017, 2018, 2019] 12 | 13 | # multithreading 14 | start = time.time() 15 | jobs = Jobs() 16 | for company in companies: 17 | jobs.add_job(fundamentals.ten_k, company, years) 18 | par_results = jobs.execute() 19 | print('parallel:', time.time() - start) 20 | 21 | # sequential 22 | # start = time.time() 23 | # seq_results = [] 24 | # for company in companies: 25 | # seq_results.append(fundamentals.ten_k(company, years)) 26 | # print('sequential:', time.time() - start) 27 | 28 | # manipulate them 29 | for r in par_results: 30 | print(r.return_on_assets()) 31 | 32 | 33 | if __name__ == '__main__': 34 | main() 35 | dispose() -------------------------------------------------------------------------------- /samples/tyler_demo.py: -------------------------------------------------------------------------------- 1 | import difflib 2 | 3 | from finpandas import fundamentals 4 | 5 | form = fundamentals.ten_k("msft", [2019, 2018]) 6 | # print(form.search("Revenue")) 7 | 8 | # print(form[2019]) 9 | def smart_search(query:str, form): 10 | matches = form.search(query) 11 | if len(matches) > 1: 12 | db = matches[2019] 13 | tags = [] 14 | for i, row in db.iteritems(): 15 | tags.append(i[0]) 16 | match = difflib.get_close_matches(query, tags, 1, 0.2)[0] 17 | match = "^" + match + "$" 18 | elif len(matches) == 0: 19 | db = form[2019] 20 | tags = [] 21 | for i, row in db.iteritems(): 22 | tags.append(i[0]) 23 | match = difflib.get_close_matches(query, tags, 1, 0.2)[0] 24 | match = "^" + match + "$" 25 | else: 26 | match = query 27 | 28 | return form.search(match) 29 | 30 | print(smart_search("SellingGeneralAndAdministrativeExpense", form)) 31 | -------------------------------------------------------------------------------- /scripts/render_docs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sphinx-apidoc -f -P -o docs_source/ $1 4 | # sphinx-apidoc -F -f -P -o docs_source/ $1 # for initial docs 5 | cd docs_source 6 | make github -------------------------------------------------------------------------------- /scripts/update.py: -------------------------------------------------------------------------------- 1 | """ 2 | update data files from the SEC 3 | """ 4 | 5 | import datetime 6 | import io 7 | import json 8 | import time 9 | import zipfile 10 | from pathlib import Path 11 | 12 | import requests 13 | 14 | #pylint: disable=invalid-name 15 | 16 | def update_company_profiles(): 17 | """ 18 | update company ticker, cik, title mappings from the SEC 19 | """ 20 | # url = "https://www.sec.gov/include/ticker.txt" # for the text version without company title 21 | url = "https://www.sec.gov/files/company_tickers.json" 22 | 23 | start = time.time() 24 | 25 | r = requests.get(url) 26 | json_file = r.json() 27 | 28 | corrections = { 29 | "BFA" : { 30 | "cik_str": 14693, 31 | "ticker": "BF-A", 32 | "title": "BROWN FORMAN CORP" 33 | }, 34 | } 35 | insertions = { 36 | "BF-B": { 37 | "cik_str": 14693, 38 | "ticker": "BF-B", 39 | "title": "BROWN FORMAN CORP" 40 | }, 41 | } 42 | json_file.update(insertions) 43 | 44 | ticker_json = {} 45 | cik_json = {} 46 | title_json = {} 47 | for idx in json_file: 48 | row = json_file[idx] 49 | ticker_key = row["ticker"] 50 | if ticker_key in corrections: 51 | row = corrections[ticker_key] 52 | ticker_key = row["ticker"] 53 | cik_key = row["cik_str"] 54 | title_key = row["title"] 55 | ticker_json[ticker_key] = row 56 | cik_json[cik_key] = row 57 | title_json[title_key] = row 58 | 59 | with open('blacktip/utils/ticker.json', 'w', encoding='utf-8') as f: 60 | json.dump(ticker_json, f, ensure_ascii=False, indent=4) 61 | 62 | with open('blacktip/utils/cik.json', 'w', encoding='utf-8') as f: 63 | json.dump(cik_json, f, ensure_ascii=False, indent=4) 64 | 65 | with open('blacktip/utils/title.json', 'w', encoding='utf-8') as f: 66 | json.dump(title_json, f, ensure_ascii=False, indent=4) 67 | 68 | end = time.time() 69 | print("\nUpdated company profiles.") 70 | print("time elapsed:", end-start) 71 | 72 | 73 | def update_dera_financials(): 74 | """ 75 | update dera financial folders from the SEC 76 | """ 77 | data_path = Path(__file__).resolve().parent.parent.joinpath("data", "financials") 78 | 79 | start = time.time() 80 | 81 | quarters = ["q1", "q2", "q3", "q4"] 82 | years = [str(i) for i in range(2009, datetime.datetime.now().year+1)] 83 | for year in years: 84 | for quarter in quarters: 85 | period = year+quarter 86 | period_path = data_path.joinpath(period) 87 | if period_path.exists(): 88 | print("skipped period:", period) 89 | continue 90 | url = f"https://www.sec.gov/files/dera/data/financial-statement-data-sets/{period}.zip" 91 | r = requests.get(url) 92 | if r.status_code==200: 93 | z = zipfile.ZipFile(io.BytesIO(r.content)) 94 | period_path.mkdir(parents=True, exist_ok=False) 95 | z.extractall(period_path) 96 | print("extracted period:", period) 97 | else: 98 | print("error getting period:", period) 99 | 100 | end = time.time() 101 | print("\nUpdated company profiles.") 102 | print("time elapsed:", end-start) 103 | 104 | if __name__ == "__main__": 105 | update_company_profiles() 106 | update_dera_financials() 107 | -------------------------------------------------------------------------------- /scripts/upload.py: -------------------------------------------------------------------------------- 1 | """ 2 | upload data files to AWS RDS database 3 | """ 4 | 5 | import csv 6 | import sys 7 | from datetime import datetime 8 | from pathlib import Path 9 | 10 | import pandas as pd 11 | from finpandas import Fundamentals 12 | 13 | from update import update_dera_financials 14 | 15 | data_path = Path(__file__).resolve().parent.parent.joinpath("data", "financials") 16 | 17 | #pylint: disable=protected-access 18 | 19 | def sub(instance:Fundamentals, folder:str): 20 | """ 21 | upload a sub table 22 | 23 | Args: 24 | instance (Fundamentals): a Fundamentals instance with insert privilages 25 | folder (str): the name of the data folder to upload, i.e. "2018q3" 26 | """ 27 | intermediate_start_time = datetime.now() 28 | print(f"inserting folder {folder} into sub.") 29 | 30 | table = pd.read_csv(data_path.joinpath(folder, "sub.txt"), sep="\t") 31 | table["folder"] = folder 32 | instance._commitdb("sub", table) 33 | intermediate_end_time = datetime.now() 34 | print( 35 | f"completed inserting folder {folder} into sub, " 36 | f"took: {intermediate_end_time-intermediate_start_time}" 37 | ) 38 | 39 | 40 | def tag(instance:Fundamentals, folder:str): 41 | """ 42 | upload a tag table. Note this uses a different process than the 43 | other tables as this table breaks unique relational structure 44 | 45 | Args: 46 | instance (Fundamentals): a Fundamentals instance with insert privilages 47 | folder (str): the name of the data folder to upload, i.e. "2018q3" 48 | """ 49 | intermediate_start_time = datetime.now() 50 | print(f"inserting folder {folder} into tag.") 51 | 52 | table = pd.read_csv(data_path.joinpath(folder, "tag.txt"), sep="\t") 53 | table["folder"] = folder 54 | conn = instance.engine.raw_connection() 55 | with conn.cursor() as cur: 56 | tag_command = ( 57 | "INSERT INTO tag " 58 | "(tag, version, custom, abstract, datatype, iord, crdr, tlabel, doc, folder) " 59 | "VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s) ON DUPLICATE KEY UPDATE tag=tag" 60 | ) 61 | data = table.applymap(str).values.tolist() 62 | cur.executemany(tag_command, data) 63 | conn.commit() 64 | 65 | intermediate_end_time = datetime.now() 66 | print( 67 | f"completed inserting folder {folder} into tag, " 68 | f"took: {intermediate_end_time-intermediate_start_time}" 69 | ) 70 | 71 | 72 | def num(instance:Fundamentals, folder:str): 73 | """ 74 | upload a num table 75 | 76 | Args: 77 | instance (Fundamentals): a Fundamentals instance with insert privilages 78 | folder (str): the name of the data folder to upload, i.e. "2018q3" 79 | """ 80 | intermediate_start_time = datetime.now() 81 | print(f"inserting folder {folder} into num.") 82 | 83 | table = pd.read_csv(data_path.joinpath(folder, "num.txt"), sep="\t") 84 | table["folder"] = folder 85 | instance._commitdb("num", table) 86 | 87 | intermediate_end_time = datetime.now() 88 | print( 89 | f"completed inserting folder {folder} into num, " 90 | f"took: {intermediate_end_time-intermediate_start_time}" 91 | ) 92 | 93 | 94 | def pre(instance:Fundamentals, folder:str): 95 | """ 96 | upload a pre table 97 | 98 | Args: 99 | instance (Fundamentals): a Fundamentals instance with insert privilages 100 | folder (str): the name of the data folder to upload, i.e. "2018q3" 101 | """ 102 | intermediate_start_time = datetime.now() 103 | print(f"inserting folder {folder} into pre.") 104 | 105 | table = pd.read_csv(data_path.joinpath(folder, "pre.txt"), sep="\t") 106 | table["folder"] = folder 107 | instance._commitdb("pre", table) 108 | 109 | intermediate_end_time = datetime.now() 110 | print( 111 | f"completed inserting folder {folder} into pre, " 112 | f"took: {intermediate_end_time-intermediate_start_time}" 113 | ) 114 | 115 | 116 | def upload_dera_financials(instance:Fundamentals, folder:str, update_data:bool=True): 117 | """ 118 | upload dera financials to the AWS MySQL database 119 | 120 | Args: 121 | instance (Fundamentals): a Fundamentals instance with insert privilages 122 | folder (str): the name of the data folder to upload, i.e. "2018q3" 123 | update_data (bool, optional): checks if local data is up to date. Defaults to True. 124 | """ 125 | if update_data: 126 | print("updating data...") 127 | update_dera_financials() 128 | print("completed updated data.") 129 | 130 | print("processing {folder}...".format(folder=folder)) 131 | 132 | start_time = datetime.now() 133 | 134 | max_int = sys.maxsize 135 | while True: 136 | try: 137 | csv.field_size_limit(max_int) 138 | break 139 | except OverflowError: 140 | max_int = max_int // 10 141 | 142 | sub(instance, folder) 143 | tag(instance, folder) 144 | num(instance, folder) 145 | pre(instance, folder) 146 | 147 | 148 | end_time = datetime.now() 149 | print(f"{folder} upload completed. Time elapsed: {end_time-start_time}") 150 | instance.dispose() 151 | 152 | 153 | # if __name__ == "__main__": 154 | # instance = Fundamentals(username, password) 155 | # start = datetime.now() 156 | # upload_dera_financials(instance, "2020q3") 157 | # for folder in tqdm(next(os.walk("data"))[1]): 158 | # main(instance, folder) 159 | # print("x" * 30) 160 | # end = datetime.now() 161 | # print("Database population completed. Time elapsed: {t}".format(t=end-start)) 162 | -------------------------------------------------------------------------------- /scripts/yf_tickers.py: -------------------------------------------------------------------------------- 1 | import json 2 | from datetime import datetime 3 | from pathlib import Path 4 | 5 | import pandas as pd 6 | import yfinance as yf 7 | from finpandas import Stocks 8 | from finpandas.utils import get_profile_by_ticker 9 | from tqdm import tqdm 10 | 11 | 12 | def yf_wrapper(tickers:list, start:str, end:str) -> pd.DataFrame: 13 | """ 14 | query historical closing price for tickers every day in period 15 | 16 | Args: 17 | tickers (list): list of stock tickers strings, i.e ["AAPL", "SPY"] 18 | start (str): start date of period 19 | end (str): end date of period 20 | 21 | Returns: 22 | pd.DataFrame: historical EOD data 23 | """ 24 | return yf.download(tickers, start=start, end=end, group_by = "ticker").reset_index() 25 | 26 | 27 | 28 | def price_upload(tickers_filepath:str, start:str, end:str) -> pd.DataFrame: 29 | """ 30 | uploads closing price of tickers in file to AWS database 31 | 32 | Args: 33 | tickers_filepath (str): filepath to json with tickers 34 | start (str): start date of period 35 | end (str): end date of period 36 | 37 | Returns: 38 | pd.DataFrame: formatted dataframe that was uploaded to mysql 39 | """ 40 | 41 | # ~~~~~~ all companies ~~~~~~ # 42 | # with open(tickers_filepath) as f: 43 | # ticker_data = json.load(f) 44 | # tickers = list(ticker_data.keys()) 45 | 46 | 47 | # ~~~~~~~~~~~ s&p 500 companies ~~~~~~~~~~~ # 48 | tickers = [ticker.replace(".", "-") for ticker in pd.read_csv(tickers_filepath)["Symbol"].tolist()] 49 | names = pd.read_csv(tickers_filepath)["Name"].tolist() 50 | 51 | # format pandas df for upload 52 | data = yf_wrapper(tickers, start, end) 53 | new_df = pd.DataFrame(columns = ["open", "high", "low", "close", "adjclose", "volume", "date", "uom", "ticker", "cik", "name"]) 54 | 55 | for i in tqdm(range(len(tickers))): 56 | ticker, name = tickers[i], names[i] 57 | temp_df = data[ticker][["Open", "High", "Low", "Close", "Adj Close", "Volume"]] 58 | temp_df.rename(columns = {"Open":"open", "High":"high", "Low":"low", "Close":"close", "Adj Close":"adjclose", "Volume":"volume"}, inplace = True) 59 | temp_df["date"] = data["Date"] 60 | temp_df["uom"] = "USD" 61 | try: 62 | cik, _, _ = get_profile_by_ticker(ticker) 63 | except TypeError: 64 | print(ticker, name) 65 | temp_df["ticker"] = ticker 66 | temp_df["cik"] = cik 67 | temp_df["name"] = name 68 | new_df = new_df.append(temp_df) 69 | 70 | to_upload = new_df.reset_index().drop("index", axis=1) 71 | 72 | # ~~~~~~~~ upload to MySQL database ~~~~~~~ # 73 | # i = Stocks(username, password) 74 | # i._commitdb("historical_eod", to_upload) 75 | 76 | return to_upload 77 | 78 | 79 | 80 | def sector_upload(filepath:str) -> pd.DataFrame: 81 | """ 82 | upload company sector data to AWS database 83 | 84 | Args: 85 | filepath (str): filepath to constituent information 86 | 87 | Returns: 88 | pd.DataFrame: formatted dataframe that was uploaded to mysql 89 | """ 90 | df = pd.read_csv(filepath) 91 | ciks = [] 92 | for ticker in df["Symbol"]: 93 | ticker = ticker.replace(".", "-") 94 | try: 95 | ciks.append(get_profile_by_ticker(ticker)[0]) 96 | except TypeError: 97 | print(ticker) 98 | df["CIK"] = ciks 99 | df.columns = ["ticker", "name", "sector", "cik"] 100 | 101 | # ~~~~~~~~ upload to MySQL database ~~~~~~~ # 102 | # i = Stocks(username, password) 103 | # i._commitdb("sector", df) 104 | 105 | return df 106 | 107 | 108 | # if __name__ == "__main__": 109 | # filepath = Path(__file__).resolve().parent.joinpath('finpandas', 'resources', 'ticker.json') 110 | # sector_upload(filepath) 111 | 112 | # filepath = Path(__file__).resolve().parent.joinpath('finpandas', 'resources', 'constituents.csv') 113 | # print(close_upload(filepath, start="2021-02-08", end="2021-02-09")) 114 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | """ 2 | PyPI build file 3 | """ 4 | import setuptools 5 | 6 | with open("README.md", "r") as fh: 7 | long_description = fh.read() 8 | 9 | docs_extras = [ 10 | "sphinx==3.4.1", 11 | "docutils", 12 | "sphinx-rtd-theme" 13 | ] 14 | 15 | setuptools.setup( 16 | name="finpandas", 17 | version="0.1.0", 18 | author="Matthew Beveridge", 19 | author_email="mattjbev@gmail.com", 20 | description="U.S. Public Financial Analysis Tools", 21 | long_description=long_description, 22 | long_description_content_type="text/markdown", 23 | url="https://mattbeveridge.com/finpandas", 24 | keywords=["SEC", "EDGAR", "finance", "10-K", "10-Q", "analytics", "investing"], 25 | install_requires=["pandas", "pymysql", "sqlalchemy==1.4.*", "dpath", "regex"], 26 | extras_require={"docs": docs_extras}, 27 | license="MIT", 28 | packages=setuptools.find_packages(), 29 | include_package_data=True, 30 | classifiers=[ 31 | "Development Status :: 3 - Alpha", 32 | "Programming Language :: Python :: 3", 33 | "License :: OSI Approved :: MIT License", 34 | "Operating System :: OS Independent", 35 | ], 36 | python_requires=">=3.6", 37 | ) 38 | -------------------------------------------------------------------------------- /tests/test_forms.py: -------------------------------------------------------------------------------- 1 | import sys 2 | from pathlib import Path 3 | 4 | sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) 5 | from finpandas import dispose, fundamentals 6 | from finpandas.dataframes import Form10K, Form10Q, HistoricalStockPrices 7 | 8 | ########################################################################### 9 | ######################### Basic Operational Tests ######################### 10 | ########################################################################### 11 | 12 | 13 | 14 | ########################################################################### 15 | ############################## Validity Tests ############################# 16 | ########################################################################### 17 | 18 | dispose() 19 | -------------------------------------------------------------------------------- /tests/test_fundamentals.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | from concurrencytest import ConcurrentTestSuite, fork_for_tests 3 | 4 | from finpandas import dispose, fundamentals 5 | from finpandas.utils import count_object_methods 6 | 7 | ########################################################################### 8 | ######################### Basic Operational Tests ######################### 9 | ########################################################################### 10 | 11 | class TestFundamentalsOperations(unittest.TestCase): 12 | # # ~~~~~~~~~~~ get_profile_by_cik ~~~~~~~~~~ # 13 | # def test_get_profile_by_cik_runs(self): 14 | # fundamentals.get_profile_by_cik(320193) 15 | 16 | 17 | # # ~~~~~~~~~ get_profile_by_ticker ~~~~~~~~~ # 18 | # def test_get_profile_by_ticker_runs(self): 19 | # fundamentals.get_profile_by_ticker("fb") 20 | 21 | 22 | # # ~~~~~~~~~~ get_profile_by_title ~~~~~~~~~ # 23 | # def test_get_profile_by_title_runs(self): 24 | # fundamentals.get_profile_by_title("Apple*") 25 | 26 | 27 | # ~~~~~~~~~~~~~~~~~ query ~~~~~~~~~~~~~~~~~ # 28 | def test_query_runs(self): 29 | pass 30 | 31 | 32 | # ~~~~~~~~~~~~~~~ query_10k ~~~~~~~~~~~~~~~ # 33 | def test_query_10k_runs_single_year(self): 34 | fundamentals.ten_k("aapl", 2018) 35 | 36 | def test_query_10k_runs_multiple_years(self): 37 | fundamentals.ten_k("aapl", [2018, 2019]) 38 | 39 | 40 | # ~~~~~~~~~~~~~~~ query_10q ~~~~~~~~~~~~~~~ # 41 | def test_query_10q_runs_single_year(self): 42 | fundamentals.ten_q("googl", 2018) 43 | 44 | def test_query_10q_runs_multiple_years(self): 45 | fundamentals.ten_q("googl", [2018, 2019]) 46 | 47 | def test_query_10q_runs_single_period(self): 48 | fundamentals.ten_q("ibm", (2016, "q1")) 49 | 50 | def test_query_10q_runs_multiple_periods(self): 51 | fundamentals.ten_q("ibm", [(2016, "q2"), (2017, "q3")]) 52 | 53 | 54 | ########################################################################### 55 | ############################## Validity Tests ############################# 56 | ########################################################################### 57 | # TODO 58 | 59 | 60 | if __name__ == '__main__': 61 | operations_suite = unittest.TestLoader().loadTestsFromTestCase(TestFundamentalsOperations) 62 | concurrent_operations_suite = ConcurrentTestSuite( 63 | operations_suite, 64 | fork_for_tests(count_object_methods(TestFundamentalsOperations)) 65 | ) 66 | runner = unittest.TextTestRunner() 67 | runner.run(concurrent_operations_suite) 68 | 69 | dispose() --------------------------------------------------------------------------------