diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7c9e1124eac..69cf702caf7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,9 +33,9 @@ jobs: - run: pip install types-pytz types-requests types-termcolor types-tabulate types-PyYAML types-python-dateutil types-setuptools types-six - run: bandit -x ./tests -r . || true - run: black --diff --check . - - run: codespell --ignore-words-list=commun,statics,ro,zar,zlot,ba,buil,coo,ether,hist,hsi,mape,navagation,operatio,pres,ser,yeld,shold,ist,varian,datas,ake,creat,vie,hel --quiet-level=2 --skip=./tests,.git,*.css,*.csv,*.html,*.ini,*.ipynb,*.js,*.json,*.lock,*.scss,*.txt,*.yaml,./build/pyinstaller - - run: flake8 . --count --ignore=E203,W503 --max-line-length=122 --show-source --statistics --exclude ./build/pyinstaller - - run: mypy --ignore-missing-imports --exclude="/setup\.py$" . + - run: codespell --ignore-words-list=commun,statics,ro,zar,zlot,ba,buil,coo,ether,hist,hsi,mape,navagation,operatio,pres,ser,yeld,shold,ist,varian,datas,ake,creat,vie,hel --quiet-level=2 --skip=./tests,.git,*.css,*.csv,*.html,*.ini,*.ipynb,*.js,*.json,*.lock,*.scss,*.txt,*.yaml,./build/pyinstaller,./website/config.toml + - run: flake8 . --count --ignore=E203,W503 --max-line-length=122 --show-source --statistics --exclude ./build/pyinstaller,./website/content + - run: mypy --ignore-missing-imports openbb_terminal - run: shopt -s globstar && pyupgrade --py38-plus **/*.py - run: safety check - run: | diff --git a/.gitignore b/.gitignore index 11bb5f4b3f5..45631fc70ff 100644 --- a/.gitignore +++ b/.gitignore @@ -51,9 +51,6 @@ jupyterlab/*/*.tsbuildinfo jupyterlab/*/ui-tests/test-results/ jupyterlab/*/ui-tests/tests/*.ts-snapshots/ -# Sphinx documentation build files -docs/_build - # User stylesheets styles/user diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ba08eb03847..e24f4921727 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -40,13 +40,13 @@ repos: [ "--ignore-words-list=commun,ro,zar,vie,hel,zlot,ba,buil,coo,ether,hist,hsi,mape,navagation,operatio,pres,ser,yeld,shold,ist,varian,datas,ake,creat,statics", "--quiet-level=2", - "--skip=./tests,.git,*.css,*.csv,*.html,*.ini,*.ipynb,*.js,*.json,*.lock,*.scss,*.txt,*.yaml,build/pyinstaller/*", + "--skip=./tests,.git,*.css,*.csv,*.html,*.ini,*.ipynb,*.js,*.json,*.lock,*.scss,*.txt,*.yaml,build/pyinstaller/*,./website/config.toml", ] - repo: https://github.com/pre-commit/mirrors-mypy rev: "v0.982" hooks: - id: mypy - args: ["--ignore-missing-imports", '--exclude=/setup\.py$'] + args: ["--ignore-missing-imports", 'openbb_terminal'] additional_dependencies: [types-all] - repo: https://github.com/kynan/nbstripout rev: 0.6.1 diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index d4bb2cbb9ed..00000000000 --- a/docs/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# Minimal makefile for Sphinx documentation -# - -# You can set these variables from the command line, and also -# from the environment for the first two. -SPHINXOPTS ?= -SPHINXBUILD ?= sphinx-build -SOURCEDIR = . -BUILDDIR = _build - -# Put it first so that "make" without argument is like "make help". -help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -.PHONY: help Makefile - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index 62822c15b6f..00000000000 --- a/docs/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# OpenBB Terminal Code Documentation - -## Creating Hugo SDK Documentation - -To generate markdown files for the Hugo website do the following: - -1. Go to the openbb directory:`cd ~/OpenBBTerminal` -1. Generate the documentation: `python docs/generate.py` -1. Change into the website directory: `cd website` -1. Run the hugo server to confirm changes applied: `hugo server -D` - -## Creating Sphinx Documentation - -Requirements: - -- sphinx -- myst_parser - -The `requirements.txt` file that mentions `myst_parser` is needed for readthedocs.io to build the documentation automatically. - -Usage: - -In the `docs` folder execute: - -```bash -rm -rf code && sphinx-apidoc ../openbb_terminal/ -o ./code -make html -``` diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html deleted file mode 100644 index ffb0f622b6f..00000000000 --- a/docs/_templates/layout.html +++ /dev/null @@ -1,11 +0,0 @@ -{% extends '!layout.html' %} - -{% block footer %} - - - -{% endblock %} diff --git a/docs/application mapping.drawio b/docs/application mapping.drawio deleted file mode 100644 index c36cbda914e..00000000000 --- a/docs/application mapping.drawio +++ /dev/null @@ -1,662 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/code/modules.rst b/docs/code/modules.rst deleted file mode 100644 index 6914a5f9f2a..00000000000 --- a/docs/code/modules.rst +++ /dev/null @@ -1,7 +0,0 @@ -openbb_terminal -=============== - -.. toctree:: - :maxdepth: 4 - - openbb_terminal diff --git a/docs/code/openbb_terminal.alternative.covid.rst b/docs/code/openbb_terminal.alternative.covid.rst deleted file mode 100644 index 949163b5700..00000000000 --- a/docs/code/openbb_terminal.alternative.covid.rst +++ /dev/null @@ -1,37 +0,0 @@ -openbb\_terminal.alternative.covid package -========================================== - -Submodules ----------- - -openbb\_terminal.alternative.covid.covid\_controller module ------------------------------------------------------------ - -.. automodule:: openbb_terminal.alternative.covid.covid_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.alternative.covid.covid\_model module ------------------------------------------------------- - -.. automodule:: openbb_terminal.alternative.covid.covid_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.alternative.covid.covid\_view module ------------------------------------------------------ - -.. automodule:: openbb_terminal.alternative.covid.covid_view - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.alternative.covid - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.alternative.rst b/docs/code/openbb_terminal.alternative.rst deleted file mode 100644 index d5355d22a27..00000000000 --- a/docs/code/openbb_terminal.alternative.rst +++ /dev/null @@ -1,29 +0,0 @@ -openbb\_terminal.alternative package -==================================== - -Subpackages ------------ - -.. toctree:: - :maxdepth: 4 - - openbb_terminal.alternative.covid - -Submodules ----------- - -openbb\_terminal.alternative.alt\_controller module ---------------------------------------------------- - -.. automodule:: openbb_terminal.alternative.alt_controller - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.alternative - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.common.behavioural_analysis.rst b/docs/code/openbb_terminal.common.behavioural_analysis.rst deleted file mode 100644 index 652ada56e56..00000000000 --- a/docs/code/openbb_terminal.common.behavioural_analysis.rst +++ /dev/null @@ -1,133 +0,0 @@ -openbb\_terminal.common.behavioural\_analysis package -===================================================== - -Submodules ----------- - -openbb\_terminal.common.behavioural\_analysis.finbrain\_model module --------------------------------------------------------------------- - -.. automodule:: openbb_terminal.common.behavioural_analysis.finbrain_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.common.behavioural\_analysis.finbrain\_view module -------------------------------------------------------------------- - -.. automodule:: openbb_terminal.common.behavioural_analysis.finbrain_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.common.behavioural\_analysis.finnhub\_model module -------------------------------------------------------------------- - -.. automodule:: openbb_terminal.common.behavioural_analysis.finnhub_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.common.behavioural\_analysis.finnhub\_view module ------------------------------------------------------------------- - -.. automodule:: openbb_terminal.common.behavioural_analysis.finnhub_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.common.behavioural\_analysis.google\_model module ------------------------------------------------------------------- - -.. automodule:: openbb_terminal.common.behavioural_analysis.google_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.common.behavioural\_analysis.google\_view module ------------------------------------------------------------------ - -.. automodule:: openbb_terminal.common.behavioural_analysis.google_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.common.behavioural\_analysis.reddit\_helpers module --------------------------------------------------------------------- - -.. automodule:: openbb_terminal.common.behavioural_analysis.reddit_helpers - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.common.behavioural\_analysis.reddit\_model module ------------------------------------------------------------------- - -.. automodule:: openbb_terminal.common.behavioural_analysis.reddit_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.common.behavioural\_analysis.reddit\_view module ------------------------------------------------------------------ - -.. automodule:: openbb_terminal.common.behavioural_analysis.reddit_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.common.behavioural\_analysis.sentimentinvestor\_model module ------------------------------------------------------------------------------ - -.. automodule:: openbb_terminal.common.behavioural_analysis.sentimentinvestor_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.common.behavioural\_analysis.sentimentinvestor\_view module ----------------------------------------------------------------------------- - -.. automodule:: openbb_terminal.common.behavioural_analysis.sentimentinvestor_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.common.behavioural\_analysis.stocktwits\_model module ----------------------------------------------------------------------- - -.. automodule:: openbb_terminal.common.behavioural_analysis.stocktwits_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.common.behavioural\_analysis.stocktwits\_view module ---------------------------------------------------------------------- - -.. automodule:: openbb_terminal.common.behavioural_analysis.stocktwits_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.common.behavioural\_analysis.twitter\_model module -------------------------------------------------------------------- - -.. automodule:: openbb_terminal.common.behavioural_analysis.twitter_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.common.behavioural\_analysis.twitter\_view module ------------------------------------------------------------------- - -.. automodule:: openbb_terminal.common.behavioural_analysis.twitter_view - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.common.behavioural_analysis - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.common.quantitative_analysis.rst b/docs/code/openbb_terminal.common.quantitative_analysis.rst deleted file mode 100644 index 9808f3ecabc..00000000000 --- a/docs/code/openbb_terminal.common.quantitative_analysis.rst +++ /dev/null @@ -1,45 +0,0 @@ -openbb\_terminal.common.quantitative\_analysis package -====================================================== - -Submodules ----------- - -openbb\_terminal.common.quantitative\_analysis.qa\_model module ---------------------------------------------------------------- - -.. automodule:: openbb_terminal.common.quantitative_analysis.qa_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.common.quantitative\_analysis.qa\_view module --------------------------------------------------------------- - -.. automodule:: openbb_terminal.common.quantitative_analysis.qa_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.common.quantitative\_analysis.rolling\_model module --------------------------------------------------------------------- - -.. automodule:: openbb_terminal.common.quantitative_analysis.rolling_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.common.quantitative\_analysis.rolling\_view module -------------------------------------------------------------------- - -.. automodule:: openbb_terminal.common.quantitative_analysis.rolling_view - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.common.quantitative_analysis - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.common.rst b/docs/code/openbb_terminal.common.rst deleted file mode 100644 index acba6e46f62..00000000000 --- a/docs/code/openbb_terminal.common.rst +++ /dev/null @@ -1,55 +0,0 @@ -openbb\_terminal.common package -=============================== - -Subpackages ------------ - -.. toctree:: - :maxdepth: 4 - - openbb_terminal.common.behavioural_analysis - openbb_terminal.common.quantitative_analysis - openbb_terminal.common.technical_analysis - -Submodules ----------- - -openbb\_terminal.common.feedparser\_model module ------------------------------------------------- - -.. automodule:: openbb_terminal.common.feedparser_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.common.feedparser\_view module ------------------------------------------------ - -.. automodule:: openbb_terminal.common.feedparser_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.common.newsapi\_model module ---------------------------------------------- - -.. automodule:: openbb_terminal.common.newsapi_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.common.newsapi\_view module --------------------------------------------- - -.. automodule:: openbb_terminal.common.newsapi_view - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.common - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.common.technical_analysis.rst b/docs/code/openbb_terminal.common.technical_analysis.rst deleted file mode 100644 index e53c962f140..00000000000 --- a/docs/code/openbb_terminal.common.technical_analysis.rst +++ /dev/null @@ -1,109 +0,0 @@ -openbb\_terminal.common.technical\_analysis package -=================================================== - -Submodules ----------- - -openbb\_terminal.common.technical\_analysis.custom\_indicators\_model module ----------------------------------------------------------------------------- - -.. automodule:: openbb_terminal.common.technical_analysis.custom_indicators_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.common.technical\_analysis.custom\_indicators\_view module ---------------------------------------------------------------------------- - -.. automodule:: openbb_terminal.common.technical_analysis.custom_indicators_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.common.technical\_analysis.momentum\_model module ------------------------------------------------------------------- - -.. automodule:: openbb_terminal.common.technical_analysis.momentum_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.common.technical\_analysis.momentum\_view module ------------------------------------------------------------------ - -.. automodule:: openbb_terminal.common.technical_analysis.momentum_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.common.technical\_analysis.overlap\_model module ------------------------------------------------------------------ - -.. automodule:: openbb_terminal.common.technical_analysis.overlap_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.common.technical\_analysis.overlap\_view module ----------------------------------------------------------------- - -.. automodule:: openbb_terminal.common.technical_analysis.overlap_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.common.technical\_analysis.trend\_indicators\_model module ---------------------------------------------------------------------------- - -.. automodule:: openbb_terminal.common.technical_analysis.trend_indicators_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.common.technical\_analysis.trend\_indicators\_view module --------------------------------------------------------------------------- - -.. automodule:: openbb_terminal.common.technical_analysis.trend_indicators_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.common.technical\_analysis.volatility\_model module --------------------------------------------------------------------- - -.. automodule:: openbb_terminal.common.technical_analysis.volatility_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.common.technical\_analysis.volatility\_view module -------------------------------------------------------------------- - -.. automodule:: openbb_terminal.common.technical_analysis.volatility_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.common.technical\_analysis.volume\_model module ----------------------------------------------------------------- - -.. automodule:: openbb_terminal.common.technical_analysis.volume_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.common.technical\_analysis.volume\_view module ---------------------------------------------------------------- - -.. automodule:: openbb_terminal.common.technical_analysis.volume_view - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.common.technical_analysis - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.core.config.rst b/docs/code/openbb_terminal.core.config.rst deleted file mode 100644 index 381a520ce9e..00000000000 --- a/docs/code/openbb_terminal.core.config.rst +++ /dev/null @@ -1,29 +0,0 @@ -openbb\_terminal.core.config package -==================================== - -Submodules ----------- - -openbb\_terminal.core.config.paths module ------------------------------------------ - -.. automodule:: openbb_terminal.core.config.paths - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.core.config.paths\_helper module -------------------------------------------------- - -.. automodule:: openbb_terminal.core.config.paths_helper - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.core.config - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.core.log.collection.rst b/docs/code/openbb_terminal.core.log.collection.rst deleted file mode 100644 index 39c68dedffb..00000000000 --- a/docs/code/openbb_terminal.core.log.collection.rst +++ /dev/null @@ -1,37 +0,0 @@ -openbb\_terminal.core.log.collection package -============================================ - -Submodules ----------- - -openbb\_terminal.core.log.collection.log\_sender module -------------------------------------------------------- - -.. automodule:: openbb_terminal.core.log.collection.log_sender - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.core.log.collection.logging\_clock module ----------------------------------------------------------- - -.. automodule:: openbb_terminal.core.log.collection.logging_clock - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.core.log.collection.s3\_sender module ------------------------------------------------------- - -.. automodule:: openbb_terminal.core.log.collection.s3_sender - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.core.log.collection - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.core.log.generation.rst b/docs/code/openbb_terminal.core.log.generation.rst deleted file mode 100644 index 23120eaa800..00000000000 --- a/docs/code/openbb_terminal.core.log.generation.rst +++ /dev/null @@ -1,61 +0,0 @@ -openbb\_terminal.core.log.generation package -============================================ - -Submodules ----------- - -openbb\_terminal.core.log.generation.directories module -------------------------------------------------------- - -.. automodule:: openbb_terminal.core.log.generation.directories - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.core.log.generation.expired\_files module ----------------------------------------------------------- - -.. automodule:: openbb_terminal.core.log.generation.expired_files - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.core.log.generation.formatter\_with\_exceptions module ------------------------------------------------------------------------ - -.. automodule:: openbb_terminal.core.log.generation.formatter_with_exceptions - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.core.log.generation.path\_tracking\_file\_handler module -------------------------------------------------------------------------- - -.. automodule:: openbb_terminal.core.log.generation.path_tracking_file_handler - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.core.log.generation.settings module ----------------------------------------------------- - -.. automodule:: openbb_terminal.core.log.generation.settings - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.core.log.generation.settings\_logger module ------------------------------------------------------------- - -.. automodule:: openbb_terminal.core.log.generation.settings_logger - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.core.log.generation - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.core.log.rst b/docs/code/openbb_terminal.core.log.rst deleted file mode 100644 index 01ed100f992..00000000000 --- a/docs/code/openbb_terminal.core.log.rst +++ /dev/null @@ -1,30 +0,0 @@ -openbb\_terminal.core.log package -================================= - -Subpackages ------------ - -.. toctree:: - :maxdepth: 4 - - openbb_terminal.core.log.collection - openbb_terminal.core.log.generation - -Submodules ----------- - -openbb\_terminal.core.log.constants module ------------------------------------------- - -.. automodule:: openbb_terminal.core.log.constants - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.core.log - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.core.rst b/docs/code/openbb_terminal.core.rst deleted file mode 100644 index 368e1c1d096..00000000000 --- a/docs/code/openbb_terminal.core.rst +++ /dev/null @@ -1,19 +0,0 @@ -openbb\_terminal.core package -============================= - -Subpackages ------------ - -.. toctree:: - :maxdepth: 4 - - openbb_terminal.core.config - openbb_terminal.core.log - -Module contents ---------------- - -.. automodule:: openbb_terminal.core - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.cryptocurrency.defi.rst b/docs/code/openbb_terminal.cryptocurrency.defi.rst deleted file mode 100644 index 06ffea44253..00000000000 --- a/docs/code/openbb_terminal.cryptocurrency.defi.rst +++ /dev/null @@ -1,165 +0,0 @@ -openbb\_terminal.cryptocurrency.defi package -============================================ - -Submodules ----------- - -openbb\_terminal.cryptocurrency.defi.coindix\_model module ----------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.defi.coindix_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.defi.coindix\_view module ---------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.defi.coindix_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.defi.cryptosaurio\_model module ---------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.defi.cryptosaurio_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.defi.cryptosaurio\_view module --------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.defi.cryptosaurio_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.defi.defi\_controller module ------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.defi.defi_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.defi.defipulse\_model module ------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.defi.defipulse_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.defi.defipulse\_view module ------------------------------------------------------------ - -.. automodule:: openbb_terminal.cryptocurrency.defi.defipulse_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.defi.graph\_model module --------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.defi.graph_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.defi.graph\_view module -------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.defi.graph_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.defi.llama\_model module --------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.defi.llama_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.defi.llama\_view module -------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.defi.llama_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.defi.smartstake\_model module -------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.defi.smartstake_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.defi.smartstake\_view module ------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.defi.smartstake_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.defi.substack\_model module ------------------------------------------------------------ - -.. automodule:: openbb_terminal.cryptocurrency.defi.substack_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.defi.substack\_view module ----------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.defi.substack_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.defi.terraengineer\_model module ----------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.defi.terraengineer_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.defi.terraengineer\_view module ---------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.defi.terraengineer_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.defi.terramoney\_fcd\_model module ------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.defi.terramoney_fcd_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.defi.terramoney\_fcd\_view module ------------------------------------------------------------------ - -.. automodule:: openbb_terminal.cryptocurrency.defi.terramoney_fcd_view - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.cryptocurrency.defi - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.cryptocurrency.discovery.rst b/docs/code/openbb_terminal.cryptocurrency.discovery.rst deleted file mode 100644 index 688bf07d39d..00000000000 --- a/docs/code/openbb_terminal.cryptocurrency.discovery.rst +++ /dev/null @@ -1,85 +0,0 @@ -openbb\_terminal.cryptocurrency.discovery package -================================================= - -Submodules ----------- - -openbb\_terminal.cryptocurrency.discovery.coinmarketcap\_model module ---------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.discovery.coinmarketcap_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.discovery.coinmarketcap\_view module --------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.discovery.coinmarketcap_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.discovery.coinpaprika\_model module -------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.discovery.coinpaprika_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.discovery.coinpaprika\_view module ------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.discovery.coinpaprika_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.discovery.dappradar\_model module ------------------------------------------------------------------ - -.. automodule:: openbb_terminal.cryptocurrency.discovery.dappradar_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.discovery.dappradar\_view module ----------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.discovery.dappradar_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.discovery.discovery\_controller module ----------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.discovery.discovery_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.discovery.pycoingecko\_model module -------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.discovery.pycoingecko_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.discovery.pycoingecko\_view module ------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.discovery.pycoingecko_view - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.cryptocurrency.discovery - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.cryptocurrency.due_diligence.rst b/docs/code/openbb_terminal.cryptocurrency.due_diligence.rst deleted file mode 100644 index b6bb6fa81d5..00000000000 --- a/docs/code/openbb_terminal.cryptocurrency.due_diligence.rst +++ /dev/null @@ -1,205 +0,0 @@ -openbb\_terminal.cryptocurrency.due\_diligence package -====================================================== - -Submodules ----------- - -openbb\_terminal.cryptocurrency.due\_diligence.binance\_model module --------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.due_diligence.binance_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.due\_diligence.binance\_view module -------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.due_diligence.binance_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.due\_diligence.ccxt\_model module ------------------------------------------------------------------ - -.. automodule:: openbb_terminal.cryptocurrency.due_diligence.ccxt_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.due\_diligence.ccxt\_view module ----------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.due_diligence.ccxt_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.due\_diligence.coinbase\_model module ---------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.due_diligence.coinbase_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.due\_diligence.coinbase\_view module --------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.due_diligence.coinbase_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.due\_diligence.coinglass\_model module ----------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.due_diligence.coinglass_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.due\_diligence.coinglass\_view module ---------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.due_diligence.coinglass_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.due\_diligence.coinpaprika\_model module ------------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.due_diligence.coinpaprika_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.due\_diligence.coinpaprika\_view module ------------------------------------------------------------------------ - -.. automodule:: openbb_terminal.cryptocurrency.due_diligence.coinpaprika_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.due\_diligence.cryptopanic\_view module ------------------------------------------------------------------------ - -.. automodule:: openbb_terminal.cryptocurrency.due_diligence.cryptopanic_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.due\_diligence.dd\_controller module --------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.due_diligence.dd_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.due\_diligence.due\_diligence\_api module -------------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.due_diligence.due_diligence_api - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.due\_diligence.finbrain\_crypto\_view module ----------------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.due_diligence.finbrain_crypto_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.due\_diligence.glassnode\_model module ----------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.due_diligence.glassnode_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.due\_diligence.glassnode\_view module ---------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.due_diligence.glassnode_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.due\_diligence.messari\_model module --------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.due_diligence.messari_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.due\_diligence.messari\_view module -------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.due_diligence.messari_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.due\_diligence.pycoingecko\_model module ------------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.due_diligence.pycoingecko_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.due\_diligence.pycoingecko\_view module ------------------------------------------------------------------------ - -.. automodule:: openbb_terminal.cryptocurrency.due_diligence.pycoingecko_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.due\_diligence.santiment\_model module ----------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.due_diligence.santiment_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.due\_diligence.santiment\_view module ---------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.due_diligence.santiment_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.due\_diligence.tokenterminal\_model module --------------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.due_diligence.tokenterminal_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.due\_diligence.tokenterminal\_view module -------------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.due_diligence.tokenterminal_view - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.cryptocurrency.due_diligence - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.cryptocurrency.nft.rst b/docs/code/openbb_terminal.cryptocurrency.nft.rst deleted file mode 100644 index 80614858403..00000000000 --- a/docs/code/openbb_terminal.cryptocurrency.nft.rst +++ /dev/null @@ -1,53 +0,0 @@ -openbb\_terminal.cryptocurrency.nft package -=========================================== - -Submodules ----------- - -openbb\_terminal.cryptocurrency.nft.nft\_controller module ----------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.nft.nft_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.nft.nftpricefloor\_model module ---------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.nft.nftpricefloor_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.nft.nftpricefloor\_view module --------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.nft.nftpricefloor_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.nft.opensea\_model module ---------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.nft.opensea_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.nft.opensea\_view module --------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.nft.opensea_view - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.cryptocurrency.nft - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.cryptocurrency.onchain.rst b/docs/code/openbb_terminal.cryptocurrency.onchain.rst deleted file mode 100644 index b89e4074551..00000000000 --- a/docs/code/openbb_terminal.cryptocurrency.onchain.rst +++ /dev/null @@ -1,117 +0,0 @@ -openbb\_terminal.cryptocurrency.onchain package -=============================================== - -Submodules ----------- - -openbb\_terminal.cryptocurrency.onchain.bitquery\_model module --------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.onchain.bitquery_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.onchain.bitquery\_view module -------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.onchain.bitquery_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.onchain.blockchain\_model module ----------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.onchain.blockchain_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.onchain.blockchain\_view module ---------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.onchain.blockchain_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.onchain.ethgasstation\_model module -------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.onchain.ethgasstation_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.onchain.ethgasstation\_view module ------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.onchain.ethgasstation_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.onchain.ethplorer\_model module ---------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.onchain.ethplorer_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.onchain.ethplorer\_view module --------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.onchain.ethplorer_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.onchain.onchain\_controller module ------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.onchain.onchain_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.onchain.shroom\_model module ------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.onchain.shroom_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.onchain.shroom\_view module ------------------------------------------------------------ - -.. automodule:: openbb_terminal.cryptocurrency.onchain.shroom_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.onchain.whale\_alert\_model module ------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.onchain.whale_alert_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.onchain.whale\_alert\_view module ------------------------------------------------------------------ - -.. automodule:: openbb_terminal.cryptocurrency.onchain.whale_alert_view - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.cryptocurrency.onchain - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.cryptocurrency.overview.rst b/docs/code/openbb_terminal.cryptocurrency.overview.rst deleted file mode 100644 index 49281b7b509..00000000000 --- a/docs/code/openbb_terminal.cryptocurrency.overview.rst +++ /dev/null @@ -1,173 +0,0 @@ -openbb\_terminal.cryptocurrency.overview package -================================================ - -Submodules ----------- - -openbb\_terminal.cryptocurrency.overview.blockchaincenter\_model module ------------------------------------------------------------------------ - -.. automodule:: openbb_terminal.cryptocurrency.overview.blockchaincenter_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.overview.blockchaincenter\_view module ----------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.overview.blockchaincenter_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.overview.coinbase\_model module ---------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.overview.coinbase_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.overview.coinbase\_view module --------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.overview.coinbase_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.overview.coinpaprika\_model module ------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.overview.coinpaprika_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.overview.coinpaprika\_view module ------------------------------------------------------------------ - -.. automodule:: openbb_terminal.cryptocurrency.overview.coinpaprika_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.overview.cryptopanic\_model module ------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.overview.cryptopanic_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.overview.cryptopanic\_view module ------------------------------------------------------------------ - -.. automodule:: openbb_terminal.cryptocurrency.overview.cryptopanic_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.overview.loanscan\_model module ---------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.overview.loanscan_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.overview.loanscan\_view module --------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.overview.loanscan_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.overview.overview\_api module -------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.overview.overview_api - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.overview.overview\_controller module --------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.overview.overview_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.overview.pycoingecko\_model module ------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.overview.pycoingecko_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.overview.pycoingecko\_view module ------------------------------------------------------------------ - -.. automodule:: openbb_terminal.cryptocurrency.overview.pycoingecko_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.overview.rekt\_model module ------------------------------------------------------------ - -.. automodule:: openbb_terminal.cryptocurrency.overview.rekt_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.overview.rekt\_view module ----------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.overview.rekt_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.overview.tokenterminal\_model module --------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.overview.tokenterminal_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.overview.tokenterminal\_view module -------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.overview.tokenterminal_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.overview.withdrawalfees\_model module ---------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.overview.withdrawalfees_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.overview.withdrawalfees\_view module --------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.overview.withdrawalfees_view - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.cryptocurrency.overview - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.cryptocurrency.quantitative_analysis.rst b/docs/code/openbb_terminal.cryptocurrency.quantitative_analysis.rst deleted file mode 100644 index e274e0e2e22..00000000000 --- a/docs/code/openbb_terminal.cryptocurrency.quantitative_analysis.rst +++ /dev/null @@ -1,21 +0,0 @@ -openbb\_terminal.cryptocurrency.quantitative\_analysis package -============================================================== - -Submodules ----------- - -openbb\_terminal.cryptocurrency.quantitative\_analysis.qa\_controller module ----------------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.quantitative_analysis.qa_controller - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.cryptocurrency.quantitative_analysis - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.cryptocurrency.rst b/docs/code/openbb_terminal.cryptocurrency.rst deleted file mode 100644 index 9db55758b25..00000000000 --- a/docs/code/openbb_terminal.cryptocurrency.rst +++ /dev/null @@ -1,93 +0,0 @@ -openbb\_terminal.cryptocurrency package -======================================= - -Subpackages ------------ - -.. toctree:: - :maxdepth: 4 - - openbb_terminal.cryptocurrency.defi - openbb_terminal.cryptocurrency.discovery - openbb_terminal.cryptocurrency.due_diligence - openbb_terminal.cryptocurrency.nft - openbb_terminal.cryptocurrency.onchain - openbb_terminal.cryptocurrency.overview - openbb_terminal.cryptocurrency.quantitative_analysis - openbb_terminal.cryptocurrency.technical_analysis - openbb_terminal.cryptocurrency.tools - -Submodules ----------- - -openbb\_terminal.cryptocurrency.coinbase\_helpers module --------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.coinbase_helpers - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.coinpaprika\_helpers module ------------------------------------------------------------ - -.. automodule:: openbb_terminal.cryptocurrency.coinpaprika_helpers - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.crypto\_controller module ---------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.crypto_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.cryptocurrency\_helpers module --------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.cryptocurrency_helpers - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.dataframe\_helpers module ---------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.dataframe_helpers - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.pycoingecko\_helpers module ------------------------------------------------------------ - -.. automodule:: openbb_terminal.cryptocurrency.pycoingecko_helpers - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.pyth\_model module --------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.pyth_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.pyth\_view module -------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.pyth_view - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.cryptocurrency - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.cryptocurrency.technical_analysis.rst b/docs/code/openbb_terminal.cryptocurrency.technical_analysis.rst deleted file mode 100644 index b5d6cac4e51..00000000000 --- a/docs/code/openbb_terminal.cryptocurrency.technical_analysis.rst +++ /dev/null @@ -1,21 +0,0 @@ -openbb\_terminal.cryptocurrency.technical\_analysis package -=========================================================== - -Submodules ----------- - -openbb\_terminal.cryptocurrency.technical\_analysis.ta\_controller module -------------------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.technical_analysis.ta_controller - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.cryptocurrency.technical_analysis - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.cryptocurrency.tools.rst b/docs/code/openbb_terminal.cryptocurrency.tools.rst deleted file mode 100644 index 9c538113f94..00000000000 --- a/docs/code/openbb_terminal.cryptocurrency.tools.rst +++ /dev/null @@ -1,45 +0,0 @@ -openbb\_terminal.cryptocurrency.tools package -============================================= - -Submodules ----------- - -openbb\_terminal.cryptocurrency.tools.tools\_controller module --------------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.tools.tools_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.tools.tools\_helpers module ------------------------------------------------------------ - -.. automodule:: openbb_terminal.cryptocurrency.tools.tools_helpers - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.tools.tools\_model module ---------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.tools.tools_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.cryptocurrency.tools.tools\_view module --------------------------------------------------------- - -.. automodule:: openbb_terminal.cryptocurrency.tools.tools_view - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.cryptocurrency.tools - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.dashboards.rst b/docs/code/openbb_terminal.dashboards.rst deleted file mode 100644 index 552ec0863ea..00000000000 --- a/docs/code/openbb_terminal.dashboards.rst +++ /dev/null @@ -1,37 +0,0 @@ -openbb\_terminal.dashboards package -=================================== - -Subpackages ------------ - -.. toctree:: - :maxdepth: 4 - - openbb_terminal.dashboards.stream - -Submodules ----------- - -openbb\_terminal.dashboards.dashboards\_controller module ---------------------------------------------------------- - -.. automodule:: openbb_terminal.dashboards.dashboards_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.dashboards.widget\_helpers module --------------------------------------------------- - -.. automodule:: openbb_terminal.dashboards.widget_helpers - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.dashboards - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.dashboards.stream.rst b/docs/code/openbb_terminal.dashboards.stream.rst deleted file mode 100644 index 7a79d121b7b..00000000000 --- a/docs/code/openbb_terminal.dashboards.stream.rst +++ /dev/null @@ -1,21 +0,0 @@ -openbb\_terminal.dashboards.stream package -========================================== - -Submodules ----------- - -openbb\_terminal.dashboards.stream.forecast module --------------------------------------------------- - -.. automodule:: openbb_terminal.dashboards.stream.forecast - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.dashboards.stream - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.econometrics.rst b/docs/code/openbb_terminal.econometrics.rst deleted file mode 100644 index 44057df5afe..00000000000 --- a/docs/code/openbb_terminal.econometrics.rst +++ /dev/null @@ -1,61 +0,0 @@ -openbb\_terminal.econometrics package -===================================== - -Submodules ----------- - -openbb\_terminal.econometrics.econometrics\_controller module -------------------------------------------------------------- - -.. automodule:: openbb_terminal.econometrics.econometrics_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.econometrics.econometrics\_helpers module ----------------------------------------------------------- - -.. automodule:: openbb_terminal.econometrics.econometrics_helpers - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.econometrics.econometrics\_model module --------------------------------------------------------- - -.. automodule:: openbb_terminal.econometrics.econometrics_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.econometrics.econometrics\_view module -------------------------------------------------------- - -.. automodule:: openbb_terminal.econometrics.econometrics_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.econometrics.regression\_model module ------------------------------------------------------- - -.. automodule:: openbb_terminal.econometrics.regression_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.econometrics.regression\_view module ------------------------------------------------------ - -.. automodule:: openbb_terminal.econometrics.regression_view - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.econometrics - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.economy.quantitative_analysis.rst b/docs/code/openbb_terminal.economy.quantitative_analysis.rst deleted file mode 100644 index 857bfe5bfc3..00000000000 --- a/docs/code/openbb_terminal.economy.quantitative_analysis.rst +++ /dev/null @@ -1,21 +0,0 @@ -openbb\_terminal.economy.quantitative\_analysis package -======================================================= - -Submodules ----------- - -openbb\_terminal.economy.quantitative\_analysis.qa\_controller module ---------------------------------------------------------------------- - -.. automodule:: openbb_terminal.economy.quantitative_analysis.qa_controller - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.economy.quantitative_analysis - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.economy.rst b/docs/code/openbb_terminal.economy.rst deleted file mode 100644 index 0c496c4ec0a..00000000000 --- a/docs/code/openbb_terminal.economy.rst +++ /dev/null @@ -1,213 +0,0 @@ -openbb\_terminal.economy package -================================ - -Subpackages ------------ - -.. toctree:: - :maxdepth: 4 - - openbb_terminal.economy.quantitative_analysis - -Submodules ----------- - -openbb\_terminal.economy.alphavantage\_model module ---------------------------------------------------- - -.. automodule:: openbb_terminal.economy.alphavantage_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.economy.alphavantage\_view module --------------------------------------------------- - -.. automodule:: openbb_terminal.economy.alphavantage_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.economy.commodity\_model module ------------------------------------------------- - -.. automodule:: openbb_terminal.economy.commodity_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.economy.commodity\_view module ------------------------------------------------ - -.. automodule:: openbb_terminal.economy.commodity_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.economy.econ\_data\_helper module --------------------------------------------------- - -.. automodule:: openbb_terminal.economy.econ_data_helper - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.economy.econdb\_model module ---------------------------------------------- - -.. automodule:: openbb_terminal.economy.econdb_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.economy.econdb\_view module --------------------------------------------- - -.. automodule:: openbb_terminal.economy.econdb_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.economy.economy\_controller module ---------------------------------------------------- - -.. automodule:: openbb_terminal.economy.economy_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.economy.economy\_helpers module ------------------------------------------------- - -.. automodule:: openbb_terminal.economy.economy_helpers - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.economy.finnhub\_model module ----------------------------------------------- - -.. automodule:: openbb_terminal.economy.finnhub_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.economy.finnhub\_view module ---------------------------------------------- - -.. automodule:: openbb_terminal.economy.finnhub_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.economy.finviz\_model module ---------------------------------------------- - -.. automodule:: openbb_terminal.economy.finviz_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.economy.finviz\_view module --------------------------------------------- - -.. automodule:: openbb_terminal.economy.finviz_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.economy.fred\_model module -------------------------------------------- - -.. automodule:: openbb_terminal.economy.fred_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.economy.fred\_view module ------------------------------------------- - -.. automodule:: openbb_terminal.economy.fred_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.economy.investingcom\_model module ---------------------------------------------------- - -.. automodule:: openbb_terminal.economy.investingcom_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.economy.investingcom\_view module --------------------------------------------------- - -.. automodule:: openbb_terminal.economy.investingcom_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.economy.nasdaq\_model module ---------------------------------------------- - -.. automodule:: openbb_terminal.economy.nasdaq_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.economy.nasdaq\_view module --------------------------------------------- - -.. automodule:: openbb_terminal.economy.nasdaq_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.economy.plot\_view module ------------------------------------------- - -.. automodule:: openbb_terminal.economy.plot_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.economy.wsj\_model module ------------------------------------------- - -.. automodule:: openbb_terminal.economy.wsj_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.economy.wsj\_view module ------------------------------------------ - -.. automodule:: openbb_terminal.economy.wsj_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.economy.yfinance\_model module ------------------------------------------------ - -.. automodule:: openbb_terminal.economy.yfinance_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.economy.yfinance\_view module ----------------------------------------------- - -.. automodule:: openbb_terminal.economy.yfinance_view - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.economy - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.etf.rst b/docs/code/openbb_terminal.etf.rst deleted file mode 100644 index bf67b8e6137..00000000000 --- a/docs/code/openbb_terminal.etf.rst +++ /dev/null @@ -1,69 +0,0 @@ -openbb\_terminal.etf package -============================ - -Submodules ----------- - -openbb\_terminal.etf.etf\_controller module -------------------------------------------- - -.. automodule:: openbb_terminal.etf.etf_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.etf.financedatabase\_model module --------------------------------------------------- - -.. automodule:: openbb_terminal.etf.financedatabase_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.etf.financedatabase\_view module -------------------------------------------------- - -.. automodule:: openbb_terminal.etf.financedatabase_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.etf.stockanalysis\_model module ------------------------------------------------- - -.. automodule:: openbb_terminal.etf.stockanalysis_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.etf.stockanalysis\_view module ------------------------------------------------ - -.. automodule:: openbb_terminal.etf.stockanalysis_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.etf.yfinance\_model module -------------------------------------------- - -.. automodule:: openbb_terminal.etf.yfinance_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.etf.yfinance\_view module ------------------------------------------- - -.. automodule:: openbb_terminal.etf.yfinance_view - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.etf - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.forecast.rst b/docs/code/openbb_terminal.forecast.rst deleted file mode 100644 index 7911e3f5d81..00000000000 --- a/docs/code/openbb_terminal.forecast.rst +++ /dev/null @@ -1,221 +0,0 @@ -openbb\_terminal.forecast package -================================= - -Submodules ----------- - -openbb\_terminal.forecast.brnn\_model module --------------------------------------------- - -.. automodule:: openbb_terminal.forecast.brnn_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.forecast.brnn\_view module -------------------------------------------- - -.. automodule:: openbb_terminal.forecast.brnn_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.forecast.expo\_model module --------------------------------------------- - -.. automodule:: openbb_terminal.forecast.expo_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.forecast.expo\_view module -------------------------------------------- - -.. automodule:: openbb_terminal.forecast.expo_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.forecast.forecast\_controller module ------------------------------------------------------ - -.. automodule:: openbb_terminal.forecast.forecast_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.forecast.forecast\_model module ------------------------------------------------- - -.. automodule:: openbb_terminal.forecast.forecast_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.forecast.forecast\_view module ------------------------------------------------ - -.. automodule:: openbb_terminal.forecast.forecast_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.forecast.helpers module ----------------------------------------- - -.. automodule:: openbb_terminal.forecast.helpers - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.forecast.linregr\_model module ------------------------------------------------ - -.. automodule:: openbb_terminal.forecast.linregr_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.forecast.linregr\_view module ----------------------------------------------- - -.. automodule:: openbb_terminal.forecast.linregr_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.forecast.nbeats\_model module ----------------------------------------------- - -.. automodule:: openbb_terminal.forecast.nbeats_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.forecast.nbeats\_view module ---------------------------------------------- - -.. automodule:: openbb_terminal.forecast.nbeats_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.forecast.nhits\_model module ---------------------------------------------- - -.. automodule:: openbb_terminal.forecast.nhits_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.forecast.nhits\_view module --------------------------------------------- - -.. automodule:: openbb_terminal.forecast.nhits_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.forecast.regr\_model module --------------------------------------------- - -.. automodule:: openbb_terminal.forecast.regr_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.forecast.regr\_view module -------------------------------------------- - -.. automodule:: openbb_terminal.forecast.regr_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.forecast.rnn\_model module -------------------------------------------- - -.. automodule:: openbb_terminal.forecast.rnn_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.forecast.rnn\_view module ------------------------------------------- - -.. automodule:: openbb_terminal.forecast.rnn_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.forecast.tcn\_model module -------------------------------------------- - -.. automodule:: openbb_terminal.forecast.tcn_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.forecast.tcn\_view module ------------------------------------------- - -.. automodule:: openbb_terminal.forecast.tcn_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.forecast.tft\_model module -------------------------------------------- - -.. automodule:: openbb_terminal.forecast.tft_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.forecast.tft\_view module ------------------------------------------- - -.. automodule:: openbb_terminal.forecast.tft_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.forecast.theta\_model module ---------------------------------------------- - -.. automodule:: openbb_terminal.forecast.theta_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.forecast.theta\_view module --------------------------------------------- - -.. automodule:: openbb_terminal.forecast.theta_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.forecast.trans\_model module ---------------------------------------------- - -.. automodule:: openbb_terminal.forecast.trans_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.forecast.trans\_view module --------------------------------------------- - -.. automodule:: openbb_terminal.forecast.trans_view - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.forecast - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.forex.quantitative_analysis.rst b/docs/code/openbb_terminal.forex.quantitative_analysis.rst deleted file mode 100644 index c69cf3de0bb..00000000000 --- a/docs/code/openbb_terminal.forex.quantitative_analysis.rst +++ /dev/null @@ -1,21 +0,0 @@ -openbb\_terminal.forex.quantitative\_analysis package -===================================================== - -Submodules ----------- - -openbb\_terminal.forex.quantitative\_analysis.qa\_controller module -------------------------------------------------------------------- - -.. automodule:: openbb_terminal.forex.quantitative_analysis.qa_controller - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.forex.quantitative_analysis - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.forex.rst b/docs/code/openbb_terminal.forex.rst deleted file mode 100644 index 7b2b76cb6c3..00000000000 --- a/docs/code/openbb_terminal.forex.rst +++ /dev/null @@ -1,78 +0,0 @@ -openbb\_terminal.forex package -============================== - -Subpackages ------------ - -.. toctree:: - :maxdepth: 4 - - openbb_terminal.forex.quantitative_analysis - openbb_terminal.forex.technical_analysis - -Submodules ----------- - -openbb\_terminal.forex.av\_model module ---------------------------------------- - -.. automodule:: openbb_terminal.forex.av_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.forex.av\_view module --------------------------------------- - -.. automodule:: openbb_terminal.forex.av_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.forex.forex\_controller module ------------------------------------------------ - -.. automodule:: openbb_terminal.forex.forex_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.forex.forex\_helper module -------------------------------------------- - -.. automodule:: openbb_terminal.forex.forex_helper - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.forex.fxempire\_model module ---------------------------------------------- - -.. automodule:: openbb_terminal.forex.fxempire_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.forex.fxempire\_view module --------------------------------------------- - -.. automodule:: openbb_terminal.forex.fxempire_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.forex.polygon\_model module --------------------------------------------- - -.. automodule:: openbb_terminal.forex.polygon_model - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.forex - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.forex.technical_analysis.rst b/docs/code/openbb_terminal.forex.technical_analysis.rst deleted file mode 100644 index 09dda5ceb3c..00000000000 --- a/docs/code/openbb_terminal.forex.technical_analysis.rst +++ /dev/null @@ -1,21 +0,0 @@ -openbb\_terminal.forex.technical\_analysis package -================================================== - -Submodules ----------- - -openbb\_terminal.forex.technical\_analysis.ta\_controller module ----------------------------------------------------------------- - -.. automodule:: openbb_terminal.forex.technical_analysis.ta_controller - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.forex.technical_analysis - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.mutual_funds.rst b/docs/code/openbb_terminal.mutual_funds.rst deleted file mode 100644 index 1a1d2764e0a..00000000000 --- a/docs/code/openbb_terminal.mutual_funds.rst +++ /dev/null @@ -1,69 +0,0 @@ -openbb\_terminal.mutual\_funds package -====================================== - -Submodules ----------- - -openbb\_terminal.mutual\_funds.avanza\_model module ---------------------------------------------------- - -.. automodule:: openbb_terminal.mutual_funds.avanza_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.mutual\_funds.avanza\_view module --------------------------------------------------- - -.. automodule:: openbb_terminal.mutual_funds.avanza_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.mutual\_funds.investpy\_model module ------------------------------------------------------ - -.. automodule:: openbb_terminal.mutual_funds.investpy_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.mutual\_funds.investpy\_view module ----------------------------------------------------- - -.. automodule:: openbb_terminal.mutual_funds.investpy_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.mutual\_funds.mutual\_fund\_controller module --------------------------------------------------------------- - -.. automodule:: openbb_terminal.mutual_funds.mutual_fund_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.mutual\_funds.yfinance\_model module ------------------------------------------------------ - -.. automodule:: openbb_terminal.mutual_funds.yfinance_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.mutual\_funds.yfinance\_view module ----------------------------------------------------- - -.. automodule:: openbb_terminal.mutual_funds.yfinance_view - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.mutual_funds - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.portfolio.brokers.coinbase.rst b/docs/code/openbb_terminal.portfolio.brokers.coinbase.rst deleted file mode 100644 index b05f91bdd74..00000000000 --- a/docs/code/openbb_terminal.portfolio.brokers.coinbase.rst +++ /dev/null @@ -1,37 +0,0 @@ -openbb\_terminal.portfolio.brokers.coinbase package -=================================================== - -Submodules ----------- - -openbb\_terminal.portfolio.brokers.coinbase.coinbase\_controller module ------------------------------------------------------------------------ - -.. automodule:: openbb_terminal.portfolio.brokers.coinbase.coinbase_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.portfolio.brokers.coinbase.coinbase\_model module ------------------------------------------------------------------- - -.. automodule:: openbb_terminal.portfolio.brokers.coinbase.coinbase_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.portfolio.brokers.coinbase.coinbase\_view module ------------------------------------------------------------------ - -.. automodule:: openbb_terminal.portfolio.brokers.coinbase.coinbase_view - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.portfolio.brokers.coinbase - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.portfolio.brokers.degiro.rst b/docs/code/openbb_terminal.portfolio.brokers.degiro.rst deleted file mode 100644 index 2fe94a03d96..00000000000 --- a/docs/code/openbb_terminal.portfolio.brokers.degiro.rst +++ /dev/null @@ -1,37 +0,0 @@ -openbb\_terminal.portfolio.brokers.degiro package -================================================= - -Submodules ----------- - -openbb\_terminal.portfolio.brokers.degiro.degiro\_controller module -------------------------------------------------------------------- - -.. automodule:: openbb_terminal.portfolio.brokers.degiro.degiro_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.portfolio.brokers.degiro.degiro\_model module --------------------------------------------------------------- - -.. automodule:: openbb_terminal.portfolio.brokers.degiro.degiro_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.portfolio.brokers.degiro.degiro\_view module -------------------------------------------------------------- - -.. automodule:: openbb_terminal.portfolio.brokers.degiro.degiro_view - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.portfolio.brokers.degiro - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.portfolio.brokers.rst b/docs/code/openbb_terminal.portfolio.brokers.rst deleted file mode 100644 index b32df4acaa1..00000000000 --- a/docs/code/openbb_terminal.portfolio.brokers.rst +++ /dev/null @@ -1,38 +0,0 @@ -openbb\_terminal.portfolio.brokers package -========================================== - -Subpackages ------------ - -.. toctree:: - :maxdepth: 4 - - openbb_terminal.portfolio.brokers.coinbase - openbb_terminal.portfolio.brokers.degiro - -Submodules ----------- - -openbb\_terminal.portfolio.brokers.bro\_controller module ---------------------------------------------------------- - -.. automodule:: openbb_terminal.portfolio.brokers.bro_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.portfolio.brokers.brokers\_helpers module ----------------------------------------------------------- - -.. automodule:: openbb_terminal.portfolio.brokers.brokers_helpers - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.portfolio.brokers - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.portfolio.portfolio_analysis.rst b/docs/code/openbb_terminal.portfolio.portfolio_analysis.rst deleted file mode 100644 index 0d206d483f4..00000000000 --- a/docs/code/openbb_terminal.portfolio.portfolio_analysis.rst +++ /dev/null @@ -1,45 +0,0 @@ -openbb\_terminal.portfolio.portfolio\_analysis package -====================================================== - -Submodules ----------- - -openbb\_terminal.portfolio.portfolio\_analysis.pa\_controller module --------------------------------------------------------------------- - -.. automodule:: openbb_terminal.portfolio.portfolio_analysis.pa_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.portfolio.portfolio\_analysis.portfolio\_model module ----------------------------------------------------------------------- - -.. automodule:: openbb_terminal.portfolio.portfolio_analysis.portfolio_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.portfolio.portfolio\_analysis.portfolio\_view module ---------------------------------------------------------------------- - -.. automodule:: openbb_terminal.portfolio.portfolio_analysis.portfolio_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.portfolio.portfolio\_analysis.yfinance\_model module ---------------------------------------------------------------------- - -.. automodule:: openbb_terminal.portfolio.portfolio_analysis.yfinance_model - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.portfolio.portfolio_analysis - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.portfolio.portfolio_optimization.rst b/docs/code/openbb_terminal.portfolio.portfolio_optimization.rst deleted file mode 100644 index 47669778e49..00000000000 --- a/docs/code/openbb_terminal.portfolio.portfolio_optimization.rst +++ /dev/null @@ -1,61 +0,0 @@ -openbb\_terminal.portfolio.portfolio\_optimization package -========================================================== - -Submodules ----------- - -openbb\_terminal.portfolio.portfolio\_optimization.excel\_model module ----------------------------------------------------------------------- - -.. automodule:: openbb_terminal.portfolio.portfolio_optimization.excel_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.portfolio.portfolio\_optimization.optimizer\_helper module ---------------------------------------------------------------------------- - -.. automodule:: openbb_terminal.portfolio.portfolio_optimization.optimizer_helper - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.portfolio.portfolio\_optimization.optimizer\_model module --------------------------------------------------------------------------- - -.. automodule:: openbb_terminal.portfolio.portfolio_optimization.optimizer_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.portfolio.portfolio\_optimization.optimizer\_view module -------------------------------------------------------------------------- - -.. automodule:: openbb_terminal.portfolio.portfolio_optimization.optimizer_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.portfolio.portfolio\_optimization.po\_controller module ------------------------------------------------------------------------- - -.. automodule:: openbb_terminal.portfolio.portfolio_optimization.po_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.portfolio.portfolio\_optimization.yahoo\_finance\_model module -------------------------------------------------------------------------------- - -.. automodule:: openbb_terminal.portfolio.portfolio_optimization.yahoo_finance_model - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.portfolio.portfolio_optimization - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.portfolio.rst b/docs/code/openbb_terminal.portfolio.rst deleted file mode 100644 index 0d70aa3e2e9..00000000000 --- a/docs/code/openbb_terminal.portfolio.rst +++ /dev/null @@ -1,87 +0,0 @@ -openbb\_terminal.portfolio package -================================== - -Subpackages ------------ - -.. toctree:: - :maxdepth: 4 - - openbb_terminal.portfolio.brokers - openbb_terminal.portfolio.portfolio_analysis - openbb_terminal.portfolio.portfolio_optimization - -Submodules ----------- - -openbb\_terminal.portfolio.allocation\_model module ---------------------------------------------------- - -.. automodule:: openbb_terminal.portfolio.allocation_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.portfolio.portfolio\_controller module -------------------------------------------------------- - -.. automodule:: openbb_terminal.portfolio.portfolio_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.portfolio.portfolio\_helper module ---------------------------------------------------- - -.. automodule:: openbb_terminal.portfolio.portfolio_helper - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.portfolio.portfolio\_model module --------------------------------------------------- - -.. automodule:: openbb_terminal.portfolio.portfolio_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.portfolio.portfolio\_view module -------------------------------------------------- - -.. automodule:: openbb_terminal.portfolio.portfolio_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.portfolio.reportlab\_helpers module ----------------------------------------------------- - -.. automodule:: openbb_terminal.portfolio.reportlab_helpers - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.portfolio.statics module ------------------------------------------ - -.. automodule:: openbb_terminal.portfolio.statics - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.portfolio.yfinance\_model module -------------------------------------------------- - -.. automodule:: openbb_terminal.portfolio.yfinance_model - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.portfolio - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.reports.rst b/docs/code/openbb_terminal.reports.rst deleted file mode 100644 index cdac0fa9407..00000000000 --- a/docs/code/openbb_terminal.reports.rst +++ /dev/null @@ -1,29 +0,0 @@ -openbb\_terminal.reports package -================================ - -Submodules ----------- - -openbb\_terminal.reports.reports\_controller module ---------------------------------------------------- - -.. automodule:: openbb_terminal.reports.reports_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.reports.widget\_helpers module ------------------------------------------------ - -.. automodule:: openbb_terminal.reports.widget_helpers - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.reports - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.rst b/docs/code/openbb_terminal.rst deleted file mode 100644 index b8ab1c1efd6..00000000000 --- a/docs/code/openbb_terminal.rst +++ /dev/null @@ -1,210 +0,0 @@ -openbb\_terminal package -======================== - -Subpackages ------------ - -.. toctree:: - :maxdepth: 4 - - openbb_terminal.alternative - openbb_terminal.common - openbb_terminal.core - openbb_terminal.cryptocurrency - openbb_terminal.dashboards - openbb_terminal.econometrics - openbb_terminal.economy - openbb_terminal.etf - openbb_terminal.forecast - openbb_terminal.forex - openbb_terminal.mutual_funds - openbb_terminal.portfolio - openbb_terminal.reports - openbb_terminal.stocks - -Submodules ----------- - -openbb\_terminal.config\_plot module ------------------------------------- - -.. automodule:: openbb_terminal.config_plot - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.config\_terminal module ----------------------------------------- - -.. automodule:: openbb_terminal.config_terminal - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.custom\_prompt\_toolkit module ------------------------------------------------ - -.. automodule:: openbb_terminal.custom_prompt_toolkit - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.decorators module ----------------------------------- - -.. automodule:: openbb_terminal.decorators - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.featflags\_controller module ---------------------------------------------- - -.. automodule:: openbb_terminal.featflags_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.feature\_flags module --------------------------------------- - -.. automodule:: openbb_terminal.feature_flags - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.helper\_classes module ---------------------------------------- - -.. automodule:: openbb_terminal.helper_classes - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.helper\_funcs module -------------------------------------- - -.. automodule:: openbb_terminal.helper_funcs - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.helpers\_denomination module ---------------------------------------------- - -.. automodule:: openbb_terminal.helpers_denomination - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.keys\_controller module ----------------------------------------- - -.. automodule:: openbb_terminal.keys_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.keys\_model module ------------------------------------ - -.. automodule:: openbb_terminal.keys_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.keys\_view module ----------------------------------- - -.. automodule:: openbb_terminal.keys_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.loggers module -------------------------------- - -.. automodule:: openbb_terminal.loggers - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.menu module ----------------------------- - -.. automodule:: openbb_terminal.menu - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.parent\_classes module ---------------------------------------- - -.. automodule:: openbb_terminal.parent_classes - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.rich\_config module ------------------------------------- - -.. automodule:: openbb_terminal.rich_config - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.sdk module ---------------------------- - -.. automodule:: openbb_terminal.sdk - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.settings\_controller module --------------------------------------------- - -.. automodule:: openbb_terminal.settings_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.sources\_controller module -------------------------------------------- - -.. automodule:: openbb_terminal.sources_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.terminal\_controller module --------------------------------------------- - -.. automodule:: openbb_terminal.terminal_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.terminal\_helper module ----------------------------------------- - -.. automodule:: openbb_terminal.terminal_helper - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.thought\_of\_the\_day module ---------------------------------------------- - -.. automodule:: openbb_terminal.thought_of_the_day - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.stocks.backtesting.rst b/docs/code/openbb_terminal.stocks.backtesting.rst deleted file mode 100644 index e37b50d06ef..00000000000 --- a/docs/code/openbb_terminal.stocks.backtesting.rst +++ /dev/null @@ -1,37 +0,0 @@ -openbb\_terminal.stocks.backtesting package -=========================================== - -Submodules ----------- - -openbb\_terminal.stocks.backtesting.bt\_controller module ---------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.backtesting.bt_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.backtesting.bt\_model module ----------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.backtesting.bt_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.backtesting.bt\_view module ---------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.backtesting.bt_view - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.stocks.backtesting - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.stocks.behavioural_analysis.rst b/docs/code/openbb_terminal.stocks.behavioural_analysis.rst deleted file mode 100644 index ed1c2be250e..00000000000 --- a/docs/code/openbb_terminal.stocks.behavioural_analysis.rst +++ /dev/null @@ -1,53 +0,0 @@ -openbb\_terminal.stocks.behavioural\_analysis package -===================================================== - -Submodules ----------- - -openbb\_terminal.stocks.behavioural\_analysis.ba\_controller module -------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.behavioural_analysis.ba_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.behavioural\_analysis.cramer\_model module ------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.behavioural_analysis.cramer_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.behavioural\_analysis.cramer\_view module ------------------------------------------------------------------ - -.. automodule:: openbb_terminal.stocks.behavioural_analysis.cramer_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.behavioural\_analysis.finnhub\_model module -------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.behavioural_analysis.finnhub_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.behavioural\_analysis.finnhub\_view module ------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.behavioural_analysis.finnhub_view - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.stocks.behavioural_analysis - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.stocks.comparison_analysis.rst b/docs/code/openbb_terminal.stocks.comparison_analysis.rst deleted file mode 100644 index e99d703e7c5..00000000000 --- a/docs/code/openbb_terminal.stocks.comparison_analysis.rst +++ /dev/null @@ -1,101 +0,0 @@ -openbb\_terminal.stocks.comparison\_analysis package -==================================================== - -Submodules ----------- - -openbb\_terminal.stocks.comparison\_analysis.ca\_controller module ------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.comparison_analysis.ca_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.comparison\_analysis.finbrain\_model module -------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.comparison_analysis.finbrain_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.comparison\_analysis.finbrain\_view module ------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.comparison_analysis.finbrain_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.comparison\_analysis.finnhub\_model module ------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.comparison_analysis.finnhub_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.comparison\_analysis.finviz\_compare\_model module --------------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.comparison_analysis.finviz_compare_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.comparison\_analysis.finviz\_compare\_view module -------------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.comparison_analysis.finviz_compare_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.comparison\_analysis.marketwatch\_model module ----------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.comparison_analysis.marketwatch_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.comparison\_analysis.marketwatch\_view module ---------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.comparison_analysis.marketwatch_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.comparison\_analysis.polygon\_model module ------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.comparison_analysis.polygon_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.comparison\_analysis.yahoo\_finance\_model module -------------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.comparison_analysis.yahoo_finance_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.comparison\_analysis.yahoo\_finance\_view module ------------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.comparison_analysis.yahoo_finance_view - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.stocks.comparison_analysis - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.stocks.dark_pool_shorts.rst b/docs/code/openbb_terminal.stocks.dark_pool_shorts.rst deleted file mode 100644 index 0d74f4d97bc..00000000000 --- a/docs/code/openbb_terminal.stocks.dark_pool_shorts.rst +++ /dev/null @@ -1,149 +0,0 @@ -openbb\_terminal.stocks.dark\_pool\_shorts package -================================================== - -Submodules ----------- - -openbb\_terminal.stocks.dark\_pool\_shorts.dps\_controller module ------------------------------------------------------------------ - -.. automodule:: openbb_terminal.stocks.dark_pool_shorts.dps_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.dark\_pool\_shorts.finra\_model module --------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.dark_pool_shorts.finra_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.dark\_pool\_shorts.finra\_view module -------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.dark_pool_shorts.finra_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.dark\_pool\_shorts.ibkr\_model module -------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.dark_pool_shorts.ibkr_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.dark\_pool\_shorts.ibkr\_view module ------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.dark_pool_shorts.ibkr_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.dark\_pool\_shorts.nyse\_model module -------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.dark_pool_shorts.nyse_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.dark\_pool\_shorts.nyse\_view module ------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.dark_pool_shorts.nyse_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.dark\_pool\_shorts.quandl\_model module ---------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.dark_pool_shorts.quandl_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.dark\_pool\_shorts.quandl\_view module --------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.dark_pool_shorts.quandl_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.dark\_pool\_shorts.sec\_model module ------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.dark_pool_shorts.sec_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.dark\_pool\_shorts.sec\_view module ------------------------------------------------------------ - -.. automodule:: openbb_terminal.stocks.dark_pool_shorts.sec_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.dark\_pool\_shorts.shortinterest\_model module ----------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.dark_pool_shorts.shortinterest_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.dark\_pool\_shorts.shortinterest\_view module ---------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.dark_pool_shorts.shortinterest_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.dark\_pool\_shorts.stockgrid\_model module ------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.dark_pool_shorts.stockgrid_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.dark\_pool\_shorts.stockgrid\_view module ------------------------------------------------------------------ - -.. automodule:: openbb_terminal.stocks.dark_pool_shorts.stockgrid_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.dark\_pool\_shorts.yahoofinance\_model module ---------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.dark_pool_shorts.yahoofinance_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.dark\_pool\_shorts.yahoofinance\_view module --------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.dark_pool_shorts.yahoofinance_view - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.stocks.dark_pool_shorts - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.stocks.discovery.rst b/docs/code/openbb_terminal.stocks.discovery.rst deleted file mode 100644 index 558ec7fd2fe..00000000000 --- a/docs/code/openbb_terminal.stocks.discovery.rst +++ /dev/null @@ -1,165 +0,0 @@ -openbb\_terminal.stocks.discovery package -========================================= - -Submodules ----------- - -openbb\_terminal.stocks.discovery.ark\_model module ---------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.discovery.ark_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.discovery.ark\_view module --------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.discovery.ark_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.discovery.disc\_controller module ---------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.discovery.disc_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.discovery.disc\_helpers module ------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.discovery.disc_helpers - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.discovery.fidelity\_model module --------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.discovery.fidelity_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.discovery.fidelity\_view module -------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.discovery.fidelity_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.discovery.financedatabase\_view module --------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.discovery.financedatabase_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.discovery.finnhub\_model module -------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.discovery.finnhub_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.discovery.finnhub\_view module ------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.discovery.finnhub_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.discovery.finviz\_model module ------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.discovery.finviz_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.discovery.finviz\_view module ------------------------------------------------------ - -.. automodule:: openbb_terminal.stocks.discovery.finviz_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.discovery.nasdaq\_model module ------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.discovery.nasdaq_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.discovery.nasdaq\_view module ------------------------------------------------------ - -.. automodule:: openbb_terminal.stocks.discovery.nasdaq_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.discovery.seeking\_alpha\_model module --------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.discovery.seeking_alpha_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.discovery.seeking\_alpha\_view module -------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.discovery.seeking_alpha_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.discovery.shortinterest\_model module -------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.discovery.shortinterest_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.discovery.shortinterest\_view module ------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.discovery.shortinterest_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.discovery.yahoofinance\_model module ------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.discovery.yahoofinance_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.discovery.yahoofinance\_view module ------------------------------------------------------------ - -.. automodule:: openbb_terminal.stocks.discovery.yahoofinance_view - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.stocks.discovery - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.stocks.due_diligence.rst b/docs/code/openbb_terminal.stocks.due_diligence.rst deleted file mode 100644 index c0fac3ed6a6..00000000000 --- a/docs/code/openbb_terminal.stocks.due_diligence.rst +++ /dev/null @@ -1,133 +0,0 @@ -openbb\_terminal.stocks.due\_diligence package -============================================== - -Submodules ----------- - -openbb\_terminal.stocks.due\_diligence.ark\_model module --------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.due_diligence.ark_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.due\_diligence.ark\_view module -------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.due_diligence.ark_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.due\_diligence.business\_insider\_model module ----------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.due_diligence.business_insider_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.due\_diligence.business\_insider\_view module ---------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.due_diligence.business_insider_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.due\_diligence.csimarket\_model module --------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.due_diligence.csimarket_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.due\_diligence.csimarket\_view module -------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.due_diligence.csimarket_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.due\_diligence.dd\_controller module ------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.due_diligence.dd_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.due\_diligence.finnhub\_model module ------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.due_diligence.finnhub_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.due\_diligence.finnhub\_view module ------------------------------------------------------------ - -.. automodule:: openbb_terminal.stocks.due_diligence.finnhub_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.due\_diligence.finviz\_model module ------------------------------------------------------------ - -.. automodule:: openbb_terminal.stocks.due_diligence.finviz_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.due\_diligence.finviz\_view module ----------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.due_diligence.finviz_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.due\_diligence.fmp\_model module --------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.due_diligence.fmp_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.due\_diligence.fmp\_view module -------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.due_diligence.fmp_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.due\_diligence.marketwatch\_model module ----------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.due_diligence.marketwatch_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.due\_diligence.marketwatch\_view module ---------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.due_diligence.marketwatch_view - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.stocks.due_diligence - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.stocks.fundamental_analysis.rst b/docs/code/openbb_terminal.stocks.fundamental_analysis.rst deleted file mode 100644 index e2e6e19259d..00000000000 --- a/docs/code/openbb_terminal.stocks.fundamental_analysis.rst +++ /dev/null @@ -1,197 +0,0 @@ -openbb\_terminal.stocks.fundamental\_analysis package -===================================================== - -Submodules ----------- - -openbb\_terminal.stocks.fundamental\_analysis.av\_model module --------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.fundamental_analysis.av_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.fundamental\_analysis.av\_view module -------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.fundamental_analysis.av_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.fundamental\_analysis.business\_insider\_model module ------------------------------------------------------------------------------ - -.. automodule:: openbb_terminal.stocks.fundamental_analysis.business_insider_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.fundamental\_analysis.business\_insider\_view module ----------------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.fundamental_analysis.business_insider_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.fundamental\_analysis.dcf\_model module ---------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.fundamental_analysis.dcf_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.fundamental\_analysis.dcf\_static module ----------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.fundamental_analysis.dcf_static - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.fundamental\_analysis.dcf\_view module --------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.fundamental_analysis.dcf_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.fundamental\_analysis.eclect\_us\_model module ----------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.fundamental_analysis.eclect_us_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.fundamental\_analysis.eclect\_us\_view module ---------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.fundamental_analysis.eclect_us_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.fundamental\_analysis.eodhd\_model module ------------------------------------------------------------------ - -.. automodule:: openbb_terminal.stocks.fundamental_analysis.eodhd_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.fundamental\_analysis.eodhd\_view module ----------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.fundamental_analysis.eodhd_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.fundamental\_analysis.fa\_controller module -------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.fundamental_analysis.fa_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.fundamental\_analysis.fa\_helper module ---------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.fundamental_analysis.fa_helper - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.fundamental\_analysis.finviz\_model module ------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.fundamental_analysis.finviz_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.fundamental\_analysis.finviz\_view module ------------------------------------------------------------------ - -.. automodule:: openbb_terminal.stocks.fundamental_analysis.finviz_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.fundamental\_analysis.fmp\_model module ---------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.fundamental_analysis.fmp_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.fundamental\_analysis.fmp\_view module --------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.fundamental_analysis.fmp_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.fundamental\_analysis.market\_watch\_model module -------------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.fundamental_analysis.market_watch_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.fundamental\_analysis.market\_watch\_view module ------------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.fundamental_analysis.market_watch_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.fundamental\_analysis.polygon\_model module -------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.fundamental_analysis.polygon_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.fundamental\_analysis.polygon\_view module ------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.fundamental_analysis.polygon_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.fundamental\_analysis.yahoo\_finance\_model module --------------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.fundamental_analysis.yahoo_finance_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.fundamental\_analysis.yahoo\_finance\_view module -------------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.fundamental_analysis.yahoo_finance_view - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.stocks.fundamental_analysis - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.stocks.government.rst b/docs/code/openbb_terminal.stocks.government.rst deleted file mode 100644 index 9d3badb7e7f..00000000000 --- a/docs/code/openbb_terminal.stocks.government.rst +++ /dev/null @@ -1,37 +0,0 @@ -openbb\_terminal.stocks.government package -========================================== - -Submodules ----------- - -openbb\_terminal.stocks.government.gov\_controller module ---------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.government.gov_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.government.quiverquant\_model module ------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.government.quiverquant_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.government.quiverquant\_view module ------------------------------------------------------------ - -.. automodule:: openbb_terminal.stocks.government.quiverquant_view - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.stocks.government - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.stocks.insider.presets.rst b/docs/code/openbb_terminal.stocks.insider.presets.rst deleted file mode 100644 index a128e446579..00000000000 --- a/docs/code/openbb_terminal.stocks.insider.presets.rst +++ /dev/null @@ -1,10 +0,0 @@ -openbb\_terminal.stocks.insider.presets package -=============================================== - -Module contents ---------------- - -.. automodule:: openbb_terminal.stocks.insider.presets - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.stocks.insider.rst b/docs/code/openbb_terminal.stocks.insider.rst deleted file mode 100644 index a7013fffc07..00000000000 --- a/docs/code/openbb_terminal.stocks.insider.rst +++ /dev/null @@ -1,77 +0,0 @@ -openbb\_terminal.stocks.insider package -======================================= - -Subpackages ------------ - -.. toctree:: - :maxdepth: 4 - - openbb_terminal.stocks.insider.presets - -Submodules ----------- - -openbb\_terminal.stocks.insider.businessinsider\_model module -------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.insider.businessinsider_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.insider.businessinsider\_view module ------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.insider.businessinsider_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.insider.finviz\_model module ----------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.insider.finviz_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.insider.finviz\_view module ---------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.insider.finviz_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.insider.insider\_controller module ----------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.insider.insider_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.insider.openinsider\_model module ---------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.insider.openinsider_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.insider.openinsider\_view module --------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.insider.openinsider_view - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.stocks.insider - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.stocks.options.rst b/docs/code/openbb_terminal.stocks.options.rst deleted file mode 100644 index e9a44e55c9a..00000000000 --- a/docs/code/openbb_terminal.stocks.options.rst +++ /dev/null @@ -1,165 +0,0 @@ -openbb\_terminal.stocks.options package -======================================= - -Subpackages ------------ - -.. toctree:: - :maxdepth: 4 - - openbb_terminal.stocks.options.screen - -Submodules ----------- - -openbb\_terminal.stocks.options.alphaquery\_model module --------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.options.alphaquery_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.options.alphaquery\_view module -------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.options.alphaquery_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.options.barchart\_model module ------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.options.barchart_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.options.barchart\_view module ------------------------------------------------------ - -.. automodule:: openbb_terminal.stocks.options.barchart_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.options.calculator\_model module --------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.options.calculator_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.options.calculator\_view module -------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.options.calculator_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.options.chartexchange\_model module ------------------------------------------------------------ - -.. automodule:: openbb_terminal.stocks.options.chartexchange_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.options.chartexchange\_view module ----------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.options.chartexchange_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.options.fdscanner\_model module -------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.options.fdscanner_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.options.fdscanner\_view module ------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.options.fdscanner_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.options.nasdaq\_model module ----------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.options.nasdaq_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.options.nasdaq\_view module ---------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.options.nasdaq_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.options.op\_helpers module --------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.options.op_helpers - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.options.options\_controller module ----------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.options.options_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.options.tradier\_model module ------------------------------------------------------ - -.. automodule:: openbb_terminal.stocks.options.tradier_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.options.tradier\_view module ----------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.options.tradier_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.options.yfinance\_model module ------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.options.yfinance_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.options.yfinance\_view module ------------------------------------------------------ - -.. automodule:: openbb_terminal.stocks.options.yfinance_view - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.stocks.options - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.stocks.options.screen.rst b/docs/code/openbb_terminal.stocks.options.screen.rst deleted file mode 100644 index 4b81025174f..00000000000 --- a/docs/code/openbb_terminal.stocks.options.screen.rst +++ /dev/null @@ -1,37 +0,0 @@ -openbb\_terminal.stocks.options.screen package -============================================== - -Submodules ----------- - -openbb\_terminal.stocks.options.screen.screener\_controller module ------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.options.screen.screener_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.options.screen.syncretism\_model module ---------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.options.screen.syncretism_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.options.screen.syncretism\_view module --------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.options.screen.syncretism_view - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.stocks.options.screen - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.stocks.quantitative_analysis.rst b/docs/code/openbb_terminal.stocks.quantitative_analysis.rst deleted file mode 100644 index d596baffdca..00000000000 --- a/docs/code/openbb_terminal.stocks.quantitative_analysis.rst +++ /dev/null @@ -1,53 +0,0 @@ -openbb\_terminal.stocks.quantitative\_analysis package -====================================================== - -Submodules ----------- - -openbb\_terminal.stocks.quantitative\_analysis.beta\_model module ------------------------------------------------------------------ - -.. automodule:: openbb_terminal.stocks.quantitative_analysis.beta_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.quantitative\_analysis.beta\_view module ----------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.quantitative_analysis.beta_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.quantitative\_analysis.factors\_model module --------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.quantitative_analysis.factors_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.quantitative\_analysis.factors\_view module -------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.quantitative_analysis.factors_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.quantitative\_analysis.qa\_controller module --------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.quantitative_analysis.qa_controller - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.stocks.quantitative_analysis - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.stocks.research.rst b/docs/code/openbb_terminal.stocks.research.rst deleted file mode 100644 index 18e76526f5c..00000000000 --- a/docs/code/openbb_terminal.stocks.research.rst +++ /dev/null @@ -1,21 +0,0 @@ -openbb\_terminal.stocks.research package -======================================== - -Submodules ----------- - -openbb\_terminal.stocks.research.res\_controller module -------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.research.res_controller - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.stocks.research - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.stocks.rst b/docs/code/openbb_terminal.stocks.rst deleted file mode 100644 index c4f338b2e5d..00000000000 --- a/docs/code/openbb_terminal.stocks.rst +++ /dev/null @@ -1,84 +0,0 @@ -openbb\_terminal.stocks package -=============================== - -Subpackages ------------ - -.. toctree:: - :maxdepth: 4 - - openbb_terminal.stocks.backtesting - openbb_terminal.stocks.behavioural_analysis - openbb_terminal.stocks.comparison_analysis - openbb_terminal.stocks.dark_pool_shorts - openbb_terminal.stocks.discovery - openbb_terminal.stocks.due_diligence - openbb_terminal.stocks.fundamental_analysis - openbb_terminal.stocks.government - openbb_terminal.stocks.insider - openbb_terminal.stocks.options - openbb_terminal.stocks.quantitative_analysis - openbb_terminal.stocks.research - openbb_terminal.stocks.screener - openbb_terminal.stocks.sector_industry_analysis - openbb_terminal.stocks.technical_analysis - openbb_terminal.stocks.tradinghours - -Submodules ----------- - -openbb\_terminal.stocks.cboe\_model module ------------------------------------------- - -.. automodule:: openbb_terminal.stocks.cboe_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.cboe\_view module ------------------------------------------ - -.. automodule:: openbb_terminal.stocks.cboe_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.stock\_statics module ---------------------------------------------- - -.. automodule:: openbb_terminal.stocks.stock_statics - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.stocks\_controller module -------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.stocks_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.stocks\_helper module ---------------------------------------------- - -.. automodule:: openbb_terminal.stocks.stocks_helper - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.stocks\_models module ---------------------------------------------- - -.. automodule:: openbb_terminal.stocks.stocks_models - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.stocks - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.stocks.screener.rst b/docs/code/openbb_terminal.stocks.screener.rst deleted file mode 100644 index 40bcea18e79..00000000000 --- a/docs/code/openbb_terminal.stocks.screener.rst +++ /dev/null @@ -1,61 +0,0 @@ -openbb\_terminal.stocks.screener package -======================================== - -Submodules ----------- - -openbb\_terminal.stocks.screener.finviz\_model module ------------------------------------------------------ - -.. automodule:: openbb_terminal.stocks.screener.finviz_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.screener.finviz\_view module ----------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.screener.finviz_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.screener.screener\_controller module ------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.screener.screener_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.screener.screener\_view module ------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.screener.screener_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.screener.yahoofinance\_model module ------------------------------------------------------------ - -.. automodule:: openbb_terminal.stocks.screener.yahoofinance_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.screener.yahoofinance\_view module ----------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.screener.yahoofinance_view - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.stocks.screener - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.stocks.sector_industry_analysis.rst b/docs/code/openbb_terminal.stocks.sector_industry_analysis.rst deleted file mode 100644 index a7de3597b2c..00000000000 --- a/docs/code/openbb_terminal.stocks.sector_industry_analysis.rst +++ /dev/null @@ -1,53 +0,0 @@ -openbb\_terminal.stocks.sector\_industry\_analysis package -========================================================== - -Submodules ----------- - -openbb\_terminal.stocks.sector\_industry\_analysis.financedatabase\_model module --------------------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.sector_industry_analysis.financedatabase_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.sector\_industry\_analysis.financedatabase\_view module -------------------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.sector_industry_analysis.financedatabase_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.sector\_industry\_analysis.sia\_controller module -------------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.sector_industry_analysis.sia_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.sector\_industry\_analysis.stockanalysis\_model module ------------------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.sector_industry_analysis.stockanalysis_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.sector\_industry\_analysis.stockanalysis\_view module ------------------------------------------------------------------------------ - -.. automodule:: openbb_terminal.stocks.sector_industry_analysis.stockanalysis_view - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.stocks.sector_industry_analysis - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.stocks.technical_analysis.rst b/docs/code/openbb_terminal.stocks.technical_analysis.rst deleted file mode 100644 index 390fecc51c7..00000000000 --- a/docs/code/openbb_terminal.stocks.technical_analysis.rst +++ /dev/null @@ -1,85 +0,0 @@ -openbb\_terminal.stocks.technical\_analysis package -=================================================== - -Submodules ----------- - -openbb\_terminal.stocks.technical\_analysis.finbrain\_model module ------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.technical_analysis.finbrain_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.technical\_analysis.finbrain\_view module ------------------------------------------------------------------ - -.. automodule:: openbb_terminal.stocks.technical_analysis.finbrain_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.technical\_analysis.finviz\_model module ----------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.technical_analysis.finviz_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.technical\_analysis.finviz\_view module ---------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.technical_analysis.finviz_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.technical\_analysis.rsp\_model module -------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.technical_analysis.rsp_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.technical\_analysis.rsp\_view module ------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.technical_analysis.rsp_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.technical\_analysis.ta\_controller module ------------------------------------------------------------------ - -.. automodule:: openbb_terminal.stocks.technical_analysis.ta_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.technical\_analysis.tradingview\_model module ---------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.technical_analysis.tradingview_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.technical\_analysis.tradingview\_view module --------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.technical_analysis.tradingview_view - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.stocks.technical_analysis - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.stocks.tradinghours.data.rst b/docs/code/openbb_terminal.stocks.tradinghours.data.rst deleted file mode 100644 index 06768cc8a4e..00000000000 --- a/docs/code/openbb_terminal.stocks.tradinghours.data.rst +++ /dev/null @@ -1,10 +0,0 @@ -openbb\_terminal.stocks.tradinghours.data package -================================================= - -Module contents ---------------- - -.. automodule:: openbb_terminal.stocks.tradinghours.data - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/code/openbb_terminal.stocks.tradinghours.rst b/docs/code/openbb_terminal.stocks.tradinghours.rst deleted file mode 100644 index dbf7b5a2c7e..00000000000 --- a/docs/code/openbb_terminal.stocks.tradinghours.rst +++ /dev/null @@ -1,53 +0,0 @@ -openbb\_terminal.stocks.tradinghours package -============================================ - -Subpackages ------------ - -.. toctree:: - :maxdepth: 4 - - openbb_terminal.stocks.tradinghours.data - -Submodules ----------- - -openbb\_terminal.stocks.tradinghours.bursa\_model module --------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.tradinghours.bursa_model - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.tradinghours.bursa\_view module -------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.tradinghours.bursa_view - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.tradinghours.tradinghours\_controller module --------------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.tradinghours.tradinghours_controller - :members: - :undoc-members: - :show-inheritance: - -openbb\_terminal.stocks.tradinghours.tradinghours\_helper module ----------------------------------------------------------------- - -.. automodule:: openbb_terminal.stocks.tradinghours.tradinghours_helper - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: openbb_terminal.stocks.tradinghours - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/conf.py b/docs/conf.py deleted file mode 100644 index 7f5f39cf497..00000000000 --- a/docs/conf.py +++ /dev/null @@ -1,68 +0,0 @@ -""" -Configuration file for the Sphinx documentation builder. - -This file only contains a selection of the most common options. For a full -list see the documentation: -https://www.sphinx-doc.org/en/master/usage/configuration.html -""" - -# -- Path setup -------------------------------------------------------------- - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -# -import os -import sys - -sys.path.insert(0, os.path.abspath(".")) -sys.path.insert(0, os.path.join(os.path.abspath("."), "..")) - -beacon = os.environ.get("BEACON") - -if beacon is not None: - with open(os.path.join(".", "_templates", "layout.html")) as f: - content = f.read() - with open(os.path.join(".", "_templates", "layout.html"), "w") as f: - f.write(content.replace("{{BEACON}}", beacon)) - -# -- Project information ----------------------------------------------------- - -project = "OpenBB Terminal" -copyright = "2021, OpenBB Terminal Contributors" # pylint: disable=W0622 -author = "OpenBB Terminal Contributors" - - -# -- General configuration --------------------------------------------------- - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named "sphinx.ext.*") or your custom -# ones. -extensions = [ - "myst_parser", - "sphinx.ext.autodoc", - "sphinx.ext.napoleon", - "sphinx.ext.viewcode", - "sphinx_rtd_theme", -] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ["_templates"] - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -# This pattern also affects html_static_path and html_extra_path. -exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] - - -# -- Options for HTML output ------------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -# -html_theme = "sphinx_rtd_theme" - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ["_static"] diff --git a/docs/generate.py b/docs/generate.py deleted file mode 100644 index a066c219da2..00000000000 --- a/docs/generate.py +++ /dev/null @@ -1,211 +0,0 @@ -from typing import Callable, Any, Optional, List, Tuple, Dict -from inspect import signature -import importlib -import os -from ruamel.yaml import YAML - -from openbb_terminal.sdk import functions - -# NOTE: The main.yml and documentation _index.md files are automaticallty overridden -# every time this is ran. Folder level _index.md files are NOT overridden after creation - -yaml = YAML() -yaml.indent(mapping=2, sequence=4, offset=2) - - -def all_functions() -> List[Tuple[str, str, Callable[..., Any]]]: - """Uses the base SDK functions dictionary to get a list of all functions we have linked - in our SDK. - - Returns - ---------- - func_list: List[Tuple[str, str, Callable[..., Any]]] - A list of functions organized as (path_to_func, view/model, the_function) - """ - func_list = [] - for key, sub_dict in functions.items(): - for sub_key, item_path in sub_dict.items(): - full_path = item_path.split(".") - module_path = ".".join(full_path[:-1]) - module = importlib.import_module(module_path) - target_function = getattr(module, full_path[-1]) - func_list.append((key, sub_key, target_function)) - return func_list - - -def groupby(orig_list: List[Any], index: int) -> Dict[Any, Any]: - """Groups a list of iterable by the index provided - - Parameters - ---------- - orig_list: List[Any] - A list of iterables - index: int - The index to groupby - - Returns - ---------- - grouped: dict[Any, Any] - Group information where keys are the groupby item and values are the iterables - """ - grouped: Dict[Any, Any] = {} - for item in orig_list: - if item[index] in grouped: - grouped[item[index]].append(item) - else: - grouped[item[index]] = [item] - return grouped - - -def generate_documentation( - base: str, key: str, value: List[Tuple[str, str, Callable[..., Any]]] -): - models = list(filter(lambda x: x[1] == "model", value)) - views = list(filter(lambda x: x[1] == "view", value)) - model_type = Optional[Tuple[str, str, Callable[..., Any]]] - model: model_type = models[0] if models else None - view: model_type = views[0] if views else None - for end in key.split("."): - base += f"/{end}" - if not os.path.isdir(base): - os.mkdir(base) - with open(f"{base}/_index.md", "w") as f: - if view: - f.write( - "To obtain charts, make sure to add `chart=True` as the last parameter\n\n" - ) - if model: - f.write(f"## Get underlying data \n### {key}{signature(model[2])}\n\n") - m_docs = str(model[2].__doc__)[:-5] - f.write(f"{m_docs}\n") - if view: - if model: - f.write("\n") - v_docs = str(view[2].__doc__)[:-5] - temp = str(signature(view[2])) - # TODO: This breaks if there is a ')' inside the function arguments - idx = temp.find(")") - new_signature = temp[:idx] + ", chart=True" + temp[idx:] - f.write(f"## Getting charts \n### {key}{new_signature}\n\n") - f.write(f"{v_docs}\n") - - -def find_line(path: str, to_match: str) -> int: - """Returns the file line of a string based on given file path""" - with open(path) as file: - for i, line in enumerate(file): - if to_match in line: - return i - return -1 - - -def delete_lines(path: str, start: int): - """Deletes all file lines after a given number""" - - with open(path, "r+") as file: - lines = file.readlines() - file.seek(0) - file.truncate() - - for i, line in enumerate(lines): - if i <= start: - file.write(line) - - -def delete_line(path: str, to_delete: int): - """Deletes single file lines after a given number""" - - with open(path, "r+") as file: - lines = file.readlines() - file.seek(0) - file.truncate() - - for i, line in enumerate(lines): - if i != to_delete: - file.write(line) - - -def crawl_folders(root: str) -> list: - """Crawls created folders to get a list of what has been created""" - target = "website/content/" - ignore_length = root.index(target) + len(target) - return [ - [path[ignore_length:], sorted(dirs)] for path, dirs, _ in os.walk(root) if dirs - ] - - -def filter_dict(sub_dict, target: str): - return sub_dict["name"] == target - - -def set_items(the_dict, path: str, subs): - """Sets the sub items inside dictionaries""" - temp_loc = the_dict["sub"] - new_path = path[4:] - for sub_path in new_path.split("/"): - # pylint: disable=cell-var-from-loop - if "sub" in temp_loc: - temp_filter = filter(lambda x: filter_dict(x, sub_path), temp_loc["sub"]) - else: - temp_filter = filter(lambda x: filter_dict(x, sub_path), temp_loc) - temp_loc = list(temp_filter)[0] - temp_loc["sub"] = [] - for sub in subs: - temp_loc["sub"].append({"name": sub, "ref": f"/{path}/{sub}"}) - return the_dict - - -def generate_dict(paths: List): - """Generates the dictionary that will be saved as YAML""" - final_dict: Dict[str, Any] = {} - added_paths = [] - for path, subs in paths: - if not final_dict and path == "SDK": - final_dict = {"name": "SDK", "ref": "/SDK", "sub": []} - for sub in subs: - final_dict["sub"].append({"name": sub, "ref": f"/{path}/{sub}"}) - added_paths.append("SDK") - if path not in added_paths: - final_dict = set_items(final_dict, path, subs) - added_paths.append(path) - return final_dict - - -def folder_documentation(path: str): - name = path.split("/")[-1] - local_path = os.path.realpath(f"./website/content/{path}") - full_path = local_path + "/_index.md" - if not os.path.exists(full_path): - with open(full_path, "w") as f: - f.write(f"---\ntitle: {name}\n") - f.write('keywords: ""\nexcerpt: ""\n') - f.write("geekdocCollapseSection: true\n") - f.write("---\n") - - -if __name__ == "__main__": - print( - "Warning: files created in same session are not added to the yaml." - " To remedy this run this script twice in a row" - ) - base_folder_path = os.path.realpath("./website/content/SDK") - if not os.path.exists(base_folder_path): - os.mkdir(base_folder_path) - target_path = os.path.realpath("./website/data/menu/main.yml") - main_path = os.path.realpath("./website/content/SDK") - folder_list = crawl_folders(main_path) - for folder_path in [x[0] for x in folder_list]: - folder_documentation(folder_path) - funcs = all_functions() - grouped_funcs = groupby(funcs, 0) - # Create the documentation files - for k, v in grouped_funcs.items(): - generate_documentation(base_folder_path, k, v) - # Delete our old entry to main.yaml - start_line = find_line(target_path, "# CODE BELOW THIS WILL BE DELETED FREQUENTLY") - delete_lines(target_path, start_line) - # Add our new entry to main.yaml - folders_dict = generate_dict(folder_list) - with open(target_path, "a") as fp: - yaml.dump({"ignore": [folders_dict]}, fp) - delete_line(target_path, start_line + 1) diff --git a/docs/index.rst b/docs/index.rst deleted file mode 100644 index e6ef3e4735d..00000000000 --- a/docs/index.rst +++ /dev/null @@ -1,21 +0,0 @@ -.. OpenBB Terminal documentation master file, created by - sphinx-quickstart on Thu Apr 29 21:54:05 2021. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - -Welcome to OpenBB Terminal's documentation! -============================================== - -.. toctree:: - :maxdepth: 3 - :caption: Contents: - - code/openbb_terminal - - -Indices and tables -================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` diff --git a/docs/make.bat b/docs/make.bat deleted file mode 100644 index 922152e96a0..00000000000 --- a/docs/make.bat +++ /dev/null @@ -1,35 +0,0 @@ -@ECHO OFF - -pushd %~dp0 - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set SOURCEDIR=. -set BUILDDIR=_build - -if "%1" == "" goto help - -%SPHINXBUILD% >NUL 2>NUL -if errorlevel 9009 ( - echo. - echo.The 'sphinx-build' command was not found. Make sure you have Sphinx - echo.installed, then set the SPHINXBUILD environment variable to point - echo.to the full path of the 'sphinx-build' executable. Alternatively you - echo.may add the Sphinx directory to PATH. - echo. - echo.If you don't have Sphinx installed, grab it from - echo.http://sphinx-doc.org/ - exit /b 1 -) - -%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% -goto end - -:help -%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% - -:end -popd diff --git a/openbb_terminal/alternative/covid/covid_model.py b/openbb_terminal/alternative/covid/covid_model.py index 9ce3fd55bb3..23b9d70236d 100644 --- a/openbb_terminal/alternative/covid/covid_model.py +++ b/openbb_terminal/alternative/covid/covid_model.py @@ -153,11 +153,13 @@ def get_case_slopes( Threshold for total number of cases ascend: bool Flag to sort in ascending order + Returns ------- pd.DataFrame Dataframe containing slopes """ + # Ignore the pandas warning for setting a slace with a value warnings.filterwarnings("ignore") data = pd.read_csv(global_cases_time_series) diff --git a/openbb_terminal/alternative/oss/runa_model.py b/openbb_terminal/alternative/oss/runa_model.py index 94f9ddddc40..e5b9b2444f5 100644 --- a/openbb_terminal/alternative/oss/runa_model.py +++ b/openbb_terminal/alternative/oss/runa_model.py @@ -103,9 +103,6 @@ def _make_request(url: str) -> Union[BeautifulSoup, None]: def get_startups() -> pd.DataFrame: """Get startups from ROSS index [Source: https://runacap.com/] - Parameters - ---------- - Returns ------- pandas.DataFrame: diff --git a/openbb_terminal/common/technical_analysis/overlap_model.py b/openbb_terminal/common/technical_analysis/overlap_model.py index b436e4e79eb..a23926018b8 100644 --- a/openbb_terminal/common/technical_analysis/overlap_model.py +++ b/openbb_terminal/common/technical_analysis/overlap_model.py @@ -43,17 +43,17 @@ def ema(data: pd.Series, length: int = 50, offset: int = 0) -> pd.DataFrame: def sma(data: pd.Series, length: int = 50, offset: int = 0) -> pd.DataFrame: """Gets simple moving average (EMA) for stock - Parameters - ---------- - data: pd.Series - Dataframe of dates and prices - length: int - Length of SMA window - offset: int - Length of offset + Parameters + ---------- + data: pd.Series + Dataframe of dates and prices + length: int + Length of SMA window + offset: int + Length of offset - Returns - ---------- + Returns + ---------- pd.DataFrame Dataframe containing prices and SMA """ diff --git a/openbb_terminal/cryptocurrency/defi/coindix_model.py b/openbb_terminal/cryptocurrency/defi/coindix_model.py index ff84bdd77f0..ea1d9a85faa 100644 --- a/openbb_terminal/cryptocurrency/defi/coindix_model.py +++ b/openbb_terminal/cryptocurrency/defi/coindix_model.py @@ -118,16 +118,16 @@ def get_defi_vaults( ---------- chain: str Blockchain - one from list [ - 'ethereum', 'polygon', 'avalanche', 'bsc', 'terra', 'fantom', - 'moonriver', 'celo', 'heco', 'okex', 'cronos', 'arbitrum', 'eth', - 'harmony', 'fuse', 'defichain', 'solana', 'optimism' + 'ethereum', 'polygon', 'avalanche', 'bsc', 'terra', 'fantom', + 'moonriver', 'celo', 'heco', 'okex', 'cronos', 'arbitrum', 'eth', + 'harmony', 'fuse', 'defichain', 'solana', 'optimism' ] protocol: str DeFi protocol - one from list: [ - 'aave', 'acryptos', 'alpaca', 'anchor', 'autofarm', 'balancer', 'bancor', - 'beefy', 'belt', 'compound', 'convex', 'cream', 'curve', 'defichain', 'geist', - 'lido', 'liquity', 'mirror', 'pancakeswap', 'raydium', 'sushi', 'tarot', 'traderjoe', - 'tulip', 'ubeswap', 'uniswap', 'venus', 'yearn' + 'aave', 'acryptos', 'alpaca', 'anchor', 'autofarm', 'balancer', 'bancor', + 'beefy', 'belt', 'compound', 'convex', 'cream', 'curve', 'defichain', 'geist', + 'lido', 'liquity', 'mirror', 'pancakeswap', 'raydium', 'sushi', 'tarot', 'traderjoe', + 'tulip', 'ubeswap', 'uniswap', 'venus', 'yearn' ] kind: str Kind/type of vault - one from list: ['lp','single','noimploss','stable'] diff --git a/openbb_terminal/cryptocurrency/defi/coindix_view.py b/openbb_terminal/cryptocurrency/defi/coindix_view.py index 0373f94d469..744c1f97a2a 100644 --- a/openbb_terminal/cryptocurrency/defi/coindix_view.py +++ b/openbb_terminal/cryptocurrency/defi/coindix_view.py @@ -33,16 +33,16 @@ def display_defi_vaults( ---------- chain: str Blockchain - one from list [ - 'ethereum', 'polygon', 'avalanche', 'bsc', 'terra', 'fantom', - 'moonriver', 'celo', 'heco', 'okex', 'cronos', 'arbitrum', 'eth', - 'harmony', 'fuse', 'defichain', 'solana', 'optimism' + 'ethereum', 'polygon', 'avalanche', 'bsc', 'terra', 'fantom', + 'moonriver', 'celo', 'heco', 'okex', 'cronos', 'arbitrum', 'eth', + 'harmony', 'fuse', 'defichain', 'solana', 'optimism' ] protocol: str DeFi protocol - one from list: [ - 'aave', 'acryptos', 'alpaca', 'anchor', 'autofarm', 'balancer', 'bancor', - 'beefy', 'belt', 'compound', 'convex', 'cream', 'curve', 'defichain', 'geist', - 'lido', 'liquity', 'mirror', 'pancakeswap', 'raydium', 'sushi', 'tarot', 'traderjoe', - 'tulip', 'ubeswap', 'uniswap', 'venus', 'yearn' + 'aave', 'acryptos', 'alpaca', 'anchor', 'autofarm', 'balancer', 'bancor', + 'beefy', 'belt', 'compound', 'convex', 'cream', 'curve', 'defichain', 'geist', + 'lido', 'liquity', 'mirror', 'pancakeswap', 'raydium', 'sushi', 'tarot', 'traderjoe', + 'tulip', 'ubeswap', 'uniswap', 'venus', 'yearn' ] kind: str Kind/type of vault - one from list: ['lp','single','noimploss','stable'] diff --git a/openbb_terminal/cryptocurrency/defi/smartstake_view.py b/openbb_terminal/cryptocurrency/defi/smartstake_view.py index fb814531eb9..95f75945683 100644 --- a/openbb_terminal/cryptocurrency/defi/smartstake_view.py +++ b/openbb_terminal/cryptocurrency/defi/smartstake_view.py @@ -49,9 +49,6 @@ def display_luna_circ_supply_change( Default: 5 external_axes : Optional[List[plt.Axes]], optional External axes (1 axis is expected in the list), by default None - Returns - None - ------- """ df = smartstake_model.get_luna_supply_stats(supply_type, days) diff --git a/openbb_terminal/cryptocurrency/due_diligence/binance_model.py b/openbb_terminal/cryptocurrency/due_diligence/binance_model.py index 98e2884cf3c..b2177b0d077 100644 --- a/openbb_terminal/cryptocurrency/due_diligence/binance_model.py +++ b/openbb_terminal/cryptocurrency/due_diligence/binance_model.py @@ -28,23 +28,23 @@ def _get_trading_pairs() -> List[dict]: List[dict] list of dictionaries in format: [ - {'symbol': 'ETHBTC', 'status': 'TRADING', 'baseAsset': 'ETH', 'baseAssetPrecision': 8, - 'quoteAsset': 'BTC', 'quotePrecision': 8, 'quoteAssetPrecision': 8, - 'baseCommissionPrecision': 8, 'quoteCommissionPrecision': 8, - 'orderTypes': ['LIMIT', 'LIMIT_MAKER', 'MARKET', 'STOP_LOSS_LIMIT', 'TAKE_PROFIT_LIMIT'], - 'icebergAllowed': True, - 'ocoAllowed': True, - 'quoteOrderQtyMarketAllowed': True, - 'isSpotTradingAllowed': True, - 'isMarginTradingAllowed': True, - 'filters': [{'filterType': 'PRICE_FILTER', 'minPrice': '0.00000100', - 'maxPrice': '922327.00000000', 'tickSize': '0.00000100'}, - {'filterType': 'PERCENT_PRICE', 'multiplierUp': '5', 'multiplierDown': '0.2', 'avgPriceMins': 5}, - {'filterType': 'LOT_SIZE', 'minQty': '0.00100000', 'maxQty': '100000.00000000', 'stepSize': '0.00100000'}, - {'filterType': 'MIN_NOTIONAL', 'minNotional': '0.00010000', 'applyToMarket': True, 'avgPriceMins': 5}, - {'filterType': 'ICEBERG_PARTS', 'limit': 10}, {'filterType': 'MARKET_LOT_SIZE', 'minQty': '0.00000000', - 'maxQty': '930.49505347', 'stepSize': '0.00000000'}, {'filterType': 'MAX_NUM_ORDERS', 'maxNumOrders': 200}, - {'filterType': 'MAX_NUM_ALGO_ORDERS', 'maxNumAlgoOrders': 5}], 'permissions': ['SPOT', 'MARGIN']}, + {'symbol': 'ETHBTC', 'status': 'TRADING', 'baseAsset': 'ETH', 'baseAssetPrecision': 8, + 'quoteAsset': 'BTC', 'quotePrecision': 8, 'quoteAssetPrecision': 8, + 'baseCommissionPrecision': 8, 'quoteCommissionPrecision': 8, + 'orderTypes': ['LIMIT', 'LIMIT_MAKER', 'MARKET', 'STOP_LOSS_LIMIT', 'TAKE_PROFIT_LIMIT'], + 'icebergAllowed': True, + 'ocoAllowed': True, + 'quoteOrderQtyMarketAllowed': True, + 'isSpotTradingAllowed': True, + 'isMarginTradingAllowed': True, + 'filters': [{'filterType': 'PRICE_FILTER', 'minPrice': '0.00000100', + 'maxPrice': '922327.00000000', 'tickSize': '0.00000100'}, + {'filterType': 'PERCENT_PRICE', 'multiplierUp': '5', 'multiplierDown': '0.2', 'avgPriceMins': 5}, + {'filterType': 'LOT_SIZE', 'minQty': '0.00100000', 'maxQty': '100000.00000000', 'stepSize': '0.00100000'}, + {'filterType': 'MIN_NOTIONAL', 'minNotional': '0.00010000', 'applyToMarket': True, 'avgPriceMins': 5}, + {'filterType': 'ICEBERG_PARTS', 'limit': 10}, {'filterType': 'MARKET_LOT_SIZE', 'minQty': '0.00000000', + 'maxQty': '930.49505347', 'stepSize': '0.00000000'}, {'filterType': 'MAX_NUM_ORDERS', 'maxNumOrders': 200}, + {'filterType': 'MAX_NUM_ALGO_ORDERS', 'maxNumAlgoOrders': 5}], 'permissions': ['SPOT', 'MARGIN']}, ... ] """ diff --git a/openbb_terminal/cryptocurrency/due_diligence/pycoingecko_model.py b/openbb_terminal/cryptocurrency/due_diligence/pycoingecko_model.py index ae47021968e..f1c4b3c102d 100644 --- a/openbb_terminal/cryptocurrency/due_diligence/pycoingecko_model.py +++ b/openbb_terminal/cryptocurrency/due_diligence/pycoingecko_model.py @@ -231,6 +231,7 @@ def get_coin_market_chart( days: int number of days to display the data kwargs + unspecified keyword arguments Returns ------- diff --git a/openbb_terminal/cryptocurrency/overview/pycoingecko_model.py b/openbb_terminal/cryptocurrency/overview/pycoingecko_model.py index 43612cbbdbc..26ef08e71e4 100644 --- a/openbb_terminal/cryptocurrency/overview/pycoingecko_model.py +++ b/openbb_terminal/cryptocurrency/overview/pycoingecko_model.py @@ -260,7 +260,7 @@ def get_exchanges(sortby: str = "Rank", ascend: bool = True) -> pd.DataFrame: def get_financial_platforms(sortby: str = "Name", ascend: bool = True) -> pd.DataFrame: """Get list of financial platforms from CoinGecko API [Source: CoinGecko] - Parameter + Parameters ---------- sortby: str Key by which to sort data diff --git a/openbb_terminal/etf/discovery/wsj_model.py b/openbb_terminal/etf/discovery/wsj_model.py index 00ccc6674c0..fe2c30622c3 100644 --- a/openbb_terminal/etf/discovery/wsj_model.py +++ b/openbb_terminal/etf/discovery/wsj_model.py @@ -18,7 +18,7 @@ def etf_movers(sort_type: str = "gainers", export: bool = False) -> pd.DataFrame Parameters ---------- sort_type: str - Data to get. Can be "gainers", "decliners" or "active" + Data to get. Can be "gainers", "decliners" or "active" Returns ------- diff --git a/openbb_terminal/etf/discovery/wsj_view.py b/openbb_terminal/etf/discovery/wsj_view.py index 3734a784381..1e00b815c81 100644 --- a/openbb_terminal/etf/discovery/wsj_view.py +++ b/openbb_terminal/etf/discovery/wsj_view.py @@ -15,15 +15,16 @@ logger = logging.getLogger(__name__) @log_start_end(log=logger) def show_top_mover(sort_type: str = "gainers", limit: int = 10, export=""): """ - Show top ETF movers from wsj.com - Parameters - ---------- - sort_type: str - What to show. Either Gainers, Decliners or Activity + Show top ETF movers from wsj.com + + Parameters + ---------- + sort_type: str + What to show. Either Gainers, Decliners or Activity limit: int - Number of etfs to show - export: str - Format to export data + Number of etfs to show + export: str + Format to export data """ data = wsj_model.etf_movers(sort_type) if data.empty: diff --git a/openbb_terminal/forecast/autoets_model.py b/openbb_terminal/forecast/autoets_model.py index 2e36abf93cb..54a8341b37f 100644 --- a/openbb_terminal/forecast/autoets_model.py +++ b/openbb_terminal/forecast/autoets_model.py @@ -3,10 +3,9 @@ __docformat__ = "numpy" import logging -from typing import Any, Union, Optional, List, Tuple +from typing import Any, Union, Tuple import warnings -import numpy as np import pandas as pd from statsforecast.models import ETS from statsforecast.core import StatsForecast @@ -31,7 +30,7 @@ def get_autoets_data( n_predict: int = 5, start_window: float = 0.85, forecast_horizon: int = 5, -) -> Tuple[list[np.ndarray], List[np.ndarray], List[np.ndarray], Optional[float], Any]: +) -> Tuple[Any, Any, Any, Any, Any]: """Performs Automatic ETS forecasting This is a wrapper around StatsForecast ETS; diff --git a/openbb_terminal/forecast/brnn_model.py b/openbb_terminal/forecast/brnn_model.py index e732b74bd00..7e10ae59a71 100644 --- a/openbb_terminal/forecast/brnn_model.py +++ b/openbb_terminal/forecast/brnn_model.py @@ -40,54 +40,56 @@ def get_brnn_data( ) -> Tuple[List[TimeSeries], List[TimeSeries], List[TimeSeries], Optional[float], Any]: """Performs Block RNN forecasting - Args: - data (Union[pd.Series, pd.DataFrame]): - Input Data - target_column (str, optional): - Target column to forecast. Defaults to "close". - n_predict (int, optional): - Days to predict. Defaults to 5. - train_split (float, optional): - Train/val split. Defaults to 0.85. - past_covariates (str, optional): - Multiple secondary columns to factor in when forecasting. Defaults to None. - forecast_horizon (int, optional): - Forecast horizon when performing historical forecasting. Defaults to 5. - input_chunk_length (int, optional): - Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. - output_chunk_length (int, optional): - The length of the forecast of the model. Defaults to 5. - model_type (str, optional): - Either a string specifying the RNN module type ("RNN", "LSTM" or "GRU"). Defaults to "LSTM". - n_rnn_layers (int, optional): - Number of layers in the RNN module. Defaults to 1. - dropout (float, optional): - Fraction of neurons afected by Dropout. Defaults to 0.0. - batch_size (int, optional): - Number of time series (input and output sequences) used in each training pass. Defaults to 32. - n_epochs (int, optional): - Number of epochs over which to train the model. Defaults to 100. - learning_rate (float, optional): - Defaults to 1e-3. - model_save_name (str, optional): - Name for model. Defaults to "brnn_model". - force_reset (bool, optional): - If set to True, any previously-existing model with the same name will be reset (all checkpoints will be - discarded). Defaults to True. - save_checkpoints (bool, optional): - Whether or not to automatically save the untrained model and checkpoints from training. Defaults to True. + Parameters + ---------- + data: Union[pd.Series, pd.DataFrame] + Input Data + target_column: str + Target column to forecast. Defaults to "close". + n_predict: int + Days to predict. Defaults to 5. + train_split: float + Train/val split. Defaults to 0.85. + past_covariates: str + Multiple secondary columns to factor in when forecasting. Defaults to None. + forecast_horizon: int + Forecast horizon when performing historical forecasting. Defaults to 5. + input_chunk_length: int + Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. + output_chunk_length: int + The length of the forecast of the model. Defaults to 5. + model_type: str + Either a string specifying the RNN module type ("RNN", "LSTM" or "GRU"). Defaults to "LSTM". + n_rnn_layers: int + Number of layers in the RNN module. Defaults to 1. + dropout: float + Fraction of neurons affected by Dropout. Defaults to 0.0. + batch_size: int + Number of time series (input and output sequences) used in each training pass. Defaults to 32. + n_epochs: int + Number of epochs over which to train the model. Defaults to 100. + learning_rate: float + Defaults to 1e-3. + model_save_name: str + Name for model. Defaults to "brnn_model". + force_reset: bool + If set to True, any previously-existing model with the same name will be reset (all checkpoints will be + discarded). Defaults to True. + save_checkpoints: bool + Whether or not to automatically save the untrained model and checkpoints from training. Defaults to True. - Returns: - list[TimeSeries] - Adjusted Data series - list[TimeSeries] - Historical forecast by best RNN model - list[TimeSeries] - list of Predictions - Optional[float] - Mean average precision error - Any - Best BRNN Model + Returns + ------- + list[TimeSeries] + Adjusted Data series + list[TimeSeries] + Historical forecast by best RNN model + list[TimeSeries] + list of Predictions + Optional[float] + Mean average precision error + Any + Best BRNN Model """ # TODO Check if torch GPU AVAILABLE diff --git a/openbb_terminal/forecast/brnn_view.py b/openbb_terminal/forecast/brnn_view.py index 40e2ecefb6b..e80e013e4db 100644 --- a/openbb_terminal/forecast/brnn_view.py +++ b/openbb_terminal/forecast/brnn_view.py @@ -49,59 +49,59 @@ def display_brnn_forecast( Parameters ---------- - data (Union[pd.Series, pd.DataFrame]): - Input Data - target_column (str, optional): - Target column to forecast. Defaults to "close". - dataset_name str - The name of the ticker to be predicted - n_predict (int, optional): - Days to predict. Defaults to 5. - train_split (float, optional): - Train/val split. Defaults to 0.85. - past_covariates (str, optional): - Multiple secondary columns to factor in when forecasting. Defaults to None. - forecast_horizon (int, optional): - Forecast horizon when performing historical forecasting. Defaults to 5. - input_chunk_length (int, optional): - Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. - output_chunk_length (int, optional): - The length of the forecast of the model. Defaults to 5. - model_type (str, optional): - Either a string specifying the RNN module type ("RNN", "LSTM" or "GRU"). Defaults to "LSTM". - n_rnn_layers (int, optional): - Number of layers in the RNN module. Defaults to 1. - dropout (float, optional): - Fraction of neurons afected by Dropout. Defaults to 0.0. - batch_size (int, optional): - Number of time series (input and output sequences) used in each training pass. Defaults to 32. - n_epochs (int, optional): - Number of epochs over which to train the model. Defaults to 101. - learning_rate (float, optional): - Defaults to 1e-3. - model_save_name (str, optional): - Name for model. Defaults to "brnn_model". - force_reset (bool, optional): - If set to True, any previously-existing model with the same name will be reset - (all checkpoints will be discarded). Defaults to True. - save_checkpoints (bool, optional): - Whether or not to automatically save the untrained model and checkpoints from training. - Defaults to True. - export: str - Format to export data - residuals: bool - Whether to show residuals for the model. Defaults to False. - forecast_only: bool - Whether to only show dates in the forecasting range. Defaults to False. - start_date: Optional[datetime] - The starting date to perform analysis, data before this is trimmed. Defaults to None. - end_date: Optional[datetime] - The ending date to perform analysis, data after this is trimmed. Defaults to None. - naive: bool - Whether to show the naive baseline. This just assumes the closing price will be the same - as the previous day's closing price. Defaults to False. - external_axes:Optional[List[plt.axes]] - External axes to plot on + data: Union[pd.Series, pd.DataFrame] + Input Data + target_column: str + Target column to forecast. Defaults to "close". + dataset_name: str + The name of the ticker to be predicted + n_predict: int + Days to predict. Defaults to 5. + train_split: float + Train/val split. Defaults to 0.85. + past_covariates: str + Multiple secondary columns to factor in when forecasting. Defaults to None. + forecast_horizon: int + Forecast horizon when performing historical forecasting. Defaults to 5. + input_chunk_length: int + Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. + output_chunk_length: int + The length of the forecast of the model. Defaults to 5. + model_type: str + Either a string specifying the RNN module type ("RNN", "LSTM" or "GRU"). Defaults to "LSTM". + n_rnn_layers: int + Number of layers in the RNN module. Defaults to 1. + dropout: float + Fraction of neurons affected by Dropout. Defaults to 0.0. + batch_size: int + Number of time series (input and output sequences) used in each training pass. Defaults to 32. + n_epochs: int + Number of epochs over which to train the model. Defaults to 101. + learning_rate: float + Defaults to 1e-3. + model_save_name: str + Name for model. Defaults to "brnn_model". + force_reset: bool + If set to True, any previously-existing model with the same name will be reset + (all checkpoints will be discarded). Defaults to True. + save_checkpoints: bool + Whether or not to automatically save the untrained model and checkpoints from training. + Defaults to True. + export: str + Format to export data + residuals: bool + Whether to show residuals for the model. Defaults to False. + forecast_only: bool + Whether to only show dates in the forecasting range. Defaults to False. + start_date: Optional[datetime] + The starting date to perform analysis, data before this is trimmed. Defaults to None. + end_date: Optional[datetime] + The ending date to perform analysis, data after this is trimmed. Defaults to None. + naive: bool + Whether to show the naive baseline. This just assumes the closing price will be the same + as the previous day's closing price. Defaults to False. + external_axes: Optional[List[plt.axes]] + External axes to plot on """ data = helpers.clean_data( data, start_date, end_date, target_column, past_covariates diff --git a/openbb_terminal/forecast/forecast_model.py b/openbb_terminal/forecast/forecast_model.py index c5bd5edd433..257c3b8155d 100644 --- a/openbb_terminal/forecast/forecast_model.py +++ b/openbb_terminal/forecast/forecast_model.py @@ -463,7 +463,7 @@ def rename_column(data: pd.DataFrame, old_column: str, new_column: str) -> pd.Da The name to update to Returns - ---------- + ------- new_df: pd.DataFrame The dataframe with the renamed column """ @@ -486,7 +486,7 @@ def describe_df(data: pd.DataFrame) -> pd.DataFrame: The df to produce statistics for Returns - ---------- + ------- df: pd.DataFrame The df with the new data """ @@ -503,7 +503,7 @@ def corr_df(data: pd.DataFrame) -> pd.DataFrame: The df to produce statistics for Returns - ---------- + ------- df: pd.DataFrame The df with the new data """ diff --git a/openbb_terminal/forecast/linregr_model.py b/openbb_terminal/forecast/linregr_model.py index ae5053d768f..8a5081bdf9a 100644 --- a/openbb_terminal/forecast/linregr_model.py +++ b/openbb_terminal/forecast/linregr_model.py @@ -32,37 +32,39 @@ def get_linear_regression_data( ) -> Tuple[List[TimeSeries], List[TimeSeries], List[TimeSeries], float, Any]: """Perform Linear Regression Forecasting - Args: - data (Union[pd.Series, pd.DataFrame]): - Input Data - target_column (str, optional): - Target column to forecast. Defaults to "close". - n_predict (int, optional): - Days to predict. Defaults to 5. - train_split (float, optional): - Train/val split. Defaults to 0.85. - past_covariates (str, optional): - Multiple secondary columns to factor in when forecasting. Defaults to None. - forecast_horizon (int, optional): - Forecast horizon when performing historical forecasting. Defaults to 5. - output_chunk_length (int, optional): - The length of the forecast of the model. Defaults to 1. - lags (int, list) - lagged target values to predict the next time step - random_state (int, optional): - The state for the model + Parameters + ---------- + data: Union[pd.Series, pd.DataFrame] + Input Data + target_column: str + Target column to forecast. Defaults to "close". + n_predict: int + Days to predict. Defaults to 5. + train_split: float + Train/val split. Defaults to 0.85. + past_covariates: str + Multiple secondary columns to factor in when forecasting. Defaults to None. + forecast_horizon: int + Forecast horizon when performing historical forecasting. Defaults to 5. + output_chunk_length: int + The length of the forecast of the model. Defaults to 1. + lags: Union[int, List[int]] + lagged target values to predict the next time step + random_state: Optional[int] + The state for the model - Returns: - List[TimeSeries] - Adjusted Data series - List[TimeSeries] - Historical forecast by best RNN model - List[TimeSeries] - list of Predictions - float - Mean average precision error - Any - Best Linear Regression Model + Returns + ------- + List[TimeSeries] + Adjusted Data series + List[TimeSeries] + Historical forecast by best RNN model + List[TimeSeries] + list of Predictions + float + Mean average precision error + Any + Best Linear Regression Model """ use_scalers = False probabilistic = True diff --git a/openbb_terminal/forecast/linregr_view.py b/openbb_terminal/forecast/linregr_view.py index 8ce32e4707e..0d86881ea0f 100644 --- a/openbb_terminal/forecast/linregr_view.py +++ b/openbb_terminal/forecast/linregr_view.py @@ -39,40 +39,41 @@ def display_linear_regression( ): """Display Linear Regression Forecasting - Args: - data (Union[pd.Series, pd.DataFrame]): - Input Data - dataset_name str - The name of the ticker to be predicted - n_predict (int, optional): - Days to predict. Defaults to 5. - target_col (str, optional): - Target column to forecast. Defaults to "close". - train_split (float, optional): - Train/val split. Defaults to 0.85. - past_covariates (str, optional): - Multiple secondary columns to factor in when forecasting. Defaults to None. - forecast_horizon (int, optional): - Forecast horizon when performing historical forecasting. Defaults to 5. - output_chunk_length (int, optional): - The length of the forecast of the model. Defaults to 1. - lags (int, list) - lagged target values to predict the next time step - export: str - Format to export data - residuals: bool - Whether to show residuals for the model. Defaults to False. - forecast_only: bool - Whether to only show dates in the forecasting range. Defaults to False. - start_date: Optional[datetime] - The starting date to perform analysis, data before this is trimmed. Defaults to None. - end_date: Optional[datetime] - The ending date to perform analysis, data after this is trimmed. Defaults to None. - naive: bool - Whether to show the naive baseline. This just assumes the closing price will be the - same as the previous day's closing price. Defaults to False. - external_axes:Optional[List[plt.axes]] - External axes to plot on + Parameters + ---------- + data: Union[pd.Series, pd.DataFrame] + Input Data + dataset_name: str + The name of the ticker to be predicted + n_predict: int + Days to predict. Defaults to 5. + target_col: str + Target column to forecast. Defaults to "close". + train_split (float, optional): + Train/val split. Defaults to 0.85. + past_covariates: str + Multiple secondary columns to factor in when forecasting. Defaults to None. + forecast_horizon: int + Forecast horizon when performing historical forecasting. Defaults to 5. + output_chunk_length: int + The length of the forecast of the model. Defaults to 1. + lags: Union[int, List[int]] + lagged target values to predict the next time step + export: str + Format to export data + residuals: bool + Whether to show residuals for the model. Defaults to False. + forecast_only: bool + Whether to only show dates in the forecasting range. Defaults to False. + start_date: Optional[datetime] + The starting date to perform analysis, data before this is trimmed. Defaults to None. + end_date: Optional[datetime] + The ending date to perform analysis, data after this is trimmed. Defaults to None. + naive: bool + Whether to show the naive baseline. This just assumes the closing price will be the + same as the previous day's closing price. Defaults to False. + external_axes: Optional[List[plt.axes]] + External axes to plot on """ data = helpers.clean_data( data, start_date, end_date, target_column, past_covariates diff --git a/openbb_terminal/forecast/nbeats_model.py b/openbb_terminal/forecast/nbeats_model.py index 8cede203f53..ee5f7795f31 100644 --- a/openbb_terminal/forecast/nbeats_model.py +++ b/openbb_terminal/forecast/nbeats_model.py @@ -40,59 +40,61 @@ def get_NBEATS_data( ) -> Tuple[List[TimeSeries], List[TimeSeries], List[TimeSeries], Optional[float], Any]: """Perform NBEATS Forecasting - Args: - data (Union[pd.Series, pd.DataFrame]): - Input Data - target_column (str, optional): - Target column to forecast. Defaults to "close". - n_predict (int, optional): - Days to predict. Defaults to 5. - train_split (float, optional): - Train/val split. Defaults to 0.85. - past_covariates (str, optional): - Multiple secondary columns to factor in when forecasting. Defaults to None. - forecast_horizon (int, optional): - Forecast horizon when performing historical forecasting. Defaults to 5. - input_chunk_length (int, optional): - Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. - output_chunk_length (int, optional): - The length of the forecast of the model. Defaults to 5. - num_stacks (int, optional): - The number of stacks that make up the whole model. Defaults to 10. - num_blocks (int, optional): - The number of blocks making up every stack. Defaults to 3. - num_layers (int, optional): - The number of fully connected layers preceding the final forking layers in each block - of every stack. Defaults to 4. - layer_widths (int, optional): - Determines the number of neurons that make up each fully connected layer in each block - of every stack. Defaults to 512. - batch_size (int, optional): - Number of time series (input and output sequences) used in each training pass. Defaults to 32. - n_epochs (int, optional): - Number of epochs over which to train the model. Defaults to 100. - learning_rate (float, optional): - Defaults to 1e-3. - model_save_name (str, optional): - Name for model. Defaults to "brnn_model". - force_reset (bool, optional): - If set to True, any previously-existing model with the same name will be reset - (all checkpoints will be discarded). Defaults to True. - save_checkpoints (bool, optional): - Whether or not to automatically save the untrained model and checkpoints from training. - Defaults to True. + Parameters + ---------- + data: Union[pd.Series, pd.DataFrame] + Input Data + target_column: str + Target column to forecast. Defaults to "close". + n_predict: int + Days to predict. Defaults to 5. + train_split: float + Train/val split. Defaults to 0.85. + past_covariates: str + Multiple secondary columns to factor in when forecasting. Defaults to None. + forecast_horizon: int + Forecast horizon when performing historical forecasting. Defaults to 5. + input_chunk_length: int + Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. + output_chunk_length: int + The length of the forecast of the model. Defaults to 5. + num_stacks: int + The number of stacks that make up the whole model. Defaults to 10. + num_blocks: int + The number of blocks making up every stack. Defaults to 3. + num_layers: int + The number of fully connected layers preceding the final forking layers in each block + of every stack. Defaults to 4. + layer_widths: int + Determines the number of neurons that make up each fully connected layer in each block + of every stack. Defaults to 512. + batch_size: int + Number of time series (input and output sequences) used in each training pass. Defaults to 32. + n_epochs: int + Number of epochs over which to train the model. Defaults to 100. + learning_rate: float + Defaults to 1e-3. + model_save_name: str + Name for model. Defaults to "brnn_model". + force_reset: bool + If set to True, any previously-existing model with the same name will be reset + (all checkpoints will be discarded). Defaults to True. + save_checkpoints: bool + Whether or not to automatically save the untrained model and checkpoints from training. + Defaults to True. - Returns: - List[TimeSeries] - Adjusted Data series - List[TimeSeries] - Historical forecast by best RNN model - List[TimeSeries] - list of Predictions - Optional[float] - Mean average precision error - Any - Best NBEATS Model + Returns + ------- + List[TimeSeries] + Adjusted Data series + List[TimeSeries] + Historical forecast by best RNN model + List[TimeSeries] + list of Predictions + Optional[float] + Mean average precision error + Any + Best NBEATS Model """ use_scalers = True diff --git a/openbb_terminal/forecast/nbeats_view.py b/openbb_terminal/forecast/nbeats_view.py index 40795d72311..4bd0d47d83d 100644 --- a/openbb_terminal/forecast/nbeats_view.py +++ b/openbb_terminal/forecast/nbeats_view.py @@ -50,64 +50,64 @@ def display_nbeats_forecast( Parameters ---------- - data (Union[pd.Series, pd.DataFrame]): - Input Data - target_column (str, optional): - Target column to forecast. Defaults to "close". - dataset_name str - The name of the ticker to be predicted - n_predict (int, optional): - Days to predict. Defaults to 5. - train_split (float, optional): - Train/val split. Defaults to 0.85. - past_covariates (str, optional): - Multiple secondary columns to factor in when forecasting. Defaults to None. - forecast_horizon (int, optional): - Forecast horizon when performing historical forecasting. Defaults to 5. - input_chunk_length (int, optional): - Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. - output_chunk_length (int, optional): - The length of the forecast of the model. Defaults to 5. - num_stacks (int, optional): - The number of stacks that make up the whole model. Defaults to 10. - num_blocks (int, optional): - The number of blocks making up every stack. Defaults to 3. - num_layers (int, optional): - The number of fully connected layers preceding the final forking layers in each block - of every stack. Defaults to 4. - layer_widths (int, optional): - Determines the number of neurons that make up each fully connected layer in each block - of every stack. Defaults to 512. - batch_size (int, optional): - Number of time series (input and output sequences) used in each training pass. Defaults - to 32. - n_epochs (int, optional): - Number of epochs over which to train the model. Defaults to 100. - learning_rate (float, optional): - Defaults to 1e-3. - model_save_name (str, optional): - Name for model. Defaults to "brnn_model". - force_reset (bool, optional): - If set to True, any previously-existing model with the same name will be reset (all - checkpoints will be discarded). Defaults to True. - save_checkpoints (bool, optional): - Whether or not to automatically save the untrained model and checkpoints from training. - Defaults to True. - export: str - Format to export data - residuals: bool - Whether to show residuals for the model. Defaults to False. - forecast_only: bool - Whether to only show dates in the forecasting range. Defaults to False. - start_date: Optional[datetime] - The starting date to perform analysis, data before this is trimmed. Defaults to None. - end_date: Optional[datetime] - The ending date to perform analysis, data after this is trimmed. Defaults to None. - naive: bool - Whether to show the naive baseline. This just assumes the closing price will be the same - as the previous day's closing price. Defaults to False. - external_axes:Optional[List[plt.axes]] - External axes to plot on + data: Union[pd.Series, pd.DataFrame] + Input Data + target_column: str + Target column to forecast. Defaults to "close". + dataset_name: str + The name of the ticker to be predicted + n_predict: int + Days to predict. Defaults to 5. + train_split: float + Train/val split. Defaults to 0.85. + past_covariates: str + Multiple secondary columns to factor in when forecasting. Defaults to None. + forecast_horizon: int + Forecast horizon when performing historical forecasting. Defaults to 5. + input_chunk_length: int + Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. + output_chunk_length: int + The length of the forecast of the model. Defaults to 5. + num_stacks: int + The number of stacks that make up the whole model. Defaults to 10. + num_blocks: int + The number of blocks making up every stack. Defaults to 3. + num_layers: int + The number of fully connected layers preceding the final forking layers in each block + of every stack. Defaults to 4. + layer_widths: int + Determines the number of neurons that make up each fully connected layer in each block + of every stack. Defaults to 512. + batch_size: int + Number of time series (input and output sequences) used in each training pass. Defaults + to 32. + n_epochs: int + Number of epochs over which to train the model. Defaults to 100. + learning_rate: float + Defaults to 1e-3. + model_save_name: str + Name for model. Defaults to "brnn_model". + force_reset: bool + If set to True, any previously-existing model with the same name will be reset (all + checkpoints will be discarded). Defaults to True. + save_checkpoints: bool + Whether or not to automatically save the untrained model and checkpoints from training. + Defaults to True. + export: str + Format to export data + residuals: bool + Whether to show residuals for the model. Defaults to False. + forecast_only: bool + Whether to only show dates in the forecasting range. Defaults to False. + start_date: Optional[datetime] + The starting date to perform analysis, data before this is trimmed. Defaults to None. + end_date: Optional[datetime] + The ending date to perform analysis, data after this is trimmed. Defaults to None. + naive: bool + Whether to show the naive baseline. This just assumes the closing price will be the same + as the previous day's closing price. Defaults to False. + external_axes: Optional[List[plt.axes]] + External axes to plot on """ data = helpers.clean_data( diff --git a/openbb_terminal/forecast/nhits_model.py b/openbb_terminal/forecast/nhits_model.py index 2a841f1bd72..1ae0c38689a 100644 --- a/openbb_terminal/forecast/nhits_model.py +++ b/openbb_terminal/forecast/nhits_model.py @@ -46,74 +46,76 @@ def get_nhits_data( ) -> Tuple[List[TimeSeries], List[TimeSeries], List[TimeSeries], Optional[float], Any]: """Performs Nhits forecasting - Args: - data (Union[pd.Series, pd.DataFrame]): - Input Data - target_column (str, optional): - Target column to forecast. Defaults to "close". - n_predict (int, optional): - Days to predict. Defaults to 5. - train_split (float, optional): - Train/val split. Defaults to 0.85. - past_covariates (str, optional): - Multiple secondary columns to factor in when forecasting. Defaults to None. - forecast_horizon (int, optional): - Forecast horizon when performing historical forecasting. Defaults to 5. - input_chunk_length (int, optional): - Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. - output_chunk_length (int, optional): - The length of the forecast of the model. Defaults to 5. - num_stacks int: - The number of stacks that make up the whole model. - num_blocks int: - The number of blocks making up every stack. - num_layers int: - The number of fully connected layers preceding the final forking layers in each block - of every stack. - layer_widths int: - Determines the number of neurons that make up each fully connected layer in each - block of every stack. If a list is passed, it must have a length equal to num_stacks - and every entry in that list corresponds to the layer width of the corresponding stack. - If an integer is passed, every stack will have blocks with FC layers of the same width. - pooling_kernel_size Optional[Tuple[Tuple[int]]]: - If set, this parameter must be a tuple of tuples, of size (num_stacks x num_blocks), - specifying the kernel size for each block in each stack used for the input pooling - layer. If left to None, some default values will be used based on input_chunk_length. - n_freq_downsample: Optional[Tuple[Tuple[int]]]: - If set, this parameter must be a tuple of tuples, of size (num_stacks x num_blocks), - specifying the downsampling factors before interpolation, for each block in each stack. - If left to None, some default values will be used based on output_chunk_length. - dropout float: - The dropout probability to be used in fully connected layers. - activation str: - Supported activations: [‘ReLU’,’RReLU’, ‘PReLU’, ‘Softplus’, ‘Tanh’, ‘SELU’, ‘LeakyReLU’, ‘Sigmoid’] - max_pool_1d bool: - Use max_pool_1d pooling. False uses AvgPool1d. - batch_size (int, optional): - Number of time series (input and output sequences) used in each training pass. Defaults to 32. - n_epochs (int, optional): - Number of epochs over which to train the model. Defaults to 100. - learning_rate (float, optional): - Defaults to 1e-3. - model_save_name (str, optional): - Name for model. Defaults to "brnn_model". - force_reset (bool, optional): - If set to True, any previously-existing model with the same name will be reset (all checkpoints will be - discarded). Defaults to True. - save_checkpoints (bool, optional): - Whether or not to automatically save the untrained model and checkpoints from training. Defaults to True. + Parameters + ---------- + data: Union[pd.Series, pd.DataFrame] + Input Data + target_column: str + Target column to forecast. Defaults to "close". + n_predict: int + Days to predict. Defaults to 5. + train_split: float + Train/val split. Defaults to 0.85. + past_covariates: str + Multiple secondary columns to factor in when forecasting. Defaults to None. + forecast_horizon: int + Forecast horizon when performing historical forecasting. Defaults to 5. + input_chunk_length: int + Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. + output_chunk_length: int + The length of the forecast of the model. Defaults to 5. + num_stacks: int + The number of stacks that make up the whole model. + num_blocks: int + The number of blocks making up every stack. + num_layers: int + The number of fully connected layers preceding the final forking layers in each block + of every stack. + layer_widths: int + Determines the number of neurons that make up each fully connected layer in each + block of every stack. If a list is passed, it must have a length equal to num_stacks + and every entry in that list corresponds to the layer width of the corresponding stack. + If an integer is passed, every stack will have blocks with FC layers of the same width. + pooling_kernel_size: Optional[Tuple[Tuple[int]]]: + If set, this parameter must be a tuple of tuples, of size (num_stacks x num_blocks), + specifying the kernel size for each block in each stack used for the input pooling + layer. If left to None, some default values will be used based on input_chunk_length. + n_freq_downsample: Optional[Tuple[Tuple[int]]] + If set, this parameter must be a tuple of tuples, of size (num_stacks x num_blocks), + specifying the downsampling factors before interpolation, for each block in each stack. + If left to None, some default values will be used based on output_chunk_length. + dropout: float + The dropout probability to be used in fully connected layers. + activation: str + Supported activations: [‘ReLU’,’RReLU’, ‘PReLU’, ‘Softplus’, ‘Tanh’, ‘SELU’, ‘LeakyReLU’, ‘Sigmoid’] + max_pool_1d: bool + Use max_pool_1d pooling. False uses AvgPool1d. + batch_size: int + Number of time series (input and output sequences) used in each training pass. Defaults to 32. + n_epochs: int + Number of epochs over which to train the model. Defaults to 100. + learning_rate: float + Defaults to 1e-3. + model_save_name: str + Name for model. Defaults to "brnn_model". + force_reset: bool + If set to True, any previously-existing model with the same name will be reset (all checkpoints will be + discarded). Defaults to True. + save_checkpoints: bool + Whether or not to automatically save the untrained model and checkpoints from training. Defaults to True. - Returns: - list[TimeSeries] - Adjusted Data series - list[TimeSeries] - Historical forecast by best RNN model - list[TimeSeries] - list of Predictions - Optional[float] - Mean average precision error - Any - Best BRNN Model + Returns + ------- + list[TimeSeries] + Adjusted Data series + list[TimeSeries] + Historical forecast by best RNN model + list[TimeSeries] + list of Predictions + Optional[float] + Mean average precision error + Any + Best BRNN Model """ # TODO Check if torch GPU AVAILABLE diff --git a/openbb_terminal/forecast/nhits_view.py b/openbb_terminal/forecast/nhits_view.py index 530ef251854..d0c82250e6f 100644 --- a/openbb_terminal/forecast/nhits_view.py +++ b/openbb_terminal/forecast/nhits_view.py @@ -55,79 +55,79 @@ def display_nhits_forecast( Parameters ---------- - data (Union[pd.Series, pd.DataFrame]): - Input Data - target_column (str, optional): - Target column to forecast. Defaults to "close". - dataset_name str - The name of the ticker to be predicted - n_predict (int, optional): - Days to predict. Defaults to 5. - train_split (float, optional): - Train/val split. Defaults to 0.85. - past_covariates (str, optional): - Multiple secondary columns to factor in when forecasting. Defaults to None. - forecast_horizon (int, optional): - Forecast horizon when performing historical forecasting. Defaults to 5. - input_chunk_length (int, optional): - Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. - output_chunk_length (int, optional): - The length of the forecast of the model. Defaults to 5. - num_stacks int: - The number of stacks that make up the whole model. - num_blocks int: - The number of blocks making up every stack. - num_layers int: - The number of fully connected layers preceding the final forking layers in each block - of every stack. - layer_widths int: - Determines the number of neurons that make up each fully connected layer in each - block of every stack. If a list is passed, it must have a length equal to num_stacks - and every entry in that list corresponds to the layer width of the corresponding stack. - If an integer is passed, every stack will have blocks with FC layers of the same width. - pooling_kernel_size Optional[Tuple[Tuple[int]]]: - If set, this parameter must be a tuple of tuples, of size (num_stacks x num_blocks), - specifying the kernel size for each block in each stack used for the input pooling - layer. If left to None, some default values will be used based on input_chunk_length. - n_freq_downsample: Optional[Tuple[Tuple[int]]]: - If set, this parameter must be a tuple of tuples, of size (num_stacks x num_blocks), - specifying the downsampling factors before interpolation, for each block in each stack. - If left to None, some default values will be used based on output_chunk_length. - dropout float: - The dropout probability to be used in fully connected layers. - activation str: - Supported activations: [[‘ReLU’,’RReLU’, ‘PReLU’, ‘Softplus’, ‘Tanh’, ‘SELU’, ‘LeakyReLU’, ‘Sigmoid’] - max_pool_1d bool: - Use max_pool_1d pooling. False uses AvgPool1d. - batch_size (int, optional): - Number of time series (input and output sequences) used in each training pass. Defaults to 32. - n_epochs (int, optional): - Number of epochs over which to train the model. Defaults to 100. - learning_rate (float, optional): - Defaults to 1e-3. - model_save_name (str, optional): - Name for model. Defaults to "brnn_model". - force_reset (bool, optional): - If set to True, any previously-existing model with the same name will be reset - (all checkpoints will be discarded). Defaults to True. - save_checkpoints (bool, optional): - Whether or not to automatically save the untrained model and checkpoints from training. - Defaults to True. - export: str - Format to export data - residuals: bool - Whether to show residuals for the model. Defaults to False. - forecast_only: bool - Whether to only show dates in the forecasting range. Defaults to False. - start_date: Optional[datetime] - The starting date to perform analysis, data before this is trimmed. Defaults to None. - end_date: Optional[datetime] - The ending date to perform analysis, data after this is trimmed. Defaults to None. - naive: bool - Whether to show the naive baseline. This just assumes the closing price will be the same - as the previous day's closing price. Defaults to False. - external_axes:Optional[List[plt.axes]] - External axes to plot on + data: Union[pd.Series, pd.DataFrame] + Input Data + target_column: str + Target column to forecast. Defaults to "close". + dataset_name: str + The name of the ticker to be predicted + n_predict: int + Days to predict. Defaults to 5. + train_split: float + Train/val split. Defaults to 0.85. + past_covariates: str + Multiple secondary columns to factor in when forecasting. Defaults to None. + forecast_horizon: int + Forecast horizon when performing historical forecasting. Defaults to 5. + input_chunk_length: int + Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. + output_chunk_length: int + The length of the forecast of the model. Defaults to 5. + num_stacks: int + The number of stacks that make up the whole model. + num_blocks: int + The number of blocks making up every stack. + num_layers: int + The number of fully connected layers preceding the final forking layers in each block + of every stack. + layer_widths: int + Determines the number of neurons that make up each fully connected layer in each + block of every stack. If a list is passed, it must have a length equal to num_stacks + and every entry in that list corresponds to the layer width of the corresponding stack. + If an integer is passed, every stack will have blocks with FC layers of the same width. + pooling_kernel_size: Optional[Tuple[Tuple[int]]] + If set, this parameter must be a tuple of tuples, of size (num_stacks x num_blocks), + specifying the kernel size for each block in each stack used for the input pooling + layer. If left to None, some default values will be used based on input_chunk_length. + n_freq_downsample: Optional[Tuple[Tuple[int]]] + If set, this parameter must be a tuple of tuples, of size (num_stacks x num_blocks), + specifying the downsampling factors before interpolation, for each block in each stack. + If left to None, some default values will be used based on output_chunk_length. + dropout: float + The dropout probability to be used in fully connected layers. + activation: str + Supported activations: [[‘ReLU’,’RReLU’, ‘PReLU’, ‘Softplus’, ‘Tanh’, ‘SELU’, ‘LeakyReLU’, ‘Sigmoid’] + max_pool_1d: bool + Use max_pool_1d pooling. False uses AvgPool1d. + batch_size: int + Number of time series (input and output sequences) used in each training pass. Defaults to 32. + n_epochs: int + Number of epochs over which to train the model. Defaults to 100. + learning_rate: float + Defaults to 1e-3. + model_save_name: str + Name for model. Defaults to "brnn_model". + force_reset: bool + If set to True, any previously-existing model with the same name will be reset + (all checkpoints will be discarded). Defaults to True. + save_checkpoints: bool + Whether or not to automatically save the untrained model and checkpoints from training. + Defaults to True. + export: str + Format to export data + residuals: bool + Whether to show residuals for the model. Defaults to False. + forecast_only: bool + Whether to only show dates in the forecasting range. Defaults to False. + start_date: Optional[datetime] + The starting date to perform analysis, data before this is trimmed. Defaults to None. + end_date: Optional[datetime] + The ending date to perform analysis, data after this is trimmed. Defaults to None. + naive: bool + Whether to show the naive baseline. This just assumes the closing price will be the same + as the previous day's closing price. Defaults to False. + external_axes: Optional[List[plt.axes]] + External axes to plot on """ data = helpers.clean_data( data, start_date, end_date, target_column, past_covariates diff --git a/openbb_terminal/forecast/regr_model.py b/openbb_terminal/forecast/regr_model.py index 9a431b5ca7f..2738e138481 100644 --- a/openbb_terminal/forecast/regr_model.py +++ b/openbb_terminal/forecast/regr_model.py @@ -31,35 +31,37 @@ def get_regression_data( ) -> Tuple[List[TimeSeries], List[TimeSeries], List[TimeSeries], float, Any]: """Perform Regression Forecasting - Args: - data (Union[pd.Series, pd.DataFrame]): - Input Data - n_predict (int, optional): - Days to predict. Defaults to 5. - target_column (str, optional): - Target column to forecast. Defaults to "close". - train_split (float, optional): - Train/val split. Defaults to 0.85. - past_covariates (str, optional): - Multiple secondary columns to factor in when forecasting. Defaults to None. - forecast_horizon (int, optional): - Forecast horizon when performing historical forecasting. Defaults to 5. - output_chunk_length (int, optional): - The length of the forecast of the model. Defaults to 1. - lags (int, list) - lagged target values to predict the next time step + Parameters + ---------- + data: Union[pd.Series, pd.DataFrame] + Input Data + n_predict: int + Days to predict. Defaults to 5. + target_column: str + Target column to forecast. Defaults to "close". + train_split: float + Train/val split. Defaults to 0.85. + past_covariates: str + Multiple secondary columns to factor in when forecasting. Defaults to None. + forecast_horizon: int + Forecast horizon when performing historical forecasting. Defaults to 5. + output_chunk_length: int + The length of the forecast of the model. Defaults to 1. + lags: Union[int, List[int]] + lagged target values to predict the next time step - Returns: - List[TimeSeries] - Adjusted Data series - List[TimeSeries] - Historical forecast by best RNN model - List[TimeSeries] - list of Predictions - float - Mean average precision error - Any - Best Regression Model + Returns + ------- + List[TimeSeries] + Adjusted Data series + List[TimeSeries] + Historical forecast by best RNN model + List[TimeSeries] + list of Predictions + float + Mean average precision error + Any + Best Regression Model """ use_scalers = False diff --git a/openbb_terminal/forecast/regr_view.py b/openbb_terminal/forecast/regr_view.py index d0a13cc6999..dc02ba7ce5c 100644 --- a/openbb_terminal/forecast/regr_view.py +++ b/openbb_terminal/forecast/regr_view.py @@ -39,40 +39,41 @@ def display_regression( ): """Display Regression Forecasting - Args: - data (Union[pd.Series, pd.DataFrame]): - Input Data - target_column (str, optional): - Target column to forecast. Defaults to "close". - dataset_name str - The name of the ticker to be predicted - n_predict (int, optional): - Days to predict. Defaults to 5. - train_split (float, optional): - Train/val split. Defaults to 0.85. - past_covariates (str, optional): - Multiple secondary columns to factor in when forecasting. Defaults to None. - forecast_horizon (int, optional): - Forecast horizon when performing historical forecasting. Defaults to 5. - output_chunk_length (int, optional): - The length of the forecast of the model. Defaults to 1. - lags (int, list) - lagged target values to predict the next time step - export: str - Format to export data - residuals: bool - Whether to show residuals for the model. Defaults to False. - forecast_only: bool - Whether to only show dates in the forecasting range. Defaults to False. - start_date: Optional[datetime] - The starting date to perform analysis, data before this is trimmed. Defaults to None. - end_date: Optional[datetime] - The ending date to perform analysis, data after this is trimmed. Defaults to None. - naive: bool - Whether to show the naive baseline. This just assumes the closing price will be the same - as the previous day's closing price. Defaults to False. - external_axes:Optional[List[plt.axes]] - External axes to plot on + Parameters + ---------- + data: Union[pd.Series, pd.DataFrame] + Input Data + target_column: str + Target column to forecast. Defaults to "close". + dataset_name: str + The name of the ticker to be predicted + n_predict: int + Days to predict. Defaults to 5. + train_split: float + Train/val split. Defaults to 0.85. + past_covariates: str + Multiple secondary columns to factor in when forecasting. Defaults to None. + forecast_horizon: int + Forecast horizon when performing historical forecasting. Defaults to 5. + output_chunk_length: int + The length of the forecast of the model. Defaults to 1. + lags: Union[int, List[int]] + lagged target values to predict the next time step + export: str + Format to export data + residuals: bool + Whether to show residuals for the model. Defaults to False. + forecast_only: bool + Whether to only show dates in the forecasting range. Defaults to False. + start_date: Optional[datetime] + The starting date to perform analysis, data before this is trimmed. Defaults to None. + end_date: Optional[datetime] + The ending date to perform analysis, data after this is trimmed. Defaults to None. + naive: bool + Whether to show the naive baseline. This just assumes the closing price will be the same + as the previous day's closing price. Defaults to False. + external_axes: Optional[List[plt.axes]] + External axes to plot on """ data = helpers.clean_data( data, start_date, end_date, target_column, past_covariates diff --git a/openbb_terminal/forecast/rnn_model.py b/openbb_terminal/forecast/rnn_model.py index a78281ddf2c..33c9e23d640 100644 --- a/openbb_terminal/forecast/rnn_model.py +++ b/openbb_terminal/forecast/rnn_model.py @@ -38,49 +38,51 @@ def get_rnn_data( ) -> Tuple[List[TimeSeries], List[TimeSeries], List[TimeSeries], Optional[float], Any]: """Perform RNN forecasting - Args: - data (Union[pd.Series, pd.DataFrame]): - Input Data - n_predict (int, optional): - Days to predict. Defaults to 5. - target_column (str, optional): - Target column to forecast. Defaults to "close". - train_split (float, optional): - Train/val split. Defaults to 0.85. - forecast_horizon (int, optional): - Forecast horizon when performing historical forecasting. Defaults to 5. - model_type (str, optional): - Either a string specifying the RNN module type ("RNN", "LSTM" or "GRU"). Defaults to "LSTM". - hidden_dim (int, optional): - Size for feature maps for each hidden RNN layer.. Defaults to 20. - dropout (float, optional): - Fraction of neurons afected by Dropout. Defaults to 0.0. - batch_size (int, optional): - Number of time series (input and output sequences) used in each training pass. Defaults to 32. - n_epochs (int, optional): - Number of epochs over which to train the model. Defaults to 100. - learning_rate (float, optional): - Defaults to 1e-3. - model_save_name (str, optional): - Name for model. Defaults to "brnn_model". - force_reset (bool, optional): - If set to True, any previously-existing model with the same name will be reset - (all checkpoints will be discarded). Defaults to True. - save_checkpoints (bool, optional): - Whether or not to automatically save the untrained model and checkpoints from training. - Defaults to True. + Parameters + ---------- + data: Union[pd.Series, pd.DataFrame] + Input Data + n_predict: int + Days to predict. Defaults to 5. + target_column: str + Target column to forecast. Defaults to "close". + train_split: float + Train/val split. Defaults to 0.85. + forecast_horizon: int + Forecast horizon when performing historical forecasting. Defaults to 5. + model_type: str + Either a string specifying the RNN module type ("RNN", "LSTM" or "GRU"). Defaults to "LSTM". + hidden_dim: int + Size for feature maps for each hidden RNN layer.. Defaults to 20. + dropout: float + Fraction of neurons affected by Dropout. Defaults to 0.0. + batch_size: int + Number of time series (input and output sequences) used in each training pass. Defaults to 32. + n_epochs: int + Number of epochs over which to train the model. Defaults to 100. + learning_rate: float + Defaults to 1e-3. + model_save_name: str + Name for model. Defaults to "brnn_model". + force_reset: bool + If set to True, any previously-existing model with the same name will be reset + (all checkpoints will be discarded). Defaults to True. + save_checkpoints: bool + Whether or not to automatically save the untrained model and checkpoints from training. + Defaults to True. - Returns: - List[TimeSeries] - Adjusted Data series - List[TimeSeries] - Historical forecast by best RNN model - List[TimeSeries] - list of Predictions - float - Mean average precision error - Any - Best RNN Model + Returns + ------- + List[TimeSeries] + Adjusted Data series + List[TimeSeries] + Historical forecast by best RNN model + List[TimeSeries] + list of Predictions + float + Mean average precision error + Any + Best RNN Model """ # TODO Check if torch GPU AVAILABLE diff --git a/openbb_terminal/forecast/rnn_view.py b/openbb_terminal/forecast/rnn_view.py index 763a6f190aa..e96df2a1d48 100644 --- a/openbb_terminal/forecast/rnn_view.py +++ b/openbb_terminal/forecast/rnn_view.py @@ -48,52 +48,52 @@ def display_rnn_forecast( Parameters ---------- - data (Union[pd.Series, pd.DataFrame]): - Input Data - dataset_name str - The name of the ticker to be predicted - n_predict (int, optional): - Days to predict. Defaults to 5. - target_column (str, optional): - Target column to forecast. Defaults to "close". - train_split (float, optional): - Train/val split. Defaults to 0.85. - forecast_horizon (int, optional): - Forecast horizon when performing historical forecasting. Defaults to 5. - model_type (str, optional): - Either a string specifying the RNN module type ("RNN", "LSTM" or "GRU"). Defaults to "LSTM". - hidden_dim (int, optional): - Size for feature maps for each hidden RNN layer.. Defaults to 20. - dropout (float, optional): - Fraction of neurons afected by Dropout. Defaults to 0.0. - batch_size (int, optional): - Number of time series (input and output sequences) used in each training pass. Defaults to 32. - n_epochs (int, optional): - Number of epochs over which to train the model. Defaults to 100. - learning_rate (float, optional): - Defaults to 1e-3. - model_save_name (str, optional): - Name for model. Defaults to "brnn_model". - force_reset (bool, optional): - If set to True, any previously-existing model with the same name will be reset - (all checkpoints will be discarded). Defaults to True. - save_checkpoints (bool, optional): - Whether or not to automatically save the untrained model and checkpoints from training. Defaults to True. - forecast_only: bool - Whether to only show dates in the forecasting range. Defaults to False. - export: str - Format to export data - residuals: bool - Whether to show residuals for the model. Defaults to False. - start_date: Optional[datetime] - The starting date to perform analysis, data before this is trimmed. Defaults to None. - end_date: Optional[datetime] - The ending date to perform analysis, data after this is trimmed. Defaults to None. - naive: bool - Whether to show the naive baseline. This just assumes the closing price will be the same - as the previous day's closing price. Defaults to False. - external_axes:Optional[List[plt.axes]] - External axes to plot on + data: Union[pd.Series, pd.DataFrame] + Input Data + dataset_name: str + The name of the ticker to be predicted + n_predict: int + Days to predict. Defaults to 5. + target_column: str + Target column to forecast. Defaults to "close". + train_split: float + Train/val split. Defaults to 0.85. + forecast_horizon: int + Forecast horizon when performing historical forecasting. Defaults to 5. + model_type: str + Either a string specifying the RNN module type ("RNN", "LSTM" or "GRU"). Defaults to "LSTM". + hidden_dim: int + Size for feature maps for each hidden RNN layer.. Defaults to 20. + dropout: float + Fraction of neurons affected by Dropout. Defaults to 0.0. + batch_size: int + Number of time series (input and output sequences) used in each training pass. Defaults to 32. + n_epochs: int + Number of epochs over which to train the model. Defaults to 100. + learning_rate: float + Defaults to 1e-3. + model_save_name: str + Name for model. Defaults to "brnn_model". + force_reset: bool + If set to True, any previously-existing model with the same name will be reset + (all checkpoints will be discarded). Defaults to True. + save_checkpoints: bool + Whether or not to automatically save the untrained model and checkpoints from training. Defaults to True. + forecast_only: bool + Whether to only show dates in the forecasting range. Defaults to False. + export: str + Format to export data + residuals: bool + Whether to show residuals for the model. Defaults to False. + start_date: Optional[datetime] + The starting date to perform analysis, data before this is trimmed. Defaults to None. + end_date: Optional[datetime] + The ending date to perform analysis, data after this is trimmed. Defaults to None. + naive: bool + Whether to show the naive baseline. This just assumes the closing price will be the same + as the previous day's closing price. Defaults to False. + external_axes: Optional[List[plt.axes]] + External axes to plot on """ data = helpers.clean_data(data, start_date, end_date, target_column, None) diff --git a/openbb_terminal/forecast/tcn_model.py b/openbb_terminal/forecast/tcn_model.py index 65bba9b8093..b192833a3d5 100644 --- a/openbb_terminal/forecast/tcn_model.py +++ b/openbb_terminal/forecast/tcn_model.py @@ -39,57 +39,59 @@ def get_tcn_data( ) -> Tuple[List[TimeSeries], List[TimeSeries], List[TimeSeries], Optional[float], Any]: """Perform TCN forecasting - Args: - data (Union[pd.Series, pd.DataFrame]): - Input Data - target_column (str, optional): - Target column to forecast. Defaults to "close". - n_predict (int, optional): - Days to predict. Defaults to 5. - train_split (float, optional): - Train/val split. Defaults to 0.85. - past_covariates (str, optional): - Multiple secondary columns to factor in when forecasting. Defaults to None. - forecast_horizon (int, optional): - Forecast horizon when performing historical forecasting. Defaults to 5. - input_chunk_length (int, optional): - Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. - output_chunk_length (int, optional): - The length of the forecast of the model. Defaults to 5. - dropout (float, optional): - Fraction of neurons afected by Dropout. Defaults to 0.1. - num_filters (int, optional): - The number of filters in a convolutional layer of the TCN. Defaults to 6. - weight_norm (bool, optional): - Boolean value indicating whether to use weight normalization. Defaults to True. - dilation_base (int, optional): - The base of the exponent that will determine the dilation on every level. Defaults to 2. - batch_size (int, optional): - Number of time series (input and output sequences) used in each training pass. Defaults to 32. - n_epochs (int, optional): - Number of epochs over which to train the model. Defaults to 100. - learning_rate (float, optional): - Defaults to 1e-3. - model_save_name (str, optional): - Name for model. Defaults to "brnn_model". - force_reset (bool, optional): - If set to True, any previously-existing model with the same name will be reset - (all checkpoints will be discarded). Defaults to True. - save_checkpoints (bool, optional): - Whether or not to automatically save the untrained model and checkpoints from training. - Defaults to True. + Parameters + ---------- + data: Union[pd.Series, pd.DataFrame] + Input Data + target_column: str + Target column to forecast. Defaults to "close". + n_predict: int + Days to predict. Defaults to 5. + train_split: float + Train/val split. Defaults to 0.85. + past_covariates: str + Multiple secondary columns to factor in when forecasting. Defaults to None. + forecast_horizon: int + Forecast horizon when performing historical forecasting. Defaults to 5. + input_chunk_length: int + Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. + output_chunk_length: int + The length of the forecast of the model. Defaults to 5. + dropout: float + Fraction of neurons affected by Dropout. Defaults to 0.1. + num_filters: int + The number of filters in a convolutional layer of the TCN. Defaults to 6. + weight_norm: bool + Boolean value indicating whether to use weight normalization. Defaults to True. + dilation_base: int + The base of the exponent that will determine the dilation on every level. Defaults to 2. + batch_size: int + Number of time series (input and output sequences) used in each training pass. Defaults to 32. + n_epochs: int + Number of epochs over which to train the model. Defaults to 100. + learning_rate: float + Defaults to 1e-3. + model_save_name: str + Name for model. Defaults to "brnn_model". + force_reset: bool + If set to True, any previously-existing model with the same name will be reset + (all checkpoints will be discarded). Defaults to True. + save_checkpoints: bool + Whether or not to automatically save the untrained model and checkpoints from training. + Defaults to True. - Returns: - List[TimeSeries] - Adjusted Data series - List[TimeSeries] - Historical forecast by best RNN model - List[TimeSeries] - list of Predictions - Optional[float] - Mean average precision error - Any - Best TCN Model + Returns + ------- + List[TimeSeries] + Adjusted Data series + List[TimeSeries] + Historical forecast by best RNN model + List[TimeSeries] + list of Predictions + Optional[float] + Mean average precision error + Any + Best TCN Model """ # TODO Check if torch GPU AVAILABLE diff --git a/openbb_terminal/forecast/tcn_view.py b/openbb_terminal/forecast/tcn_view.py index f427645c6f1..8b93028df33 100644 --- a/openbb_terminal/forecast/tcn_view.py +++ b/openbb_terminal/forecast/tcn_view.py @@ -50,60 +50,60 @@ def display_tcn_forecast( Parameters ---------- - data (Union[pd.Series, pd.DataFrame]): - Input Data - target_column (str, optional): - Target column to forecast. Defaults to "close". - dataset_name str - The name of the ticker to be predicted - n_predict (int, optional): - Days to predict. Defaults to 5. - train_split (float, optional): - Train/val split. Defaults to 0.85. - past_covariates (str, optional): - Multiple secondary columns to factor in when forecasting. Defaults to None. - forecast_horizon (int, optional): - Forecast horizon when performing historical forecasting. Defaults to 5. - input_chunk_length (int, optional): - Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. - output_chunk_length (int, optional): - The length of the forecast of the model. Defaults to 5. - dropout (float, optional): - Fraction of neurons afected by Dropout. Defaults to 0.1. - num_filters (int, optional): - The number of filters in a convolutional layer of the TCN. Defaults to 6. - weight_norm (bool, optional): - Boolean value indicating whether to use weight normalization. Defaults to True. - dilation_base (int, optional): - The base of the exponent that will determine the dilation on every level. Defaults to 2. - batch_size (int, optional): - Number of time series (input and output sequences) used in each training pass. Defaults to 32. - n_epochs (int, optional): - Number of epochs over which to train the model. Defaults to 100. - learning_rate (float, optional): - Defaults to 1e-3. - model_save_name (str, optional): - Name for model. Defaults to "brnn_model". - force_reset (bool, optional): - If set to True, any previously-existing model with the same name will be reset - (all checkpoints will be discarded). Defaults to True. - save_checkpoints (bool, optional): - Whether or not to automatically save the untrained model and checkpoints from training. Defaults to True. - export: str - Format to export data - residuals: bool - Whether to show residuals for the model. Defaults to False. - forecast_only: bool - Whether to only show dates in the forecasting range. Defaults to False. - start_date: Optional[datetime] - The starting date to perform analysis, data before this is trimmed. Defaults to None. - end_date: Optional[datetime] - The ending date to perform analysis, data after this is trimmed. Defaults to None. - naive: bool - Whether to show the naive baseline. This just assumes the closing price will be the same - as the previous day's closing price. Defaults to False. - external_axes:Optional[List[plt.axes]] - External axes to plot on + data: Union[pd.Series, pd.DataFrame] + Input Data + target_column: str + Target column to forecast. Defaults to "close". + dataset_name: str + The name of the ticker to be predicted + n_predict: int + Days to predict. Defaults to 5. + train_split: float + Train/val split. Defaults to 0.85. + past_covariates: str + Multiple secondary columns to factor in when forecasting. Defaults to None. + forecast_horizon: int + Forecast horizon when performing historical forecasting. Defaults to 5. + input_chunk_length: int + Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. + output_chunk_length: int + The length of the forecast of the model. Defaults to 5. + dropout: float + Fraction of neurons affected by Dropout. Defaults to 0.1. + num_filters: int + The number of filters in a convolutional layer of the TCN. Defaults to 6. + weight_norm: bool + Boolean value indicating whether to use weight normalization. Defaults to True. + dilation_base: int + The base of the exponent that will determine the dilation on every level. Defaults to 2. + batch_size: int + Number of time series (input and output sequences) used in each training pass. Defaults to 32. + n_epochs: int + Number of epochs over which to train the model. Defaults to 100. + learning_rate: float + Defaults to 1e-3. + model_save_name: str + Name for model. Defaults to "brnn_model". + force_reset: bool + If set to True, any previously-existing model with the same name will be reset + (all checkpoints will be discarded). Defaults to True. + save_checkpoints: bool + Whether or not to automatically save the untrained model and checkpoints from training. Defaults to True. + export: str + Format to export data + residuals: bool + Whether to show residuals for the model. Defaults to False. + forecast_only: bool + Whether to only show dates in the forecasting range. Defaults to False. + start_date: Optional[datetime] + The starting date to perform analysis, data before this is trimmed. Defaults to None. + end_date: Optional[datetime] + The ending date to perform analysis, data after this is trimmed. Defaults to None. + naive: bool + Whether to show the naive baseline. This just assumes the closing price will be the same + as the previous day's closing price. Defaults to False. + external_axes: Optional[List[plt.axes]] + External axes to plot on """ data = helpers.clean_data( diff --git a/openbb_terminal/forecast/trans_model.py b/openbb_terminal/forecast/trans_model.py index 97c4e6fc189..2af3f8e2271 100644 --- a/openbb_terminal/forecast/trans_model.py +++ b/openbb_terminal/forecast/trans_model.py @@ -42,62 +42,64 @@ def get_trans_data( ) -> Tuple[List[TimeSeries], List[TimeSeries], List[TimeSeries], Optional[float], Any]: """Performs Transformer forecasting - Args: - data (Union[pd.Series, pd.DataFrame]): - Input Data - n_predict (int, optional): - Days to predict. Defaults to 5. - target_column (str, optional): - Target column to forecast. Defaults to "close". - train_split (float, optional): - Train/val split. Defaults to 0.85. - past_covariates (str, optional): - Multiple secondary columns to factor in when forecasting. Defaults to None. - forecast_horizon (int, optional): - Forecast horizon when performing historical forecasting. Defaults to 5. - input_chunk_length (int, optional): - Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. - output_chunk_length (int, optional): - The length of the forecast of the model. Defaults to 5. - d_model (int): - The number of expected features in the encoder/decoder inputs. Defaults to 64. - nhead (int): - The number of heads in the multi-head attention mechanism. Defaults to 4. - num_encoder_layers (int): - The number of encoder layers in the encoder. Defaults to 3. - num_decoder_layers (int): - The number of decoder layers in the encoder. Defaults to 3. - dim_feedforward (int): - The dimension of the feedforward network model. Defaults to 512. - activation (str): - The activation function of encoder/decoder intermediate layer, ‘relu’ or ‘gelu’. Defaults to 'relu'. - dropout (float, optional): - Fraction of neurons afected by Dropout. Defaults to 0.0. - batch_size (int, optional): - Number of time series (input and output sequences) used in each training pass. Defaults to 32. - n_epochs (int, optional): - Number of epochs over which to train the model. Defaults to 100. - learning_rate (float, optional): - Defaults to 1e-3. - model_save_name (str, optional): - Name for model. Defaults to "brnn_model". - force_reset (bool, optional): - If set to True, any previously-existing model with the same name will be reset (all checkpoints will be - discarded). Defaults to True. - save_checkpoints (bool, optional): - Whether or not to automatically save the untrained model and checkpoints from training. Defaults to True. + Parameters + ---------- + data: Union[pd.Series, pd.DataFrame] + Input Data + n_predict: int + Days to predict. Defaults to 5. + target_column: str + Target column to forecast. Defaults to "close". + train_split: float + Train/val split. Defaults to 0.85. + past_covariates: str + Multiple secondary columns to factor in when forecasting. Defaults to None. + forecast_horizon: int + Forecast horizon when performing historical forecasting. Defaults to 5. + input_chunk_length: int + Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. + output_chunk_length: int + The length of the forecast of the model. Defaults to 5. + d_model: int + The number of expected features in the encoder/decoder inputs. Defaults to 64. + nhead: int + The number of heads in the multi-head attention mechanism. Defaults to 4. + num_encoder_layers: int + The number of encoder layers in the encoder. Defaults to 3. + num_decoder_layers: int + The number of decoder layers in the encoder. Defaults to 3. + dim_feedforward: int + The dimension of the feedforward network model. Defaults to 512. + activation: str + The activation function of encoder/decoder intermediate layer, ‘relu’ or ‘gelu’. Defaults to 'relu'. + dropout: float + Fraction of neurons afected by Dropout. Defaults to 0.0. + batch_size: int + Number of time series (input and output sequences) used in each training pass. Defaults to 32. + n_epochs: int + Number of epochs over which to train the model. Defaults to 100. + learning_rate: float + Defaults to 1e-3. + model_save_name: str + Name for model. Defaults to "brnn_model". + force_reset: bool + If set to True, any previously-existing model with the same name will be reset (all checkpoints will be + discarded). Defaults to True. + save_checkpoints: bool + Whether or not to automatically save the untrained model and checkpoints from training. Defaults to True. - Returns: - List[TimeSeries] - Adjusted Data series - List[TimeSeries] - Historical forecast by best RNN model - List[TimeSeries] - list of Predictions - Optional[float] - Mean average precision error - Any - Best transformer Model + Returns + ------- + List[TimeSeries] + Adjusted Data series + List[TimeSeries] + Historical forecast by best RNN model + List[TimeSeries] + list of Predictions + Optional[float] + Mean average precision error + Any + Best transformer Model """ # TODO Check if torch GPU AVAILABLE diff --git a/openbb_terminal/forecast/trans_view.py b/openbb_terminal/forecast/trans_view.py index 3deee19072d..f59c615f8c7 100644 --- a/openbb_terminal/forecast/trans_view.py +++ b/openbb_terminal/forecast/trans_view.py @@ -53,65 +53,65 @@ def display_trans_forecast( Parameters ---------- - data (Union[pd.Series, pd.DataFrame]): - Input Data - dataset_name str - The name of the ticker to be predicted - n_predict (int, optional): - Days to predict. Defaults to 5. - target_column (str, optional): - Target column to forecast. Defaults to "close". - train_split (float, optional): - Train/val split. Defaults to 0.85. - past_covariates (str, optional): - Multiple secondary columns to factor in when forecasting. Defaults to None. - forecast_horizon (int, optional): - Forecast horizon when performing historical forecasting. Defaults to 5. - input_chunk_length (int, optional): - Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. - output_chunk_length (int, optional): - The length of the forecast of the model. Defaults to 5. - d_model (int): - The number of expected features in the encoder/decoder inputs. Defaults to 64. - nhead (int): - The number of heads in the multi-head attention mechanism. Defaults to 4. - num_encoder_layers (int): - The number of encoder layers in the encoder. Defaults to 3. - num_decoder_layers (int): - The number of decoder layers in the encoder. Defaults to 3. - dim_feedforward (int): - The dimension of the feedforward network model. Defaults to 512. - activation (str): - The activation function of encoder/decoder intermediate layer, ‘relu’ or ‘gelu’. Defaults to 'relu'. - dropout (float, optional): - Fraction of neurons afected by Dropout. Defaults to 0.1. - batch_size (int, optional): - Number of time series (input and output sequences) used in each training pass. Defaults to 32. - n_epochs (int, optional): - Number of epochs over which to train the model. Defaults to 100. - model_save_name (str, optional): - Name for model. Defaults to "brnn_model". - force_reset (bool, optional): - If set to True, any previously-existing model with the same name will be reset - (all checkpoints will be discarded). Defaults to True. - save_checkpoints (bool, optional): - Whether or not to automatically save the untrained model and checkpoints from training. - Defaults to True. - export: str - Format to export data - residuals: bool - Whether to show residuals for the model. Defaults to False. - forecast_only: bool - Whether to only show dates in the forecasting range. Defaults to False. - start_date: Optional[datetime] - The starting date to perform analysis, data before this is trimmed. Defaults to None. - end_date: Optional[datetime] - The ending date to perform analysis, data after this is trimmed. Defaults to None. - naive: bool - Whether to show the naive baseline. This just assumes the closing price will be the same - as the previous day's closing price. Defaults to False. - external_axes:Optional[List[plt.axes]] - External axes to plot on + data: Union[pd.Series, pd.DataFrame] + Input Data + dataset_name: str + The name of the ticker to be predicted + n_predict: int + Days to predict. Defaults to 5. + target_column: str + Target column to forecast. Defaults to "close". + train_split: float + Train/val split. Defaults to 0.85. + past_covariates: str + Multiple secondary columns to factor in when forecasting. Defaults to None. + forecast_horizon: int + Forecast horizon when performing historical forecasting. Defaults to 5. + input_chunk_length: int + Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. + output_chunk_length: int + The length of the forecast of the model. Defaults to 5. + d_model: int + The number of expected features in the encoder/decoder inputs. Defaults to 64. + nhead: int + The number of heads in the multi-head attention mechanism. Defaults to 4. + num_encoder_layers: int + The number of encoder layers in the encoder. Defaults to 3. + num_decoder_layers: int + The number of decoder layers in the encoder. Defaults to 3. + dim_feedforward: int + The dimension of the feedforward network model. Defaults to 512. + activation: str + The activation function of encoder/decoder intermediate layer, ‘relu’ or ‘gelu’. Defaults to 'relu'. + dropout: float + Fraction of neurons affected by Dropout. Defaults to 0.1. + batch_size_: int + Number of time series (input and output sequences) used in each training pass. Defaults to 32. + n_epochs: int + Number of epochs over which to train the model. Defaults to 100. + model_save_name: str + Name for model. Defaults to "brnn_model". + force_reset: bool + If set to True, any previously-existing model with the same name will be reset + (all checkpoints will be discarded). Defaults to True. + save_checkpoints: bool + Whether or not to automatically save the untrained model and checkpoints from training. + Defaults to True. + export: str + Format to export data + residuals: bool + Whether to show residuals for the model. Defaults to False. + forecast_only: bool + Whether to only show dates in the forecasting range. Defaults to False. + start_date: Optional[datetime] + The starting date to perform analysis, data before this is trimmed. Defaults to None. + end_date: Optional[datetime] + The ending date to perform analysis, data after this is trimmed. Defaults to None. + naive: bool + Whether to show the naive baseline. This just assumes the closing price will be the same + as the previous day's closing price. Defaults to False. + external_axes: Optional[List[plt.axes]] + External axes to plot on """ data = helpers.clean_data( diff --git a/openbb_terminal/keys_model.py b/openbb_terminal/keys_model.py index 204f1d2d929..abe40ceb7ad 100644 --- a/openbb_terminal/keys_model.py +++ b/openbb_terminal/keys_model.py @@ -122,20 +122,19 @@ def set_keys( Parameters ---------- - keys_dict: Dict[str, Dict[str, Union[str, bool]]] - E.g. {"fred": {"key":"XXXXX"}, "binance": {"key":"YYYYY", "secret":"ZZZZZ"}} - More info on APIs can be found through get_keys_info(). - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. + keys_dict: Dict[str, Dict[str, Union[str, bool]]] + E.g. {"fred": {"key":"XXXXX"}, "binance": {"key":"YYYYY", "secret":"ZZZZZ"}} + More info on APIs can be found through get_keys_info(). + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. Returns ------- status_dict: Dict - """ status_dict = {} @@ -172,7 +171,6 @@ def get_keys_info() -> Dict[str, List[str]]: Returns ------- Dictionary of expected API keys and arguments: Dict[str, List[str]] - """ args_dict = {} @@ -206,16 +204,17 @@ def first_time_user() -> bool: def set_key(env_var_name: str, env_var_value: str, persist: bool = False) -> None: """Set API key. + Parameters ---------- - env_var_name: str - API name - env_var_value: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. + env_var_name: str + API name + env_var_value: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. """ if persist: os.environ[env_var_name] = env_var_value @@ -231,13 +230,17 @@ def set_key(env_var_name: str, env_var_value: str, persist: bool = False) -> Non def get_keys(show: bool = False) -> pd.DataFrame: """Get currently set API keys. + Parameters ---------- - show: bool - Flag to choose whether to show actual keys or not. - By default, False. - Returns: - pd.DataFrame: currents keys + show: bool + Flag to choose whether to show actual keys or not. + By default, False. + + Returns + ------- + pd.DataFrame + Currents keys """ # TODO: Refactor api variables without prefix API_ and extend API_SOURCE_KEY format @@ -265,16 +268,18 @@ def get_keys(show: bool = False) -> pd.DataFrame: def set_av_key(key: str, persist: bool = False, show_output: bool = False) -> str: """Set Alpha Vantage key + Parameters ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -286,10 +291,12 @@ def set_av_key(key: str, persist: bool = False, show_output: bool = False) -> st def check_av_key(show_output: bool = False) -> str: """Check Alpha Vantage key + Parameters ---------- - show_output: bool - Display status string or not. By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -317,16 +324,18 @@ def check_av_key(show_output: bool = False) -> str: def set_fmp_key(key: str, persist: bool = False, show_output: bool = False) -> str: """Set Financial Modeling Prep key + Parameters ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -338,10 +347,12 @@ def set_fmp_key(key: str, persist: bool = False, show_output: bool = False) -> s def check_fmp_key(show_output: bool = False) -> str: """Check Financial Modeling Prep key + Parameters ---------- - show_output: bool - Display status string or not. By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -374,16 +385,18 @@ def check_fmp_key(show_output: bool = False) -> str: def set_quandl_key(key: str, persist: bool = False, show_output: bool = False) -> str: """Set Quandl key + Parameters ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -395,10 +408,12 @@ def set_quandl_key(key: str, persist: bool = False, show_output: bool = False) - def check_quandl_key(show_output: bool = False) -> str: """Check Quandl key + Parameters ---------- - show_output: bool - Display status string or not. By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -425,16 +440,18 @@ def check_quandl_key(show_output: bool = False) -> str: def set_polygon_key(key: str, persist: bool = False, show_output: bool = False) -> str: """Set Polygon key + Parameters ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -446,10 +463,12 @@ def set_polygon_key(key: str, persist: bool = False, show_output: bool = False) def check_polygon_key(show_output: bool = False) -> str: """Check Polygon key + Parameters ---------- - show_output: bool - Display status string or not. By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -481,16 +500,18 @@ def check_polygon_key(show_output: bool = False) -> str: def set_fred_key(key: str, persist: bool = False, show_output: bool = False) -> str: """Set FRED key + Parameters ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -502,10 +523,12 @@ def set_fred_key(key: str, persist: bool = False, show_output: bool = False) -> def check_fred_key(show_output: bool = False) -> str: """Check FRED key + Parameters ---------- - show_output: bool - Display status string or not. By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -536,16 +559,18 @@ def check_fred_key(show_output: bool = False) -> str: def set_news_key(key: str, persist: bool = False, show_output: bool = False) -> str: """Set News key + Parameters ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -557,10 +582,12 @@ def set_news_key(key: str, persist: bool = False, show_output: bool = False) -> def check_news_key(show_output: bool = False) -> str: """Check News key + Parameters ---------- - show_output: bool - Display status string or not. By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -591,16 +618,18 @@ def check_news_key(show_output: bool = False) -> str: def set_tradier_key(key: str, persist: bool = False, show_output: bool = False) -> str: """Set Tradier key + Parameters ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -612,10 +641,12 @@ def set_tradier_key(key: str, persist: bool = False, show_output: bool = False) def check_tradier_key(show_output: bool = False) -> str: """Check Tradier key + Parameters ---------- - show_output: bool - Display status string or not. By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -651,16 +682,18 @@ def check_tradier_key(show_output: bool = False) -> str: def set_cmc_key(key: str, persist: bool = False, show_output: bool = False) -> str: """Set Coinmarketcap key + Parameters ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -672,10 +705,12 @@ def set_cmc_key(key: str, persist: bool = False, show_output: bool = False) -> s def check_cmc_key(show_output: bool = False) -> str: """Check Coinmarketcap key + Parameters ---------- - show_output: bool - Display status string or not. By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -703,16 +738,18 @@ def check_cmc_key(show_output: bool = False) -> str: def set_finnhub_key(key: str, persist: bool = False, show_output: bool = False) -> str: """Set Finnhub key + Parameters ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -724,10 +761,12 @@ def set_finnhub_key(key: str, persist: bool = False, show_output: bool = False) def check_finnhub_key(show_output: bool = False) -> str: """Check Finnhub key + Parameters ---------- - show_output: bool - Display status string or not. By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -758,16 +797,18 @@ def check_finnhub_key(show_output: bool = False) -> str: def set_iex_key(key: str, persist: bool = False, show_output: bool = False) -> str: """Set IEX Cloud key + Parameters ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -779,10 +820,12 @@ def set_iex_key(key: str, persist: bool = False, show_output: bool = False) -> s def check_iex_key(show_output: bool = False) -> str: """Check IEX Cloud key + Parameters ---------- - show_output: bool - Display status string or not. By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -818,19 +861,26 @@ def set_reddit_key( show_output: bool = False, ) -> str: """Set Reddit key + Parameters ---------- - client_id: str - client_secret: str - password: str - username: str - useragent: str - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. + client_id: str + Client ID + client_secret: str + Client secret + password: str + User assword + username: str + User username + useragent: str + User useragent + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -847,10 +897,12 @@ def set_reddit_key( def check_reddit_key(show_output: bool = False) -> str: """Check Reddit key + Parameters ---------- - show_output: bool - Display status string or not. By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -905,16 +957,18 @@ def check_reddit_key(show_output: bool = False) -> str: def set_bitquery_key(key: str, persist: bool = False, show_output: bool = False) -> str: """Set Bitquery key + Parameters ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -926,10 +980,12 @@ def set_bitquery_key(key: str, persist: bool = False, show_output: bool = False) def check_bitquery_key(show_output: bool = False) -> str: """Check Bitquery key + Parameters ---------- - show_output: bool - Display status string or not. By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -973,17 +1029,22 @@ def set_twitter_key( show_output: bool = False, ) -> str: """Set Twitter key + Parameters ---------- - key: str - secret: str - access_token: str - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. + key: str + API key + secret: str + API secret + access_token: str + API token + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -998,10 +1059,12 @@ def set_twitter_key( def check_twitter_key(show_output: bool = False) -> str: """Check Twitter key + Parameters ---------- - show_output: bool - Display status string or not. By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -1049,16 +1112,20 @@ def set_rh_key( show_output: bool = False, ) -> str: """Set Robinhood key + Parameters ---------- - username: str - password: str - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. + username: str + User username + password: str + User password + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -1072,10 +1139,12 @@ def set_rh_key( def check_rh_key(show_output: bool = False) -> str: """Check Robinhood key + Parameters ---------- - show_output: bool - Display status string or not. By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -1103,17 +1172,22 @@ def set_degiro_key( show_output: bool = False, ) -> str: """Set Degiro key + Parameters ---------- - username: str - password: str - secret: str - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. + username: str + User username + password: str + User password + secret: str + User secret + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -1128,10 +1202,12 @@ def set_degiro_key( def check_degiro_key(show_output: bool = False) -> str: """Check Degiro key + Parameters ---------- - show_output: bool - Display status string or not. By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -1177,17 +1253,22 @@ def set_oanda_key( show_output: bool = False, ) -> str: """Set Oanda key + Parameters ---------- - account: str - access_token: str - account_type: str - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. + account: str + User account + access_token: str + User token + account_type: str + User account type + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -1202,10 +1283,12 @@ def set_oanda_key( def check_oanda_key(show_output: bool = False) -> str: """Check Oanda key + Parameters ---------- - show_output: bool - Display status string or not. By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -1244,16 +1327,20 @@ def set_binance_key( show_output: bool = False, ) -> str: """Set Binance key + Parameters ---------- - key: str - secret: str - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. + key: str + API key + secret: str + API secret + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -1267,10 +1354,12 @@ def set_binance_key( def check_binance_key(show_output: bool = False) -> str: """Check Binance key + Parameters ---------- - show_output: bool - Display status string or not. By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -1302,15 +1391,18 @@ def set_si_key( show_output: bool = False, ) -> str: """Set Sentimentinvestor key. + Parameters ---------- - key: str - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -1323,10 +1415,12 @@ def set_si_key( def check_si_key(show_output: bool = False) -> str: """Check Sentimentinvestor key + Parameters ---------- - show_output: bool - Display status string or not. By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -1366,17 +1460,22 @@ def set_coinbase_key( show_output: bool = False, ) -> str: """Set Coinbase key + Parameters ---------- - key: str - secret: str - passphrase: str - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. + key: str + API key + secret: str + API secret + passphrase: str + Account passphrase + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -1391,10 +1490,12 @@ def set_coinbase_key( def check_coinbase_key(show_output: bool = False) -> str: """Check Coinbase key + Parameters ---------- - show_output: bool - Display status string or not. By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -1432,16 +1533,18 @@ def check_coinbase_key(show_output: bool = False) -> str: def set_walert_key(key: str, persist: bool = False, show_output: bool = False) -> str: """Set Walert key + Parameters ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -1453,10 +1556,12 @@ def set_walert_key(key: str, persist: bool = False, show_output: bool = False) - def check_walert_key(show_output: bool = False) -> str: """Check Walert key + Parameters ---------- - show_output: bool - Display status string or not. By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -1492,16 +1597,18 @@ def set_glassnode_key( key: str, persist: bool = False, show_output: bool = False ) -> str: """Set Glassnode key. + Parameters ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -1513,10 +1620,12 @@ def set_glassnode_key( def check_glassnode_key(show_output: bool = False) -> str: """Check Glassnode key + Parameters ---------- - show_output: bool - Display status string or not. By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -1554,16 +1663,18 @@ def set_coinglass_key( key: str, persist: bool = False, show_output: bool = False ) -> str: """Set Coinglass key. + Parameters ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -1575,10 +1686,12 @@ def set_coinglass_key( def check_coinglass_key(show_output: bool = False) -> str: """Check Coinglass key + Parameters ---------- - show_output: bool - Display status string or not. By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -1612,16 +1725,18 @@ def check_coinglass_key(show_output: bool = False) -> str: def set_cpanic_key(key: str, persist: bool = False, show_output: bool = False) -> str: """Set Cpanic key. + Parameters ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -1633,10 +1748,12 @@ def set_cpanic_key(key: str, persist: bool = False, show_output: bool = False) - def check_cpanic_key(show_output: bool = False) -> str: """Check Cpanic key + Parameters ---------- - show_output: bool - Display status string or not. By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -1666,16 +1783,18 @@ def set_ethplorer_key( key: str, persist: bool = False, show_output: bool = False ) -> str: """Set Ethplorer key. + Parameters ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -1687,10 +1806,12 @@ def set_ethplorer_key( def check_ethplorer_key(show_output: bool = False) -> str: """Check Ethplorer key + Parameters ---------- - show_output: bool - Display status string or not. By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -1725,18 +1846,20 @@ def set_smartstake_key( key: str, access_token: str, persist: bool = False, show_output: bool = False ): """Set Smartstake key. + Parameters ---------- - key: str - API key - access_token: str - API token - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. + key: str + API key + access_token: str + API token + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -1749,10 +1872,12 @@ def set_smartstake_key( def check_smartstake_key(show_output: bool = False) -> str: """Check Smartstake key + Parameters ---------- - show_output: bool - Display status string or not. By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -1800,16 +1925,18 @@ def check_smartstake_key(show_output: bool = False) -> str: def set_github_key(key: str, persist: bool = False, show_output: bool = False) -> str: """Set GitHub key. + Parameters ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -1821,10 +1948,12 @@ def set_github_key(key: str, persist: bool = False, show_output: bool = False) - def check_github_key(show_output: bool = False) -> str: """Check GitHub key + Parameters ---------- - show_output: bool - Display status string or not. By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -1846,16 +1975,18 @@ def check_github_key(show_output: bool = False) -> str: def set_messari_key(key: str, persist: bool = False, show_output: bool = False) -> str: """Set Messari key. + Parameters ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -1867,10 +1998,12 @@ def set_messari_key(key: str, persist: bool = False, show_output: bool = False) def check_messari_key(show_output: bool = False) -> str: """Check Messari key + Parameters ---------- - show_output: bool - Display status string or not. By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -1903,16 +2036,18 @@ def check_messari_key(show_output: bool = False) -> str: def set_eodhd_key(key: str, persist: bool = False, show_output: bool = False) -> str: """Set Eodhd key. + Parameters ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -1924,10 +2059,12 @@ def set_eodhd_key(key: str, persist: bool = False, show_output: bool = False) -> def check_eodhd_key(show_output: bool = False) -> str: """Check Eodhd key + Parameters ---------- - show_output: bool - Display status string or not. By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -1956,16 +2093,18 @@ def set_santiment_key( key: str, persist: bool = False, show_output: bool = False ) -> str: """Set Santiment key. + Parameters ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -1977,10 +2116,12 @@ def set_santiment_key( def check_santiment_key(show_output: bool = False) -> str: """Check Santiment key + Parameters ---------- - show_output: bool - Display status string or not. By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -2020,16 +2161,18 @@ def check_santiment_key(show_output: bool = False) -> str: def set_shroom_key(key: str, persist: bool = False, show_output: bool = False) -> str: """Set Shroom key + Parameters ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + Returns ------- status: str @@ -2076,14 +2219,14 @@ def set_tokenterminal_key( Parameters ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. Returns ------- @@ -2099,8 +2242,8 @@ def check_tokenterminal_key(show_output: bool = False) -> str: Parameters ---------- - show_output: bool - Display status string or not. By default, False. + show_output: bool + Display status string or not. By default, False. Returns ------- @@ -2131,14 +2274,14 @@ def set_stocksera_key(key: str, persist: bool = False, show_output: bool = False Parameters ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. Returns ------- @@ -2153,8 +2296,8 @@ def check_stocksera_key(show_output: bool = False): """Check Stocksera key Parameters ---------- - show_output: bool - Display status string or not. By default, False. + show_output: bool + Display status string or not. By default, False. Returns ------- diff --git a/openbb_terminal/portfolio/portfolio_model.py b/openbb_terminal/portfolio/portfolio_model.py index d0807652c3e..162659da472 100644 --- a/openbb_terminal/portfolio/portfolio_model.py +++ b/openbb_terminal/portfolio/portfolio_model.py @@ -1398,7 +1398,6 @@ def get_maximum_drawdown( Holdings series pd.Series Drawdown series - ------- """ holdings: pd.Series = portfolio.portfolio_value if is_returns: diff --git a/openbb_terminal/portfolio/portfolio_optimization/optimizer_model.py b/openbb_terminal/portfolio/portfolio_optimization/optimizer_model.py index 890f9f911f9..3b094e4ff2b 100644 --- a/openbb_terminal/portfolio/portfolio_optimization/optimizer_model.py +++ b/openbb_terminal/portfolio/portfolio_optimization/optimizer_model.py @@ -1,7 +1,8 @@ """Optimization Model""" __docformat__ = "numpy" -# pylint: disable=R0913, C0302, E1101 +# pylint: disable=R0913, C0302, E1101, line-too-long +# flake8: noqa: E501 import logging from typing import Dict, List, Tuple @@ -191,9 +192,10 @@ def get_equal_weights( freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for m' for monthly returns. maxnan: float Max percentage of nan values accepted per asset to be included in @@ -201,8 +203,7 @@ def get_equal_weights( threshold: float Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. value : float, optional Amount to allocate. Returns percentages if set to 1. @@ -262,9 +263,10 @@ def get_property_weights( freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float Max percentage of nan values accepted per asset to be included in @@ -272,8 +274,7 @@ def get_property_weights( threshold: float Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. s_property : str Property to weight portfolio by value : float, optional @@ -358,9 +359,10 @@ def get_mean_risk_portfolio( freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float Max percentage of nan values accepted per asset to be included in @@ -368,8 +370,7 @@ def get_mean_risk_portfolio( threshold: float Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. objective: str Objective function of the optimization model. The default is 'Sharpe'. Possible values are: @@ -414,28 +415,24 @@ def get_mean_risk_portfolio( The default value is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`a-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`a-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `a-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `a-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `a-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `a-MLforAM`. d_ewma: float, optional The smoothing factor of ewma methods. @@ -560,9 +557,10 @@ def get_max_sharpe( freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -570,8 +568,7 @@ def get_max_sharpe( threshold: float, optional Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. risk_measure: str, optional The risk measure used to optimize the portfolio. The default is 'MV'. Possible values are: @@ -604,28 +601,24 @@ def get_max_sharpe( The default value is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`a-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`a-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `a-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `a-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `a-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `a-MLforAM`. d_ewma: float, optional The smoothing factor of ewma methods. @@ -710,9 +703,10 @@ def get_min_risk( freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -720,8 +714,7 @@ def get_min_risk( threshold: float, optional Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. risk_measure: str, optional The risk measure used to optimize the portfolio. The default is 'MV'. Possible values are: @@ -754,28 +747,24 @@ def get_min_risk( The default value is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`a-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`a-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `a-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `a-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `a-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `a-MLforAM`. d_ewma: float, optional The smoothing factor of ewma methods. @@ -860,9 +849,10 @@ def get_max_util( freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -870,8 +860,7 @@ def get_max_util( threshold: float, optional Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. risk_measure: str, optional The risk measure used to optimize the portfolio. The default is 'MV'. Possible values are: @@ -904,28 +893,24 @@ def get_max_util( The default value is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`a-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`a-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `a-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `a-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `a-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `a-MLforAM`. d_ewma: float, optional The smoothing factor of ewma methods. @@ -1010,9 +995,10 @@ def get_max_ret( freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -1020,8 +1006,7 @@ def get_max_ret( threshold: float, optional Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. risk_measure: str, optional The risk measure used to optimize the portfolio. The default is 'MV'. Possible values are: @@ -1054,28 +1039,24 @@ def get_max_ret( The default value is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`a-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`a-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `a-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `a-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `a-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `a-MLforAM`. d_ewma: float, optional The smoothing factor of ewma methods. @@ -1152,9 +1133,10 @@ def get_max_diversification_portfolio( freq: str The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float Max percentage of nan values accepted per asset to be included in @@ -1162,25 +1144,22 @@ def get_max_diversification_portfolio( threshold: float Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`a-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`a-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `a-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `a-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `a-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `a-MLforAM`. d_ewma: float, optional The smoothing factor of ewma methods. @@ -1268,9 +1247,10 @@ def get_max_decorrelation_portfolio( freq: str The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float Max percentage of nan values accepted per asset to be included in @@ -1278,25 +1258,22 @@ def get_max_decorrelation_portfolio( threshold: float Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - s`interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see s`interpolate `__. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`a-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`a-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `a-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `a-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `a-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `a-MLforAM`. d_ewma: float, optional The smoothing factor of ewma methods. @@ -1400,9 +1377,10 @@ def get_black_litterman_portfolio( freq: str The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float Max percentage of nan values accepted per asset to be included in @@ -1410,8 +1388,7 @@ def get_black_litterman_portfolio( threshold: float Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. objective: str Objective function of the optimization model. The default is 'Sharpe'. Possible values are: @@ -1563,9 +1540,10 @@ def get_ef( freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -1573,8 +1551,7 @@ def get_ef( threshold: float, optional Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. risk_measure: str, optional The risk measure used to optimize the portfolio. The default is 'MV'. Possible values are: @@ -1741,9 +1718,10 @@ def get_risk_parity_portfolio( freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -1751,8 +1729,7 @@ def get_risk_parity_portfolio( threshold: float, optional Value used to replace outliers that are higher to threshold. method: str, optional - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. risk_measure: str, optional The risk measure used to optimize the portfolio. The default is 'MV'. Possible values are: @@ -1783,28 +1760,24 @@ def get_risk_parity_portfolio( The default value is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`a-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`a-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `a-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `a-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `a-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `a-MLforAM`. d_ewma: float, optional The smoothing factor of ewma methods. @@ -1902,9 +1875,10 @@ def get_rel_risk_parity_portfolio( freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -1912,8 +1886,7 @@ def get_rel_risk_parity_portfolio( threshold: float, optional Value used to replace outliers that are higher to threshold. method: str, optional - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. version : str, optional Relaxed risk parity model version. The default is 'A'. Possible values are: @@ -1935,28 +1908,24 @@ def get_rel_risk_parity_portfolio( The default value is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`a-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`a-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `a-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `a-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `a-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `a-MLforAM`. d_ewma: float, optional The smoothing factor of ewma methods. @@ -2063,9 +2032,10 @@ def get_hcp_portfolio( freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -2073,8 +2043,7 @@ def get_hcp_portfolio( threshold: float, optional Value used to replace outliers that are higher to threshold. method: str, optional - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. model: str, optional The hierarchical cluster portfolio model used for optimize the portfolio. The default is 'HRP'. Possible values are: @@ -2088,36 +2057,34 @@ def get_hcp_portfolio( metric and clusters. The default is 'pearson'. Possible values are: - 'pearson': pearson correlation matrix. Distance formula: - :math:`D_{i,j} = \\sqrt{0.5(1-\rho^{pearson}_{i,j})}`. + .. math:: D_{i,j} = \\sqrt{0.5(1-\\rho^{pearson}_{i,j})} - 'spearman': spearman correlation matrix. Distance formula: - :math:`D_{i,j} = \\sqrt{0.5(1-\rho^{spearman}_{i,j})}`. + .. math:: D_{i,j} = \\sqrt{0.5(1-\\rho^{spearman}_{i,j})} - 'abs_pearson': absolute value pearson correlation matrix. Distance formula: - :math:`D_{i,j} = \\sqrt{(1-|\rho^{pearson}_{i,j}|)}`. + .. math:: D_{i,j} = \\sqrt{(1-|\\rho^{pearson}_{i,j}|)} - 'abs_spearman': absolute value spearman correlation matrix. Distance formula: - :math:`D_{i,j} = \\sqrt{(1-|\rho^{spearman}_{i,j}|)}`. + .. math:: D_{i,j} = \\sqrt{(1-|\\rho^{spearman}_{i,j}|)} - 'distance': distance correlation matrix. Distance formula: - :math:`D_{i,j} = \\sqrt{(1-\rho^{distance}_{i,j})}`. + .. math:: D_{i,j} = \\sqrt{(1-\\rho^{distance}_{i,j})} - 'mutual_info': mutual information matrix. Distance used is variation information matrix. - 'tail': lower tail dependence index matrix. Dissimilarity formula: - :math:`D_{i,j} = -\\log{\\lambda_{i,j}}`. + .. math:: D_{i,j} = -\\log{\\lambda_{i,j}}. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`c-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`c-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`c-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`c-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `c-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `c-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `c-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `c-MLforAM`. objective: str, optional Objective function used by the NCO model. @@ -2177,9 +2144,8 @@ def get_hcp_portfolio( Number of CVaRs used to approximate Tail Gini of gains. If None it duplicates a_sim value. The default is None. linkage: str, optional - Linkage method of hierarchical clustering. For more information see - `linkage `_. + Linkage method of hierarchical clustering. For more information see `linkage `__. The default is 'single'. Possible values are: - 'single'. @@ -2202,12 +2168,9 @@ def get_hcp_portfolio( Number of bins used to calculate variation of information. The default value is 'KN'. Possible values are: - - 'KN': Knuth's choice method. For more information see - `knuth_bin_width `_. - - 'FD': Freedman–Diaconis' choice method. For more information see - `freedman_bin_width `_. - - 'SC': Scotts' choice method. For more information see - `scott_bin_width `_. + - 'KN': Knuth's choice method. For more information see `knuth_bin_width `__. + - 'FD': Freedman–Diaconis' choice method. For more information see `freedman_bin_width `__. + - 'SC': Scotts' choice method. For more information see `scott_bin_width `__. - 'HGR': Hacine-Gharbi and Ravier' choice method. alpha_tail: float, optional @@ -2327,9 +2290,10 @@ def get_hrp( freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -2337,43 +2301,40 @@ def get_hrp( threshold: float, optional Value used to replace outliers that are higher to threshold. method: str, optional - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. codependence: str, optional The codependence or similarity matrix used to build the distance metric and clusters. The default is 'pearson'. Possible values are: - 'pearson': pearson correlation matrix. Distance formula: - :math:`D_{i,j} = \\sqrt{0.5(1-\rho^{pearson}_{i,j})}`. + .. math:: D_{i,j} = \\sqrt{0.5(1-\\rho^{pearson}_{i,j})} - 'spearman': spearman correlation matrix. Distance formula: - :math:`D_{i,j} = \\sqrt{0.5(1-\rho^{spearman}_{i,j})}`. + .. math:: D_{i,j} = \\sqrt{0.5(1-\\rho^{spearman}_{i,j})} - 'abs_pearson': absolute value pearson correlation matrix. Distance formula: - :math:`D_{i,j} = \\sqrt{(1-|\rho^{pearson}_{i,j}|)}`. + .. math:: D_{i,j} = \\sqrt{(1-|\\rho^{pearson}_{i,j}|)} - 'abs_spearman': absolute value spearman correlation matrix. Distance formula: - :math:`D_{i,j} = \\sqrt{(1-|\rho^{spearman}_{i,j}|)}`. + .. math:: D_{i,j} = \\sqrt{(1-|\\rho^{spearman}_{i,j}|)} - 'distance': distance correlation matrix. Distance formula: - :math:`D_{i,j} = \\sqrt{(1-\rho^{distance}_{i,j})}`. + .. math:: D_{i,j} = \\sqrt{(1-\\rho^{distance}_{i,j})} - 'mutual_info': mutual information matrix. Distance used is variation information matrix. - 'tail': lower tail dependence index matrix. Dissimilarity formula: - :math:`D_{i,j} = -\\log{\\lambda_{i,j}}`. + .. math:: D_{i,j} = -\\log{\\lambda_{i,j}}. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`c-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`c-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`c-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`c-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `c-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `c-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `c-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `c-MLforAM`. objective: str, optional Objective function used by the NCO model. @@ -2433,8 +2394,7 @@ def get_hrp( Number of CVaRs used to approximate Tail Gini of gains. If None it duplicates a_sim value. The default is None. linkage: str, optional - Linkage method of hierarchical clustering. For more information see - `linkage `_. + Linkage method of hierarchical clustering. For more information see `linkage `__. The default is 'single'. Possible values are: - 'single'. @@ -2457,12 +2417,9 @@ def get_hrp( Number of bins used to calculate variation of information. The default value is 'KN'. Possible values are: - - 'KN': Knuth's choice method. For more information see - `knuth_bin_width `_. - - 'FD': Freedman–Diaconis' choice method. For more information see - `freedman_bin_width `_. - - 'SC': Scotts' choice method. For more information see - `scott_bin_width `_. + - 'KN': Knuth's choice method. For more information see `knuth_bin_width `__. + - 'FD': Freedman–Diaconis' choice method. For more information see `freedman_bin_width `__. + - 'SC': Scotts' choice method. For more information see `scott_bin_width `__. - 'HGR': Hacine-Gharbi and Ravier' choice method. alpha_tail: float, optional @@ -2563,9 +2520,10 @@ def get_herc( freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -2573,43 +2531,40 @@ def get_herc( threshold: float, optional Value used to replace outliers that are higher to threshold. method: str, optional - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. codependence: str, optional The codependence or similarity matrix used to build the distance metric and clusters. The default is 'pearson'. Possible values are: - 'pearson': pearson correlation matrix. Distance formula: - :math:`D_{i,j} = \\sqrt{0.5(1-\rho^{pearson}_{i,j})}`. + .. math:: D_{i,j} = \\sqrt{0.5(1-\\rho^{pearson}_{i,j})} - 'spearman': spearman correlation matrix. Distance formula: - :math:`D_{i,j} = \\sqrt{0.5(1-\rho^{spearman}_{i,j})}`. + .. math:: D_{i,j} = \\sqrt{0.5(1-\\rho^{spearman}_{i,j})} - 'abs_pearson': absolute value pearson correlation matrix. Distance formula: - :math:`D_{i,j} = \\sqrt{(1-|\rho^{pearson}_{i,j}|)}`. + .. math:: D_{i,j} = \\sqrt{(1-|\\rho^{pearson}_{i,j}|)} - 'abs_spearman': absolute value spearman correlation matrix. Distance formula: - :math:`D_{i,j} = \\sqrt{(1-|\rho^{spearman}_{i,j}|)}`. + .. math:: D_{i,j} = \\sqrt{(1-|\\rho^{spearman}_{i,j}|)} - 'distance': distance correlation matrix. Distance formula: - :math:`D_{i,j} = \\sqrt{(1-\rho^{distance}_{i,j})}`. + .. math:: D_{i,j} = \\sqrt{(1-\\rho^{distance}_{i,j})} - 'mutual_info': mutual information matrix. Distance used is variation information matrix. - 'tail': lower tail dependence index matrix. Dissimilarity formula: - :math:`D_{i,j} = -\\log{\\lambda_{i,j}}`. + .. math:: D_{i,j} = -\\log{\\lambda_{i,j}}. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`c-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`c-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`c-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`c-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `c-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `c-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `c-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `c-MLforAM`. objective: str, optional Objective function used by the NCO model. @@ -2669,8 +2624,7 @@ def get_herc( Number of CVaRs used to approximate Tail Gini of gains. If None it duplicates a_sim value. The default is None. linkage: str, optional - Linkage method of hierarchical clustering. For more information see - `linkage `_. + Linkage method of hierarchical clustering. For more information see `linkage `__. The default is 'single'. Possible values are: - 'single'. @@ -2693,12 +2647,9 @@ def get_herc( Number of bins used to calculate variation of information. The default value is 'KN'. Possible values are: - - 'KN': Knuth's choice method. For more information see - `knuth_bin_width `_. - - 'FD': Freedman–Diaconis' choice method. For more information see - `freedman_bin_width `_. - - 'SC': Scotts' choice method. For more information see - `scott_bin_width `_. + - 'KN': Knuth's choice method. For more information see `knuth_bin_width `__. + - 'FD': Freedman–Diaconis' choice method. For more information see `freedman_bin_width `__. + - 'SC': Scotts' choice method. For more information see `scott_bin_width `__. - 'HGR': Hacine-Gharbi and Ravier' choice method. alpha_tail: float, optional @@ -2799,9 +2750,10 @@ def get_nco( freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -2809,43 +2761,40 @@ def get_nco( threshold: float, optional Value used to replace outliers that are higher to threshold. method: str, optional - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. codependence: str, optional The codependence or similarity matrix used to build the distance metric and clusters. The default is 'pearson'. Possible values are: - 'pearson': pearson correlation matrix. Distance formula: - :math:`D_{i,j} = \\sqrt{0.5(1-\rho^{pearson}_{i,j})}`. + .. math:: D_{i,j} = \\sqrt{0.5(1-\\rho^{pearson}_{i,j})} - 'spearman': spearman correlation matrix. Distance formula: - :math:`D_{i,j} = \\sqrt{0.5(1-\rho^{spearman}_{i,j})}`. + .. math:: D_{i,j} = \\sqrt{0.5(1-\\rho^{spearman}_{i,j})} - 'abs_pearson': absolute value pearson correlation matrix. Distance formula: - :math:`D_{i,j} = \\sqrt{(1-|\rho^{pearson}_{i,j}|)}`. + .. math:: D_{i,j} = \\sqrt{(1-|\\rho^{pearson}_{i,j}|)} - 'abs_spearman': absolute value spearman correlation matrix. Distance formula: - :math:`D_{i,j} = \\sqrt{(1-|\rho^{spearman}_{i,j}|)}`. + .. math:: D_{i,j} = \\sqrt{(1-|\\rho^{spearman}_{i,j}|)} - 'distance': distance correlation matrix. Distance formula: - :math:`D_{i,j} = \\sqrt{(1-\rho^{distance}_{i,j})}`. + .. math:: D_{i,j} = \\sqrt{(1-\\rho^{distance}_{i,j})} - 'mutual_info': mutual information matrix. Distance used is variation information matrix. - 'tail': lower tail dependence index matrix. Dissimilarity formula: - :math:`D_{i,j} = -\\log{\\lambda_{i,j}}`. + .. math:: D_{i,j} = -\\log{\\lambda_{i,j}}. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`c-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`c-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`c-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`c-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `c-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `c-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `c-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `c-MLforAM`. objective: str, optional Objective function used by the NCO model. @@ -2905,8 +2854,7 @@ def get_nco( Number of CVaRs used to approximate Tail Gini of gains. If None it duplicates a_sim value. The default is None. linkage: str, optional - Linkage method of hierarchical clustering. For more information see - `linkage `_. + Linkage method of hierarchical clustering. For more information see `linkage `__. The default is 'single'. Possible values are: - 'single'. @@ -2929,12 +2877,9 @@ def get_nco( Number of bins used to calculate variation of information. The default value is 'KN'. Possible values are: - - 'KN': Knuth's choice method. For more information see - `knuth_bin_width `_. - - 'FD': Freedman–Diaconis' choice method. For more information see - `freedman_bin_width `_. - - 'SC': Scotts' choice method. For more information see - `scott_bin_width `_. + - 'KN': Knuth's choice method. For more information see `knuth_bin_width `__. + - 'FD': Freedman–Diaconis' choice method. For more information see `freedman_bin_width `__. + - 'SC': Scotts' choice method. For more information see `scott_bin_width `__. - 'HGR': Hacine-Gharbi and Ravier' choice method. alpha_tail: float, optional diff --git a/openbb_terminal/portfolio/portfolio_optimization/optimizer_view.py b/openbb_terminal/portfolio/portfolio_optimization/optimizer_view.py index f6f4d89f87a..80fdb272bf5 100644 --- a/openbb_terminal/portfolio/portfolio_optimization/optimizer_view.py +++ b/openbb_terminal/portfolio/portfolio_optimization/optimizer_view.py @@ -1,7 +1,8 @@ """Optimization View""" __docformat__ = "numpy" -# pylint: disable=R0913, R0914, C0302, too-many-branches, too-many-statements +# pylint: disable=R0913, R0914, C0302, too-many-branches, too-many-statements, line-too-long +# flake8: noqa: E501 import logging import math @@ -661,8 +662,7 @@ def display_equal_weight( threshold: float, optional Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. risk_measure: str, optional The risk measure used to optimize the portfolio. The default is 'MV'. Possible values are: @@ -764,9 +764,9 @@ def display_property_weighting( freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -774,8 +774,7 @@ def display_property_weighting( threshold: float, optional Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. s_property : str Property to get weighted portfolio of risk_measure: str, optional @@ -887,9 +886,9 @@ def display_mean_risk( freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -897,8 +896,7 @@ def display_mean_risk( threshold: float, optional Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. risk_measure: str, optional The risk measure used to optimize the portfolio. The default is 'MV'. Possible values are: @@ -943,28 +941,24 @@ def display_mean_risk( The default value is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`a-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`a-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `a-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `a-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `a-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `a-MLforAM`. d_ewma: float, optional The smoothing factor of ewma methods. @@ -1078,9 +1072,9 @@ def display_max_sharpe( freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -1088,8 +1082,7 @@ def display_max_sharpe( threshold: float, optional Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. risk_measure: str, optional The risk measure used to optimize the portfolio. The default is 'MV'. Possible values are: @@ -1125,28 +1118,24 @@ def display_max_sharpe( The default value is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`a-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`a-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `a-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `a-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `a-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `a-MLforAM`. d_ewma: float, optional The smoothing factor of ewma methods. @@ -1256,9 +1245,9 @@ def display_min_risk( freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -1266,8 +1255,7 @@ def display_min_risk( threshold: float, optional Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. risk_measure: str, optional The risk measure used to optimize the portfolio. The default is 'MV'. Possible values are: @@ -1303,28 +1291,24 @@ def display_min_risk( The default value is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`a-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`a-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `a-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `a-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `a-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `a-MLforAM`. d_ewma: float, optional The smoothing factor of ewma methods. @@ -1430,9 +1414,9 @@ def display_max_util( freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -1440,8 +1424,7 @@ def display_max_util( threshold: float, optional Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. risk_measure: str, optional The risk measure used to optimize the portfolio. The default is 'MV'. Possible values are: @@ -1477,28 +1460,24 @@ def display_max_util( The default value is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`a-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`a-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `a-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `a-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `a-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `a-MLforAM`. d_ewma: float, optional The smoothing factor of ewma methods. @@ -1604,9 +1583,9 @@ def display_max_ret( freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -1614,8 +1593,7 @@ def display_max_ret( threshold: float, optional Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. risk_measure: str, optional The risk measure used to optimize the portfolio. The default is 'MV'. Possible values are: @@ -1651,28 +1629,24 @@ def display_max_ret( The default value is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`a-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`a-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `a-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `a-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `a-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `a-MLforAM`. d_ewma: float, optional The smoothing factor of ewma methods. @@ -1771,9 +1745,9 @@ def display_max_div( freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -1781,25 +1755,22 @@ def display_max_div( threshold: float, optional Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`a-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`a-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `a-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `a-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `a-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `a-MLforAM`. d_ewma: float, optional The smoothing factor of ewma methods. @@ -1889,9 +1860,9 @@ def display_max_decorr( freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -1899,25 +1870,22 @@ def display_max_decorr( threshold: float, optional Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`a-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`a-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `a-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `a-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `a-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `a-MLforAM`. d_ewma: float, optional The smoothing factor of ewma methods. @@ -2020,9 +1988,9 @@ def display_black_litterman( freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -2030,8 +1998,7 @@ def display_black_litterman( threshold: float, optional Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. benchmark : Dict Dict of portfolio weights objective: str @@ -2155,9 +2122,9 @@ def display_ef( freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -2165,8 +2132,7 @@ def display_ef( threshold: float, optional Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. risk_measure: str, optional The risk measure used to optimize the portfolio. The default is 'MV'. Possible values are: @@ -2374,10 +2340,10 @@ def display_risk_parity( freq: str The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. - - X (integer days) for returns calculated every X days. + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. + - X (integer days) for returns calculated every X days. maxnan: float Max percentage of nan values accepted per asset to be included in @@ -2385,8 +2351,7 @@ def display_risk_parity( threshold: float Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. risk_measure: str The risk measure used to optimize the portfolio. The default is 'MV'. Possible values are: @@ -2417,28 +2382,24 @@ def display_risk_parity( The default value is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`a-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`a-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `a-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `a-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `a-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `a-MLforAM`. d_ewma: float, optional The smoothing factor of ewma methods. @@ -2532,10 +2493,10 @@ def display_rel_risk_parity( freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. - - X (integer days) for returns calculated every X days. + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. + - X (integer days) for returns calculated every X days. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -2543,8 +2504,7 @@ def display_rel_risk_parity( threshold: float, optional Value used to replace outliers that are higher to threshold. method: str, optional - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. version : str, optional Relaxed risk parity model version. The default is 'A'. Possible values are: @@ -2566,28 +2526,24 @@ def display_rel_risk_parity( The default value is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`a-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`a-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `a-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `a-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `a-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `a-MLforAM`. d_ewma: float, optional The smoothing factor of ewma methods. @@ -2689,9 +2645,9 @@ def display_hcp( freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -2699,8 +2655,7 @@ def display_hcp( threshold: float, optional Value used to replace outliers that are higher to threshold. method: str, optional - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. model: str, optional The hierarchical cluster portfolio model used for optimize the portfolio. The default is 'HRP'. Possible values are: @@ -2714,36 +2669,34 @@ def display_hcp( metric and clusters. The default is 'pearson'. Possible values are: - 'pearson': pearson correlation matrix. Distance formula: - :math:`D_{i,j} = \\sqrt{0.5(1-\rho^{pearson}_{i,j})}`. + .. math:: D_{i,j} = \\sqrt{0.5(1-\\rho^{pearson}_{i,j})}. - 'spearman': spearman correlation matrix. Distance formula: - :math:`D_{i,j} = \\sqrt{0.5(1-\rho^{spearman}_{i,j})}`. + .. math:: D_{i,j} = \\sqrt{0.5(1-\\rho^{spearman}_{i,j})}. - 'abs_pearson': absolute value pearson correlation matrix. Distance formula: - :math:`D_{i,j} = \\sqrt{(1-|\rho^{pearson}_{i,j}|)}`. + .. math:: D_{i,j} = \\sqrt{(1-|\\rho^{pearson}_{i,j}|)}. - 'abs_spearman': absolute value spearman correlation matrix. Distance formula: - :math:`D_{i,j} = \\sqrt{(1-|\rho^{spearman}_{i,j}|)}`. + .. math:: D_{i,j} = \\sqrt{(1-|\\rho^{spearman}_{i,j}|)}. - 'distance': distance correlation matrix. Distance formula: - :math:`D_{i,j} = \\sqrt{(1-\rho^{distance}_{i,j})}`. + .. math:: D_{i,j} = \\sqrt{(1-\\rho^{distance}_{i,j})}. - 'mutual_info': mutual information matrix. Distance used is variation information matrix. - 'tail': lower tail dependence index matrix. Dissimilarity formula: - :math:`D_{i,j} = -\\log{\\lambda_{i,j}}`. + .. math:: D_{i,j} = -\\log{\\lambda_{i,j}}. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`c-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`c-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`c-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`c-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `c-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `c-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `c-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `c-MLforAM`. objective: str, optional Objective function used by the NCO model. @@ -2803,8 +2756,7 @@ def display_hcp( Number of CVaRs used to approximate Tail Gini of gains. If None it duplicates a_sim value. The default is None. linkage: str, optional - Linkage method of hierarchical clustering. For more information see - `linkage `_. + Linkage method of hierarchical clustering. For more information see `linkage `__. The default is 'single'. Possible values are: - 'single'. @@ -2827,12 +2779,9 @@ def display_hcp( Number of bins used to calculate variation of information. The default value is 'KN'. Possible values are: - - 'KN': Knuth's choice method. For more information see - `knuth_bin_width `_. - - 'FD': Freedman–Diaconis' choice method. For more information see - `freedman_bin_width `_. - - 'SC': Scotts' choice method. For more information see - `scott_bin_width `_. + - 'KN': Knuth's choice method. For more information see `knuth_bin_width `__. + - 'FD': Freedman–Diaconis' choice method. For more information see `freedman_bin_width `__. + - 'SC': Scotts' choice method. For more information see `scott_bin_width `__. - 'HGR': Hacine-Gharbi and Ravier' choice method. alpha_tail: float, optional @@ -2965,9 +2914,9 @@ def display_hrp( freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -2975,43 +2924,40 @@ def display_hrp( threshold: float, optional Value used to replace outliers that are higher to threshold. method: str, optional - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. codependence: str, optional The codependence or similarity matrix used to build the distance metric and clusters. The default is 'pearson'. Possible values are: - 'pearson': pearson correlation matrix. Distance formula: - :math:`D_{i,j} = \\sqrt{0.5(1-\rho^{pearson}_{i,j})}`. + .. math:: D_{i,j} = \\sqrt{0.5(1-\\rho^{pearson}_{i,j})}. - 'spearman': spearman correlation matrix. Distance formula: - :math:`D_{i,j} = \\sqrt{0.5(1-\rho^{spearman}_{i,j})}`. + .. math:: D_{i,j} = \\sqrt{0.5(1-\\rho^{spearman}_{i,j})}. - 'abs_pearson': absolute value pearson correlation matrix. Distance formula: - :math:`D_{i,j} = \\sqrt{(1-|\rho^{pearson}_{i,j}|)}`. + .. math:: D_{i,j} = \\sqrt{(1-|\\rho^{pearson}_{i,j}|)}. - 'abs_spearman': absolute value spearman correlation matrix. Distance formula: - :math:`D_{i,j} = \\sqrt{(1-|\rho^{spearman}_{i,j}|)}`. + .. math:: D_{i,j} = \\sqrt{(1-|\\rho^{spearman}_{i,j}|)}. - 'distance': distance correlation matrix. Distance formula: - :math:`D_{i,j} = \\sqrt{(1-\rho^{distance}_{i,j})}`. + .. math:: D_{i,j} = \\sqrt{(1-\\rho^{distance}_{i,j})}. - 'mutual_info': mutual information matrix. Distance used is variation information matrix. - 'tail': lower tail dependence index matrix. Dissimilarity formula: - :math:`D_{i,j} = -\\log{\\lambda_{i,j}}`. + .. math:: D_{i,j} = -\\log{\\lambda_{i,j}}. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`c-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`c-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`c-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`c-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `c-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `c-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `c-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `c-MLforAM`. risk_measure: str, optional The risk measure used to optimize the portfolio. If model is 'NCO', @@ -3062,8 +3008,7 @@ def display_hrp( Number of CVaRs used to approximate Tail Gini of gains. If None it duplicates a_sim value. The default is None. linkage: str, optional - Linkage method of hierarchical clustering. For more information see - `linkage `_. + Linkage method of hierarchical clustering. For more information see `linkage `__. The default is 'single'. Possible values are: - 'single'. @@ -3086,12 +3031,9 @@ def display_hrp( Number of bins used to calculate variation of information. The default value is 'KN'. Possible values are: - - 'KN': Knuth's choice method. For more information see - `knuth_bin_width `_. - - 'FD': Freedman–Diaconis' choice method. For more information see - `freedman_bin_width `_. - - 'SC': Scotts' choice method. For more information see - `scott_bin_width `_. + - 'KN': Knuth's choice method. For more information see `knuth_bin_width `__. + - 'FD': Freedman–Diaconis' choice method. For more information see `freedman_bin_width `__. + - 'SC': Scotts' choice method. For more information see `scott_bin_width `__. - 'HGR': Hacine-Gharbi and Ravier' choice method. alpha_tail: float, optional @@ -3217,9 +3159,9 @@ def display_herc( freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -3227,8 +3169,7 @@ def display_herc( threshold: float, optional Value used to replace outliers that are higher to threshold. method: str, optional - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. model: str, optional The hierarchical cluster portfolio model used for optimize the portfolio. The default is 'HRP'. Possible values are: @@ -3242,36 +3183,34 @@ def display_herc( metric and clusters. The default is 'pearson'. Possible values are: - 'pearson': pearson correlation matrix. Distance formula: - :math:`D_{i,j} = \\sqrt{0.5(1-\rho^{pearson}_{i,j})}`. + .. math:: D_{i,j} = \\sqrt{0.5(1-\\rho^{pearson}_{i,j})}. - 'spearman': spearman correlation matrix. Distance formula: - :math:`D_{i,j} = \\sqrt{0.5(1-\rho^{spearman}_{i,j})}`. + .. math:: D_{i,j} = \\sqrt{0.5(1-\\rho^{spearman}_{i,j})}. - 'abs_pearson': absolute value pearson correlation matrix. Distance formula: - :math:`D_{i,j} = \\sqrt{(1-|\rho^{pearson}_{i,j}|)}`. + .. math:: D_{i,j} = \\sqrt{(1-|\\rho^{pearson}_{i,j}|)}. - 'abs_spearman': absolute value spearman correlation matrix. Distance formula: - :math:`D_{i,j} = \\sqrt{(1-|\rho^{spearman}_{i,j}|)}`. + .. math:: D_{i,j} = \\sqrt{(1-|\\rho^{spearman}_{i,j}|)}. - 'distance': distance correlation matrix. Distance formula: - :math:`D_{i,j} = \\sqrt{(1-\rho^{distance}_{i,j})}`. + .. math:: D_{i,j} = \\sqrt{(1-\\rho^{distance}_{i,j})}. - 'mutual_info': mutual information matrix. Distance used is variation information matrix. - 'tail': lower tail dependence index matrix. Dissimilarity formula: - :math:`D_{i,j} = -\\log{\\lambda_{i,j}}`. + .. math:: D_{i,j} = -\\log{\\lambda_{i,j}}. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`c-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`c-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`c-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`c-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `c-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `c-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `c-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `c-MLforAM`. risk_measure: str, optional The risk measure used to optimize the portfolio. If model is 'NCO', @@ -3322,8 +3261,7 @@ def display_herc( Number of CVaRs used to approximate Tail Gini of gains. If None it duplicates a_sim value. The default is None. linkage: str, optional - Linkage method of hierarchical clustering. For more information see - `linkage `_. + Linkage method of hierarchical clustering. For more information see `linkage `__. The default is 'single'. Possible values are: - 'single'. @@ -3346,12 +3284,9 @@ def display_herc( Number of bins used to calculate variation of information. The default value is 'KN'. Possible values are: - - 'KN': Knuth's choice method. For more information see - `knuth_bin_width `_. - - 'FD': Freedman–Diaconis' choice method. For more information see - `freedman_bin_width `_. - - 'SC': Scotts' choice method. For more information see - `scott_bin_width `_. + - 'KN': Knuth's choice method. For more information see `knuth_bin_width `__. + - 'FD': Freedman–Diaconis' choice method. For more information see `freedman_bin_width `__. + - 'SC': Scotts' choice method. For more information see `scott_bin_width `__. - 'HGR': Hacine-Gharbi and Ravier' choice method. alpha_tail: float, optional @@ -3478,9 +3413,9 @@ def display_nco( freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -3488,8 +3423,7 @@ def display_nco( threshold: float, optional Value used to replace outliers that are higher to threshold. method: str, optional - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. model: str, optional The hierarchical cluster portfolio model used for optimize the portfolio. The default is 'HRP'. Possible values are: @@ -3503,36 +3437,34 @@ def display_nco( metric and clusters. The default is 'pearson'. Possible values are: - 'pearson': pearson correlation matrix. Distance formula: - :math:`D_{i,j} = \\sqrt{0.5(1-\rho^{pearson}_{i,j})}`. + .. math:: D_{i,j} = \\sqrt{0.5(1-\\rho^{pearson}_{i,j})}. - 'spearman': spearman correlation matrix. Distance formula: - :math:`D_{i,j} = \\sqrt{0.5(1-\rho^{spearman}_{i,j})}`. + .. math:: D_{i,j} = \\sqrt{0.5(1-\\rho^{spearman}_{i,j})}. - 'abs_pearson': absolute value pearson correlation matrix. Distance formula: - :math:`D_{i,j} = \\sqrt{(1-|\rho^{pearson}_{i,j}|)}`. + .. math:: D_{i,j} = \\sqrt{(1-|\\rho^{pearson}_{i,j}|)}. - 'abs_spearman': absolute value spearman correlation matrix. Distance formula: - :math:`D_{i,j} = \\sqrt{(1-|\rho^{spearman}_{i,j}|)}`. + .. math:: D_{i,j} = \\sqrt{(1-|\\rho^{spearman}_{i,j}|)}. - 'distance': distance correlation matrix. Distance formula: - :math:`D_{i,j} = \\sqrt{(1-\rho^{distance}_{i,j})}`. + .. math:: D_{i,j} = \\sqrt{(1-\\rho^{distance}_{i,j})}. - 'mutual_info': mutual information matrix. Distance used is variation information matrix. - 'tail': lower tail dependence index matrix. Dissimilarity formula: - :math:`D_{i,j} = -\\log{\\lambda_{i,j}}`. + .. math:: D_{i,j} = -\\log{\\lambda_{i,j}}. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`c-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`c-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`c-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`c-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `c-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `c-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `c-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `c-MLforAM`. objective: str, optional Objective function used by the NCO model. @@ -3592,8 +3524,7 @@ def display_nco( Number of CVaRs used to approximate Tail Gini of gains. If None it duplicates a_sim value. The default is None. linkage: str, optional - Linkage method of hierarchical clustering. For more information see - `linkage `_. + Linkage method of hierarchical clustering. For more information see `linkage `__. The default is 'single'. Possible values are: - 'single'. @@ -3616,12 +3547,9 @@ def display_nco( Number of bins used to calculate variation of information. The default value is 'KN'. Possible values are: - - 'KN': Knuth's choice method. For more information see - `knuth_bin_width `_. - - 'FD': Freedman–Diaconis' choice method. For more information see - `freedman_bin_width `_. - - 'SC': Scotts' choice method. For more information see - `scott_bin_width `_. + - 'KN': Knuth's choice method. For more information see `knuth_bin_width `__. + - 'FD': Freedman–Diaconis' choice method. For more information see `freedman_bin_width `__. + - 'SC': Scotts' choice method. For more information see `scott_bin_width `__. - 'HGR': Hacine-Gharbi and Ravier' choice method. alpha_tail: float, optional @@ -3843,9 +3771,9 @@ def additional_plots( freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. risk_measure: str, optional The risk measure used to optimize the portfolio. If model is 'NCO', diff --git a/openbb_terminal/sdk.py b/openbb_terminal/sdk.py index 1ad7b7b3388..4ebeea47407 100644 --- a/openbb_terminal/sdk.py +++ b/openbb_terminal/sdk.py @@ -51,6 +51,7 @@ TerminalStyle().applyMPLstyle() SUPPRESS_LOGGING_CLASSES = { ReportController: "ReportController", DashboardsController: "DashboardsController", + "test_load_sdk": "test_load_sdk", } @@ -1948,6 +1949,18 @@ functions = { "keys.santiment": {"model": "openbb_terminal.keys_model.set_santiment_key"}, "keys.tokenterminal": {"model": "openbb_terminal.keys_model.set_tokenterminal_key"}, "keys.shroom": {"model": "openbb_terminal.keys_model.set_shroom_key"}, + "futures.search": { + "model": "openbb_terminal.futures.yfinance_model.get_search_futures", + "view": "openbb_terminal.futures.yfinance_view.display_search", + }, + "futures.historical": { + "model": "openbb_terminal.futures.yfinance_model.get_historical_futures", + "view": "openbb_terminal.futures.yfinance_view.display_historical", + }, + "futures.curve": { + "model": "openbb_terminal.futures.yfinance_model.get_curve_futures", + "view": "openbb_terminal.futures.yfinance_view.display_curve", + }, } forecast_extras = { "forecast.load": {"model": "openbb_terminal.common.common_model.load"}, @@ -2045,18 +2058,6 @@ forecast_extras = { "model": "openbb_terminal.forecast.nhits_model.get_nhits_data", "view": "openbb_terminal.forecast.nhits_view.display_nhits_forecast", }, - "futures.search": { - "model": "openbb_terminal.futures.yfinance_model.get_search_futures", - "view": "openbb_terminal.futures.yfinance_view.display_search", - }, - "futures.historical": { - "model": "openbb_terminal.futures.yfinance_model.get_historical_futures", - "view": "openbb_terminal.futures.yfinance_view.display_historical", - }, - "futures.curve": { - "model": "openbb_terminal.futures.yfinance_model.get_curve_futures", - "view": "openbb_terminal.futures.yfinance_view.display_curve", - }, } if forecasting: diff --git a/openbb_terminal/stocks/fundamental_analysis/yahoo_finance_model.py b/openbb_terminal/stocks/fundamental_analysis/yahoo_finance_model.py index cd16309dae5..c9fc4f8aa93 100644 --- a/openbb_terminal/stocks/fundamental_analysis/yahoo_finance_model.py +++ b/openbb_terminal/stocks/fundamental_analysis/yahoo_finance_model.py @@ -334,9 +334,11 @@ def get_financials(symbol: str, statement: str, ratios: bool = False) -> pd.Data Stock ticker symbol statement: str can be: - cash-flow - financials for Income - balance-sheet + + - cash-flow + - financials for Income + - balance-sheet + ratios: bool Shows percentage change diff --git a/openbb_terminal/stocks/fundamental_analysis/yahoo_finance_view.py b/openbb_terminal/stocks/fundamental_analysis/yahoo_finance_view.py index 988c232420a..2b9181a8d2c 100644 --- a/openbb_terminal/stocks/fundamental_analysis/yahoo_finance_view.py +++ b/openbb_terminal/stocks/fundamental_analysis/yahoo_finance_view.py @@ -395,11 +395,14 @@ def display_fundamentals( symbol: str Stock ticker symbol statement: str - can be: - cash-flow - financials for Income - balance-sheet + Possible values are: + + - cash-flow + - financials for Income + - balance-sheet + limit: int + Number of periods to show ratios: bool Shows percentage change plot: list diff --git a/tests/openbb_terminal/sdk/test_sdk.py b/tests/openbb_terminal/sdk/test_sdk.py index db33dd0d99d..794e1add750 100644 --- a/tests/openbb_terminal/sdk/test_sdk.py +++ b/tests/openbb_terminal/sdk/test_sdk.py @@ -1,9 +1,7 @@ import pytest - -# pylint disable=import-outside-toplevel +# flake8: noqa +# pylint: disable= import-outside-toplevel, unused-import @pytest.mark.vcr def test_load_sdk(): from openbb_terminal.sdk import openbb - - openbb.stocks.load("TSLA") diff --git a/website/config.toml b/website/config.toml index 5130ad67854..31827b5b6fc 100644 --- a/website/config.toml +++ b/website/config.toml @@ -81,3 +81,15 @@ enableGitInfo = true # (Optional, default false) Auto-decrease brightness of images and add a slightly grayscale to avoid # bright spots while using the dark mode. geekdocDarkModeDim = false + + +[security] + enableInlineShortcodes = false + [security.exec] + allow = ['^dart-sass-embedded$', '^go$', '^npx$', '^postcss$', "rst2html.py"] + osEnv = ['(?i)^((HTTPS?|NO)_PROXY|PATH(EXT)?|APPDATA|TE?MP|TERM)$'] + [security.funcs] + getenv = ['^HUGO_'] + [security.http] + methods = ['(?i)GET|POST'] + urls = ['.*'] diff --git a/website/content/SDK/alt/covid/global_cases/_index.md b/website/content/SDK/alt/covid/global_cases/_index.md deleted file mode 100644 index c111df4f570..00000000000 --- a/website/content/SDK/alt/covid/global_cases/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### alt.covid.global_cases(country: str) -> pandas.core.frame.DataFrame - -Get historical cases for given country - - Parameters - ---------- - country: str - Country to search for - - Returns - ------- - pd.DataFrame - Dataframe of historical cases diff --git a/website/content/SDK/alt/covid/global_cases/_index.rst b/website/content/SDK/alt/covid/global_cases/_index.rst new file mode 100644 index 00000000000..343165e652a --- /dev/null +++ b/website/content/SDK/alt/covid/global_cases/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +alt.covid.global_cases( + country: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get historical cases for given country +

+ +* **Parameters** + + country: str + Country to search for + +* **Returns** + + pd.DataFrame + Dataframe of historical cases diff --git a/website/content/SDK/alt/covid/global_deaths/_index.md b/website/content/SDK/alt/covid/global_deaths/_index.md deleted file mode 100644 index c1e67a1af58..00000000000 --- a/website/content/SDK/alt/covid/global_deaths/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### alt.covid.global_deaths(country: str) -> pandas.core.frame.DataFrame - -Get historical deaths for given country - - Parameters - ---------- - country: str - Country to search for - - Returns - ------- - pd.DataFrame - Dataframe of historical deaths diff --git a/website/content/SDK/alt/covid/global_deaths/_index.rst b/website/content/SDK/alt/covid/global_deaths/_index.rst new file mode 100644 index 00000000000..7337cdca6b6 --- /dev/null +++ b/website/content/SDK/alt/covid/global_deaths/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +alt.covid.global_deaths( + country: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get historical deaths for given country +

+ +* **Parameters** + + country: str + Country to search for + +* **Returns** + + pd.DataFrame + Dataframe of historical deaths diff --git a/website/content/SDK/alt/covid/ov/_index.md b/website/content/SDK/alt/covid/ov/_index.md deleted file mode 100644 index ddbacdd95fc..00000000000 --- a/website/content/SDK/alt/covid/ov/_index.md +++ /dev/null @@ -1,31 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### alt.covid.ov(country, limit: int = 100) -> pandas.core.frame.DataFrame - -Get historical cases and deaths by country - - Parameters - ---------- - country: str - Country to get data for - limit: int - Number of raw data to show - -## Getting charts -### alt.covid.ov(country, raw: bool = False, limit: int = 10, export: str = '', plot: bool = True, chart=True) -> None - -Show historical cases and deaths by country - - Parameters - ---------- - country: str - Country to get data for - raw: bool - Flag to display raw data - limit: int - Number of raw data to show - export: str - Format to export data - plot: bool - Flag to display historical plot diff --git a/website/content/SDK/alt/covid/ov/_index.rst b/website/content/SDK/alt/covid/ov/_index.rst new file mode 100644 index 00000000000..0a3a8de3bff --- /dev/null +++ b/website/content/SDK/alt/covid/ov/_index.rst @@ -0,0 +1,76 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +alt.covid.ov( + country, limit: int = 100, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get historical cases and deaths by country +

+ +* **Parameters** + + country: str + Country to get data for + limit: int + Number of raw data to show + chart: *bool* + Flag to display chart + + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +alt.covid.ov( + country, raw: bool = False, + limit: int = 10, + export: str = '', + plot: bool = True, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Show historical cases and deaths by country +

+ +* **Parameters** + + country: str + Country to get data for + raw: bool + Flag to display raw data + limit: int + Number of raw data to show + export: str + Format to export data + plot: bool + Flag to display historical plot + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/alt/covid/slopes/_index.md b/website/content/SDK/alt/covid/slopes/_index.md deleted file mode 100644 index b4427d2d93c..00000000000 --- a/website/content/SDK/alt/covid/slopes/_index.md +++ /dev/null @@ -1,39 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### alt.covid.slopes(days_back: int = 30, limit: int = 50, threshold: int = 10000, ascend: bool = False) -> pandas.core.frame.DataFrame - -Load cases and find slope over period - - Parameters - ---------- - days_back: int - Number of historical days to consider - limit: int - Number of rows to show - threshold: int - Threshold for total number of cases - ascend: bool - Flag to sort in ascending order - Returns - ------- - pd.DataFrame - Dataframe containing slopes - -## Getting charts -### alt.covid.slopes(days_back: int = 30, limit: int = 10, threshold: int = 10000, ascend: bool = False, export: str = '', chart=True) -> None - - - - Parameters - ---------- - days_back: int - Number of historical days to get slope for - limit: int - Number to show in table - ascend: bool - Flag to sort in ascending order - threshold: int - Threshold for total cases over period - export : str - Format to export data diff --git a/website/content/SDK/alt/covid/slopes/_index.rst b/website/content/SDK/alt/covid/slopes/_index.rst new file mode 100644 index 00000000000..a2cb3d674ed --- /dev/null +++ b/website/content/SDK/alt/covid/slopes/_index.rst @@ -0,0 +1,89 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +alt.covid.slopes( + days_back: int = 30, + limit: int = 50, + threshold: int = 10000, + ascend: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Load cases and find slope over period +

+ +* **Parameters** + + days_back: int + Number of historical days to consider + limit: int + Number of rows to show + threshold: int + Threshold for total number of cases + ascend: bool + Flag to sort in ascending order + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Dataframe containing slopes + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +alt.covid.slopes( + days_back: int = 30, + limit: int = 10, + threshold: int = 10000, + ascend: bool = False, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ +

+ +* **Parameters** + + days_back: int + Number of historical days to get slope for + limit: int + Number to show in table + ascend: bool + Flag to sort in ascending order + threshold: int + Threshold for total cases over period + export : str + Format to export data + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/alt/covid/stat/_index.md b/website/content/SDK/alt/covid/stat/_index.md deleted file mode 100644 index 127b5645b1f..00000000000 --- a/website/content/SDK/alt/covid/stat/_index.md +++ /dev/null @@ -1,35 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### alt.covid.stat(country, stat: str = 'cases', limit: int = 10) -> pandas.core.frame.DataFrame - -Show historical cases and deaths by country - - Parameters - ---------- - country: str - Country to get data for - stat: str - Statistic to get. Either "cases", "deaths" or "rates" - limit: int - Number of raw data to show - -## Getting charts -### alt.covid.stat(country, stat: str = 'cases', raw: bool = False, limit: int = 10, export: str = '', plot: bool = True, chart=True) -> None - -Show historical cases and deaths by country - - Parameters - ---------- - country: str - Country to get data for - stat: str - Statistic to get. Either "cases", "deaths" or "rates" - raw: bool - Flag to display raw data - limit: int - Number of raw data to show - export: str - Format to export data - plot : bool - Flag to plot data diff --git a/website/content/SDK/alt/covid/stat/_index.rst b/website/content/SDK/alt/covid/stat/_index.rst new file mode 100644 index 00000000000..73ab8ccdcad --- /dev/null +++ b/website/content/SDK/alt/covid/stat/_index.rst @@ -0,0 +1,82 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +alt.covid.stat( + country, stat: str = 'cases', + limit: int = 10, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Show historical cases and deaths by country +

+ +* **Parameters** + + country: str + Country to get data for + stat: str + Statistic to get. Either "cases", "deaths" or "rates" + limit: int + Number of raw data to show + chart: *bool* + Flag to display chart + + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +alt.covid.stat( + country, stat: str = 'cases', + raw: bool = False, + limit: int = 10, + export: str = '', + plot: bool = True, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Show historical cases and deaths by country +

+ +* **Parameters** + + country: str + Country to get data for + stat: str + Statistic to get. Either "cases", "deaths" or "rates" + raw: bool + Flag to display raw data + limit: int + Number of raw data to show + export: str + Format to export data + plot : bool + Flag to plot data + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/alt/oss/_make_request/_index.md b/website/content/SDK/alt/oss/_make_request/_index.md deleted file mode 100644 index 3b074fc8c5d..00000000000 --- a/website/content/SDK/alt/oss/_make_request/_index.md +++ /dev/null @@ -1,13 +0,0 @@ -## Get underlying data -### alt.oss._make_request(url: str) -> Optional[bs4.BeautifulSoup] - -Helper method to scrap - - Parameters - ---------- - url : str - url to scrape - - Returns - ------- - BeautifulSoup object diff --git a/website/content/SDK/alt/oss/_make_request/_index.rst b/website/content/SDK/alt/oss/_make_request/_index.rst new file mode 100644 index 00000000000..f7952f25785 --- /dev/null +++ b/website/content/SDK/alt/oss/_make_request/_index.rst @@ -0,0 +1,33 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +alt.oss._make_request( + url: str, + chart: bool = False, +) -> Optional[bs4.BeautifulSoup] +{{< /highlight >}} + +.. raw:: html + +

+ Helper method to scrap +

+ +* **Parameters** + + url : str + url to scrape + +* **Returns** + + BeautifulSoup object diff --git a/website/content/SDK/alt/oss/_retry_session/_index.md b/website/content/SDK/alt/oss/_retry_session/_index.md deleted file mode 100644 index f9ffcbd99f6..00000000000 --- a/website/content/SDK/alt/oss/_retry_session/_index.md +++ /dev/null @@ -1,19 +0,0 @@ -## Get underlying data -### alt.oss._retry_session(url: str, retries: int = 3, backoff_factor: float = 1.0) -> requests.sessions.Session - -Helper methods that retries to make request - - - Parameters - ---------- - url: str - Url to mount a session - retries: int - How many retries - backoff_factor: float - Backoff schema - time periods between retry - - Returns - ------- - requests.Session - Mounted session diff --git a/website/content/SDK/alt/oss/_retry_session/_index.rst b/website/content/SDK/alt/oss/_retry_session/_index.rst new file mode 100644 index 00000000000..56e09b996cf --- /dev/null +++ b/website/content/SDK/alt/oss/_retry_session/_index.rst @@ -0,0 +1,40 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +alt.oss._retry_session( + url: str, + retries: int = 3, + backoff_factor: float = 1.0, + chart: bool = False, +) -> requests.sessions.Session +{{< /highlight >}} + +.. raw:: html + +

+ Helper methods that retries to make request +

+ +* **Parameters** + + url: str + Url to mount a session + retries: int + How many retries + backoff_factor: float + Backoff schema - time periods between retry + +* **Returns** + + requests.Session + Mounted session diff --git a/website/content/SDK/alt/oss/github_data/_index.md b/website/content/SDK/alt/oss/github_data/_index.md deleted file mode 100644 index 96e16101798..00000000000 --- a/website/content/SDK/alt/oss/github_data/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### alt.oss.github_data(url: str, **kwargs) - -Get repository stats - - Parameters - ---------- - url: str - github api endpoint - params: dict - params to pass to api endpoint - Returns - ------- - dict with data diff --git a/website/content/SDK/alt/oss/github_data/_index.rst b/website/content/SDK/alt/oss/github_data/_index.rst new file mode 100644 index 00000000000..8f9ee9f756f --- /dev/null +++ b/website/content/SDK/alt/oss/github_data/_index.rst @@ -0,0 +1,35 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +alt.oss.github_data( + url: str, + **kwargs, chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Get repository stats +

+ +* **Parameters** + + url: str + github api endpoint + params: dict + params to pass to api endpoint + +* **Returns** + + dict with data diff --git a/website/content/SDK/alt/oss/history/_index.md b/website/content/SDK/alt/oss/history/_index.md deleted file mode 100644 index cdcb24b2515..00000000000 --- a/website/content/SDK/alt/oss/history/_index.md +++ /dev/null @@ -1,29 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### alt.oss.history(repo: str) - -Get repository star history - - Parameters - ---------- - repo : str - Repo to search for Format: org/repo, e.g., openbb-finance/openbbterminal - - Returns - ------- - pd.DataFrame - Columns: Date, Stars - -## Getting charts -### alt.oss.history(repo: str, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) -> None - -Display repo summary [Source: https://api.github.com] - - Parameters - ---------- - repo : str - Repository to display star history. Format: org/repo, e.g., openbb-finance/openbbterminal - export : str - Export dataframe data to csv,json,xlsx file - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/alt/oss/history/_index.rst b/website/content/SDK/alt/oss/history/_index.rst new file mode 100644 index 00000000000..68e42977e84 --- /dev/null +++ b/website/content/SDK/alt/oss/history/_index.rst @@ -0,0 +1,73 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +alt.oss.history( + repo: str, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Get repository star history +

+ +* **Parameters** + + repo : str + Repo to search for Format: org/repo, e.g., openbb-finance/openbbterminal + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame - Columns: Date, Stars + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +alt.oss.history( + repo: str, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display repo summary [Source: https://api.github.com] +

+ +* **Parameters** + + repo : str + Repository to display star history. Format: org/repo, e.g., openbb-finance/openbbterminal + export : str + Export dataframe data to csv,json,xlsx file + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/alt/oss/ross/_index.md b/website/content/SDK/alt/oss/ross/_index.md deleted file mode 100644 index 394ab7b19d0..00000000000 --- a/website/content/SDK/alt/oss/ross/_index.md +++ /dev/null @@ -1,38 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### alt.oss.ross() -> pandas.core.frame.DataFrame - -Get startups from ROSS index [Source: https://runacap.com/] - - Parameters - ---------- - - Returns - ------- - pandas.DataFrame: - list of startups - -## Getting charts -### alt.oss.ross(limit: int = 10, sortby: str = 'Stars AGR [%]', ascend: bool = False, show_chart: bool = False, show_growth: bool = True, chart_type: str = 'stars', export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) -> None - -Display list of startups from ross index [Source: https://runacap.com/] - - Parameters - ---------- - limit: int - Number of startups to search - sortby: str - Key by which to sort data. Default: Stars AGR [%] - ascend: bool - Flag to sort data descending - show_chart: bool - Flag to show chart with startups - show_growth: bool - Flag to show growth line chart - chart_type: str - Chart type {stars,forks} - export : str - Export dataframe data to csv,json,xlsx file - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/alt/oss/ross/_index.rst b/website/content/SDK/alt/oss/ross/_index.rst new file mode 100644 index 00000000000..951b00840dc --- /dev/null +++ b/website/content/SDK/alt/oss/ross/_index.rst @@ -0,0 +1,77 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +alt.oss.ross() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get startups from ROSS index [Source: https://runacap.com/] +

+ +* **Returns** + + pandas.DataFrame: + list of startups + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +alt.oss.ross( + limit: int = 10, + sortby: str = 'Stars AGR [%]', ascend: bool = False, + show_chart: bool = False, + show_growth: bool = True, + chart_type: str = 'stars', + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display list of startups from ross index [Source: https://runacap.com/] +

+ +* **Parameters** + + limit: int + Number of startups to search + sortby: str + Key by which to sort data. Default: Stars AGR [%] + ascend: bool + Flag to sort data descending + show_chart: bool + Flag to show chart with startups + show_growth: bool + Flag to show growth line chart + chart_type: str + Chart type {stars,forks} + export : str + Export dataframe data to csv,json,xlsx file + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/alt/oss/search/_index.md b/website/content/SDK/alt/oss/search/_index.md deleted file mode 100644 index 9dbd76032ef..00000000000 --- a/website/content/SDK/alt/oss/search/_index.md +++ /dev/null @@ -1,16 +0,0 @@ -## Get underlying data -### alt.oss.search(sortby: str = 'stars', page: int = 1, categories: str = '') -> pandas.core.frame.DataFrame - -Get repos sorted by stars or forks. Can be filtered by categories - - Parameters - ---------- - sortby : str - Sort repos by {stars, forks} - categories : str - Check for repo categories. If more than one separate with a comma: e.g., finance,investment. Default: None - page : int - Page number to get repos - Returns - ------- - pd.DataFrame with list of repos diff --git a/website/content/SDK/alt/oss/search/_index.rst b/website/content/SDK/alt/oss/search/_index.rst new file mode 100644 index 00000000000..e636e63c71b --- /dev/null +++ b/website/content/SDK/alt/oss/search/_index.rst @@ -0,0 +1,39 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +alt.oss.search( + sortby: str = 'stars', + page: int = 1, + categories: str = '', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get repos sorted by stars or forks. Can be filtered by categories +

+ +* **Parameters** + + sortby : str + Sort repos by {stars, forks} + categories : str + Check for repo categories. If more than one separate with a comma: e.g., finance,investment. Default: None + page : int + Page number to get repos + +* **Returns** + + pd.DataFrame with list of repos diff --git a/website/content/SDK/alt/oss/summary/_index.md b/website/content/SDK/alt/oss/summary/_index.md deleted file mode 100644 index 8c00830e627..00000000000 --- a/website/content/SDK/alt/oss/summary/_index.md +++ /dev/null @@ -1,27 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### alt.oss.summary(repo: str) -> pandas.core.frame.DataFrame - -Get repository summary - - Parameters - ---------- - repo : str - Repo to search for Format: org/repo, e.g., openbb-finance/openbbterminal - - Returns - ------- - pd.DataFrame - Columns: Metric, Value - -## Getting charts -### alt.oss.summary(repo: str, export: str = '', chart=True) -> None - -Display repo summary [Source: https://api.github.com] - - Parameters - ---------- - repo : str - Repository to display summary. Format: org/repo, e.g., openbb-finance/openbbterminal - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/alt/oss/summary/_index.rst b/website/content/SDK/alt/oss/summary/_index.rst new file mode 100644 index 00000000000..a37fc43548f --- /dev/null +++ b/website/content/SDK/alt/oss/summary/_index.rst @@ -0,0 +1,70 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +alt.oss.summary( + repo: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get repository summary +

+ +* **Parameters** + + repo : str + Repo to search for Format: org/repo, e.g., openbb-finance/openbbterminal + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame - Columns: Metric, Value + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +alt.oss.summary( + repo: str, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display repo summary [Source: https://api.github.com] +

+ +* **Parameters** + + repo : str + Repository to display summary. Format: org/repo, e.g., openbb-finance/openbbterminal + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/alt/oss/top/_index.md b/website/content/SDK/alt/oss/top/_index.md deleted file mode 100644 index b80227e2095..00000000000 --- a/website/content/SDK/alt/oss/top/_index.md +++ /dev/null @@ -1,36 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### alt.oss.top(sortby: str, limit: int = 50, categories: str = '') -> pandas.core.frame.DataFrame - -Get repos sorted by stars or forks. Can be filtered by categories - - Parameters - ---------- - sortby : str - Sort repos by {stars, forks} - categories : str - Check for repo categories. If more than one separate with a comma: e.g., finance,investment. Default: None - limit : int - Number of repos to search for - Returns - ------- - pd.DataFrame with list of repos - -## Getting charts -### alt.oss.top(sortby: str, categories: str = '', limit: int = 10, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) -> None - -Display repo summary [Source: https://api.github.com] - - Parameters - ---------- - sortby : str - Sort repos by {stars, forks} - categories : str - Check for repo categories. If more than one separate with a comma: e.g., finance,investment. Default: None - limit : int - Number of repos to look at - export : str - Export dataframe data to csv,json,xlsx file - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/alt/oss/top/_index.rst b/website/content/SDK/alt/oss/top/_index.rst new file mode 100644 index 00000000000..1334864a94d --- /dev/null +++ b/website/content/SDK/alt/oss/top/_index.rst @@ -0,0 +1,85 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +alt.oss.top( + sortby: str, + limit: int = 50, + categories: str = '', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get repos sorted by stars or forks. Can be filtered by categories +

+ +* **Parameters** + + sortby : str + Sort repos by {stars, forks} + categories : str + Check for repo categories. If more than one separate with a comma: e.g., finance,investment. Default: None + limit : int + Number of repos to search for + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame with list of repos + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +alt.oss.top( + sortby: str, + categories: str = '', + limit: int = 10, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display repo summary [Source: https://api.github.com] +

+ +* **Parameters** + + sortby : str + Sort repos by {stars, forks} + categories : str + Check for repo categories. If more than one separate with a comma: e.g., finance,investment. Default: None + limit : int + Number of repos to look at + export : str + Export dataframe data to csv,json,xlsx file + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/common/news/_index.md b/website/content/SDK/common/news/_index.md deleted file mode 100644 index 109c84a7d57..00000000000 --- a/website/content/SDK/common/news/_index.md +++ /dev/null @@ -1,18 +0,0 @@ -## Get underlying data -### common.news(term: str = '', sources: str = '', sort: str = 'published') -> pandas.core.frame.DataFrame - -Get news for a given term and source. [Source: Feedparser] - - Parameters - ---------- - term : str - term to search on the news articles - sources: str - sources to exclusively show news from (separated by commas) - sort: str - the column to sort by - - Returns - ---------- - articles : dict - term to search on the news articles diff --git a/website/content/SDK/common/news/_index.rst b/website/content/SDK/common/news/_index.rst new file mode 100644 index 00000000000..7e542412545 --- /dev/null +++ b/website/content/SDK/common/news/_index.rst @@ -0,0 +1,40 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +common.news( + term: str = '', + sources: str = '', + sort: str = 'published', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get news for a given term and source. [Source: Feedparser] +

+ +* **Parameters** + + term : str + term to search on the news articles + sources: str + sources to exclusively show news from (separated by commas) + sort: str + the column to sort by + +* **Returns** + + articles : dict + term to search on the news articles diff --git a/website/content/SDK/common/qa/bw/_index.md b/website/content/SDK/common/qa/bw/_index.md deleted file mode 100644 index a9916937b41..00000000000 --- a/website/content/SDK/common/qa/bw/_index.md +++ /dev/null @@ -1,37 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### common.qa.bw(data: pandas.core.frame.DataFrame, target: str, symbol: str = '', yearly: bool = True, external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None) -> None - -Show box and whisker plots - - Parameters - ---------- - symbol : str - Name of dataset - data : pd.DataFrame - Dataframe to look at - target : str - Data column to look at - yearly : bool - Flag to indicate yearly accumulation - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None - -## Getting charts -### common.qa.bw(data: pandas.core.frame.DataFrame, target: str, symbol: str = '', yearly: bool = True, external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) -> None - -Show box and whisker plots - - Parameters - ---------- - symbol : str - Name of dataset - data : pd.DataFrame - Dataframe to look at - target : str - Data column to look at - yearly : bool - Flag to indicate yearly accumulation - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/common/qa/bw/_index.rst b/website/content/SDK/common/qa/bw/_index.rst new file mode 100644 index 00000000000..d7818bb41df --- /dev/null +++ b/website/content/SDK/common/qa/bw/_index.rst @@ -0,0 +1,87 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +common.qa.bw( + data: pandas.core.frame.DataFrame, + target: str, + symbol: str = '', + yearly: bool = True, + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Show box and whisker plots +

+ +* **Parameters** + + symbol : str + Name of dataset + data : pd.DataFrame + Dataframe to look at + target : str + Data column to look at + yearly : bool + Flag to indicate yearly accumulation + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +common.qa.bw( + data: pandas.core.frame.DataFrame, + target: str, + symbol: str = '', + yearly: bool = True, + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Show box and whisker plots +

+ +* **Parameters** + + symbol : str + Name of dataset + data : pd.DataFrame + Dataframe to look at + target : str + Data column to look at + yearly : bool + Flag to indicate yearly accumulation + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/common/qa/calculate_adjusted_var/_index.md b/website/content/SDK/common/qa/calculate_adjusted_var/_index.md deleted file mode 100644 index 1084574a125..00000000000 --- a/website/content/SDK/common/qa/calculate_adjusted_var/_index.md +++ /dev/null @@ -1,22 +0,0 @@ -## Get underlying data -### common.qa.calculate_adjusted_var(kurtosis: float, skew: float, ndp: float, std: float, mean: float) -> float - -Calculates VaR, which is adjusted for skew and kurtosis (Cornish-Fischer-Expansion) - - Parameters - ---------- - kurtosis: float - kurtosis of data - skew: float - skew of data - ndp: float - normal distribution percentage number (99% -> -2.326) - std: float - standard deviation of data - mean: float - mean of data - - Returns - ------- - float - Real adjusted VaR diff --git a/website/content/SDK/common/qa/calculate_adjusted_var/_index.rst b/website/content/SDK/common/qa/calculate_adjusted_var/_index.rst new file mode 100644 index 00000000000..b4124a0390f --- /dev/null +++ b/website/content/SDK/common/qa/calculate_adjusted_var/_index.rst @@ -0,0 +1,46 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +common.qa.calculate_adjusted_var( + kurtosis: float, + skew: float, + ndp: float, + std: float, + mean: float, + chart: bool = False, +) -> float +{{< /highlight >}} + +.. raw:: html + +

+ Calculates VaR, which is adjusted for skew and kurtosis (Cornish-Fischer-Expansion) +

+ +* **Parameters** + + kurtosis: float + kurtosis of data + skew: float + skew of data + ndp: float + normal distribution percentage number (99% -> -2.326) + std: float + standard deviation of data + mean: float + mean of data + +* **Returns** + + float + Real adjusted VaR diff --git a/website/content/SDK/common/qa/decompose/_index.md b/website/content/SDK/common/qa/decompose/_index.md deleted file mode 100644 index 7f4bcb3daab..00000000000 --- a/website/content/SDK/common/qa/decompose/_index.md +++ /dev/null @@ -1,20 +0,0 @@ -## Get underlying data -### common.qa.decompose(data: pandas.core.frame.DataFrame, multiplicative: bool = False) -> Tuple[Any, pandas.core.frame.DataFrame, pandas.core.frame.DataFrame] - -Perform seasonal decomposition - - Parameters - ---------- - data : pd.DataFrame - Dataframe of targeted data - multiplicative : bool - Boolean to indicate multiplication instead of addition - - Returns - ------- - result: Any - Result of statsmodels seasonal_decompose - cycle: pd.DataFrame - Filtered cycle - trend: pd.DataFrame - Filtered Trend diff --git a/website/content/SDK/common/qa/decompose/_index.rst b/website/content/SDK/common/qa/decompose/_index.rst new file mode 100644 index 00000000000..31a5a9af626 --- /dev/null +++ b/website/content/SDK/common/qa/decompose/_index.rst @@ -0,0 +1,41 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +common.qa.decompose( + data: pandas.core.frame.DataFrame, + multiplicative: bool = False, + chart: bool = False, +) -> Tuple[Any, pandas.core.frame.DataFrame, pandas.core.frame.DataFrame] +{{< /highlight >}} + +.. raw:: html + +

+ Perform seasonal decomposition +

+ +* **Parameters** + + data : pd.DataFrame + Dataframe of targeted data + multiplicative : bool + Boolean to indicate multiplication instead of addition + +* **Returns** + + result: Any + Result of statsmodels seasonal_decompose + cycle: pd.DataFrame + Filtered cycle + trend: pd.DataFrame + Filtered Trend diff --git a/website/content/SDK/common/qa/es/_index.md b/website/content/SDK/common/qa/es/_index.md deleted file mode 100644 index d1dc7a5f402..00000000000 --- a/website/content/SDK/common/qa/es/_index.md +++ /dev/null @@ -1,46 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### common.qa.es(data: pandas.core.frame.DataFrame, use_mean: bool = False, distribution: str = 'normal', percentile: Union[float, int] = 99.9, portfolio: bool = False) -> pandas.core.frame.DataFrame - -Gets Expected Shortfall for specified stock dataframe - - Parameters - ---------- - data: pd.DataFrame - Data dataframe - use_mean: bool - If one should use the data mean for calculation - distribution: str - Type of distribution, options: laplace, student_t, normal - percentile: Union[float,int] - VaR percentile - portfolio: bool - If the data is a portfolio - - Returns - ------- - list - list of ES - list - list of historical ES - -## Getting charts -### common.qa.es(data: pandas.core.frame.DataFrame, symbol: str = '', use_mean: bool = False, distribution: str = 'normal', percentile: float = 99.9, portfolio: bool = False, chart=True) -> None - -Displays expected shortfall - - Parameters - ---------- - data: pd.DataFrame - Data dataframe - use_mean: - if one should use the data mean return - symbol: str - name of the data - distribution: str - choose distribution to use: logistic, laplace, normal - percentile: int - es percentile - portfolio: bool - If the data is a portfolio diff --git a/website/content/SDK/common/qa/es/_index.rst b/website/content/SDK/common/qa/es/_index.rst new file mode 100644 index 00000000000..e18cfc07c67 --- /dev/null +++ b/website/content/SDK/common/qa/es/_index.rst @@ -0,0 +1,97 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +common.qa.es( + data: pandas.core.frame.DataFrame, + use_mean: bool = False, + distribution: str = 'normal', + percentile: Union[float, int] = 99.9, + portfolio: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Gets Expected Shortfall for specified stock dataframe +

+ +* **Parameters** + + data: pd.DataFrame + Data dataframe + use_mean: bool + If one should use the data mean for calculation + distribution: str + Type of distribution, options: laplace, student_t, normal + percentile: Union[float,int] + VaR percentile + portfolio: bool + If the data is a portfolio + chart: *bool* + Flag to display chart + + +* **Returns** + + list + list of ES + list + list of historical ES + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +common.qa.es( + data: pandas.core.frame.DataFrame, + symbol: str = '', + use_mean: bool = False, + distribution: str = 'normal', + percentile: float = 99.9, + portfolio: bool = False, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Displays expected shortfall +

+ +* **Parameters** + + data: pd.DataFrame + Data dataframe + use_mean: + if one should use the data mean return + symbol: str + name of the data + distribution: str + choose distribution to use: logistic, laplace, normal + percentile: int + es percentile + portfolio: bool + If the data is a portfolio + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/common/qa/kurtosis/_index.md b/website/content/SDK/common/qa/kurtosis/_index.md deleted file mode 100644 index 854d166b00c..00000000000 --- a/website/content/SDK/common/qa/kurtosis/_index.md +++ /dev/null @@ -1,38 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### common.qa.kurtosis(data: pandas.core.frame.DataFrame, window: int = 14) -> pandas.core.frame.DataFrame - -Kurtosis Indicator - - Parameters - ---------- - data: pd.DataFrame - Dataframe of targeted data - window: int - Length of window - - Returns - ------- - df_kurt : pd.DataFrame - Dataframe of rolling kurtosis - -## Getting charts -### common.qa.kurtosis(symbol: str, data: pandas.core.frame.DataFrame, target: str, window: int = 14, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -View rolling kurtosis - - Parameters - ---------- - symbol: str - Ticker - data: pd.DataFrame - Dataframe of stock prices - target: str - Column in data to look at - window: int - Length of window - export: str - Format to export data - external_axes: Optional[List[plt.Axes]], optional - External axes (2 axes are expected in the list), by default None diff --git a/website/content/SDK/common/qa/kurtosis/_index.rst b/website/content/SDK/common/qa/kurtosis/_index.rst new file mode 100644 index 00000000000..d57551781a9 --- /dev/null +++ b/website/content/SDK/common/qa/kurtosis/_index.rst @@ -0,0 +1,86 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +common.qa.kurtosis( + data: pandas.core.frame.DataFrame, + window: int = 14, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Kurtosis Indicator +

+ +* **Parameters** + + data: pd.DataFrame + Dataframe of targeted data + window: int + Length of window + chart: *bool* + Flag to display chart + + +* **Returns** + + df_kurt : pd.DataFrame + Dataframe of rolling kurtosis + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +common.qa.kurtosis( + symbol: str, + data: pandas.core.frame.DataFrame, + target: str, + window: int = 14, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ View rolling kurtosis +

+ +* **Parameters** + + symbol: str + Ticker + data: pd.DataFrame + Dataframe of stock prices + target: str + Column in data to look at + window: int + Length of window + export: str + Format to export data + external_axes: Optional[List[plt.Axes]], optional + External axes (2 axes are expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/common/qa/normality/_index.md b/website/content/SDK/common/qa/normality/_index.md deleted file mode 100644 index ffeb91958b8..00000000000 --- a/website/content/SDK/common/qa/normality/_index.md +++ /dev/null @@ -1,33 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### common.qa.normality(data: pandas.core.frame.DataFrame) -> pandas.core.frame.DataFrame - - - Look at the distribution of returns and generate statistics on the relation to the normal curve. - This function calculates skew and kurtosis (the third and fourth moments) and performs both - a Jarque-Bera and Shapiro Wilk test to determine if data is normally distributed. - - Parameters - ---------- - data : pd.DataFrame - Dataframe of targeted data - - Returns - ------- - pd.DataFrame - Dataframe containing statistics of normality - -## Getting charts -### common.qa.normality(data: pandas.core.frame.DataFrame, target: str, export: str = '', chart=True) -> None - -View normality statistics - - Parameters - ---------- - data : pd.DataFrame - DataFrame - target : str - Column in data to look at - export : str - Format to export data diff --git a/website/content/SDK/common/qa/normality/_index.rst b/website/content/SDK/common/qa/normality/_index.rst new file mode 100644 index 00000000000..205a3a864cd --- /dev/null +++ b/website/content/SDK/common/qa/normality/_index.rst @@ -0,0 +1,76 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +common.qa.normality( + data: pandas.core.frame.DataFrame, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Look at the distribution of returns and generate statistics on the relation to the normal curve. + This function calculates skew and kurtosis (the third and fourth moments) and performs both + a Jarque-Bera and Shapiro Wilk test to determine if data is normally distributed. +

+ +* **Parameters** + + data : pd.DataFrame + Dataframe of targeted data + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Dataframe containing statistics of normality + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +common.qa.normality( + data: pandas.core.frame.DataFrame, + target: str, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ View normality statistics +

+ +* **Parameters** + + data : pd.DataFrame + DataFrame + target : str + Column in data to look at + export : str + Format to export data + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/common/qa/omega/_index.md b/website/content/SDK/common/qa/omega/_index.md deleted file mode 100644 index 728f7b4f7db..00000000000 --- a/website/content/SDK/common/qa/omega/_index.md +++ /dev/null @@ -1,27 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### common.qa.omega(data: pandas.core.frame.DataFrame, threshold_start: float = 0, threshold_end: float = 1.5) -> pandas.core.frame.DataFrame - -Get the omega series - Parameters - ---------- - data: pd.DataFrame - stock dataframe - threshold_start: float - annualized target return threshold start of plotted threshold range - threshold_end: float - annualized target return threshold end of plotted threshold range - -## Getting charts -### common.qa.omega(data: pandas.core.frame.DataFrame, threshold_start: float = 0, threshold_end: float = 1.5, chart=True) -> None - -Displays the omega ratio - Parameters - ---------- - data: pd.DataFrame - stock dataframe - threshold_start: float - annualized target return threshold start of plotted threshold range - threshold_end: float - annualized target return threshold end of plotted threshold range diff --git a/website/content/SDK/common/qa/omega/_index.rst b/website/content/SDK/common/qa/omega/_index.rst new file mode 100644 index 00000000000..132eae90d66 --- /dev/null +++ b/website/content/SDK/common/qa/omega/_index.rst @@ -0,0 +1,75 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +common.qa.omega( + data: pandas.core.frame.DataFrame, + threshold_start: float = 0, + threshold_end: float = 1.5, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get the omega series +

+ +* **Parameters** + + data: pd.DataFrame + stock dataframe + threshold_start: float + annualized target return threshold start of plotted threshold range + threshold_end: float + annualized target return threshold end of plotted threshold range + chart: *bool* + Flag to display chart + + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +common.qa.omega( + data: pandas.core.frame.DataFrame, + threshold_start: float = 0, + threshold_end: float = 1.5, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Displays the omega ratio +

+ +* **Parameters** + + data: pd.DataFrame + stock dataframe + threshold_start: float + annualized target return threshold start of plotted threshold range + threshold_end: float + annualized target return threshold end of plotted threshold range + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/common/qa/quantile/_index.md b/website/content/SDK/common/qa/quantile/_index.md deleted file mode 100644 index 004fd10e0f6..00000000000 --- a/website/content/SDK/common/qa/quantile/_index.md +++ /dev/null @@ -1,44 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### common.qa.quantile(data: pandas.core.frame.DataFrame, window: int = 14, quantile_pct: float = 0.5) -> Tuple[pandas.core.frame.DataFrame, pandas.core.frame.DataFrame] - -Overlay Median & Quantile - - Parameters - ---------- - data: pd.DataFrame - Dataframe of targeted data - window : int - Length of window - quantile_pct: float - Quantile to display - - Returns - ------- - df_med : pd.DataFrame - Dataframe of median prices over window - df_quantile : pd.DataFrame - Dataframe of gievn quantile prices over window - -## Getting charts -### common.qa.quantile(data: pandas.core.frame.DataFrame, target: str, symbol: str = '', window: int = 14, quantile: float = 0.5, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) -> None - -View rolling quantile - - Parameters - ---------- - data: pd.DataFrame - Dataframe - target: str - Column in data to look at - symbol : str - Stock ticker - window : int - Length of window - quantile: float - Quantile to get - export: str - Format to export data - external_axes: Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/common/qa/quantile/_index.rst b/website/content/SDK/common/qa/quantile/_index.rst new file mode 100644 index 00000000000..78fe4b73778 --- /dev/null +++ b/website/content/SDK/common/qa/quantile/_index.rst @@ -0,0 +1,94 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +common.qa.quantile( + data: pandas.core.frame.DataFrame, + window: int = 14, + quantile_pct: float = 0.5, + chart: bool = False, +) -> Tuple[pandas.core.frame.DataFrame, pandas.core.frame.DataFrame] +{{< /highlight >}} + +.. raw:: html + +

+ Overlay Median & Quantile +

+ +* **Parameters** + + data: pd.DataFrame + Dataframe of targeted data + window : int + Length of window + quantile_pct: float + Quantile to display + chart: *bool* + Flag to display chart + + +* **Returns** + + df_med : pd.DataFrame + Dataframe of median prices over window + df_quantile : pd.DataFrame + Dataframe of gievn quantile prices over window + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +common.qa.quantile( + data: pandas.core.frame.DataFrame, + target: str, + symbol: str = '', + window: int = 14, + quantile: float = 0.5, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ View rolling quantile +

+ +* **Parameters** + + data: pd.DataFrame + Dataframe + target: str + Column in data to look at + symbol : str + Stock ticker + window : int + Length of window + quantile: float + Quantile to get + export: str + Format to export data + external_axes: Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/common/qa/rolling/_index.md b/website/content/SDK/common/qa/rolling/_index.md deleted file mode 100644 index 3e4ffac4eaa..00000000000 --- a/website/content/SDK/common/qa/rolling/_index.md +++ /dev/null @@ -1,40 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### common.qa.rolling(data: pandas.core.frame.DataFrame, window: int = 14) -> Tuple[pandas.core.frame.DataFrame, pandas.core.frame.DataFrame] - -Return rolling mean and standard deviation - - Parameters - ---------- - data: pd.DataFrame - Dataframe of target data - window: int - Length of rolling window - - Returns - ------- - pd.DataFrame: - Dataframe of rolling mean - pd.DataFrame: - Dataframe of rolling standard deviation - -## Getting charts -### common.qa.rolling(data: pandas.core.frame.DataFrame, target: str, symbol: str = '', window: int = 14, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) -> None - -View mean std deviation - - Parameters - ---------- - data: pd.DataFrame - Dataframe - target: str - Column in data to look at - symbol : str - Stock ticker - window : int - Length of window - export: str - Format to export data - external_axes: Optional[List[plt.Axes]], optional - External axes (2 axes are expected in the list), by default None diff --git a/website/content/SDK/common/qa/rolling/_index.rst b/website/content/SDK/common/qa/rolling/_index.rst new file mode 100644 index 00000000000..ae32bad771b --- /dev/null +++ b/website/content/SDK/common/qa/rolling/_index.rst @@ -0,0 +1,88 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +common.qa.rolling( + data: pandas.core.frame.DataFrame, + window: int = 14, + chart: bool = False, +) -> Tuple[pandas.core.frame.DataFrame, pandas.core.frame.DataFrame] +{{< /highlight >}} + +.. raw:: html + +

+ Return rolling mean and standard deviation +

+ +* **Parameters** + + data: pd.DataFrame + Dataframe of target data + window: int + Length of rolling window + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame: + Dataframe of rolling mean + pd.DataFrame: + Dataframe of rolling standard deviation + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +common.qa.rolling( + data: pandas.core.frame.DataFrame, + target: str, + symbol: str = '', + window: int = 14, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ View mean std deviation +

+ +* **Parameters** + + data: pd.DataFrame + Dataframe + target: str + Column in data to look at + symbol : str + Stock ticker + window : int + Length of window + export: str + Format to export data + external_axes: Optional[List[plt.Axes]], optional + External axes (2 axes are expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/common/qa/sharpe/_index.md b/website/content/SDK/common/qa/sharpe/_index.md deleted file mode 100644 index 13d3a32d9cc..00000000000 --- a/website/content/SDK/common/qa/sharpe/_index.md +++ /dev/null @@ -1,32 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### common.qa.sharpe(data: pandas.core.frame.DataFrame, rfr: float = 0, window: float = 252) -> pandas.core.frame.DataFrame - -Calculates the sharpe ratio - Parameters - ---------- - data: pd.DataFrame - selected dataframe column - rfr: float - risk free rate - window: float - length of the rolling window - - Returns - ------- - sharpe: pd.DataFrame - sharpe ratio - -## Getting charts -### common.qa.sharpe(data: pandas.core.frame.DataFrame, rfr: float = 0, window: float = 252, chart=True) -> None - -Calculates the sharpe ratio - Parameters - ---------- - data: pd.DataFrame - selected dataframe column - rfr: float - risk free rate - window: float - length of the rolling window diff --git a/website/content/SDK/common/qa/sharpe/_index.rst b/website/content/SDK/common/qa/sharpe/_index.rst new file mode 100644 index 00000000000..677fa2bef1e --- /dev/null +++ b/website/content/SDK/common/qa/sharpe/_index.rst @@ -0,0 +1,80 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +common.qa.sharpe( + data: pandas.core.frame.DataFrame, + rfr: float = 0, + window: float = 252, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Calculates the sharpe ratio +

+ +* **Parameters** + + data: pd.DataFrame + selected dataframe column + rfr: float + risk free rate + window: float + length of the rolling window + chart: *bool* + Flag to display chart + + +* **Returns** + + sharpe: pd.DataFrame + sharpe ratio + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +common.qa.sharpe( + data: pandas.core.frame.DataFrame, + rfr: float = 0, + window: float = 252, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Calculates the sharpe ratio +

+ +* **Parameters** + + data: pd.DataFrame + selected dataframe column + rfr: float + risk free rate + window: float + length of the rolling window + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/common/qa/skew/_index.md b/website/content/SDK/common/qa/skew/_index.md deleted file mode 100644 index 146307bb2ad..00000000000 --- a/website/content/SDK/common/qa/skew/_index.md +++ /dev/null @@ -1,38 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### common.qa.skew(data: pandas.core.frame.DataFrame, window: int = 14) -> pandas.core.frame.DataFrame - -Skewness Indicator - - Parameters - ---------- - data: pd.DataFrame - Dataframe of targeted data - window : int - Length of window - - Returns - ------- - data_skew : pd.DataFrame - Dataframe of rolling skew - -## Getting charts -### common.qa.skew(symbol: str, data: pandas.core.frame.DataFrame, target: str, window: int = 14, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) -> None - -View rolling skew - - Parameters - ---------- - symbol: str - Stock ticker - data: pd.DataFrame - Dataframe - target: str - Column in data to look at - window: int - Length of window - export: str - Format to export data - external_axes: Optional[List[plt.Axes]], optional - External axes (2 axes are expected in the list), by default None diff --git a/website/content/SDK/common/qa/skew/_index.rst b/website/content/SDK/common/qa/skew/_index.rst new file mode 100644 index 00000000000..ca36fd2f85e --- /dev/null +++ b/website/content/SDK/common/qa/skew/_index.rst @@ -0,0 +1,86 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +common.qa.skew( + data: pandas.core.frame.DataFrame, + window: int = 14, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Skewness Indicator +

+ +* **Parameters** + + data: pd.DataFrame + Dataframe of targeted data + window : int + Length of window + chart: *bool* + Flag to display chart + + +* **Returns** + + data_skew : pd.DataFrame + Dataframe of rolling skew + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +common.qa.skew( + symbol: str, + data: pandas.core.frame.DataFrame, + target: str, + window: int = 14, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ View rolling skew +

+ +* **Parameters** + + symbol: str + Stock ticker + data: pd.DataFrame + Dataframe + target: str + Column in data to look at + window: int + Length of window + export: str + Format to export data + external_axes: Optional[List[plt.Axes]], optional + External axes (2 axes are expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/common/qa/sortino/_index.md b/website/content/SDK/common/qa/sortino/_index.md deleted file mode 100644 index a133bedec0b..00000000000 --- a/website/content/SDK/common/qa/sortino/_index.md +++ /dev/null @@ -1,36 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### common.qa.sortino(data: pandas.core.frame.DataFrame, target_return: float = 0, window: float = 252, adjusted: bool = False) -> pandas.core.frame.DataFrame - -Calculates the sortino ratio - Parameters - ---------- - data: pd.DataFrame - selected dataframe - target_return: float - target return of the asset - window: float - length of the rolling window - adjusted: bool - adjust the sortino ratio - - Returns - ------- - sortino: pd.DataFrame - sortino ratio - -## Getting charts -### common.qa.sortino(data: pandas.core.frame.DataFrame, target_return: float, window: float, adjusted: bool, chart=True) -> None - -Displays the sortino ratio - Parameters - ---------- - data: pd.DataFrame - selected dataframe - target_return: float - target return of the asset - window: float - length of the rolling window - adjusted: bool - adjust the sortino ratio diff --git a/website/content/SDK/common/qa/sortino/_index.rst b/website/content/SDK/common/qa/sortino/_index.rst new file mode 100644 index 00000000000..21b78a190ad --- /dev/null +++ b/website/content/SDK/common/qa/sortino/_index.rst @@ -0,0 +1,86 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +common.qa.sortino( + data: pandas.core.frame.DataFrame, + target_return: float = 0, + window: float = 252, + adjusted: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Calculates the sortino ratio +

+ +* **Parameters** + + data: pd.DataFrame + selected dataframe + target_return: float + target return of the asset + window: float + length of the rolling window + adjusted: bool + adjust the sortino ratio + chart: *bool* + Flag to display chart + + +* **Returns** + + sortino: pd.DataFrame + sortino ratio + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +common.qa.sortino( + data: pandas.core.frame.DataFrame, + target_return: float, + window: float, + adjusted: bool, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Displays the sortino ratio +

+ +* **Parameters** + + data: pd.DataFrame + selected dataframe + target_return: float + target return of the asset + window: float + length of the rolling window + adjusted: bool + adjust the sortino ratio + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/common/qa/spread/_index.md b/website/content/SDK/common/qa/spread/_index.md deleted file mode 100644 index 389bc64cd7c..00000000000 --- a/website/content/SDK/common/qa/spread/_index.md +++ /dev/null @@ -1,42 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### common.qa.spread(data: pandas.core.frame.DataFrame, window: int = 14) -> Tuple[pandas.core.frame.DataFrame, pandas.core.frame.DataFrame] - -Standard Deviation and Variance - - Parameters - ---------- - data: pd.DataFrame - DataFrame of targeted data - window: int - Length of window - - Returns - ------- - df_sd: pd.DataFrame - Dataframe of rolling standard deviation - df_var: pd.DataFrame - Dataframe of rolling standard deviation - -## Getting charts -### common.qa.spread(data: pandas.core.frame.DataFrame, target: str, symbol: str = '', window: int = 14, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -View rolling spread - - Parameters - ---------- - data: pd.DataFrame - Dataframe - target: str - Column in data to look at - target: str - Column in data to look at - symbol : str - Stock ticker - window : int - Length of window - export: str - Format to export data - external_axes: Optional[List[plt.Axes]], optional - External axes (3 axes are expected in the list), by default None diff --git a/website/content/SDK/common/qa/spread/_index.rst b/website/content/SDK/common/qa/spread/_index.rst new file mode 100644 index 00000000000..950be3e28ce --- /dev/null +++ b/website/content/SDK/common/qa/spread/_index.rst @@ -0,0 +1,90 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +common.qa.spread( + data: pandas.core.frame.DataFrame, + window: int = 14, + chart: bool = False, +) -> Tuple[pandas.core.frame.DataFrame, pandas.core.frame.DataFrame] +{{< /highlight >}} + +.. raw:: html + +

+ Standard Deviation and Variance +

+ +* **Parameters** + + data: pd.DataFrame + DataFrame of targeted data + window: int + Length of window + chart: *bool* + Flag to display chart + + +* **Returns** + + df_sd: pd.DataFrame + Dataframe of rolling standard deviation + df_var: pd.DataFrame + Dataframe of rolling standard deviation + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +common.qa.spread( + data: pandas.core.frame.DataFrame, + target: str, + symbol: str = '', + window: int = 14, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ View rolling spread +

+ +* **Parameters** + + data: pd.DataFrame + Dataframe + target: str + Column in data to look at + target: str + Column in data to look at + symbol : str + Stock ticker + window : int + Length of window + export: str + Format to export data + external_axes: Optional[List[plt.Axes]], optional + External axes (3 axes are expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/common/qa/summary/_index.md b/website/content/SDK/common/qa/summary/_index.md deleted file mode 100644 index f9cc8528049..00000000000 --- a/website/content/SDK/common/qa/summary/_index.md +++ /dev/null @@ -1,28 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### common.qa.summary(data: pandas.core.frame.DataFrame) -> pandas.core.frame.DataFrame - -Print summary statistics - - Parameters - ---------- - data : pd.DataFrame - Dataframe to get summary statistics for - - Returns - ------- - summary : pd.DataFrame - Summary statistics - -## Getting charts -### common.qa.summary(data: pandas.core.frame.DataFrame, export: str = '', chart=True) -> None - -Show summary statistics - - Parameters - ---------- - data : pd.DataFrame - DataFrame to get statistics of - export : str - Format to export data diff --git a/website/content/SDK/common/qa/summary/_index.rst b/website/content/SDK/common/qa/summary/_index.rst new file mode 100644 index 00000000000..15c6f1d4146 --- /dev/null +++ b/website/content/SDK/common/qa/summary/_index.rst @@ -0,0 +1,71 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +common.qa.summary( + data: pandas.core.frame.DataFrame, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Print summary statistics +

+ +* **Parameters** + + data : pd.DataFrame + Dataframe to get summary statistics for + chart: *bool* + Flag to display chart + + +* **Returns** + + summary : pd.DataFrame + Summary statistics + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +common.qa.summary( + data: pandas.core.frame.DataFrame, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Show summary statistics +

+ +* **Parameters** + + data : pd.DataFrame + DataFrame to get statistics of + export : str + Format to export data + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/common/qa/unitroot/_index.md b/website/content/SDK/common/qa/unitroot/_index.md deleted file mode 100644 index 1bd1d744175..00000000000 --- a/website/content/SDK/common/qa/unitroot/_index.md +++ /dev/null @@ -1,38 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### common.qa.unitroot(data: pandas.core.frame.DataFrame, fuller_reg: str = 'c', kpss_reg: str = 'c') -> pandas.core.frame.DataFrame - -Calculate test statistics for unit roots - - Parameters - ---------- - data : pd.DataFrame - DataFrame of target variable - fuller_reg : str - Type of regression of ADF test. Can be ‘c’,’ct’,’ctt’,’nc’ 'c' - Constant and t - trend order - kpss_reg : str - Type of regression for KPSS test. Can be ‘c’,’ct' - - Returns - ------- - pd.DataFrame - Dataframe with results of ADF test and KPSS test - -## Getting charts -### common.qa.unitroot(data: pandas.core.frame.DataFrame, target: str, fuller_reg: str = 'c', kpss_reg: str = 'c', export: str = '', chart=True) - -Show unit root test calculations - - Parameters - ---------- - data : pd.DataFrame - DataFrame - target : str - Column of data to look at - fuller_reg : str - Type of regression of ADF test. Can be ‘c’,’ct’,’ctt’,’nc’ 'c' - Constant and t - trend order - kpss_reg : str - Type of regression for KPSS test. Can be ‘c’,’ct' - export : str - Format for exporting data diff --git a/website/content/SDK/common/qa/unitroot/_index.rst b/website/content/SDK/common/qa/unitroot/_index.rst new file mode 100644 index 00000000000..98a5911d928 --- /dev/null +++ b/website/content/SDK/common/qa/unitroot/_index.rst @@ -0,0 +1,86 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +common.qa.unitroot( + data: pandas.core.frame.DataFrame, + fuller_reg: str = 'c', + kpss_reg: str = 'c', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Calculate test statistics for unit roots +

+ +* **Parameters** + + data : pd.DataFrame + DataFrame of target variable + fuller_reg : str + Type of regression of ADF test. Can be ‘c’,’ct’,’ctt’,’nc’ 'c' - Constant and t - trend order + kpss_reg : str + Type of regression for KPSS test. Can be ‘c’,’ct' + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Dataframe with results of ADF test and KPSS test + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +common.qa.unitroot( + data: pandas.core.frame.DataFrame, + target: str, + fuller_reg: str = 'c', + kpss_reg: str = 'c', + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Show unit root test calculations +

+ +* **Parameters** + + data : pd.DataFrame + DataFrame + target : str + Column of data to look at + fuller_reg : str + Type of regression of ADF test. Can be ‘c’,’ct’,’ctt’,’nc’ 'c' - Constant and t - trend order + kpss_reg : str + Type of regression for KPSS test. Can be ‘c’,’ct' + export : str + Format for exporting data + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/common/qa/var/_index.md b/website/content/SDK/common/qa/var/_index.md deleted file mode 100644 index 2817b524c31..00000000000 --- a/website/content/SDK/common/qa/var/_index.md +++ /dev/null @@ -1,52 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### common.qa.var(data: pandas.core.frame.DataFrame, use_mean: bool = False, adjusted_var: bool = False, student_t: bool = False, percentile: Union[int, float] = 99.9, portfolio: bool = False) -> pandas.core.frame.DataFrame - -Gets value at risk for specified stock dataframe - - Parameters - ---------- - data: pd.DataFrame - Data dataframe - use_mean: bool - If one should use the data mean for calculation - adjusted_var: bool - If one should return VaR adjusted for skew and kurtosis - student_t: bool - If one should use the student-t distribution - percentile: Union[int,float] - VaR percentile - portfolio: bool - If the data is a portfolio - - Returns - ------- - list - list of VaR - list - list of historical VaR - -## Getting charts -### common.qa.var(data: pandas.core.frame.DataFrame, symbol: str = '', use_mean: bool = False, adjusted_var: bool = False, student_t: bool = False, percentile: float = 99.9, data_range: int = 0, portfolio: bool = False, chart=True) -> None - -Displays VaR of dataframe - - Parameters - ---------- - data: pd.Dataframe - Data dataframe - use_mean: bool - if one should use the data mean return - symbol: str - name of the data - adjusted_var: bool - if one should have VaR adjusted for skew and kurtosis (Cornish-Fisher-Expansion) - student_t: bool - If one should use the student-t distribution - percentile: int - var percentile - data_range: int - Number of rows you want to use VaR over - portfolio: bool - If the data is a portfolio diff --git a/website/content/SDK/common/qa/var/_index.rst b/website/content/SDK/common/qa/var/_index.rst new file mode 100644 index 00000000000..ba18bfb5b88 --- /dev/null +++ b/website/content/SDK/common/qa/var/_index.rst @@ -0,0 +1,106 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +common.qa.var( + data: pandas.core.frame.DataFrame, + use_mean: bool = False, + adjusted_var: bool = False, + student_t: bool = False, + percentile: Union[int, float] = 99.9, + portfolio: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Gets value at risk for specified stock dataframe +

+ +* **Parameters** + + data: pd.DataFrame + Data dataframe + use_mean: bool + If one should use the data mean for calculation + adjusted_var: bool + If one should return VaR adjusted for skew and kurtosis + student_t: bool + If one should use the student-t distribution + percentile: Union[int,float] + VaR percentile + portfolio: bool + If the data is a portfolio + chart: *bool* + Flag to display chart + + +* **Returns** + + list + list of VaR + list + list of historical VaR + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +common.qa.var( + data: pandas.core.frame.DataFrame, + symbol: str = '', + use_mean: bool = False, + adjusted_var: bool = False, + student_t: bool = False, + percentile: float = 99.9, + data_range: int = 0, + portfolio: bool = False, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Displays VaR of dataframe +

+ +* **Parameters** + + data: pd.Dataframe + Data dataframe + use_mean: bool + if one should use the data mean return + symbol: str + name of the data + adjusted_var: bool + if one should have VaR adjusted for skew and kurtosis (Cornish-Fisher-Expansion) + student_t: bool + If one should use the student-t distribution + percentile: int + var percentile + data_range: int + Number of rows you want to use VaR over + portfolio: bool + If the data is a portfolio + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/common/ta/ad/_index.md b/website/content/SDK/common/ta/ad/_index.md deleted file mode 100644 index 03afec6d971..00000000000 --- a/website/content/SDK/common/ta/ad/_index.md +++ /dev/null @@ -1,36 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### common.ta.ad(data: pandas.core.frame.DataFrame, use_open: bool = False) -> pandas.core.frame.DataFrame - -Calculate AD technical indicator - - Parameters - ---------- - data : pd.DataFrame - Dataframe of prices with OHLC and Volume - use_open : bool - Whether to use open prices - - Returns - ------- - pd.DataFrame - Dataframe with technical indicator - -## Getting charts -### common.ta.ad(data: pandas.core.frame.DataFrame, use_open: bool = False, symbol: str = '', export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Plot AD technical indicator - - Parameters - ---------- - data : pd.DataFrame - Dataframe of ohlc prices - use_open : bool - Whether to use open prices in calculation - symbol : str - Ticker symbol - export: str - Format to export data as - external_axes : Optional[List[plt.Axes]], optional - External axes (3 axes are expected in the list), by default None diff --git a/website/content/SDK/common/ta/ad/_index.rst b/website/content/SDK/common/ta/ad/_index.rst new file mode 100644 index 00000000000..fa10ae09712 --- /dev/null +++ b/website/content/SDK/common/ta/ad/_index.rst @@ -0,0 +1,83 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +common.ta.ad( + data: pandas.core.frame.DataFrame, + use_open: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Calculate AD technical indicator +

+ +* **Parameters** + + data : pd.DataFrame + Dataframe of prices with OHLC and Volume + use_open : bool + Whether to use open prices + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Dataframe with technical indicator + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +common.ta.ad( + data: pandas.core.frame.DataFrame, + use_open: bool = False, + symbol: str = '', + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Plot AD technical indicator +

+ +* **Parameters** + + data : pd.DataFrame + Dataframe of ohlc prices + use_open : bool + Whether to use open prices in calculation + symbol : str + Ticker symbol + export: str + Format to export data as + external_axes : Optional[List[plt.Axes]], optional + External axes (3 axes are expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/common/ta/adosc/_index.md b/website/content/SDK/common/ta/adosc/_index.md deleted file mode 100644 index fe66cda1057..00000000000 --- a/website/content/SDK/common/ta/adosc/_index.md +++ /dev/null @@ -1,44 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### common.ta.adosc(data: pandas.core.frame.DataFrame, use_open: bool = False, fast: int = 3, slow: int = 10) -> pandas.core.frame.DataFrame - -Calculate AD oscillator technical indicator - - Parameters - ---------- - data : pd.DataFrame - Dataframe of OHLC prices - use_open : bool - Whether to use open prices - fast: int - Fast value - slow: int - Slow value - - Returns - ------- - pd.DataFrame - Dataframe with technical indicator - -## Getting charts -### common.ta.adosc(data: pandas.core.frame.DataFrame, fast: int = 3, slow: int = 10, use_open: bool = False, symbol: str = '', export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display AD Osc Indicator - - Parameters - ---------- - data : pd.DataFrame - Dataframe of ohlc prices - use_open : bool - Whether to use open prices in calculation - fast: int - Length of fast window - slow : int - Length of slow window - symbol : str - Stock ticker - export : str - Format to export data - external_axes : Optional[List[plt.Axes]], optional - External axes (3 axes are expected in the list), by default None diff --git a/website/content/SDK/common/ta/adosc/_index.rst b/website/content/SDK/common/ta/adosc/_index.rst new file mode 100644 index 00000000000..c4bfa05e001 --- /dev/null +++ b/website/content/SDK/common/ta/adosc/_index.rst @@ -0,0 +1,95 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +common.ta.adosc( + data: pandas.core.frame.DataFrame, + use_open: bool = False, + fast: int = 3, + slow: int = 10, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Calculate AD oscillator technical indicator +

+ +* **Parameters** + + data : pd.DataFrame + Dataframe of OHLC prices + use_open : bool + Whether to use open prices + fast: int + Fast value + slow: int + Slow value + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Dataframe with technical indicator + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +common.ta.adosc( + data: pandas.core.frame.DataFrame, + fast: int = 3, + slow: int = 10, + use_open: bool = False, + symbol: str = '', + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display AD Osc Indicator +

+ +* **Parameters** + + data : pd.DataFrame + Dataframe of ohlc prices + use_open : bool + Whether to use open prices in calculation + fast: int + Length of fast window + slow : int + Length of slow window + symbol : str + Stock ticker + export : str + Format to export data + external_axes : Optional[List[plt.Axes]], optional + External axes (3 axes are expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/common/ta/adx/_index.md b/website/content/SDK/common/ta/adx/_index.md deleted file mode 100644 index 063996e428f..00000000000 --- a/website/content/SDK/common/ta/adx/_index.md +++ /dev/null @@ -1,44 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### common.ta.adx(data: pandas.core.frame.DataFrame, window: int = 14, scalar: int = 100, drift: int = 1) -> pandas.core.frame.DataFrame - -ADX technical indicator - - Parameters - ---------- - data : pd.DataFrame - Dataframe with OHLC price data - window: int - Length of window - scalar: int - Scalar variable - drift: int - Drift variable - - Returns - ------- - pd.DataFrame - DataFrame with adx indicator - -## Getting charts -### common.ta.adx(data: pandas.core.frame.DataFrame, window: int = 14, scalar: int = 100, drift: int = 1, symbol: str = '', export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Plot ADX indicator - - Parameters - ---------- - data : pd.DataFrame - Dataframe with OHLC price data - window : int - Length of window - scalar : int - Scalar variable - drift : int - Drift variable - symbol : str - Ticker - export : str - Format to export data - external_axes : Optional[List[plt.Axes]], optional - External axes (2 axes are expected in the list), by default None diff --git a/website/content/SDK/common/ta/adx/_index.rst b/website/content/SDK/common/ta/adx/_index.rst new file mode 100644 index 00000000000..cf38ef263fe --- /dev/null +++ b/website/content/SDK/common/ta/adx/_index.rst @@ -0,0 +1,95 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +common.ta.adx( + data: pandas.core.frame.DataFrame, + window: int = 14, + scalar: int = 100, + drift: int = 1, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ ADX technical indicator +

+ +* **Parameters** + + data : pd.DataFrame + Dataframe with OHLC price data + window: int + Length of window + scalar: int + Scalar variable + drift: int + Drift variable + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + DataFrame with adx indicator + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +common.ta.adx( + data: pandas.core.frame.DataFrame, + window: int = 14, + scalar: int = 100, + drift: int = 1, + symbol: str = '', + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Plot ADX indicator +

+ +* **Parameters** + + data : pd.DataFrame + Dataframe with OHLC price data + window : int + Length of window + scalar : int + Scalar variable + drift : int + Drift variable + symbol : str + Ticker + export : str + Format to export data + external_axes : Optional[List[plt.Axes]], optional + External axes (2 axes are expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/common/ta/aroon/_index.md b/website/content/SDK/common/ta/aroon/_index.md deleted file mode 100644 index b0291a9f4e5..00000000000 --- a/website/content/SDK/common/ta/aroon/_index.md +++ /dev/null @@ -1,40 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### common.ta.aroon(data: pandas.core.frame.DataFrame, window: int = 25, scalar: int = 100) -> pandas.core.frame.DataFrame - -Aroon technical indicator - - Parameters - ---------- - data : pd.DataFrame - Dataframe with OHLC price data - window : int - Length of window - scalar : int - Scalar variable - - Returns - ------- - pd.DataFrame - DataFrame with aroon indicator - -## Getting charts -### common.ta.aroon(data: pandas.core.frame.DataFrame, window: int = 25, scalar: int = 100, symbol: str = '', export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Plot Aroon indicator - - Parameters - ---------- - data: pd.DataFrame - Dataframe with OHLC price data - window: int - Length of window - symbol: str - Ticker - scalar: int - Scalar variable - export: str - Format to export data - external_axes: Optional[List[plt.Axes]], optional - External axes (3 axes are expected in the list), by default None diff --git a/website/content/SDK/common/ta/aroon/_index.rst b/website/content/SDK/common/ta/aroon/_index.rst new file mode 100644 index 00000000000..20d116a1c69 --- /dev/null +++ b/website/content/SDK/common/ta/aroon/_index.rst @@ -0,0 +1,89 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +common.ta.aroon( + data: pandas.core.frame.DataFrame, + window: int = 25, + scalar: int = 100, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Aroon technical indicator +

+ +* **Parameters** + + data : pd.DataFrame + Dataframe with OHLC price data + window : int + Length of window + scalar : int + Scalar variable + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + DataFrame with aroon indicator + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +common.ta.aroon( + data: pandas.core.frame.DataFrame, + window: int = 25, + scalar: int = 100, + symbol: str = '', + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Plot Aroon indicator +

+ +* **Parameters** + + data: pd.DataFrame + Dataframe with OHLC price data + window: int + Length of window + symbol: str + Ticker + scalar: int + Scalar variable + export: str + Format to export data + external_axes: Optional[List[plt.Axes]], optional + External axes (3 axes are expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/common/ta/atr/_index.md b/website/content/SDK/common/ta/atr/_index.md deleted file mode 100644 index 7f78d69f52a..00000000000 --- a/website/content/SDK/common/ta/atr/_index.md +++ /dev/null @@ -1,40 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### common.ta.atr(data: pandas.core.frame.DataFrame, window: int = 14, mamode: str = 'ema', offset: int = 0) -> pandas.core.frame.DataFrame - -Average True Range - - Parameters - ---------- - data : pd.DataFrame - Dataframe of ohlc prices - window : int - Length of window - mamode: str - Type of filter - offset : int - Offset value - - Returns - ------- - pd.DataFrame - Dataframe of atr - -## Getting charts -### common.ta.atr(data: pandas.core.frame.DataFrame, symbol: str = '', window: int = 14, mamode: str = 'sma', offset: int = 0, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Show ATR - - Parameters - ---------- - data : pd.DataFrame - Dataframe of ohlc prices - symbol : str - Ticker symbol - window : int - Length of window to calculate upper channel - export : str - Format of export file - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/common/ta/atr/_index.rst b/website/content/SDK/common/ta/atr/_index.rst new file mode 100644 index 00000000000..9403f440f6f --- /dev/null +++ b/website/content/SDK/common/ta/atr/_index.rst @@ -0,0 +1,91 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +common.ta.atr( + data: pandas.core.frame.DataFrame, + window: int = 14, + mamode: str = 'ema', + offset: int = 0, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Average True Range +

+ +* **Parameters** + + data : pd.DataFrame + Dataframe of ohlc prices + window : int + Length of window + mamode: str + Type of filter + offset : int + Offset value + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Dataframe of atr + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +common.ta.atr( + data: pandas.core.frame.DataFrame, + symbol: str = '', + window: int = 14, + mamode: str = 'sma', + offset: int = 0, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Show ATR +

+ +* **Parameters** + + data : pd.DataFrame + Dataframe of ohlc prices + symbol : str + Ticker symbol + window : int + Length of window to calculate upper channel + export : str + Format of export file + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/common/ta/bbands/_index.md b/website/content/SDK/common/ta/bbands/_index.md deleted file mode 100644 index 94c1d7ca4ee..00000000000 --- a/website/content/SDK/common/ta/bbands/_index.md +++ /dev/null @@ -1,44 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### common.ta.bbands(data: pandas.core.frame.DataFrame, window: int = 15, n_std: float = 2, mamode: str = 'ema') -> pandas.core.frame.DataFrame - -Calculate Bollinger Bands - - Parameters - ---------- - data : pd.DataFrame - Dataframe of ohlc prices - window : int - Length of window to calculate BB - n_std : float - Number of standard deviations to show - mamode : str - Method of calculating average - - Returns - ------- - df_ta: pd.DataFrame - Dataframe of bollinger band data - -## Getting charts -### common.ta.bbands(data: pandas.core.frame.DataFrame, symbol: str = '', window: int = 15, n_std: float = 2, mamode: str = 'sma', export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Show bollinger bands - - Parameters - ---------- - data : pd.DataFrame - Dataframe of ohlc prices - symbol : str - Ticker symbol - window : int - Length of window to calculate BB - n_std : float - Number of standard deviations to show - mamode : str - Method of calculating average - export : str - Format of export file - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/common/ta/bbands/_index.rst b/website/content/SDK/common/ta/bbands/_index.rst new file mode 100644 index 00000000000..0857521c40e --- /dev/null +++ b/website/content/SDK/common/ta/bbands/_index.rst @@ -0,0 +1,95 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +common.ta.bbands( + data: pandas.core.frame.DataFrame, + window: int = 15, + n_std: float = 2, + mamode: str = 'ema', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Calculate Bollinger Bands +

+ +* **Parameters** + + data : pd.DataFrame + Dataframe of ohlc prices + window : int + Length of window to calculate BB + n_std : float + Number of standard deviations to show + mamode : str + Method of calculating average + chart: *bool* + Flag to display chart + + +* **Returns** + + df_ta: pd.DataFrame + Dataframe of bollinger band data + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +common.ta.bbands( + data: pandas.core.frame.DataFrame, + symbol: str = '', + window: int = 15, + n_std: float = 2, + mamode: str = 'sma', + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Show bollinger bands +

+ +* **Parameters** + + data : pd.DataFrame + Dataframe of ohlc prices + symbol : str + Ticker symbol + window : int + Length of window to calculate BB + n_std : float + Number of standard deviations to show + mamode : str + Method of calculating average + export : str + Format of export file + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/common/ta/cci/_index.md b/website/content/SDK/common/ta/cci/_index.md deleted file mode 100644 index 3240f46fc6a..00000000000 --- a/website/content/SDK/common/ta/cci/_index.md +++ /dev/null @@ -1,45 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### common.ta.cci(data: pandas.core.frame.DataFrame, window: int = 14, scalar: float = 0.0015) -> pandas.core.frame.DataFrame - -Commodity channel index - - Parameters - ---------- - high_vals: pd.Series - High values - low_values: pd.Series - Low values - close-values: pd.Series - Close values - window: int - Length of window - scalar: float - Scalar variable - - Returns - ---------- - pd.DataFrame - Dataframe of technical indicator - -## Getting charts -### common.ta.cci(data: pandas.core.frame.DataFrame, window: int = 14, scalar: float = 0.0015, symbol: str = '', export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display CCI Indicator - - Parameters - ---------- - - data : pd.DataFrame - Dataframe of OHLC - window : int - Length of window - scalar : float - Scalar variable - symbol : str - Stock ticker - export : str - Format to export data - external_axes : Optional[List[plt.Axes]], optional - External axes (2 axes are expected in the list), by default None diff --git a/website/content/SDK/common/ta/cci/_index.rst b/website/content/SDK/common/ta/cci/_index.rst new file mode 100644 index 00000000000..6f23e17335f --- /dev/null +++ b/website/content/SDK/common/ta/cci/_index.rst @@ -0,0 +1,93 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +common.ta.cci( + data: pandas.core.frame.DataFrame, + window: int = 14, + scalar: float = 0.0015, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Commodity channel index +

+ +* **Parameters** + + high_vals: pd.Series + High values + low_values: pd.Series + Low values + close-values: pd.Series + Close values + window: int + Length of window + scalar: float + Scalar variable + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Dataframe of technical indicator + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +common.ta.cci( + data: pandas.core.frame.DataFrame, + window: int = 14, + scalar: float = 0.0015, + symbol: str = '', + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display CCI Indicator +

+ +* **Parameters** + + data : pd.DataFrame + Dataframe of OHLC + window : int + Length of window + scalar : float + Scalar variable + symbol : str + Stock ticker + export : str + Format to export data + external_axes : Optional[List[plt.Axes]], optional + External axes (2 axes are expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/common/ta/cg/_index.md b/website/content/SDK/common/ta/cg/_index.md deleted file mode 100644 index aae2d5c47cc..00000000000 --- a/website/content/SDK/common/ta/cg/_index.md +++ /dev/null @@ -1,35 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### common.ta.cg(values: pandas.core.series.Series, window: int) -> pandas.core.frame.DataFrame - -Center of gravity - - Parameters - ---------- - values: pd.DataFrame - Data to use with close being titled values - window: int - Length for indicator window - Returns - ---------- - pd.DataFrame - Dataframe of technical indicator - -## Getting charts -### common.ta.cg(data: pandas.core.series.Series, window: int = 14, symbol: str = '', export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display center of gravity Indicator - - Parameters - ---------- - data : pd.Series - Series of values - window : int - Length of window - symbol : str - Stock ticker - export : str - Format to export data - external_axes : Optional[List[plt.Axes]], optional - External axes (2 axes are expected in the list), by default None diff --git a/website/content/SDK/common/ta/cg/_index.rst b/website/content/SDK/common/ta/cg/_index.rst new file mode 100644 index 00000000000..eea267f4067 --- /dev/null +++ b/website/content/SDK/common/ta/cg/_index.rst @@ -0,0 +1,83 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +common.ta.cg( + values: pandas.core.series.Series, + window: int, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Center of gravity +

+ +* **Parameters** + + values: pd.DataFrame + Data to use with close being titled values + window: int + Length for indicator window + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Dataframe of technical indicator + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +common.ta.cg( + data: pandas.core.series.Series, + window: int = 14, + symbol: str = '', + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display center of gravity Indicator +

+ +* **Parameters** + + data : pd.Series + Series of values + window : int + Length of window + symbol : str + Stock ticker + export : str + Format to export data + external_axes : Optional[List[plt.Axes]], optional + External axes (2 axes are expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/common/ta/donchian/_index.md b/website/content/SDK/common/ta/donchian/_index.md deleted file mode 100644 index ef0a2629476..00000000000 --- a/website/content/SDK/common/ta/donchian/_index.md +++ /dev/null @@ -1,40 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### common.ta.donchian(data: pandas.core.frame.DataFrame, upper_length: int = 20, lower_length: int = 20) -> pandas.core.frame.DataFrame - -Calculate Donchian Channels - - Parameters - ---------- - data : pd.DataFrame - Dataframe of ohlc prices - upper_length : int - Length of window to calculate upper channel - lower_length : int - Length of window to calculate lower channel - - Returns - ------- - pd.DataFrame - Dataframe of upper and lower channels - -## Getting charts -### common.ta.donchian(data: pandas.core.frame.DataFrame, symbol: str = '', upper_length: int = 20, lower_length: int = 20, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Show donchian channels - - Parameters - ---------- - data : pd.DataFrame - Dataframe of ohlc prices - symbol : str - Ticker symbol - upper_length : int - Length of window to calculate upper channel - lower_length : int - Length of window to calculate lower channel - export : str - Format of export file - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/common/ta/donchian/_index.rst b/website/content/SDK/common/ta/donchian/_index.rst new file mode 100644 index 00000000000..84fca78e9ea --- /dev/null +++ b/website/content/SDK/common/ta/donchian/_index.rst @@ -0,0 +1,89 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +common.ta.donchian( + data: pandas.core.frame.DataFrame, + upper_length: int = 20, + lower_length: int = 20, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Calculate Donchian Channels +

+ +* **Parameters** + + data : pd.DataFrame + Dataframe of ohlc prices + upper_length : int + Length of window to calculate upper channel + lower_length : int + Length of window to calculate lower channel + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Dataframe of upper and lower channels + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +common.ta.donchian( + data: pandas.core.frame.DataFrame, + symbol: str = '', + upper_length: int = 20, + lower_length: int = 20, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Show donchian channels +

+ +* **Parameters** + + data : pd.DataFrame + Dataframe of ohlc prices + symbol : str + Ticker symbol + upper_length : int + Length of window to calculate upper channel + lower_length : int + Length of window to calculate lower channel + export : str + Format of export file + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/common/ta/ema/_index.md b/website/content/SDK/common/ta/ema/_index.md deleted file mode 100644 index a45748f5ad8..00000000000 --- a/website/content/SDK/common/ta/ema/_index.md +++ /dev/null @@ -1,18 +0,0 @@ -## Get underlying data -### common.ta.ema(data: pandas.core.series.Series, length: int = 50, offset: int = 0) -> pandas.core.frame.DataFrame - -Gets exponential moving average (EMA) for stock - - Parameters - ---------- - data: pd.Series - Dataframe of dates and prices - length: int - Length of EMA window - offset: int - Length of offset - - Returns - ---------- - pd.DataFrame - Dataframe containing prices and EMA diff --git a/website/content/SDK/common/ta/ema/_index.rst b/website/content/SDK/common/ta/ema/_index.rst new file mode 100644 index 00000000000..538e49410a8 --- /dev/null +++ b/website/content/SDK/common/ta/ema/_index.rst @@ -0,0 +1,40 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +common.ta.ema( + data: pandas.core.series.Series, + length: int = 50, + offset: int = 0, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Gets exponential moving average (EMA) for stock +

+ +* **Parameters** + + data: pd.Series + Dataframe of dates and prices + length: int + Length of EMA window + offset: int + Length of offset + +* **Returns** + + pd.DataFrame + Dataframe containing prices and EMA diff --git a/website/content/SDK/common/ta/fib/_index.md b/website/content/SDK/common/ta/fib/_index.md deleted file mode 100644 index d25c87cf7e9..00000000000 --- a/website/content/SDK/common/ta/fib/_index.md +++ /dev/null @@ -1,52 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### common.ta.fib(data: pandas.core.frame.DataFrame, limit: int = 120, start_date: Any = None, end_date: Any = None) -> Tuple[pandas.core.frame.DataFrame, pandas._libs.tslibs.timestamps.Timestamp, pandas._libs.tslibs.timestamps.Timestamp, float, float] - -Calculate Fibonacci levels - - Parameters - ---------- - data : pd.DataFrame - Dataframe of prices - limit : int - Days to look back for retracement - start_date : Any - Custom start date for retracement - end_date : Any - Custom end date for retracement - - Returns - ------- - df : pd.DataFrame - Dataframe of fib levels - min_date: pd.Timestamp - Date of min point - max_date: pd.Timestamp: - Date of max point - min_pr: float - Price at min point - max_pr: float - Price at max point - -## Getting charts -### common.ta.fib(data: pandas.core.frame.DataFrame, limit: int = 120, start_date: Optional[str] = None, end_date: Optional[str] = None, symbol: str = '', export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Calculate fibonacci retracement levels - - Parameters - ---------- - data: pd.DataFrame - OHLC data - limit: int - Days to lookback - start_date: Optional[str, None] - User picked date for starting retracement - end_date: Optional[str, None] - User picked date for ending retracement - symbol: str - Ticker symbol - export: str - Format to export data - external_axes : Optional[List[plt.Axes]], optional - External axes (2 axes are expected in the list), by default None diff --git a/website/content/SDK/common/ta/fib/_index.rst b/website/content/SDK/common/ta/fib/_index.rst new file mode 100644 index 00000000000..90d0dc9b33e --- /dev/null +++ b/website/content/SDK/common/ta/fib/_index.rst @@ -0,0 +1,103 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +common.ta.fib( + data: pandas.core.frame.DataFrame, + limit: int = 120, + start_date: Any = None, + end_date: Any = None, + chart: bool = False, +) -> Tuple[pandas.core.frame.DataFrame, pandas._libs.tslibs.timestamps.Timestamp, pandas._libs.tslibs.timestamps.Timestamp, float, float] +{{< /highlight >}} + +.. raw:: html + +

+ Calculate Fibonacci levels +

+ +* **Parameters** + + data : pd.DataFrame + Dataframe of prices + limit : int + Days to look back for retracement + start_date : Any + Custom start date for retracement + end_date : Any + Custom end date for retracement + chart: *bool* + Flag to display chart + + +* **Returns** + + df : pd.DataFrame + Dataframe of fib levels + min_date: pd.Timestamp + Date of min point + max_date: pd.Timestamp: + Date of max point + min_pr: float + Price at min point + max_pr: float + Price at max point + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +common.ta.fib( + data: pandas.core.frame.DataFrame, + limit: int = 120, + start_date: Optional[str] = None, + end_date: Optional[str] = None, + symbol: str = '', + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Calculate fibonacci retracement levels +

+ +* **Parameters** + + data: pd.DataFrame + OHLC data + limit: int + Days to lookback + start_date: Optional[str, None] + User picked date for starting retracement + end_date: Optional[str, None] + User picked date for ending retracement + symbol: str + Ticker symbol + export: str + Format to export data + external_axes : Optional[List[plt.Axes]], optional + External axes (2 axes are expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/common/ta/fisher/_index.md b/website/content/SDK/common/ta/fisher/_index.md deleted file mode 100644 index 7683af354ac..00000000000 --- a/website/content/SDK/common/ta/fisher/_index.md +++ /dev/null @@ -1,35 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### common.ta.fisher(data: pandas.core.frame.DataFrame, window: int = 14) -> pandas.core.frame.DataFrame - -Fisher Transform - - Parameters - ---------- - data : pd.DataFrame - Dataframe of OHLC prices - window: int - Length for indicator window - Returns - ---------- - df_ta: pd.DataFrame - Dataframe of technical indicator - -## Getting charts -### common.ta.fisher(data: pandas.core.frame.DataFrame, window: int = 14, symbol: str = '', export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display Fisher Indicator - - Parameters - ---------- - data : pd.DataFrame - Dataframe of OHLC prices - window : int - Length of window - symbol : str - Ticker string - export : str - Format to export data - external_axes : Optional[List[plt.Axes]], optional - External axes (3 axes are expected in the list), by default None diff --git a/website/content/SDK/common/ta/fisher/_index.rst b/website/content/SDK/common/ta/fisher/_index.rst new file mode 100644 index 00000000000..f1154334119 --- /dev/null +++ b/website/content/SDK/common/ta/fisher/_index.rst @@ -0,0 +1,83 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +common.ta.fisher( + data: pandas.core.frame.DataFrame, + window: int = 14, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Fisher Transform +

+ +* **Parameters** + + data : pd.DataFrame + Dataframe of OHLC prices + window: int + Length for indicator window + chart: *bool* + Flag to display chart + + +* **Returns** + + df_ta: pd.DataFrame + Dataframe of technical indicator + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +common.ta.fisher( + data: pandas.core.frame.DataFrame, + window: int = 14, + symbol: str = '', + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display Fisher Indicator +

+ +* **Parameters** + + data : pd.DataFrame + Dataframe of OHLC prices + window : int + Length of window + symbol : str + Ticker string + export : str + Format to export data + external_axes : Optional[List[plt.Axes]], optional + External axes (3 axes are expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/common/ta/hma/_index.md b/website/content/SDK/common/ta/hma/_index.md deleted file mode 100644 index 14ca33ef216..00000000000 --- a/website/content/SDK/common/ta/hma/_index.md +++ /dev/null @@ -1,18 +0,0 @@ -## Get underlying data -### common.ta.hma(data: pandas.core.series.Series, length: int = 50, offset: int = 0) -> pandas.core.frame.DataFrame - -Gets hull moving average (HMA) for stock - - Parameters - ---------- - data: pd.Series - Dataframe of dates and prices - length: int - Length of SMA window - offset: int - Length of offset - - Returns - ---------- - df_ta: pd.DataFrame - Dataframe containing prices and HMA diff --git a/website/content/SDK/common/ta/hma/_index.rst b/website/content/SDK/common/ta/hma/_index.rst new file mode 100644 index 00000000000..63a6356c8f7 --- /dev/null +++ b/website/content/SDK/common/ta/hma/_index.rst @@ -0,0 +1,40 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +common.ta.hma( + data: pandas.core.series.Series, + length: int = 50, + offset: int = 0, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Gets hull moving average (HMA) for stock +

+ +* **Parameters** + + data: pd.Series + Dataframe of dates and prices + length: int + Length of SMA window + offset: int + Length of offset + +* **Returns** + + df_ta: pd.DataFrame + Dataframe containing prices and HMA diff --git a/website/content/SDK/common/ta/kc/_index.md b/website/content/SDK/common/ta/kc/_index.md deleted file mode 100644 index 519efe5bed8..00000000000 --- a/website/content/SDK/common/ta/kc/_index.md +++ /dev/null @@ -1,49 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### common.ta.kc(data: pandas.core.frame.DataFrame, window: int = 20, scalar: float = 2, mamode: str = 'ema', offset: int = 0) -> pandas.core.frame.DataFrame - -Keltner Channels - - Parameters - ---------- - data: pd.DataFrame - Dataframe of ohlc prices - window : int - Length of window - scalar: float - Scalar value - mamode: str - Type of filter - offset : int - Offset value - - Returns - ------- - pd.DataFrame - Dataframe of rolling kc - -## Getting charts -### common.ta.kc(data: pandas.core.frame.DataFrame, window: int = 20, scalar: float = 2, mamode: str = 'ema', offset: int = 0, symbol: str = '', export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -View Keltner Channels Indicator - - Parameters - ---------- - - data: pd.DataFrame - Dataframe of ohlc prices - window: int - Length of window - scalar: float - Scalar value - mamode: str - Type of filter - offset: int - Offset value - symbol: str - Ticker symbol - export: str - Format to export data - external_axes: Optional[List[plt.Axes]], optional - External axes (2 axes are expected in the list), by default None diff --git a/website/content/SDK/common/ta/kc/_index.rst b/website/content/SDK/common/ta/kc/_index.rst new file mode 100644 index 00000000000..0d465d7de98 --- /dev/null +++ b/website/content/SDK/common/ta/kc/_index.rst @@ -0,0 +1,101 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +common.ta.kc( + data: pandas.core.frame.DataFrame, + window: int = 20, + scalar: float = 2, + mamode: str = 'ema', + offset: int = 0, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Keltner Channels +

+ +* **Parameters** + + data: pd.DataFrame + Dataframe of ohlc prices + window : int + Length of window + scalar: float + Scalar value + mamode: str + Type of filter + offset : int + Offset value + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Dataframe of rolling kc + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +common.ta.kc( + data: pandas.core.frame.DataFrame, + window: int = 20, + scalar: float = 2, + mamode: str = 'ema', + offset: int = 0, + symbol: str = '', + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ View Keltner Channels Indicator +

+ +* **Parameters** + + data: pd.DataFrame + Dataframe of ohlc prices + window: int + Length of window + scalar: float + Scalar value + mamode: str + Type of filter + offset: int + Offset value + symbol: str + Ticker symbol + export: str + Format to export data + external_axes: Optional[List[plt.Axes]], optional + External axes (2 axes are expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/common/ta/ma/_index.md b/website/content/SDK/common/ta/ma/_index.md deleted file mode 100644 index 014f44068c6..00000000000 --- a/website/content/SDK/common/ta/ma/_index.md +++ /dev/null @@ -1,45 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### common.ta.ma(data: pandas.core.series.Series, window: List[int] = None, offset: int = 0, ma_type: str = 'EMA', symbol: str = '', export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None) -> None - -Plots MA technical indicator - - Parameters - ---------- - data: pd.Series - Series of prices - window: List[int] - Length of EMA window - offset: int - Offset variable - ma_type: str - Type of moving average. Either "EMA" "ZLMA" or "SMA" - symbol: str - Ticker - export: str - Format to export data - external_axes: Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None - -## Getting charts -### common.ta.ma(data: pandas.core.series.Series, window: List[int] = None, offset: int = 0, ma_type: str = 'EMA', symbol: str = '', export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) -> None - -Plots MA technical indicator - - Parameters - ---------- - data: pd.Series - Series of prices - window: List[int] - Length of EMA window - offset: int - Offset variable - ma_type: str - Type of moving average. Either "EMA" "ZLMA" or "SMA" - symbol: str - Ticker - export: str - Format to export data - external_axes: Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/common/ta/ma/_index.rst b/website/content/SDK/common/ta/ma/_index.rst new file mode 100644 index 00000000000..1f9320ecd49 --- /dev/null +++ b/website/content/SDK/common/ta/ma/_index.rst @@ -0,0 +1,99 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +common.ta.ma( + data: pandas.core.series.Series, + window: List[int] = None, + offset: int = 0, + ma_type: str = 'EMA', + symbol: str = '', + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Plots MA technical indicator +

+ +* **Parameters** + + data: pd.Series + Series of prices + window: List[int] + Length of EMA window + offset: int + Offset variable + ma_type: str + Type of moving average. Either "EMA" "ZLMA" or "SMA" + symbol: str + Ticker + export: str + Format to export data + external_axes: Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +common.ta.ma( + data: pandas.core.series.Series, + window: List[int] = None, + offset: int = 0, + ma_type: str = 'EMA', + symbol: str = '', + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Plots MA technical indicator +

+ +* **Parameters** + + data: pd.Series + Series of prices + window: List[int] + Length of EMA window + offset: int + Offset variable + ma_type: str + Type of moving average. Either "EMA" "ZLMA" or "SMA" + symbol: str + Ticker + export: str + Format to export data + external_axes: Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/common/ta/macd/_index.md b/website/content/SDK/common/ta/macd/_index.md deleted file mode 100644 index 1689027f256..00000000000 --- a/website/content/SDK/common/ta/macd/_index.md +++ /dev/null @@ -1,43 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### common.ta.macd(data: pandas.core.series.Series, n_fast: int = 12, n_slow: int = 26, n_signal: int = 9) -> pandas.core.frame.DataFrame - -Moving average convergence divergence - - Parameters - ---------- - data: pd.Series - Values for calculation - n_fast : int - Fast period - n_slow : int - Slow period - n_signal : int - Signal period - Returns - ---------- - pd.DataFrame - Dataframe of technical indicator - -## Getting charts -### common.ta.macd(data: pandas.core.series.Series, n_fast: int = 12, n_slow: int = 26, n_signal: int = 9, symbol: str = '', export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Plot MACD signal - - Parameters - ---------- - data : pd.Series - Values to input - n_fast : int - Fast period - n_slow : int - Slow period - n_signal : int - Signal period - symbol : str - Stock ticker - export : str - Format to export data - external_axes : Optional[List[plt.Axes]], optional - External axes (2 axes are expected in the list), by default None diff --git a/website/content/SDK/common/ta/macd/_index.rst b/website/content/SDK/common/ta/macd/_index.rst new file mode 100644 index 00000000000..ab503749a28 --- /dev/null +++ b/website/content/SDK/common/ta/macd/_index.rst @@ -0,0 +1,95 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +common.ta.macd( + data: pandas.core.series.Series, + n_fast: int = 12, + n_slow: int = 26, + n_signal: int = 9, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Moving average convergence divergence +

+ +* **Parameters** + + data: pd.Series + Values for calculation + n_fast : int + Fast period + n_slow : int + Slow period + n_signal : int + Signal period + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Dataframe of technical indicator + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +common.ta.macd( + data: pandas.core.series.Series, + n_fast: int = 12, + n_slow: int = 26, + n_signal: int = 9, + symbol: str = '', + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Plot MACD signal +

+ +* **Parameters** + + data : pd.Series + Values to input + n_fast : int + Fast period + n_slow : int + Slow period + n_signal : int + Signal period + symbol : str + Stock ticker + export : str + Format to export data + external_axes : Optional[List[plt.Axes]], optional + External axes (2 axes are expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/common/ta/obv/_index.md b/website/content/SDK/common/ta/obv/_index.md deleted file mode 100644 index bd37c11abb0..00000000000 --- a/website/content/SDK/common/ta/obv/_index.md +++ /dev/null @@ -1,32 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### common.ta.obv(data: pandas.core.frame.DataFrame) -> pandas.core.frame.DataFrame - -On Balance Volume - - Parameters - ---------- - data: pd.DataFrame - Dataframe of OHLC prices - - Returns - ------- - pd.DataFrame - Dataframe with technical indicator - -## Getting charts -### common.ta.obv(data: pandas.core.frame.DataFrame, symbol: str = '', export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Plot OBV technical indicator - - Parameters - ---------- - data : pd.DataFrame - Dataframe of ohlc prices - symbol : str - Ticker - export: str - Format to export data as - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/common/ta/obv/_index.rst b/website/content/SDK/common/ta/obv/_index.rst new file mode 100644 index 00000000000..d97f5ae060c --- /dev/null +++ b/website/content/SDK/common/ta/obv/_index.rst @@ -0,0 +1,77 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +common.ta.obv( + data: pandas.core.frame.DataFrame, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ On Balance Volume +

+ +* **Parameters** + + data: pd.DataFrame + Dataframe of OHLC prices + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Dataframe with technical indicator + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +common.ta.obv( + data: pandas.core.frame.DataFrame, + symbol: str = '', + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Plot OBV technical indicator +

+ +* **Parameters** + + data : pd.DataFrame + Dataframe of ohlc prices + symbol : str + Ticker + export: str + Format to export data as + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/common/ta/rsi/_index.md b/website/content/SDK/common/ta/rsi/_index.md deleted file mode 100644 index 288251e22c5..00000000000 --- a/website/content/SDK/common/ta/rsi/_index.md +++ /dev/null @@ -1,44 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### common.ta.rsi(data: pandas.core.series.Series, window: int = 14, scalar: float = 100, drift: int = 1) -> pandas.core.frame.DataFrame - -Relative strength index - - Parameters - ---------- - data: pd.Series - Dataframe of prices - window: int - Length of window - scalar: float - Scalar variable - drift: int - Drift variable - - Returns - ---------- - pd.DataFrame - Dataframe of technical indicator - -## Getting charts -### common.ta.rsi(data: pandas.core.series.Series, window: int = 14, scalar: float = 100.0, drift: int = 1, symbol: str = '', export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display RSI Indicator - - Parameters - ---------- - data : pd.Series - Values to input - window : int - Length of window - scalar : float - Scalar variable - drift : int - Drift variable - symbol : str - Stock ticker - export : str - Format to export data - external_axes : Optional[List[plt.Axes]], optional - External axes (2 axes are expected in the list), by default None diff --git a/website/content/SDK/common/ta/rsi/_index.rst b/website/content/SDK/common/ta/rsi/_index.rst new file mode 100644 index 00000000000..3dfe3bef896 --- /dev/null +++ b/website/content/SDK/common/ta/rsi/_index.rst @@ -0,0 +1,95 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +common.ta.rsi( + data: pandas.core.series.Series, + window: int = 14, + scalar: float = 100, + drift: int = 1, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Relative strength index +

+ +* **Parameters** + + data: pd.Series + Dataframe of prices + window: int + Length of window + scalar: float + Scalar variable + drift: int + Drift variable + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Dataframe of technical indicator + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +common.ta.rsi( + data: pandas.core.series.Series, + window: int = 14, + scalar: float = 100.0, + drift: int = 1, + symbol: str = '', + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display RSI Indicator +

+ +* **Parameters** + + data : pd.Series + Values to input + window : int + Length of window + scalar : float + Scalar variable + drift : int + Drift variable + symbol : str + Stock ticker + export : str + Format to export data + external_axes : Optional[List[plt.Axes]], optional + External axes (2 axes are expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/common/ta/sma/_index.md b/website/content/SDK/common/ta/sma/_index.md deleted file mode 100644 index 02dc08df3f6..00000000000 --- a/website/content/SDK/common/ta/sma/_index.md +++ /dev/null @@ -1,18 +0,0 @@ -## Get underlying data -### common.ta.sma(data: pandas.core.series.Series, length: int = 50, offset: int = 0) -> pandas.core.frame.DataFrame - -Gets simple moving average (EMA) for stock - - Parameters - ---------- - data: pd.Series - Dataframe of dates and prices - length: int - Length of SMA window - offset: int - Length of offset - - Returns - ---------- - pd.DataFrame - Dataframe containing prices and SMA diff --git a/website/content/SDK/common/ta/sma/_index.rst b/website/content/SDK/common/ta/sma/_index.rst new file mode 100644 index 00000000000..df30881d3eb --- /dev/null +++ b/website/content/SDK/common/ta/sma/_index.rst @@ -0,0 +1,40 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +common.ta.sma( + data: pandas.core.series.Series, + length: int = 50, + offset: int = 0, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Gets simple moving average (EMA) for stock +

+ +* **Parameters** + + data: pd.Series + Dataframe of dates and prices + length: int + Length of SMA window + offset: int + Length of offset + +* **Returns** + + pd.DataFrame + Dataframe containing prices and SMA diff --git a/website/content/SDK/common/ta/stoch/_index.md b/website/content/SDK/common/ta/stoch/_index.md deleted file mode 100644 index 86a6c648025..00000000000 --- a/website/content/SDK/common/ta/stoch/_index.md +++ /dev/null @@ -1,43 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### common.ta.stoch(data: pandas.core.frame.DataFrame, fastkperiod: int = 14, slowdperiod: int = 3, slowkperiod: int = 3) - -Stochastic oscillator - - Parameters - ---------- - data : pd.DataFrame - Dataframe of OHLC prices - fastkperiod : int - Fast k period - slowdperiod : int - Slow d period - slowkperiod : int - Slow k period - Returns - ---------- - pd.DataFrame - Dataframe of technical indicator - -## Getting charts -### common.ta.stoch(data: pandas.core.frame.DataFrame, fastkperiod: int = 14, slowdperiod: int = 3, slowkperiod: int = 3, symbol: str = '', export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) -> None - -Plot stochastic oscillator signal - - Parameters - ---------- - data : pd.DataFrame - Dataframe of OHLC prices - fastkperiod : int - Fast k period - slowdperiod : int - Slow d period - slowkperiod : int - Slow k period - symbol : str - Stock ticker symbol - export : str - Format to export data - external_axes : Optional[List[plt.Axes]], optional - External axes (3 axes are expected in the list), by default None diff --git a/website/content/SDK/common/ta/stoch/_index.rst b/website/content/SDK/common/ta/stoch/_index.rst new file mode 100644 index 00000000000..8ac89ea75b8 --- /dev/null +++ b/website/content/SDK/common/ta/stoch/_index.rst @@ -0,0 +1,95 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +common.ta.stoch( + data: pandas.core.frame.DataFrame, + fastkperiod: int = 14, + slowdperiod: int = 3, + slowkperiod: int = 3, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Stochastic oscillator +

+ +* **Parameters** + + data : pd.DataFrame + Dataframe of OHLC prices + fastkperiod : int + Fast k period + slowdperiod : int + Slow d period + slowkperiod : int + Slow k period + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Dataframe of technical indicator + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +common.ta.stoch( + data: pandas.core.frame.DataFrame, + fastkperiod: int = 14, + slowdperiod: int = 3, + slowkperiod: int = 3, + symbol: str = '', + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Plot stochastic oscillator signal +

+ +* **Parameters** + + data : pd.DataFrame + Dataframe of OHLC prices + fastkperiod : int + Fast k period + slowdperiod : int + Slow d period + slowkperiod : int + Slow k period + symbol : str + Stock ticker symbol + export : str + Format to export data + external_axes : Optional[List[plt.Axes]], optional + External axes (3 axes are expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/common/ta/vwap/_index.md b/website/content/SDK/common/ta/vwap/_index.md deleted file mode 100644 index 395645944e3..00000000000 --- a/website/content/SDK/common/ta/vwap/_index.md +++ /dev/null @@ -1,41 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### common.ta.vwap(data: pandas.core.series.Series, offset: int = 0) -> pandas.core.frame.DataFrame - -Gets volume weighted average price (VWAP) - - Parameters - ---------- - data: pd.DataFrame - Dataframe of dates and prices - offset: int - Length of offset - Returns - ---------- - df_vwap: pd.DataFrame - Dataframe with VWAP data - -## Getting charts -### common.ta.vwap(data: pandas.core.frame.DataFrame, symbol: str = '', start_date: str = None, end_date: str = None, offset: int = 0, interval: str = '', export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Plots VWMA technical indicator - - Parameters - ---------- - data : pd.DataFrame - Dataframe of OHLC prices - symbol : str - Ticker - offset : int - Offset variable - start_date: datetime - Start date to get data from with - end_date: datetime - End date to get data from with - interval : str - Interval of data - export : str - Format to export data - external_axes : Optional[List[plt.Axes]], optional - External axes (3 axes are expected in the list), by default None diff --git a/website/content/SDK/common/ta/vwap/_index.rst b/website/content/SDK/common/ta/vwap/_index.rst new file mode 100644 index 00000000000..5a9e3b53133 --- /dev/null +++ b/website/content/SDK/common/ta/vwap/_index.rst @@ -0,0 +1,92 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +common.ta.vwap( + data: pandas.core.series.Series, + offset: int = 0, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Gets volume weighted average price (VWAP) +

+ +* **Parameters** + + data: pd.DataFrame + Dataframe of dates and prices + offset: int + Length of offset + chart: *bool* + Flag to display chart + + +* **Returns** + + df_vwap: pd.DataFrame + Dataframe with VWAP data + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +common.ta.vwap( + data: pandas.core.frame.DataFrame, + symbol: str = '', + start_date: str = None, + end_date: str = None, + offset: int = 0, + interval: str = '', + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Plots VWMA technical indicator +

+ +* **Parameters** + + data : pd.DataFrame + Dataframe of OHLC prices + symbol : str + Ticker + offset : int + Offset variable + start_date: datetime + Start date to get data from with + end_date: datetime + End date to get data from with + interval : str + Interval of data + export : str + Format to export data + external_axes : Optional[List[plt.Axes]], optional + External axes (3 axes are expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/common/ta/wma/_index.md b/website/content/SDK/common/ta/wma/_index.md deleted file mode 100644 index 496080938fa..00000000000 --- a/website/content/SDK/common/ta/wma/_index.md +++ /dev/null @@ -1,18 +0,0 @@ -## Get underlying data -### common.ta.wma(data: pandas.core.series.Series, length: int = 50, offset: int = 0) -> pandas.core.frame.DataFrame - -Gets weighted moving average (WMA) for stock - - Parameters - ---------- - data: pd.Series - Dataframe of dates and prices - length: int - Length of SMA window - offset: int - Length of offset - - Returns - ---------- - df_ta: pd.DataFrame - Dataframe containing prices and WMA diff --git a/website/content/SDK/common/ta/wma/_index.rst b/website/content/SDK/common/ta/wma/_index.rst new file mode 100644 index 00000000000..4a4f83578cf --- /dev/null +++ b/website/content/SDK/common/ta/wma/_index.rst @@ -0,0 +1,40 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +common.ta.wma( + data: pandas.core.series.Series, + length: int = 50, + offset: int = 0, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Gets weighted moving average (WMA) for stock +

+ +* **Parameters** + + data: pd.Series + Dataframe of dates and prices + length: int + Length of SMA window + offset: int + Length of offset + +* **Returns** + + df_ta: pd.DataFrame + Dataframe containing prices and WMA diff --git a/website/content/SDK/common/ta/zlma/_index.md b/website/content/SDK/common/ta/zlma/_index.md deleted file mode 100644 index 00922f4d174..00000000000 --- a/website/content/SDK/common/ta/zlma/_index.md +++ /dev/null @@ -1,18 +0,0 @@ -## Get underlying data -### common.ta.zlma(data: pandas.core.series.Series, length: int = 50, offset: int = 0) -> pandas.core.frame.DataFrame - -Gets zero-lagged exponential moving average (ZLEMA) for stock - - Parameters - ---------- - data: pd.Series - Dataframe of dates and prices - length: int - Length of EMA window - offset: int - Length of offset - - Returns - ---------- - df_ta: pd.DataFrame - Dataframe containing prices and EMA diff --git a/website/content/SDK/common/ta/zlma/_index.rst b/website/content/SDK/common/ta/zlma/_index.rst new file mode 100644 index 00000000000..db2e85fa827 --- /dev/null +++ b/website/content/SDK/common/ta/zlma/_index.rst @@ -0,0 +1,40 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +common.ta.zlma( + data: pandas.core.series.Series, + length: int = 50, + offset: int = 0, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Gets zero-lagged exponential moving average (ZLEMA) for stock +

+ +* **Parameters** + + data: pd.Series + Dataframe of dates and prices + length: int + Length of EMA window + offset: int + Length of offset + +* **Returns** + + df_ta: pd.DataFrame + Dataframe containing prices and EMA diff --git a/website/content/SDK/crypto/candles/_index.md b/website/content/SDK/crypto/candles/_index.md deleted file mode 100644 index d1349b73ec7..00000000000 --- a/website/content/SDK/crypto/candles/_index.md +++ /dev/null @@ -1,19 +0,0 @@ -## Get underlying data -### crypto.candles(candles_df: 'pd.DataFrame', volume: 'bool' = True, ylabel: 'str' = '', title: 'str' = '', external_axes: 'list[plt.Axes] | None' = None, yscale: 'str' = 'linear') -> 'None' - -Plot candle chart from dataframe. [Source: Binance] - - Parameters - ---------- - candles_df: pd.DataFrame - Dataframe containing time and OHLCV - volume: bool - If volume data shall be plotted, by default True - ylabel: str - Y-label of the graph, by default "" - title: str - Title of graph, by default "" - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None - yscale : str - Scaling for y axis. Either linear or log diff --git a/website/content/SDK/crypto/candles/_index.rst b/website/content/SDK/crypto/candles/_index.rst new file mode 100644 index 00000000000..6c1b7db2e80 --- /dev/null +++ b/website/content/SDK/crypto/candles/_index.rst @@ -0,0 +1,43 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.candles( + candles_df: 'pd.DataFrame', + volume: 'bool' = True, + ylabel: 'str' = '', + title: 'str' = '', + external_axes: 'list[plt.Axes] | None' = None, yscale: 'str' = 'linear', + chart: bool = False, +) -> 'None' +{{< /highlight >}} + +.. raw:: html + +

+ Plot candle chart from dataframe. [Source: Binance] +

+ +* **Parameters** + + candles_df: pd.DataFrame + Dataframe containing time and OHLCV + volume: bool + If volume data shall be plotted, by default True + ylabel: str + Y-label of the graph, by default "" + title: str + Title of graph, by default "" + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + yscale : str + Scaling for y axis. Either linear or log diff --git a/website/content/SDK/crypto/chart/_index.md b/website/content/SDK/crypto/chart/_index.md deleted file mode 100644 index 321ee235bb6..00000000000 --- a/website/content/SDK/crypto/chart/_index.md +++ /dev/null @@ -1,33 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.chart(prices_df: 'pd.DataFrame', to_symbol: 'str' = '', from_symbol: 'str' = '', source: 'str' = '', exchange: 'str' = '', interval: 'str' = '', external_axes: 'list[plt.Axes] | None' = None, yscale: 'str' = 'linear') -> 'None' - -Load data for Technical Analysis - - Parameters - ---------- - prices_df: pd.DataFrame - Cryptocurrency - to_symbol: str - Coin (only used for chart title), by default "" - from_symbol: str - Currency (only used for chart title), by default "" - yscale: str - Scale for y axis of plot Either linear or log - -## Getting charts -### crypto.chart(prices_df: 'pd.DataFrame', to_symbol: 'str' = '', from_symbol: 'str' = '', source: 'str' = '', exchange: 'str' = '', interval: 'str' = '', external_axes: 'list[plt.Axes] | None' = None, yscale: 'str' = 'linear', chart=True) -> 'None' - -Load data for Technical Analysis - - Parameters - ---------- - prices_df: pd.DataFrame - Cryptocurrency - to_symbol: str - Coin (only used for chart title), by default "" - from_symbol: str - Currency (only used for chart title), by default "" - yscale: str - Scale for y axis of plot Either linear or log diff --git a/website/content/SDK/crypto/chart/_index.rst b/website/content/SDK/crypto/chart/_index.rst new file mode 100644 index 00000000000..74bd3b1e263 --- /dev/null +++ b/website/content/SDK/crypto/chart/_index.rst @@ -0,0 +1,87 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.chart( + prices_df: 'pd.DataFrame', + to_symbol: 'str' = '', + from_symbol: 'str' = '', + source: 'str' = '', + exchange: 'str' = '', + interval: 'str' = '', + external_axes: 'list[plt.Axes] | None' = None, yscale: 'str' = 'linear', + chart: bool = False, +) -> 'None' +{{< /highlight >}} + +.. raw:: html + +

+ Load data for Technical Analysis +

+ +* **Parameters** + + prices_df: pd.DataFrame + Cryptocurrency + to_symbol: str + Coin (only used for chart title), by default "" + from_symbol: str + Currency (only used for chart title), by default "" + yscale: str + Scale for y axis of plot Either linear or log + chart: *bool* + Flag to display chart + + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.chart( + prices_df: 'pd.DataFrame', + to_symbol: 'str' = '', + from_symbol: 'str' = '', + source: 'str' = '', + exchange: 'str' = '', + interval: 'str' = '', + external_axes: 'list[plt.Axes] | None' = None, yscale: 'str' = 'linear', + chart: bool = False, +) -> 'None' +{{< /highlight >}} + +.. raw:: html + +

+ Load data for Technical Analysis +

+ +* **Parameters** + + prices_df: pd.DataFrame + Cryptocurrency + to_symbol: str + Coin (only used for chart title), by default "" + from_symbol: str + Currency (only used for chart title), by default "" + yscale: str + Scale for y axis of plot Either linear or log + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/dd/active/_index.md b/website/content/SDK/crypto/dd/active/_index.md deleted file mode 100644 index ec5b041d285..00000000000 --- a/website/content/SDK/crypto/dd/active/_index.md +++ /dev/null @@ -1,44 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.dd.active(symbol: str, interval: str = '24h', start_date: int = 1262322000, end_date: int = 1667510580) -> pandas.core.frame.DataFrame - -Returns active addresses of a certain symbol - [Source: https://glassnode.com] - - Parameters - ---------- - symbol : str - Asset to search active addresses (e.g., BTC) - start_date : int - Initial date timestamp (e.g., 1_614_556_800) - end_date : int - End date timestamp (e.g., 1_614_556_800) - interval : str - Interval frequency (e.g., 24h) - - Returns - ------- - pd.DataFrame - active addresses over time - -## Getting charts -### crypto.dd.active(symbol: str, start_date: int = 1577836800, end_date: int = 1609459200, interval: str = '24h', export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) -> None - -Display active addresses of a certain symbol over time - [Source: https://glassnode.org] - - Parameters - ---------- - symbol : str - Asset to search active addresses (e.g., BTC) - start_date : int - Initial date timestamp (e.g., 1_614_556_800) - end_date : int - End date timestamp (e.g., 1_614_556_800) - interval : str - Interval frequency (possible values are: 24h, 1w, 1month) - export : str - Export dataframe data to csv,json,xlsx file - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/crypto/dd/active/_index.rst b/website/content/SDK/crypto/dd/active/_index.rst new file mode 100644 index 00000000000..d51fa31b433 --- /dev/null +++ b/website/content/SDK/crypto/dd/active/_index.rst @@ -0,0 +1,94 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.active( + symbol: str, + interval: str = '24h', + start_date: int = 1262304000, + end_date: int = 1667908975, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Returns active addresses of a certain symbol + [Source: https://glassnode.com] +

+ +* **Parameters** + + symbol : str + Asset to search active addresses (e.g., BTC) + start_date : int + Initial date timestamp (e.g., 1_614_556_800) + end_date : int + End date timestamp (e.g., 1_614_556_800) + interval : str + Interval frequency (e.g., 24h) + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + active addresses over time + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.dd.active( + symbol: str, + start_date: int = 1577836800, + end_date: int = 1609459200, + interval: str = '24h', + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display active addresses of a certain symbol over time + [Source: https://glassnode.org] +

+ +* **Parameters** + + symbol : str + Asset to search active addresses (e.g., BTC) + start_date : int + Initial date timestamp (e.g., 1_614_556_800) + end_date : int + End date timestamp (e.g., 1_614_556_800) + interval : str + Interval frequency (possible values are: 24h, 1w, 1month) + export : str + Export dataframe data to csv,json,xlsx file + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/dd/all_binance_trading_pairs/_index.md b/website/content/SDK/crypto/dd/all_binance_trading_pairs/_index.md deleted file mode 100644 index 26191910549..00000000000 --- a/website/content/SDK/crypto/dd/all_binance_trading_pairs/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### crypto.dd.all_binance_trading_pairs() -> pandas.core.frame.DataFrame - -Returns all available pairs on Binance in DataFrame format. DataFrame has 3 columns symbol, baseAsset, quoteAsset - example row: ETHBTC | ETH | BTC - [Source: Binance] - - - Returns - ------- - pd.DataFrame - All available pairs on Binance - Columns: symbol, baseAsset, quoteAsset - diff --git a/website/content/SDK/crypto/dd/all_binance_trading_pairs/_index.rst b/website/content/SDK/crypto/dd/all_binance_trading_pairs/_index.rst new file mode 100644 index 00000000000..52bd1ab9041 --- /dev/null +++ b/website/content/SDK/crypto/dd/all_binance_trading_pairs/_index.rst @@ -0,0 +1,29 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.all_binance_trading_pairs() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Returns all available pairs on Binance in DataFrame format. DataFrame has 3 columns symbol, baseAsset, quoteAsset + example row: ETHBTC | ETH | BTC + [Source: Binance] +

+ +* **Returns** + + pd.DataFrame + All available pairs on Binance + Columns: symbol, baseAsset, quoteAsset diff --git a/website/content/SDK/crypto/dd/balance/_index.md b/website/content/SDK/crypto/dd/balance/_index.md deleted file mode 100644 index 1c62c3989a8..00000000000 --- a/website/content/SDK/crypto/dd/balance/_index.md +++ /dev/null @@ -1,32 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.dd.balance(from_symbol: str, to_symbol: str = 'USDT') -> pandas.core.frame.DataFrame - -Get account holdings for asset. [Source: Binance] - - Parameters - ---------- - from_symbol: str - Cryptocurrency - to_symbol: str - Cryptocurrency - - Returns - ------- - pd.DataFrame - Dataframe with account holdings for an asset - -## Getting charts -### crypto.dd.balance(from_symbol: str, to_symbol: str = 'USDT', export: str = '', chart=True) -> None - -Get account holdings for asset. [Source: Binance] - - Parameters - ---------- - from_symbol: str - Cryptocurrency - to_symbol: str - Cryptocurrency - export: str - Export dataframe data to csv,json,xlsx diff --git a/website/content/SDK/crypto/dd/balance/_index.rst b/website/content/SDK/crypto/dd/balance/_index.rst new file mode 100644 index 00000000000..e1293c33b93 --- /dev/null +++ b/website/content/SDK/crypto/dd/balance/_index.rst @@ -0,0 +1,77 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.balance( + from_symbol: str, + to_symbol: str = 'USDT', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get account holdings for asset. [Source: Binance] +

+ +* **Parameters** + + from_symbol: str + Cryptocurrency + to_symbol: str + Cryptocurrency + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Dataframe with account holdings for an asset + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.dd.balance( + from_symbol: str, + to_symbol: str = 'USDT', + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Get account holdings for asset. [Source: Binance] +

+ +* **Parameters** + + from_symbol: str + Cryptocurrency + to_symbol: str + Cryptocurrency + export: str + Export dataframe data to csv,json,xlsx + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/dd/basic/_index.md b/website/content/SDK/crypto/dd/basic/_index.md deleted file mode 100644 index cc64eda7da5..00000000000 --- a/website/content/SDK/crypto/dd/basic/_index.md +++ /dev/null @@ -1,30 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.dd.basic(symbol: str = 'btc-bitcoin') -> pandas.core.frame.DataFrame - -Basic coin information [Source: CoinPaprika] - - Parameters - ---------- - symbol: str - Coin id - - Returns - ------- - pd.DataFrame - Metric, Value - -## Getting charts -### crypto.dd.basic(symbol: str = 'BTC', export: str = '', chart=True) -> None - -Get basic information for coin. Like: - name, symbol, rank, type, description, platform, proof_type, contract, tags, parent. - [Source: CoinPaprika] - - Parameters - ---------- - symbol: str - Cryptocurrency symbol (e.g. BTC) - export: str - Export dataframe data to csv,json,xlsx diff --git a/website/content/SDK/crypto/dd/basic/_index.rst b/website/content/SDK/crypto/dd/basic/_index.rst new file mode 100644 index 00000000000..79638ca202b --- /dev/null +++ b/website/content/SDK/crypto/dd/basic/_index.rst @@ -0,0 +1,73 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.basic( + symbol: str = 'btc-bitcoin', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Basic coin information [Source: CoinPaprika] +

+ +* **Parameters** + + symbol: str + Coin id + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Metric, Value + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.dd.basic( + symbol: str = 'BTC', + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Get basic information for coin. Like: + name, symbol, rank, type, description, platform, proof_type, contract, tags, parent. + [Source: CoinPaprika] +

+ +* **Parameters** + + symbol: str + Cryptocurrency symbol (e.g. BTC) + export: str + Export dataframe data to csv,json,xlsx + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/dd/binance_available_quotes_for_each_coin/_index.md b/website/content/SDK/crypto/dd/binance_available_quotes_for_each_coin/_index.md deleted file mode 100644 index d061d334b9d..00000000000 --- a/website/content/SDK/crypto/dd/binance_available_quotes_for_each_coin/_index.md +++ /dev/null @@ -1,11 +0,0 @@ -## Get underlying data -### crypto.dd.binance_available_quotes_for_each_coin() -> dict - -Helper methods that for every coin available on Binance add all quote assets. [Source: Binance] - - Returns - ------- - dict: - All quote assets for given coin - {'ETH' : ['BTC', 'USDT' ...], 'UNI' : ['ETH', 'BTC','BUSD', ...] - diff --git a/website/content/SDK/crypto/dd/binance_available_quotes_for_each_coin/_index.rst b/website/content/SDK/crypto/dd/binance_available_quotes_for_each_coin/_index.rst new file mode 100644 index 00000000000..8e243deb563 --- /dev/null +++ b/website/content/SDK/crypto/dd/binance_available_quotes_for_each_coin/_index.rst @@ -0,0 +1,27 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.binance_available_quotes_for_each_coin() -> dict +{{< /highlight >}} + +.. raw:: html + +

+ Helper methods that for every coin available on Binance add all quote assets. [Source: Binance] +

+ +* **Returns** + + dict: + All quote assets for given coin + {'ETH' : ['BTC', 'USDT' ...], 'UNI' : ['ETH', 'BTC','BUSD', ...] diff --git a/website/content/SDK/crypto/dd/book/_index.md b/website/content/SDK/crypto/dd/book/_index.md deleted file mode 100644 index 0a7fe57189c..00000000000 --- a/website/content/SDK/crypto/dd/book/_index.md +++ /dev/null @@ -1,41 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.dd.book(from_symbol: str, limit: int = 100, to_symbol: str = 'USDT') -> pandas.core.frame.DataFrame - -Get order book for currency. [Source: Binance] - - Parameters - ---------- - - from_symbol: str - Cryptocurrency symbol - limit: int - Limit parameter. Adjusts the weight - to_symbol: str - Quote currency (what to view coin vs) - - Returns - ------- - - pd.DataFrame - Dataframe containing orderbook - -## Getting charts -### crypto.dd.book(from_symbol: str, limit: int = 100, to_symbol: str = 'USDT', export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) -> None - -Get order book for currency. [Source: Binance] - - Parameters - ---------- - - from_symbol: str - Cryptocurrency symbol - limit: int - Limit parameter. Adjusts the weight - to_symbol: str - Quote currency (what to view coin vs) - export: str - Export dataframe data to csv,json,xlsx - external_axes : Optional[List[plt.Axes]] - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/crypto/dd/book/_index.rst b/website/content/SDK/crypto/dd/book/_index.rst new file mode 100644 index 00000000000..173adb9ebea --- /dev/null +++ b/website/content/SDK/crypto/dd/book/_index.rst @@ -0,0 +1,86 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.book( + from_symbol: str, + limit: int = 100, + to_symbol: str = 'USDT', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get order book for currency. [Source: Binance] +

+ +* **Parameters** + + from_symbol: *str* + Cryptocurrency symbol + limit: *int* + Limit parameter. Adjusts the weight + to_symbol: *str* + Quote currency (what to view coin vs) + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Dataframe containing orderbook + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.dd.book( + from_symbol: str, + limit: int = 100, + to_symbol: str = 'USDT', + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Get order book for currency. [Source: Binance] +

+ +* **Parameters** + + from_symbol: *str* + Cryptocurrency symbol + limit: *int* + Limit parameter. Adjusts the weight + to_symbol: *str* + Quote currency (what to view coin vs) + export: *str* + Export dataframe data to csv,json,xlsx + external_axes : Optional[List[plt.Axes]] + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/dd/btcrb/_index.md b/website/content/SDK/crypto/dd/btcrb/_index.md deleted file mode 100644 index f3c7ff4e274..00000000000 --- a/website/content/SDK/crypto/dd/btcrb/_index.md +++ /dev/null @@ -1,33 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.dd.btcrb(start_date: str = '2010-01-01', end_date: str = '2022-11-03') - -Get bitcoin price data - [Price data from source: https://glassnode.com] - [Inspired by: https://blockchaincenter.net] - - Parameters - ---------- - start_date : str - Initial date, format YYYY-MM-DD - end_date : str - Final date, format YYYY-MM-DD - -## Getting charts -### crypto.dd.btcrb(start_date: str = '2010-01-01', end_date: str = '2022-11-03', export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Displays bitcoin rainbow chart - [Price data from source: https://glassnode.com] - [Inspired by: https://blockchaincenter.net] - - Parameters - ---------- - start_date : int - Initial date, format YYYY-MM-DD - end_date : int - Final date, format YYYY-MM-DD - export : str - Export dataframe data to csv,json,xlsx file - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/crypto/dd/btcrb/_index.rst b/website/content/SDK/crypto/dd/btcrb/_index.rst new file mode 100644 index 00000000000..9d9b857d82f --- /dev/null +++ b/website/content/SDK/crypto/dd/btcrb/_index.rst @@ -0,0 +1,79 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.btcrb( + start_date: str = '2010-01-01', + end_date: str = '2022-11-07', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Get bitcoin price data + [Price data from source: https://glassnode.com] + [Inspired by: https://blockchaincenter.net] +

+ +* **Parameters** + + start_date : str + Initial date, format YYYY-MM-DD + end_date : str + Final date, format YYYY-MM-DD + chart: *bool* + Flag to display chart + + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.dd.btcrb( + start_date: str = '2010-01-01', + end_date: str = '2022-11-07', + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Displays bitcoin rainbow chart + [Price data from source: https://glassnode.com] + [Inspired by: https://blockchaincenter.net] +

+ +* **Parameters** + + start_date : int + Initial date, format YYYY-MM-DD + end_date : int + Final date, format YYYY-MM-DD + export : str + Export dataframe data to csv,json,xlsx file + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/dd/candles/_index.md b/website/content/SDK/crypto/dd/candles/_index.md deleted file mode 100644 index db7321bbb25..00000000000 --- a/website/content/SDK/crypto/dd/candles/_index.md +++ /dev/null @@ -1,32 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.dd.candles(symbol: str, interval: str = '24h') -> pandas.core.frame.DataFrame - -Get candles for chosen trading pair and time interval. [Source: Coinbase] - - Parameters - ---------- - symbol: str - Trading pair of coins on Coinbase e.g ETH-USDT or UNI-ETH - interval: str - Time interval. One from 1min, 5min ,15min, 1hour, 6hour, 24hour - - Returns - ------- - pd.DataFrame - Candles for chosen trading pair. - -## Getting charts -### crypto.dd.candles(symbol: str, interval: str = '24h', export: str = '', chart=True) -> None - -Get candles for chosen trading pair and time interval. [Source: Coinbase] - - Parameters - ---------- - symbol: str - Trading pair of coins on Coinbase e.g ETH-USDT or UNI-ETH - interval: str - Time interval. One from 1m, 5m ,15m, 1h, 6h, 24h - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/dd/candles/_index.rst b/website/content/SDK/crypto/dd/candles/_index.rst new file mode 100644 index 00000000000..3091495199e --- /dev/null +++ b/website/content/SDK/crypto/dd/candles/_index.rst @@ -0,0 +1,77 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.candles( + symbol: str, + interval: str = '24h', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get candles for chosen trading pair and time interval. [Source: Coinbase] +

+ +* **Parameters** + + symbol: str + Trading pair of coins on Coinbase e.g ETH-USDT or UNI-ETH + interval: str + Time interval. One from 1min, 5min ,15min, 1hour, 6hour, 24hour + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Candles for chosen trading pair. + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.dd.candles( + symbol: str, + interval: str = '24h', + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Get candles for chosen trading pair and time interval. [Source: Coinbase] +

+ +* **Parameters** + + symbol: str + Trading pair of coins on Coinbase e.g ETH-USDT or UNI-ETH + interval: str + Time interval. One from 1m, 5m ,15m, 1h, 6h, 24h + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/dd/cbbook/_index.md b/website/content/SDK/crypto/dd/cbbook/_index.md deleted file mode 100644 index b5a0782578e..00000000000 --- a/website/content/SDK/crypto/dd/cbbook/_index.md +++ /dev/null @@ -1,33 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.dd.cbbook(symbol: str) -> Tuple[numpy.ndarray, numpy.ndarray, str, dict] - -Get orders book for chosen trading pair. [Source: Coinbase] - - Parameters - ---------- - symbol: str - Trading pair of coins on Coinbase e.g ETH-USDT or UNI-ETH - - Returns - ------- - Tuple[np.array, np.array, str, dict] - array with bid prices, order sizes and cumulative order sizes - array with ask prices, order sizes and cumulative order sizes - trading pair - dict with raw data - -## Getting charts -### crypto.dd.cbbook(symbol: str, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) -> None - -Displays a list of available currency pairs for trading. [Source: Coinbase] - - Parameters - ---------- - symbol: str - Trading pair of coins on Coinbase e.g ETH-USDT or UNI-ETH - export : str - Export dataframe data to csv,json,xlsx file - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/crypto/dd/cbbook/_index.rst b/website/content/SDK/crypto/dd/cbbook/_index.rst new file mode 100644 index 00000000000..108392776bd --- /dev/null +++ b/website/content/SDK/crypto/dd/cbbook/_index.rst @@ -0,0 +1,77 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.cbbook( + symbol: str, + chart: bool = False, +) -> Tuple[numpy.ndarray, numpy.ndarray, str, dict] +{{< /highlight >}} + +.. raw:: html + +

+ Get orders book for chosen trading pair. [Source: Coinbase] +

+ +* **Parameters** + + symbol: *str* + Trading pair of coins on Coinbase e.g ETH-USDT or UNI-ETH + chart: *bool* + Flag to display chart + + +* **Returns** + + Tuple[np.array, np.array, str, dict] + array with bid prices, order sizes and cumulative order sizes + array with ask prices, order sizes and cumulative order sizes + trading pair + dict with raw data + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.dd.cbbook( + symbol: str, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Displays a list of available currency pairs for trading. [Source: Coinbase] +

+ +* **Parameters** + + symbol: *str* + Trading pair of coins on Coinbase e.g ETH-USDT or UNI-ETH + export : *str* + Export dataframe data to csv,json,xlsx file + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/dd/change/_index.md b/website/content/SDK/crypto/dd/change/_index.rst similarity index 50% rename from website/content/SDK/crypto/dd/change/_index.md rename to website/content/SDK/crypto/dd/change/_index.rst index 8d7e1779991..a8d5134d330 100644 --- a/website/content/SDK/crypto/dd/change/_index.md +++ b/website/content/SDK/crypto/dd/change/_index.rst @@ -1,13 +1,36 @@ -To obtain charts, make sure to add `chart=True` as the last parameter +.. role:: python(code) + :language: python + :class: highlight -## Get underlying data -### crypto.dd.change(symbol: str, exchange: str = 'binance', start_date: int = 1262322000, end_date: int = 1667510580) -> pandas.core.frame.DataFrame +| -Returns 30d change of the supply held in exchange wallets of a certain symbol. +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.change( + symbol: str, + exchange: str = 'binance', + start_date: int = 1262304000, + end_date: int = 1667908975, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Returns 30d change of the supply held in exchange wallets of a certain symbol. [Source: https://glassnode.com] +

+ +* **Parameters** - Parameters - ---------- symbol : str Asset symbol to search supply (e.g., BTC) exchange : str @@ -16,20 +39,44 @@ Returns 30d change of the supply held in exchange wallets of a certain symbol. Initial date timestamp (e.g., 1_614_556_800) end_date : int End date timestamp (e.g., 1_614_556_800) + chart: *bool* + Flag to display chart + + +* **Returns** - Returns - ------- pd.DataFrame supply change in exchange wallets of a certain symbol over time -## Getting charts -### crypto.dd.change(symbol: str, exchange: str = 'binance', start_date: int = 1577836800, end_date: int = 1609459200, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) -> None +| -Display 30d change of the supply held in exchange wallets. +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.dd.change( + symbol: str, + exchange: str = 'binance', + start_date: int = 1577836800, + end_date: int = 1609459200, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display 30d change of the supply held in exchange wallets. [Source: https://glassnode.org] +

+ +* **Parameters** - Parameters - ---------- symbol : str Asset to search active addresses (e.g., BTC) exchange : str @@ -44,3 +91,6 @@ Display 30d change of the supply held in exchange wallets. Export dataframe data to csv,json,xlsx file external_axes : Optional[List[plt.Axes]], optional External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/dd/check_valid_binance_str/_index.md b/website/content/SDK/crypto/dd/check_valid_binance_str/_index.md deleted file mode 100644 index de732bc9734..00000000000 --- a/website/content/SDK/crypto/dd/check_valid_binance_str/_index.md +++ /dev/null @@ -1,4 +0,0 @@ -## Get underlying data -### crypto.dd.check_valid_binance_str(symbol: str) -> str - -Check if symbol is in defined binance. [Source: Bin diff --git a/website/content/SDK/crypto/dd/check_valid_binance_str/_index.rst b/website/content/SDK/crypto/dd/check_valid_binance_str/_index.rst new file mode 100644 index 00000000000..6d368ebfabe --- /dev/null +++ b/website/content/SDK/crypto/dd/check_valid_binance_str/_index.rst @@ -0,0 +1,24 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.check_valid_binance_str( + symbol: str, + chart: bool = False, +) -> str +{{< /highlight >}} + +.. raw:: html + +

+ Check if symbol is in defined binance. [Source: Binance +

diff --git a/website/content/SDK/crypto/dd/close/_index.md b/website/content/SDK/crypto/dd/close/_index.md deleted file mode 100644 index 9248a3176e1..00000000000 --- a/website/content/SDK/crypto/dd/close/_index.md +++ /dev/null @@ -1,21 +0,0 @@ -## Get underlying data -### crypto.dd.close(symbol: str, start_date: str = '2010-01-01', end_date: str = '2022-11-03', print_errors: bool = True) -> pandas.core.frame.DataFrame - -Returns the price of a cryptocurrency - [Source: https://glassnode.com] - - Parameters - ---------- - symbol : str - Crypto to check close price (BTC or ETH) - start_date : str - Initial date, format YYYY-MM-DD - end_date : str - Final date, format YYYY-MM-DD - print_errors: bool - Flag to print errors. Default: True - - Returns - ------- - pd.DataFrame - price over time diff --git a/website/content/SDK/crypto/dd/close/_index.rst b/website/content/SDK/crypto/dd/close/_index.rst new file mode 100644 index 00000000000..a524f5ada50 --- /dev/null +++ b/website/content/SDK/crypto/dd/close/_index.rst @@ -0,0 +1,44 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.close( + symbol: str, + start_date: str = '2010-01-01', + end_date: str = '2022-11-08', + print_errors: bool = True, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Returns the price of a cryptocurrency + [Source: https://glassnode.com] +

+ +* **Parameters** + + symbol : str + Crypto to check close price (BTC or ETH) + start_date : str + Initial date, format YYYY-MM-DD + end_date : str + Final date, format YYYY-MM-DD + print_errors: bool + Flag to print errors. Default: True + +* **Returns** + + pd.DataFrame + price over time diff --git a/website/content/SDK/crypto/dd/coin/_index.md b/website/content/SDK/crypto/dd/coin/_index.md deleted file mode 100644 index 36e85fdaf8a..00000000000 --- a/website/content/SDK/crypto/dd/coin/_index.md +++ /dev/null @@ -1,13 +0,0 @@ -## Get underlying data -### crypto.dd.coin(symbol: str = 'eth-ethereum') -> dict - -Get coin by id [Source: CoinPaprika] - - Parameters - ---------- - symbol: str - id of coin from coinpaprika e.g. Ethereum - > 'eth-ethereum' - Returns - ------- - dict - Coin response diff --git a/website/content/SDK/crypto/dd/coin/_index.rst b/website/content/SDK/crypto/dd/coin/_index.rst new file mode 100644 index 00000000000..ecbe88000a5 --- /dev/null +++ b/website/content/SDK/crypto/dd/coin/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.coin( + symbol: str = 'eth-ethereum', + chart: bool = False, +) -> dict +{{< /highlight >}} + +.. raw:: html + +

+ Get coin by id [Source: CoinPaprika] +

+ +* **Parameters** + + symbol: str + id of coin from coinpaprika e.g. Ethereum - > 'eth-ethereum' + +* **Returns** + + dict + Coin response diff --git a/website/content/SDK/crypto/dd/coin_market_chart/_index.md b/website/content/SDK/crypto/dd/coin_market_chart/_index.md deleted file mode 100644 index 862559fe0ad..00000000000 --- a/website/content/SDK/crypto/dd/coin_market_chart/_index.md +++ /dev/null @@ -1,18 +0,0 @@ -## Get underlying data -### crypto.dd.coin_market_chart(symbol: str = '', vs_currency: str = 'usd', days: int = 30, **kwargs: Any) -> pandas.core.frame.DataFrame - -Get prices for given coin. [Source: CoinGecko] - - Parameters - ---------- - vs_currency: str - currency vs which display data - days: int - number of days to display the data - kwargs - - Returns - ------- - pandas.DataFrame - Prices for given coin - Columns: time, price, currency diff --git a/website/content/SDK/crypto/dd/coin_market_chart/_index.rst b/website/content/SDK/crypto/dd/coin_market_chart/_index.rst new file mode 100644 index 00000000000..91c3daaa19a --- /dev/null +++ b/website/content/SDK/crypto/dd/coin_market_chart/_index.rst @@ -0,0 +1,42 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.coin_market_chart( + symbol: str = '', + vs_currency: str = 'usd', + days: int = 30, + **kwargs: Any, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get prices for given coin. [Source: CoinGecko] +

+ +* **Parameters** + + vs_currency: str + currency vs which display data + days: int + number of days to display the data + kwargs + unspecified keyword arguments + +* **Returns** + + pandas.DataFrame + Prices for given coin + Columns: time, price, currency diff --git a/website/content/SDK/crypto/dd/eb/_index.md b/website/content/SDK/crypto/dd/eb/_index.rst similarity index 51% rename from website/content/SDK/crypto/dd/eb/_index.md rename to website/content/SDK/crypto/dd/eb/_index.rst index 8e6f8820941..d33eebfe963 100644 --- a/website/content/SDK/crypto/dd/eb/_index.md +++ b/website/content/SDK/crypto/dd/eb/_index.rst @@ -1,13 +1,36 @@ -To obtain charts, make sure to add `chart=True` as the last parameter +.. role:: python(code) + :language: python + :class: highlight -## Get underlying data -### crypto.dd.eb(symbol: str, exchange: str = 'binance', start_date: int = 1262322000, end_date: int = 1667510580) -> pandas.core.frame.DataFrame +| -Returns the total amount of coins held on exchange addresses in units and percentage. +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.eb( + symbol: str, + exchange: str = 'binance', + start_date: int = 1262304000, + end_date: int = 1667908975, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Returns the total amount of coins held on exchange addresses in units and percentage. [Source: https://glassnode.com] +

+ +* **Parameters** - Parameters - ---------- symbol : str Asset to search active addresses (e.g., BTC) exchange : str @@ -16,20 +39,45 @@ Returns the total amount of coins held on exchange addresses in units and percen Initial date timestamp (e.g., 1_614_556_800) end_date : int End date timestamp (e.g., 1_614_556_800) + chart: *bool* + Flag to display chart + + +* **Returns** - Returns - ------- pd.DataFrame total amount of coins in units/percentage and symbol price over time -## Getting charts -### crypto.dd.eb(symbol: str, exchange: str = 'binance', start_date: int = 1577836800, end_date: int = 1609459200, percentage: bool = False, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) -> None +| -Display total amount of coins held on exchange addresses in units and percentage. +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.dd.eb( + symbol: str, + exchange: str = 'binance', + start_date: int = 1577836800, + end_date: int = 1609459200, + percentage: bool = False, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display total amount of coins held on exchange addresses in units and percentage. [Source: https://glassnode.org] +

+ +* **Parameters** - Parameters - ---------- symbol : str Asset to search active addresses (e.g., BTC) exchange : str @@ -46,3 +94,6 @@ Display total amount of coins held on exchange addresses in units and percentage Export dataframe data to csv,json,xlsx file external_axes : Optional[List[plt.Axes]], optional External axes (2 axes are expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/dd/events/_index.md b/website/content/SDK/crypto/dd/events/_index.rst similarity index 59% rename from website/content/SDK/crypto/dd/events/_index.md rename to website/content/SDK/crypto/dd/events/_index.rst index e7172f1065a..553f7eb25a5 100644 --- a/website/content/SDK/crypto/dd/events/_index.md +++ b/website/content/SDK/crypto/dd/events/_index.rst @@ -1,9 +1,29 @@ -To obtain charts, make sure to add `chart=True` as the last parameter +.. role:: python(code) + :language: python + :class: highlight -## Get underlying data -### crypto.dd.events(symbol: str = 'eth-ethereum', sortby='date', ascend: bool = False) -> pandas.core.frame.DataFrame +| -Get all events related to given coin like conferences, start date of futures trading etc. +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.events( + symbol: str = 'eth-ethereum', sortby='date', + ascend: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get all events related to given coin like conferences, start date of futures trading etc. [Source: CoinPaprika] Example of response from API: @@ -20,9 +40,10 @@ Get all events related to given coin like conferences, start date of futures tra "link": "http://www.cmegroup.com/trading/equity-index/us-index/bitcoin_product_calendar_futures.html", "proof_image_link": "https://static.coinpaprika.com/storage/cdn/event_images/16635.jpg" } +

+ +* **Parameters** - Parameters - ---------- symbol: str id of coin from coinpaprika e.g. Ethereum - > 'eth-ethereum' sortby: str @@ -31,19 +52,44 @@ Get all events related to given coin like conferences, start date of futures tra https://api.coinpaprika.com/docs#tag/Coins/paths/~1coins~1%7Bcoin_id%7D~1events/get). ascend: bool Flag to sort data ascending - Returns - ------- + chart: *bool* + Flag to display chart + + +* **Returns** + pandas.DataFrame Events found for given coin Columns: id, date , date_to, name, description, is_conference, link, proof_image_link -## Getting charts -### crypto.dd.events(symbol: str = 'BTC', limit: int = 10, sortby: str = 'date', ascend: bool = False, links: bool = False, export: str = '', chart=True) -> None +| -Get all events for given coin id. [Source: CoinPaprika] +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.dd.events( + symbol: str = 'BTC', + limit: int = 10, + sortby: str = 'date', + ascend: bool = False, + links: bool = False, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Get all events for given coin id. [Source: CoinPaprika] +

+ +* **Parameters** - Parameters - ---------- symbol: str Cryptocurrency symbol (e.g. BTC) limit: int @@ -58,3 +104,6 @@ Get all events for given coin id. [Source: CoinPaprika] Flag to display urls export : str Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/dd/ex/_index.md b/website/content/SDK/crypto/dd/ex/_index.md deleted file mode 100644 index fea2a493a43..00000000000 --- a/website/content/SDK/crypto/dd/ex/_index.md +++ /dev/null @@ -1,41 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.dd.ex(symbol: str = 'eth-ethereum', sortby: str = 'adjusted_volume_24h_share', ascend: bool = True) -> pandas.core.frame.DataFrame - -Get all exchanges for given coin id. [Source: CoinPaprika] - - Parameters - ---------- - symbol: str - Identifier of Coin from CoinPaprika - sortby: str - Key by which to sort data. Every column name is valid (see for possible values: - https://api.coinpaprika.com/v1). - ascend: bool - Flag to sort data ascending - - Returns - ------- - pandas.DataFrame - All exchanges for given coin - Columns: id, name, adjusted_volume_24h_share, fiats - -## Getting charts -### crypto.dd.ex(symbol: str = 'btc', limit: int = 10, sortby: str = 'adjusted_volume_24h_share', ascend: bool = True, export: str = '', chart=True) -> None - -Get all exchanges for given coin id. [Source: CoinPaprika] - - Parameters - ---------- - symbol: str - Cryptocurrency symbol (e.g. BTC) - limit: int - Number of records to display - sortby: str - Key by which to sort data. Every column name is valid (see for possible values: - https://api.coinpaprika.com/v1). - ascend: bool - Flag to sort data ascending - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/dd/ex/_index.rst b/website/content/SDK/crypto/dd/ex/_index.rst new file mode 100644 index 00000000000..1b6cbd59d32 --- /dev/null +++ b/website/content/SDK/crypto/dd/ex/_index.rst @@ -0,0 +1,89 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.ex( + symbol: str = 'eth-ethereum', + sortby: str = 'adjusted_volume_24h_share', + ascend: bool = True, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get all exchanges for given coin id. [Source: CoinPaprika] +

+ +* **Parameters** + + symbol: str + Identifier of Coin from CoinPaprika + sortby: str + Key by which to sort data. Every column name is valid (see for possible values: + https://api.coinpaprika.com/v1). + ascend: bool + Flag to sort data ascending + chart: *bool* + Flag to display chart + + +* **Returns** + + pandas.DataFrame + All exchanges for given coin + Columns: id, name, adjusted_volume_24h_share, fiats + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.dd.ex( + symbol: str = 'btc', + limit: int = 10, + sortby: str = 'adjusted_volume_24h_share', + ascend: bool = True, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Get all exchanges for given coin id. [Source: CoinPaprika] +

+ +* **Parameters** + + symbol: str + Cryptocurrency symbol (e.g. BTC) + limit: int + Number of records to display + sortby: str + Key by which to sort data. Every column name is valid (see for possible values: + https://api.coinpaprika.com/v1). + ascend: bool + Flag to sort data ascending + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/dd/exchanges/_index.md b/website/content/SDK/crypto/dd/exchanges/_index.md deleted file mode 100644 index 112d420f69c..00000000000 --- a/website/content/SDK/crypto/dd/exchanges/_index.md +++ /dev/null @@ -1,13 +0,0 @@ -## Get underlying data -### crypto.dd.exchanges() - -Helper method to get all the exchanges supported by ccxt - [Source: https://docs.ccxt.com/en/latest/manual.html] - - Parameters - ---------- - - Returns - ------- - List[str] - list of all the exchanges supported by ccxt diff --git a/website/content/SDK/crypto/dd/exchanges/_index.rst b/website/content/SDK/crypto/dd/exchanges/_index.rst new file mode 100644 index 00000000000..c638e1b101c --- /dev/null +++ b/website/content/SDK/crypto/dd/exchanges/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.exchanges() +{{< /highlight >}} + +.. raw:: html + +

+ Helper method to get all the exchanges supported by ccxt + [Source: https://docs.ccxt.com/en/latest/manual.html] + + Parameters + ---------- +

+ +* **Parameters** + + + +* **Returns** + + List[str] + list of all the exchanges supported by ccxt diff --git a/website/content/SDK/crypto/dd/fr/_index.md b/website/content/SDK/crypto/dd/fr/_index.md deleted file mode 100644 index cd7ccff17b8..00000000000 --- a/website/content/SDK/crypto/dd/fr/_index.md +++ /dev/null @@ -1,38 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.dd.fr(symbol: str) -> Tuple[str, pandas.core.frame.DataFrame, pandas.core.frame.DataFrame, pandas.core.frame.DataFrame] - -Returns coin fundraising - [Source: https://messari.io/] - - Parameters - ---------- - symbol : str - Crypto symbol to check fundraising - - Returns - ------- - str - launch summary - pd.DataFrame - Sales rounds - pd.DataFrame - Treasury Accounts - pd.DataFrame - Metric Value launch details - -## Getting charts -### crypto.dd.fr(symbol: str, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) -> None - -Display coin fundraising - [Source: https://messari.io/] - - Parameters - ---------- - symbol : str - Crypto symbol to check coin fundraising - export : str - Export dataframe data to csv,json,xlsx file - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/crypto/dd/fr/_index.rst b/website/content/SDK/crypto/dd/fr/_index.rst new file mode 100644 index 00000000000..5d84ed51dd2 --- /dev/null +++ b/website/content/SDK/crypto/dd/fr/_index.rst @@ -0,0 +1,82 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.fr( + symbol: str, + chart: bool = False, +) -> Tuple[str, pandas.core.frame.DataFrame, pandas.core.frame.DataFrame, pandas.core.frame.DataFrame] +{{< /highlight >}} + +.. raw:: html + +

+ Returns coin fundraising + [Source: https://messari.io/] +

+ +* **Parameters** + + symbol : str + Crypto symbol to check fundraising + chart: *bool* + Flag to display chart + + +* **Returns** + + str + launch summary + pd.DataFrame + Sales rounds + pd.DataFrame + Treasury Accounts + pd.DataFrame + Metric Value launch details + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.dd.fr( + symbol: str, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display coin fundraising + [Source: https://messari.io/] +

+ +* **Parameters** + + symbol : str + Crypto symbol to check coin fundraising + export : str + Export dataframe data to csv,json,xlsx file + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/dd/get_mt/_index.md b/website/content/SDK/crypto/dd/get_mt/_index.md deleted file mode 100644 index f33911c2040..00000000000 --- a/website/content/SDK/crypto/dd/get_mt/_index.md +++ /dev/null @@ -1,34 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.dd.get_mt(only_free: bool = True) -> pandas.core.frame.DataFrame - -Returns available messari timeseries - [Source: https://messari.io/] - - Parameters - ---------- - only_free : bool - Display only timeseries available for free - - Returns - ------- - pd.DataFrame - available timeseries - -## Getting charts -### crypto.dd.get_mt(limit: int = 10, query: str = '', only_free: bool = True, export: str = '', chart=True) -> None - -Display messari timeseries list - [Source: https://messari.io/] - - Parameters - ---------- - limit : int - number to show - query : str - Query to search across all messari timeseries - only_free : bool - Display only timeseries available for free - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/dd/get_mt/_index.rst b/website/content/SDK/crypto/dd/get_mt/_index.rst new file mode 100644 index 00000000000..77edd988aff --- /dev/null +++ b/website/content/SDK/crypto/dd/get_mt/_index.rst @@ -0,0 +1,79 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.get_mt( + only_free: bool = True, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Returns available messari timeseries + [Source: https://messari.io/] +

+ +* **Parameters** + + only_free : bool + Display only timeseries available for free + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + available timeseries + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.dd.get_mt( + limit: int = 10, + query: str = '', + only_free: bool = True, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display messari timeseries list + [Source: https://messari.io/] +

+ +* **Parameters** + + limit : int + number to show + query : str + Query to search across all messari timeseries + only_free : bool + Display only timeseries available for free + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/dd/gh/_index.md b/website/content/SDK/crypto/dd/gh/_index.md deleted file mode 100644 index 532ae4a264b..00000000000 --- a/website/content/SDK/crypto/dd/gh/_index.md +++ /dev/null @@ -1,50 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.dd.gh(symbol: str, dev_activity: bool = False, interval: str = '1d', start_date: str = '2021-11-03T17:23:00Z', end_date: str = '2022-11-03T17:23:00Z') -> pandas.core.frame.DataFrame - -Returns a list of developer activity for a given coin and time interval. - - [Source: https://santiment.net/] - - Parameters - ---------- - symbol : str - Crypto symbol to check github activity - dev_activity: bool - Whether to filter only for development activity - start_date : int - Initial date like string (e.g., 2021-10-01) - end_date : int - End date like string (e.g., 2021-10-01) - interval : str - Interval frequency (e.g., 1d) - - Returns - ------- - pd.DataFrame - developer activity over time - -## Getting charts -### crypto.dd.gh(symbol: str, start_date: str = '2021-11-03T17:23:00Z', dev_activity: bool = False, end_date: str = '2022-11-03T17:23:00Z', interval: str = '1d', export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) -> None - -Returns a list of github activity for a given coin and time interval. - - [Source: https://santiment.net/] - - Parameters - ---------- - symbol : str - Crypto symbol to check github activity - dev_activity: bool - Whether to filter only for development activity - start_date : int - Initial date like string (e.g., 2021-10-01) - end_date : int - End date like string (e.g., 2021-10-01) - interval : str - Interval frequency (some possible values are: 1h, 1d, 1w) - export : str - Export dataframe data to csv,json,xlsx file - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/crypto/dd/gh/_index.rst b/website/content/SDK/crypto/dd/gh/_index.rst new file mode 100644 index 00000000000..b87dfed1d54 --- /dev/null +++ b/website/content/SDK/crypto/dd/gh/_index.rst @@ -0,0 +1,102 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.gh( + symbol: str, + dev_activity: bool = False, + interval: str = '1d', + start_date: str = '2021-11-08T12:02:55Z', + end_date: str = '2022-11-08T12:02:55Z', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Returns a list of developer activity for a given coin and time interval. + + [Source: https://santiment.net/] +

+ +* **Parameters** + + symbol : str + Crypto symbol to check github activity + dev_activity: bool + Whether to filter only for development activity + start_date : int + Initial date like string (e.g., 2021-10-01) + end_date : int + End date like string (e.g., 2021-10-01) + interval : str + Interval frequency (e.g., 1d) + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + developer activity over time + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.dd.gh( + symbol: str, + start_date: str = '2021-11-08T12:02:55Z', + dev_activity: bool = False, + end_date: str = '2022-11-08T12:02:55Z', + interval: str = '1d', + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Returns a list of github activity for a given coin and time interval. + + [Source: https://santiment.net/] +

+ +* **Parameters** + + symbol : str + Crypto symbol to check github activity + dev_activity: bool + Whether to filter only for development activity + start_date : int + Initial date like string (e.g., 2021-10-01) + end_date : int + End date like string (e.g., 2021-10-01) + interval : str + Interval frequency (some possible values are: 1h, 1d, 1w) + export : str + Export dataframe data to csv,json,xlsx file + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/dd/gov/_index.md b/website/content/SDK/crypto/dd/gov/_index.md deleted file mode 100644 index 8bc24a11d2d..00000000000 --- a/website/content/SDK/crypto/dd/gov/_index.md +++ /dev/null @@ -1,32 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.dd.gov(symbol: str) -> Tuple[str, pandas.core.frame.DataFrame] - -Returns coin governance - [Source: https://messari.io/] - - Parameters - ---------- - symbol : str - Crypto symbol to check governance - - Returns - ------- - str - governance summary - pd.DataFrame - Metric Value with governance details - -## Getting charts -### crypto.dd.gov(symbol: str, export: str = '', chart=True) -> None - -Display coin governance - [Source: https://messari.io/] - - Parameters - ---------- - symbol : str - Crypto symbol to check coin governance - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/dd/gov/_index.rst b/website/content/SDK/crypto/dd/gov/_index.rst new file mode 100644 index 00000000000..4c6ca5ff1c9 --- /dev/null +++ b/website/content/SDK/crypto/dd/gov/_index.rst @@ -0,0 +1,75 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.gov( + symbol: str, + chart: bool = False, +) -> Tuple[str, pandas.core.frame.DataFrame] +{{< /highlight >}} + +.. raw:: html + +

+ Returns coin governance + [Source: https://messari.io/] +

+ +* **Parameters** + + symbol : str + Crypto symbol to check governance + chart: *bool* + Flag to display chart + + +* **Returns** + + str + governance summary + pd.DataFrame + Metric Value with governance details + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.dd.gov( + symbol: str, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display coin governance + [Source: https://messari.io/] +

+ +* **Parameters** + + symbol : str + Crypto symbol to check coin governance + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/dd/headlines/_index.md b/website/content/SDK/crypto/dd/headlines/_index.md deleted file mode 100644 index 555b7f7519a..00000000000 --- a/website/content/SDK/crypto/dd/headlines/_index.md +++ /dev/null @@ -1,39 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.dd.headlines(symbol: str) -> pandas.core.frame.DataFrame - -Gets Sentiment analysis provided by FinBrain's API [Source: finbrain] - - Parameters - ---------- - symbol : str - Ticker symbol to get the sentiment analysis from - - Returns - ------- - DataFrame() - Empty if there was an issue with data retrieval - -## Getting charts -### crypto.dd.headlines(symbol: str, raw: bool = False, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) -> None - -Sentiment analysis from FinBrain for Cryptocurrencies - - FinBrain collects the news headlines from 15+ major financial news - sources on a daily basis and analyzes them to generate sentiment scores - for more than 4500 US stocks. FinBrain Technologies develops deep learning - algorithms for financial analysis and prediction, which currently serves - traders from more than 150 countries all around the world. - [Source: https://finbrain.tech] - - Parameters - ---------- - symbol: str - Cryptocurrency - raw : False - Display raw table data - export : str - Export dataframe data to csv,json,xlsx file - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/crypto/dd/headlines/_index.rst b/website/content/SDK/crypto/dd/headlines/_index.rst new file mode 100644 index 00000000000..02f23e11ea5 --- /dev/null +++ b/website/content/SDK/crypto/dd/headlines/_index.rst @@ -0,0 +1,84 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.headlines( + symbol: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Gets Sentiment analysis provided by FinBrain's API [Source: finbrain] +

+ +* **Parameters** + + symbol : str + Ticker symbol to get the sentiment analysis from + chart: *bool* + Flag to display chart + + +* **Returns** + + DataFrame() + Empty if there was an issue with data retrieval + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.dd.headlines( + symbol: str, + raw: bool = False, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Sentiment analysis from FinBrain for Cryptocurrencies + + FinBrain collects the news headlines from 15+ major financial news + sources on a daily basis and analyzes them to generate sentiment scores + for more than 4500 US stocks. FinBrain Technologies develops deep learning + algorithms for financial analysis and prediction, which currently serves + traders from more than 150 countries all around the world. + [Source: https://finbrain.tech] +

+ +* **Parameters** + + symbol: str + Cryptocurrency + raw : False + Display raw table data + export : str + Export dataframe data to csv,json,xlsx file + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/dd/inv/_index.md b/website/content/SDK/crypto/dd/inv/_index.md deleted file mode 100644 index 9ca0b9454ea..00000000000 --- a/website/content/SDK/crypto/dd/inv/_index.md +++ /dev/null @@ -1,32 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.dd.inv(symbol: str) -> Tuple[pandas.core.frame.DataFrame, pandas.core.frame.DataFrame] - -Returns coin investors - [Source: https://messari.io/] - - Parameters - ---------- - symbol : str - Crypto symbol to check investors - - Returns - ------- - pd.DataFrame - individuals - pd.DataFrame - organizations - -## Getting charts -### crypto.dd.inv(symbol: str, export: str = '', chart=True) -> None - -Display coin investors - [Source: https://messari.io/] - - Parameters - ---------- - symbol : str - Crypto symbol to check coin investors - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/dd/inv/_index.rst b/website/content/SDK/crypto/dd/inv/_index.rst new file mode 100644 index 00000000000..ffc2153e85b --- /dev/null +++ b/website/content/SDK/crypto/dd/inv/_index.rst @@ -0,0 +1,75 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.inv( + symbol: str, + chart: bool = False, +) -> Tuple[pandas.core.frame.DataFrame, pandas.core.frame.DataFrame] +{{< /highlight >}} + +.. raw:: html + +

+ Returns coin investors + [Source: https://messari.io/] +

+ +* **Parameters** + + symbol : str + Crypto symbol to check investors + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + individuals + pd.DataFrame + organizations + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.dd.inv( + symbol: str, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display coin investors + [Source: https://messari.io/] +

+ +* **Parameters** + + symbol : str + Crypto symbol to check coin investors + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/dd/links/_index.md b/website/content/SDK/crypto/dd/links/_index.md deleted file mode 100644 index 77994c1c8db..00000000000 --- a/website/content/SDK/crypto/dd/links/_index.md +++ /dev/null @@ -1,32 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.dd.links(symbol: str) -> pandas.core.frame.DataFrame - -Returns asset's links - [Source: https://messari.io/] - - Parameters - ---------- - symbol : str - Crypto symbol to check links - - Returns - ------- - pd.DataFrame - asset links - -## Getting charts -### crypto.dd.links(symbol: str, export: str = '', chart=True) -> None - -Display coin links - [Source: https://messari.io/] - - Parameters - ---------- - symbol : str - Crypto symbol to check links - export : str - Export dataframe data to csv,json,xlsx file - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/crypto/dd/links/_index.rst b/website/content/SDK/crypto/dd/links/_index.rst new file mode 100644 index 00000000000..3616ba9fe6b --- /dev/null +++ b/website/content/SDK/crypto/dd/links/_index.rst @@ -0,0 +1,75 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.links( + symbol: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Returns asset's links + [Source: https://messari.io/] +

+ +* **Parameters** + + symbol : str + Crypto symbol to check links + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + asset links + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.dd.links( + symbol: str, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display coin links + [Source: https://messari.io/] +

+ +* **Parameters** + + symbol : str + Crypto symbol to check links + export : str + Export dataframe data to csv,json,xlsx file + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/dd/mcapdom/_index.md b/website/content/SDK/crypto/dd/mcapdom/_index.md deleted file mode 100644 index e14de4d2fb2..00000000000 --- a/website/content/SDK/crypto/dd/mcapdom/_index.md +++ /dev/null @@ -1,44 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.dd.mcapdom(symbol: str, interval: str = '1d', start_date: str = '2021-11-03', end_date: str = '2022-11-03') -> pandas.core.frame.DataFrame - -Returns market dominance of a coin over time - [Source: https://messari.io/] - - Parameters - ---------- - symbol : str - Crypto symbol to check market cap dominance - interval : str - Interval frequency (possible values are: 5m, 15m, 30m, 1h, 1d, 1w) - start_date : int - Initial date like string (e.g., 2021-10-01) - end_date : int - End date like string (e.g., 2021-10-01) - - Returns - ------- - pd.DataFrame - market dominance percentage over time - -## Getting charts -### crypto.dd.mcapdom(symbol: str, start_date: str = '2021-11-03', end_date: str = '2022-11-03', interval: str = '1d', export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) -> None - -Display market dominance of a coin over time - [Source: https://messari.io/] - - Parameters - ---------- - symbol : str - Crypto symbol to check market cap dominance - start_date : int - Initial date like string (e.g., 2021-10-01) - end_date : int - End date like string (e.g., 2021-10-01) - interval : str - Interval frequency (possible values are: 5m, 15m, 30m, 1h, 1d, 1w) - export : str - Export dataframe data to csv,json,xlsx file - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/crypto/dd/mcapdom/_index.rst b/website/content/SDK/crypto/dd/mcapdom/_index.rst new file mode 100644 index 00000000000..d8a295fe923 --- /dev/null +++ b/website/content/SDK/crypto/dd/mcapdom/_index.rst @@ -0,0 +1,94 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.mcapdom( + symbol: str, + interval: str = '1d', + start_date: str = '2021-11-08', + end_date: str = '2022-11-08', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Returns market dominance of a coin over time + [Source: https://messari.io/] +

+ +* **Parameters** + + symbol : str + Crypto symbol to check market cap dominance + interval : str + Interval frequency (possible values are: 5m, 15m, 30m, 1h, 1d, 1w) + start_date : int + Initial date like string (e.g., 2021-10-01) + end_date : int + End date like string (e.g., 2021-10-01) + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + market dominance percentage over time + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.dd.mcapdom( + symbol: str, + start_date: str = '2021-11-08', + end_date: str = '2022-11-08', + interval: str = '1d', + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display market dominance of a coin over time + [Source: https://messari.io/] +

+ +* **Parameters** + + symbol : str + Crypto symbol to check market cap dominance + start_date : int + Initial date like string (e.g., 2021-10-01) + end_date : int + End date like string (e.g., 2021-10-01) + interval : str + Interval frequency (possible values are: 5m, 15m, 30m, 1h, 1d, 1w) + export : str + Export dataframe data to csv,json,xlsx file + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/dd/mkt/_index.md b/website/content/SDK/crypto/dd/mkt/_index.rst similarity index 51% rename from website/content/SDK/crypto/dd/mkt/_index.md rename to website/content/SDK/crypto/dd/mkt/_index.rst index 442fa7a47e3..3d59bf0eabe 100644 --- a/website/content/SDK/crypto/dd/mkt/_index.md +++ b/website/content/SDK/crypto/dd/mkt/_index.rst @@ -1,12 +1,35 @@ -To obtain charts, make sure to add `chart=True` as the last parameter +.. role:: python(code) + :language: python + :class: highlight -## Get underlying data -### crypto.dd.mkt(symbol: str = 'eth-ethereum', quotes: str = 'USD', sortby: str = 'pct_volume_share', ascend: bool = True) -> pandas.core.frame.DataFrame +| -All markets for given coin and currency [Source: CoinPaprika] +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.mkt( + symbol: str = 'eth-ethereum', + quotes: str = 'USD', + sortby: str = 'pct_volume_share', + ascend: bool = True, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ All markets for given coin and currency [Source: CoinPaprika] +

+ +* **Parameters** - Parameters - ---------- symbol: str Coin Parpika identifier of coin e.g. eth-ethereum quotes: str @@ -21,19 +44,44 @@ All markets for given coin and currency [Source: CoinPaprika] https://api.coinpaprika.com/v1). ascend: bool Flag to sort data ascending + chart: *bool* + Flag to display chart + + +* **Returns** - Returns - ------- pandas.DataFrame All markets for given coin and currency -## Getting charts -### crypto.dd.mkt(from_symbol: str = 'BTC', to_symbol: str = 'USD', limit: int = 20, sortby: str = 'pct_volume_share', ascend: bool = True, links: bool = False, export: str = '', chart=True) -> None +| -Get all markets for given coin id. [Source: CoinPaprika] +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.dd.mkt( + from_symbol: str = 'BTC', + to_symbol: str = 'USD', + limit: int = 20, + sortby: str = 'pct_volume_share', + ascend: bool = True, + links: bool = False, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Get all markets for given coin id. [Source: CoinPaprika] +

+ +* **Parameters** - Parameters - ---------- from_symbol: str Cryptocurrency symbol (e.g. BTC) to_symbol: str @@ -49,3 +97,6 @@ Get all markets for given coin id. [Source: CoinPaprika] Flag to display urls export : str Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/dd/mt/_index.md b/website/content/SDK/crypto/dd/mt/_index.md deleted file mode 100644 index 6e2d4113d57..00000000000 --- a/website/content/SDK/crypto/dd/mt/_index.md +++ /dev/null @@ -1,50 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.dd.mt(symbol: str, timeseries_id: str, interval: str = '1d', start_date: str = '2021-11-03', end_date: str = '2022-11-03') -> Tuple[pandas.core.frame.DataFrame, str] - -Returns messari timeseries - [Source: https://messari.io/] - - Parameters - ---------- - symbol : str - Crypto symbol to check messari timeseries - timeseries_id : str - Messari timeserie id - interval : str - Interval frequency (possible values are: 5m, 15m, 30m, 1h, 1d, 1w) - start : int - Initial date like string (e.g., 2021-10-01) - end : int - End date like string (e.g., 2021-10-01) - - Returns - ------- - pd.DataFrame - messari timeserie over time - str - timeserie title - -## Getting charts -### crypto.dd.mt(symbol: str, timeseries_id: str, start_date: str = '2021-11-03', end_date: str = '2022-11-03', interval: str = '1d', export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) -> None - -Display messari timeseries - [Source: https://messari.io/] - - Parameters - ---------- - symbol : str - Crypto symbol to check market cap dominance - timeseries_id: str - Obtained by api.crypto.dd.get_mt command - start_date : int - Initial date like string (e.g., 2021-10-01) - end_date : int - End date like string (e.g., 2021-10-01) - interval : str - Interval frequency (possible values are: 5m, 15m, 30m, 1h, 1d, 1w) - export : str - Export dataframe data to csv,json,xlsx file - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/crypto/dd/mt/_index.rst b/website/content/SDK/crypto/dd/mt/_index.rst new file mode 100644 index 00000000000..07b3ffa09e9 --- /dev/null +++ b/website/content/SDK/crypto/dd/mt/_index.rst @@ -0,0 +1,102 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.mt( + symbol: str, + timeseries_id: str, + interval: str = '1d', + start_date: str = '2021-11-08', + end_date: str = '2022-11-08', + chart: bool = False, +) -> Tuple[pandas.core.frame.DataFrame, str] +{{< /highlight >}} + +.. raw:: html + +

+ Returns messari timeseries + [Source: https://messari.io/] +

+ +* **Parameters** + + symbol : str + Crypto symbol to check messari timeseries + timeseries_id : str + Messari timeserie id + interval : str + Interval frequency (possible values are: 5m, 15m, 30m, 1h, 1d, 1w) + start : int + Initial date like string (e.g., 2021-10-01) + end : int + End date like string (e.g., 2021-10-01) + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + messari timeserie over time + str + timeserie title + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.dd.mt( + symbol: str, + timeseries_id: str, + start_date: str = '2021-11-08', + end_date: str = '2022-11-08', + interval: str = '1d', + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display messari timeseries + [Source: https://messari.io/] +

+ +* **Parameters** + + symbol : str + Crypto symbol to check market cap dominance + timeseries_id: str + Obtained by api.crypto.dd.get_mt command + start_date : int + Initial date like string (e.g., 2021-10-01) + end_date : int + End date like string (e.g., 2021-10-01) + interval : str + Interval frequency (possible values are: 5m, 15m, 30m, 1h, 1d, 1w) + export : str + Export dataframe data to csv,json,xlsx file + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/dd/news/_index.md b/website/content/SDK/crypto/dd/news/_index.md deleted file mode 100644 index fe2ed5bd888..00000000000 --- a/website/content/SDK/crypto/dd/news/_index.md +++ /dev/null @@ -1,49 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.dd.news(limit: int = 60, post_kind: str = 'news', filter_: Optional[str] = None, region: str = 'en', source: Optional[str] = None, symbol: Optional[str] = None, sortby: str = 'published_at', ascend: bool = True) -> pandas.core.frame.DataFrame - -Get recent posts from CryptoPanic news aggregator platform. [Source: https://cryptopanic.com/] - - Parameters - ---------- - limit: int - number of news to fetch - post_kind: str - Filter by category of news. Available values: news or media. - filter_: Optional[str] - Filter by kind of news. One from list: rising|hot|bullish|bearish|important|saved|lol - region: str - Filter news by regions. Available regions are: en (English), de (Deutsch), nl (Dutch), - es (Español), fr (Français), it (Italiano), pt (Português), ru (Русский) - sortby: str - Key to sort by. - ascend: bool - Sort in ascend order. - - Returns - ------- - pd.DataFrame - DataFrame with recent news from different sources filtered by provided parameters. - -## Getting charts -### crypto.dd.news(post_kind: str = 'news', region: str = 'en', filter_: Optional[str] = None, source: Optional[str] = None, symbol: Optional[str] = None, limit: int = 25, ascend: bool = True, export: str = '', chart=True) -> None - -Display recent posts from CryptoPanic news aggregator platform. - [Source: https://cryptopanic.com/] - - Parameters - ---------- - limit: int - number of news to display - post_kind: str - Filter by category of news. Available values: news or media. - filter_: Optional[str] - Filter by kind of news. One from list: rising|hot|bullish|bearish|important|saved|lol - region: str - Filter news by regions. Available regions are: en (English), de (Deutsch), nl (Dutch), - es (Español), fr (Français), it (Italiano), pt (Português), ru (Русский) - ascend: bool - Sort in ascending order. - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/dd/news/_index.rst b/website/content/SDK/crypto/dd/news/_index.rst new file mode 100644 index 00000000000..822da9d04d5 --- /dev/null +++ b/website/content/SDK/crypto/dd/news/_index.rst @@ -0,0 +1,105 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.news( + limit: int = 60, + post_kind: str = 'news', + filter_: Optional[str] = None, + region: str = 'en', + source: Optional[str] = None, + symbol: Optional[str] = None, + sortby: str = 'published_at', + ascend: bool = True, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get recent posts from CryptoPanic news aggregator platform. [Source: https://cryptopanic.com/] +

+ +* **Parameters** + + limit: int + number of news to fetch + post_kind: str + Filter by category of news. Available values: news or media. + filter\_: Optional[str] + Filter by kind of news. One from list: rising|hot|bullish|bearish|important|saved|lol + region: str + Filter news by regions. Available regions are: en (English), de (Deutsch), nl (Dutch), + es (Español), fr (Français), it (Italiano), pt (Português), ru (Русский) + sortby: str + Key to sort by. + ascend: bool + Sort in ascend order. + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + DataFrame with recent news from different sources filtered by provided parameters. + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.dd.news( + post_kind: str = 'news', + region: str = 'en', + filter_: Optional[str] = None, + source: Optional[str] = None, + symbol: Optional[str] = None, + limit: int = 25, + ascend: bool = True, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display recent posts from CryptoPanic news aggregator platform. + [Source: https://cryptopanic.com/] +

+ +* **Parameters** + + limit: int + number of news to display + post_kind: str + Filter by category of news. Available values: news or media. + filter\_: Optional[str] + Filter by kind of news. One from list: rising|hot|bullish|bearish|important|saved|lol + region: str + Filter news by regions. Available regions are: en (English), de (Deutsch), nl (Dutch), + es (Español), fr (Français), it (Italiano), pt (Português), ru (Русский) + ascend: bool + Sort in ascending order. + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/dd/nonzero/_index.md b/website/content/SDK/crypto/dd/nonzero/_index.md deleted file mode 100644 index 54d668b34d1..00000000000 --- a/website/content/SDK/crypto/dd/nonzero/_index.md +++ /dev/null @@ -1,40 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.dd.nonzero(symbol: str, start_date: int = 1262322000, end_date: int = 1667510580) -> pandas.core.frame.DataFrame - -Returns addresses with non-zero balance of a certain symbol - [Source: https://glassnode.com] - - Parameters - ---------- - symbol : str - Asset to search (e.g., BTC) - start_date : int - Initial date timestamp (e.g., 1_577_836_800) - end_date : int - End date timestamp (e.g., 1_609_459_200) - - Returns - ------- - pd.DataFrame - addresses with non-zero balances - -## Getting charts -### crypto.dd.nonzero(symbol: str, start_date: int = 1577836800, end_date: int = 1609459200, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) -> None - -Display addresses with non-zero balance of a certain symbol - [Source: https://glassnode.org] - - Parameters - ---------- - symbol : str - Asset to search (e.g., BTC) - start_date : int - Initial date timestamp (e.g., 1_577_836_800) - end_date : int - End date timestamp (e.g., 1_609_459_200) - export : str - Export dataframe data to csv,json,xlsx file - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/crypto/dd/nonzero/_index.rst b/website/content/SDK/crypto/dd/nonzero/_index.rst new file mode 100644 index 00000000000..79c6ee85372 --- /dev/null +++ b/website/content/SDK/crypto/dd/nonzero/_index.rst @@ -0,0 +1,88 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.nonzero( + symbol: str, + start_date: int = 1262304000, + end_date: int = 1667908975, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Returns addresses with non-zero balance of a certain symbol + [Source: https://glassnode.com] +

+ +* **Parameters** + + symbol : str + Asset to search (e.g., BTC) + start_date : int + Initial date timestamp (e.g., 1_577_836_800) + end_date : int + End date timestamp (e.g., 1_609_459_200) + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + addresses with non-zero balances + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.dd.nonzero( + symbol: str, + start_date: int = 1577836800, + end_date: int = 1609459200, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display addresses with non-zero balance of a certain symbol + [Source: https://glassnode.org] +

+ +* **Parameters** + + symbol : str + Asset to search (e.g., BTC) + start_date : int + Initial date timestamp (e.g., 1_577_836_800) + end_date : int + End date timestamp (e.g., 1_609_459_200) + export : str + Export dataframe data to csv,json,xlsx file + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/dd/ob/_index.md b/website/content/SDK/crypto/dd/ob/_index.md deleted file mode 100644 index b00d0beab93..00000000000 --- a/website/content/SDK/crypto/dd/ob/_index.md +++ /dev/null @@ -1,37 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.dd.ob(exchange_id: str, symbol: str, to_symbol: str) -> Dict - -Returns orderbook for a coin in a given exchange - [Source: https://docs.ccxt.com/en/latest/manual.html] - - Parameters - ---------- - exchange_id : str - exchange id - symbol : str - coin symbol - to_symbol : str - currency to compare coin against - - Returns - ------- - Dict with bids and asks - -## Getting charts -### crypto.dd.ob(exchange: str, symbol: str, to_symbol: str, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Displays order book for a coin in a given exchange - [Source: https://docs.ccxt.com/en/latest/manual.html] - - Parameters - ---------- - exchange : str - exchange id - symbol : str - coin symbol - vs : str - currency to compare coin against - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/dd/ob/_index.rst b/website/content/SDK/crypto/dd/ob/_index.rst new file mode 100644 index 00000000000..2aa7b5c00c5 --- /dev/null +++ b/website/content/SDK/crypto/dd/ob/_index.rst @@ -0,0 +1,85 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.ob( + exchange_id: str, + symbol: str, + to_symbol: str, + chart: bool = False, +) -> Dict +{{< /highlight >}} + +.. raw:: html + +

+ Returns orderbook for a coin in a given exchange + [Source: https://docs.ccxt.com/en/latest/manual.html] +

+ +* **Parameters** + + exchange_id : str + exchange id + symbol : str + coin symbol + to_symbol : str + currency to compare coin against + chart: *bool* + Flag to display chart + + +* **Returns** + + Dict with bids and asks + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.dd.ob( + exchange: str, + symbol: str, + to_symbol: str, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Displays order book for a coin in a given exchange + [Source: https://docs.ccxt.com/en/latest/manual.html] +

+ +* **Parameters** + + exchange : str + exchange id + symbol : str + coin symbol + vs : str + currency to compare coin against + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/dd/ohlc_historical/_index.md b/website/content/SDK/crypto/dd/ohlc_historical/_index.rst similarity index 60% rename from website/content/SDK/crypto/dd/ohlc_historical/_index.md rename to website/content/SDK/crypto/dd/ohlc_historical/_index.rst index 0e205437349..b94d85d75e1 100644 --- a/website/content/SDK/crypto/dd/ohlc_historical/_index.md +++ b/website/content/SDK/crypto/dd/ohlc_historical/_index.rst @@ -1,14 +1,34 @@ -## Get underlying data -### crypto.dd.ohlc_historical(symbol: str = 'eth-ethereum', quotes: str = 'USD', days: int = 90) -> pandas.core.frame.DataFrame +.. role:: python(code) + :language: python + :class: highlight +| +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.ohlc_historical( + symbol: str = 'eth-ethereum', + quotes: str = 'USD', + days: int = 90, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

Open/High/Low/Close values with volume and market_cap. [Source: CoinPaprika] Request example: https://api.coinpaprika.com/v1/coins/btc-bitcoin/ohlcv/historical?start=2019-01-01&end=2019-01-20 if the last day is current day it can an change with every request until actual close of the day at 23:59:59 +

+* **Parameters** - Parameters - ---------- symbol: str Paprika coin identifier e.g. eth-ethereum quotes: str @@ -16,7 +36,7 @@ days: int time range for chart in days. Maximum 365 - Returns - ------- +* **Returns** + pandas.DataFrame Open/High/Low/Close values with volume and market_cap. diff --git a/website/content/SDK/crypto/dd/oi/_index.md b/website/content/SDK/crypto/dd/oi/_index.md deleted file mode 100644 index 605f73d4af7..00000000000 --- a/website/content/SDK/crypto/dd/oi/_index.md +++ /dev/null @@ -1,34 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.dd.oi(symbol: str, interval: int = 0) -> pandas.core.frame.DataFrame - -Returns open interest by exchange for a certain symbol - [Source: https://coinglass.github.io/API-Reference/] - - Parameters - ---------- - symbol : str - Crypto Symbol to search open interest futures (e.g., BTC) - interval : int - Frequency (possible values are: 0 for ALL, 2 for 1H, 1 for 4H, 4 for 12H), by default 0 - - Returns - ------- - pd.DataFrame - open interest by exchange and price - -## Getting charts -### crypto.dd.oi(symbol: str, interval: int = 0, export: str = '', chart=True) -> None - -Displays open interest by exchange for a certain cryptocurrency - [Source: https://coinglass.github.io/API-Reference/] - - Parameters - ---------- - symbol : str - Crypto symbol to search open interest (e.g., BTC) - interval : int - Frequency (possible values are: 0 for ALL, 2 for 1H, 1 for 4H, 4 for 12H), by default 0 - export : str - Export dataframe data to csv,json,xlsx diff --git a/website/content/SDK/crypto/dd/oi/_index.rst b/website/content/SDK/crypto/dd/oi/_index.rst new file mode 100644 index 00000000000..df99e225d8c --- /dev/null +++ b/website/content/SDK/crypto/dd/oi/_index.rst @@ -0,0 +1,79 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.oi( + symbol: str, + interval: int = 0, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Returns open interest by exchange for a certain symbol + [Source: https://coinglass.github.io/API-Reference/] +

+ +* **Parameters** + + symbol : str + Crypto Symbol to search open interest futures (e.g., BTC) + interval : int + Frequency (possible values are: 0 for ALL, 2 for 1H, 1 for 4H, 4 for 12H), by default 0 + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + open interest by exchange and price + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.dd.oi( + symbol: str, + interval: int = 0, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Displays open interest by exchange for a certain cryptocurrency + [Source: https://coinglass.github.io/API-Reference/] +

+ +* **Parameters** + + symbol : str + Crypto symbol to search open interest (e.g., BTC) + interval : int + Frequency (possible values are: 0 for ALL, 2 for 1H, 1 for 4H, 4 for 12H), by default 0 + export : str + Export dataframe data to csv,json,xlsx fil + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/dd/pi/_index.md b/website/content/SDK/crypto/dd/pi/_index.md deleted file mode 100644 index eb25658d0bf..00000000000 --- a/website/content/SDK/crypto/dd/pi/_index.md +++ /dev/null @@ -1,36 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.dd.pi(symbol: str) -> Tuple[pandas.core.frame.DataFrame, pandas.core.frame.DataFrame, pandas.core.frame.DataFrame, pandas.core.frame.DataFrame] - -Returns coin product info - [Source: https://messari.io/] - - Parameters - ---------- - symbol : str - Crypto symbol to check product info - - Returns - ------- - pd.DataFrame - Metric, Value with project and technology details - pd.DataFrame - coin public repos - pd.DataFrame - coin audits - pd.DataFrame - coin known exploits/vulns - -## Getting charts -### crypto.dd.pi(symbol: str, export: str = '', chart=True) -> None - -Display project info - [Source: https://messari.io/] - - Parameters - ---------- - symbol : str - Crypto symbol to check project info - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/dd/pi/_index.rst b/website/content/SDK/crypto/dd/pi/_index.rst new file mode 100644 index 00000000000..0e1bfdd0b6a --- /dev/null +++ b/website/content/SDK/crypto/dd/pi/_index.rst @@ -0,0 +1,79 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.pi( + symbol: str, + chart: bool = False, +) -> Tuple[pandas.core.frame.DataFrame, pandas.core.frame.DataFrame, pandas.core.frame.DataFrame, pandas.core.frame.DataFrame] +{{< /highlight >}} + +.. raw:: html + +

+ Returns coin product info + [Source: https://messari.io/] +

+ +* **Parameters** + + symbol : str + Crypto symbol to check product info + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Metric, Value with project and technology details + pd.DataFrame + coin public repos + pd.DataFrame + coin audits + pd.DataFrame + coin known exploits/vulns + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.dd.pi( + symbol: str, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display project info + [Source: https://messari.io/] +

+ +* **Parameters** + + symbol : str + Crypto symbol to check project info + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/dd/pr/_index.md b/website/content/SDK/crypto/dd/pr/_index.md deleted file mode 100644 index 9998b27f1c0..00000000000 --- a/website/content/SDK/crypto/dd/pr/_index.md +++ /dev/null @@ -1,41 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.dd.pr(main_coin: str, to_symbol: Optional[str] = None, limit: Optional[int] = None, price: Optional[int] = None) -> pandas.core.frame.DataFrame - -Fetch data to calculate potential returns of a certain coin. [Source: CoinGecko] - - Parameters - ---------- - main_coin : str - Coin loaded to check potential returns for (e.g., algorand) - to_symbol : str | None - Coin to compare main_coin with (e.g., bitcoin) - limit : int | None - Number of coins with highest market cap to compare main_coin with (e.g., 5) - price - Target price of main_coin to check potential returns (e.g., 5) - - Returns - ------- - pd.DataFrame - Potential returns data - Columns: Coin, Current Price, Target Coin, Potential Price, Potential Market Cap ($), Change (%) - -## Getting charts -### crypto.dd.pr(to_symbol: str, from_symbol: Optional[str] = None, limit: Optional[int] = None, price: Optional[int] = None, export: str = '', chart=True) -> None - -Displays potential returns of a certain coin. [Source: CoinGecko] - - Parameters - ---------- - to_symbol : str - Coin loaded to check potential returns for (e.g., algorand) - from_symbol : str | None - Coin to compare main_coin with (e.g., bitcoin) - limit : int | None - Number of coins with highest market cap to compare main_coin with (e.g., 5) - price - Target price of main_coin to check potential returns (e.g., 5) - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/dd/pr/_index.rst b/website/content/SDK/crypto/dd/pr/_index.rst new file mode 100644 index 00000000000..2590b48057e --- /dev/null +++ b/website/content/SDK/crypto/dd/pr/_index.rst @@ -0,0 +1,90 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.pr( + main_coin: str, + to_symbol: Optional[str] = None, + limit: Optional[int] = None, + price: Optional[int] = None, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Fetch data to calculate potential returns of a certain coin. [Source: CoinGecko] +

+ +* **Parameters** + + main_coin : str + Coin loaded to check potential returns for (e.g., algorand) + to_symbol : str | None + Coin to compare main_coin with (e.g., bitcoin) + limit : int | None + Number of coins with highest market cap to compare main_coin with (e.g., 5) + price + Target price of main_coin to check potential returns (e.g., 5) + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Potential returns data + Columns: Coin, Current Price, Target Coin, Potential Price, Potential Market Cap ($), Change (%) + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.dd.pr( + to_symbol: str, + from_symbol: Optional[str] = None, + limit: Optional[int] = None, + price: Optional[int] = None, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Displays potential returns of a certain coin. [Source: CoinGecko] +

+ +* **Parameters** + + to_symbol : str + Coin loaded to check potential returns for (e.g., algorand) + from_symbol : str | None + Coin to compare main_coin with (e.g., bitcoin) + limit : int | None + Number of coins with highest market cap to compare main_coin with (e.g., 5) + price + Target price of main_coin to check potential returns (e.g., 5) + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/dd/ps/_index.md b/website/content/SDK/crypto/dd/ps/_index.rst similarity index 63% rename from website/content/SDK/crypto/dd/ps/_index.md rename to website/content/SDK/crypto/dd/ps/_index.rst index 470bb71fce7..e5ad05a3af1 100644 --- a/website/content/SDK/crypto/dd/ps/_index.md +++ b/website/content/SDK/crypto/dd/ps/_index.rst @@ -1,9 +1,29 @@ -To obtain charts, make sure to add `chart=True` as the last parameter +.. role:: python(code) + :language: python + :class: highlight -## Get underlying data -### crypto.dd.ps(symbol: str = 'btc-bitcoin', quotes: str = 'USD') -> pandas.core.frame.DataFrame +| -Get all most important ticker related information for given coin id [Source: CoinPaprika] +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.ps( + symbol: str = 'btc-bitcoin', + quotes: str = 'USD', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get all most important ticker related information for given coin id [Source: CoinPaprika] .. code-block:: json @@ -40,31 +60,55 @@ Get all most important ticker related information for given coin id [Source: Coi } } } +

+ +* **Parameters** - Parameters - ---------- symbol: str Id of coin from CoinPaprika quotes: str Comma separated quotes to return e.g quotes = USD, BTC + chart: *bool* + Flag to display chart + + +* **Returns** - Returns - ------- pandas.DataFrame Most important ticker related information Columns: Metric, Value -## Getting charts -### crypto.dd.ps(from_symbol: str = 'BTC', to_symbol: str = 'USD', export: str = '', chart=True) -> None +| -Get ticker information for single coin [Source: CoinPaprika] +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.dd.ps( + from_symbol: str = 'BTC', + to_symbol: str = 'USD', + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Get ticker information for single coin [Source: CoinPaprika] +

+ +* **Parameters** - Parameters - ---------- from_symbol: str Cryptocurrency symbol (e.g. BTC) to_symbol: str Quoted currency export: str Export dataframe data to csv,json,xlsx + chart: *bool* + Flag to display chart diff --git a/website/content/SDK/crypto/dd/rm/_index.md b/website/content/SDK/crypto/dd/rm/_index.md deleted file mode 100644 index a32ba5d26eb..00000000000 --- a/website/content/SDK/crypto/dd/rm/_index.md +++ /dev/null @@ -1,38 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.dd.rm(symbol: str, ascend: bool = True) -> pandas.core.frame.DataFrame - -Returns coin roadmap - [Source: https://messari.io/] - - Parameters - ---------- - symbol : str - Crypto symbol to check roadmap - ascend: bool - reverse order - - Returns - ------- - pd.DataFrame - roadmap - -## Getting charts -### crypto.dd.rm(symbol: str, ascend: bool = True, limit: int = 5, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) -> None - -Display coin roadmap - [Source: https://messari.io/] - - Parameters - ---------- - symbol : str - Crypto symbol to check roadmap - ascend: bool - reverse order - limit : int - number to show - export : str - Export dataframe data to csv,json,xlsx file - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/crypto/dd/rm/_index.rst b/website/content/SDK/crypto/dd/rm/_index.rst new file mode 100644 index 00000000000..574314d944a --- /dev/null +++ b/website/content/SDK/crypto/dd/rm/_index.rst @@ -0,0 +1,85 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.rm( + symbol: str, + ascend: bool = True, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Returns coin roadmap + [Source: https://messari.io/] +

+ +* **Parameters** + + symbol : str + Crypto symbol to check roadmap + ascend: bool + reverse order + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + roadmap + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.dd.rm( + symbol: str, + ascend: bool = True, + limit: int = 5, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display coin roadmap + [Source: https://messari.io/] +

+ +* **Parameters** + + symbol : str + Crypto symbol to check roadmap + ascend: bool + reverse order + limit : int + number to show + export : str + Export dataframe data to csv,json,xlsx file + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/dd/show_available_pairs_for_given_symbol/_index.md b/website/content/SDK/crypto/dd/show_available_pairs_for_given_symbol/_index.md deleted file mode 100644 index aeddd48d6f0..00000000000 --- a/website/content/SDK/crypto/dd/show_available_pairs_for_given_symbol/_index.md +++ /dev/null @@ -1,4 +0,0 @@ -## Get underlying data -### crypto.dd.show_available_pairs_for_given_symbol(symbol: str = 'ETH') -> Tuple[str, list] - - diff --git a/website/content/SDK/crypto/dd/show_available_pairs_for_given_symbol/_index.rst b/website/content/SDK/crypto/dd/show_available_pairs_for_given_symbol/_index.rst new file mode 100644 index 00000000000..c470ed52155 --- /dev/null +++ b/website/content/SDK/crypto/dd/show_available_pairs_for_given_symbol/_index.rst @@ -0,0 +1,12 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ diff --git a/website/content/SDK/crypto/dd/stats/_index.md b/website/content/SDK/crypto/dd/stats/_index.md deleted file mode 100644 index 74fa60fdb68..00000000000 --- a/website/content/SDK/crypto/dd/stats/_index.md +++ /dev/null @@ -1,30 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.dd.stats(symbol: str) -> pandas.core.frame.DataFrame - -Get 24 hr stats for the product. Volume is in base currency units. - Open, high and low are in quote currency units. [Source: Coinbase] - - Parameters - ---------- - symbol: str - Trading pair of coins on Coinbase e.g ETH-USDT or UNI-ETH - - Returns - ------- - pd.DataFrame - 24h stats for chosen trading pair - -## Getting charts -### crypto.dd.stats(symbol: str, export: str = '', chart=True) -> None - -Get 24 hr stats for the product. Volume is in base currency units. - Open, high and low are in quote currency units. [Source: Coinbase] - - Parameters - ---------- - symbol: str - Trading pair of coins on Coinbase e.g ETH-USDT or UNI-ETH - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/dd/stats/_index.rst b/website/content/SDK/crypto/dd/stats/_index.rst new file mode 100644 index 00000000000..87681ecf256 --- /dev/null +++ b/website/content/SDK/crypto/dd/stats/_index.rst @@ -0,0 +1,73 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.stats( + symbol: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get 24 hr stats for the product. Volume is in base currency units. + Open, high and low are in quote currency units. [Source: Coinbase] +

+ +* **Parameters** + + symbol: str + Trading pair of coins on Coinbase e.g ETH-USDT or UNI-ETH + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + 24h stats for chosen trading pair + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.dd.stats( + symbol: str, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Get 24 hr stats for the product. Volume is in base currency units. + Open, high and low are in quote currency units. [Source: Coinbase] +

+ +* **Parameters** + + symbol: str + Trading pair of coins on Coinbase e.g ETH-USDT or UNI-ETH + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/dd/team/_index.md b/website/content/SDK/crypto/dd/team/_index.md deleted file mode 100644 index c1b65eb2f09..00000000000 --- a/website/content/SDK/crypto/dd/team/_index.md +++ /dev/null @@ -1,32 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.dd.team(symbol: str) -> Tuple[pandas.core.frame.DataFrame, pandas.core.frame.DataFrame] - -Returns coin team - [Source: https://messari.io/] - - Parameters - ---------- - symbol : str - Crypto symbol to check team - - Returns - ------- - pd.DataFrame - individuals - pd.DataFrame - organizations - -## Getting charts -### crypto.dd.team(symbol: str, export: str = '', chart=True) -> None - -Display coin team - [Source: https://messari.io/] - - Parameters - ---------- - symbol : str - Crypto symbol to check coin team - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/dd/team/_index.rst b/website/content/SDK/crypto/dd/team/_index.rst new file mode 100644 index 00000000000..0f8df129363 --- /dev/null +++ b/website/content/SDK/crypto/dd/team/_index.rst @@ -0,0 +1,75 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.team( + symbol: str, + chart: bool = False, +) -> Tuple[pandas.core.frame.DataFrame, pandas.core.frame.DataFrame] +{{< /highlight >}} + +.. raw:: html + +

+ Returns coin team + [Source: https://messari.io/] +

+ +* **Parameters** + + symbol : str + Crypto symbol to check team + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + individuals + pd.DataFrame + organizations + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.dd.team( + symbol: str, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display coin team + [Source: https://messari.io/] +

+ +* **Parameters** + + symbol : str + Crypto symbol to check coin team + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/dd/tk/_index.md b/website/content/SDK/crypto/dd/tk/_index.md deleted file mode 100644 index c4cace2aeaa..00000000000 --- a/website/content/SDK/crypto/dd/tk/_index.md +++ /dev/null @@ -1,35 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.dd.tk(symbol: str, coingecko_id: str) -> Tuple[pandas.core.frame.DataFrame, pandas.core.frame.DataFrame] - -Returns coin tokenomics - [Source: https://messari.io/] - - Parameters - ---------- - symbol : str - Crypto symbol to check tokenomics - coingecko_id : str - ID from coingecko - Returns - ------- - pd.DataFrame - Metric Value tokenomics - pd.DataFrame - Circulating supply overtime - -## Getting charts -### crypto.dd.tk(symbol: str, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) -> None - -Display coin tokenomics - [Source: https://messari.io/] - - Parameters - ---------- - symbol : str - Crypto symbol to check tokenomics - export : str - Export dataframe data to csv,json,xlsx file - external_axes : Optional[List[plt.Axes]], optional - External axes (2 axes are expected in the list), by default None diff --git a/website/content/SDK/crypto/dd/tk/_index.rst b/website/content/SDK/crypto/dd/tk/_index.rst new file mode 100644 index 00000000000..890374a5557 --- /dev/null +++ b/website/content/SDK/crypto/dd/tk/_index.rst @@ -0,0 +1,81 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.tk( + symbol: str, + coingecko_id: str, + chart: bool = False, +) -> Tuple[pandas.core.frame.DataFrame, pandas.core.frame.DataFrame] +{{< /highlight >}} + +.. raw:: html + +

+ Returns coin tokenomics + [Source: https://messari.io/] +

+ +* **Parameters** + + symbol : str + Crypto symbol to check tokenomics + coingecko_id : str + ID from coingecko + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Metric Value tokenomics + pd.DataFrame + Circulating supply overtime + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.dd.tk( + symbol: str, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display coin tokenomics + [Source: https://messari.io/] +

+ +* **Parameters** + + symbol : str + Crypto symbol to check tokenomics + export : str + Export dataframe data to csv,json,xlsx file + external_axes : Optional[List[plt.Axes]], optional + External axes (2 axes are expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/dd/tokenomics/_index.md b/website/content/SDK/crypto/dd/tokenomics/_index.md deleted file mode 100644 index 7d7b6a8a5c3..00000000000 --- a/website/content/SDK/crypto/dd/tokenomics/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### crypto.dd.tokenomics(symbol: str = '') -> pandas.core.frame.DataFrame - -Get tokenomics for given coin. [Source: CoinGecko] - - Parameters - ---------- - symbol: str - coin symbol to check tokenomics - - Returns - ------- - pandas.DataFrame - Metric, Value with tokenomics diff --git a/website/content/SDK/crypto/dd/tokenomics/_index.rst b/website/content/SDK/crypto/dd/tokenomics/_index.rst new file mode 100644 index 00000000000..d70e73b4495 --- /dev/null +++ b/website/content/SDK/crypto/dd/tokenomics/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.tokenomics( + symbol: str = '', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get tokenomics for given coin. [Source: CoinGecko] +

+ +* **Parameters** + + symbol: str + coin symbol to check tokenomics + +* **Returns** + + pandas.DataFrame + Metric, Value with tokenomics diff --git a/website/content/SDK/crypto/dd/trades/_index.md b/website/content/SDK/crypto/dd/trades/_index.md deleted file mode 100644 index c31fc2da27c..00000000000 --- a/website/content/SDK/crypto/dd/trades/_index.md +++ /dev/null @@ -1,40 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.dd.trades(exchange_id: str, symbol: str, to_symbol: str) -> pandas.core.frame.DataFrame - -Returns trades for a coin in a given exchange - [Source: https://docs.ccxt.com/en/latest/manual.html] - - Parameters - ---------- - exchange_id : str - exchange id - symbol : str - coin symbol - to_symbol : str - currency to compare coin against - - Returns - ------- - pd.DataFrame - trades for a coin in a given exchange - -## Getting charts -### crypto.dd.trades(exchange: str, symbol: str, to_symbol: str, limit: int = 10, export: str = '', chart=True) - -Displays trades for a coin in a given exchange - [Source: https://docs.ccxt.com/en/latest/manual.html] - - Parameters - ---------- - exchange : str - exchange id - symbol : str - coin symbol - to_symbol : str - currency to compare coin against - limit : int - number of trades to display - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/dd/trades/_index.rst b/website/content/SDK/crypto/dd/trades/_index.rst new file mode 100644 index 00000000000..f1004dc92f3 --- /dev/null +++ b/website/content/SDK/crypto/dd/trades/_index.rst @@ -0,0 +1,88 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.trades( + exchange_id: str, + symbol: str, + to_symbol: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Returns trades for a coin in a given exchange + [Source: https://docs.ccxt.com/en/latest/manual.html] +

+ +* **Parameters** + + exchange_id : str + exchange id + symbol : str + coin symbol + to_symbol : str + currency to compare coin against + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + trades for a coin in a given exchange + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.dd.trades( + exchange: str, + symbol: str, + to_symbol: str, + limit: int = 10, + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Displays trades for a coin in a given exchange + [Source: https://docs.ccxt.com/en/latest/manual.html] +

+ +* **Parameters** + + exchange : str + exchange id + symbol : str + coin symbol + to_symbol : str + currency to compare coin against + limit : int + number of trades to display + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/dd/trading_pair_info/_index.md b/website/content/SDK/crypto/dd/trading_pair_info/_index.md deleted file mode 100644 index d95050f2a7c..00000000000 --- a/website/content/SDK/crypto/dd/trading_pair_info/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### crypto.dd.trading_pair_info(symbol: str) -> pandas.core.frame.DataFrame - -Get information about chosen trading pair. [Source: Coinbase] - - Parameters - ---------- - symbol: str - Trading pair of coins on Coinbase e.g ETH-USDT or UNI-ETH - - Returns - ------- - pd.DataFrame - Basic information about given trading pair diff --git a/website/content/SDK/crypto/dd/trading_pair_info/_index.rst b/website/content/SDK/crypto/dd/trading_pair_info/_index.rst new file mode 100644 index 00000000000..1846656fb7d --- /dev/null +++ b/website/content/SDK/crypto/dd/trading_pair_info/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.trading_pair_info( + symbol: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get information about chosen trading pair. [Source: Coinbase] +

+ +* **Parameters** + + symbol: str + Trading pair of coins on Coinbase e.g ETH-USDT or UNI-ETH + +* **Returns** + + pd.DataFrame + Basic information about given trading pair diff --git a/website/content/SDK/crypto/dd/trading_pairs/_index.md b/website/content/SDK/crypto/dd/trading_pairs/_index.md deleted file mode 100644 index ffc2d103547..00000000000 --- a/website/content/SDK/crypto/dd/trading_pairs/_index.md +++ /dev/null @@ -1,30 +0,0 @@ -## Get underlying data -### crypto.dd.trading_pairs() -> List[dict] - -Helper method that return all trading pairs on binance. Methods ause this data for input for e.g - building dataframe with all coins, or to build dict of all trading pairs. [Source: Binance] - - Returns - ------- - List[dict] - list of dictionaries in format: - [ - {'symbol': 'ETHBTC', 'status': 'TRADING', 'baseAsset': 'ETH', 'baseAssetPrecision': 8, - 'quoteAsset': 'BTC', 'quotePrecision': 8, 'quoteAssetPrecision': 8, - 'baseCommissionPrecision': 8, 'quoteCommissionPrecision': 8, - 'orderTypes': ['LIMIT', 'LIMIT_MAKER', 'MARKET', 'STOP_LOSS_LIMIT', 'TAKE_PROFIT_LIMIT'], - 'icebergAllowed': True, - 'ocoAllowed': True, - 'quoteOrderQtyMarketAllowed': True, - 'isSpotTradingAllowed': True, - 'isMarginTradingAllowed': True, - 'filters': [{'filterType': 'PRICE_FILTER', 'minPrice': '0.00000100', - 'maxPrice': '922327.00000000', 'tickSize': '0.00000100'}, - {'filterType': 'PERCENT_PRICE', 'multiplierUp': '5', 'multiplierDown': '0.2', 'avgPriceMins': 5}, - {'filterType': 'LOT_SIZE', 'minQty': '0.00100000', 'maxQty': '100000.00000000', 'stepSize': '0.00100000'}, - {'filterType': 'MIN_NOTIONAL', 'minNotional': '0.00010000', 'applyToMarket': True, 'avgPriceMins': 5}, - {'filterType': 'ICEBERG_PARTS', 'limit': 10}, {'filterType': 'MARKET_LOT_SIZE', 'minQty': '0.00000000', - 'maxQty': '930.49505347', 'stepSize': '0.00000000'}, {'filterType': 'MAX_NUM_ORDERS', 'maxNumOrders': 200}, - {'filterType': 'MAX_NUM_ALGO_ORDERS', 'maxNumAlgoOrders': 5}], 'permissions': ['SPOT', 'MARGIN']}, - ... - ] diff --git a/website/content/SDK/crypto/dd/trading_pairs/_index.rst b/website/content/SDK/crypto/dd/trading_pairs/_index.rst new file mode 100644 index 00000000000..60599e3d28b --- /dev/null +++ b/website/content/SDK/crypto/dd/trading_pairs/_index.rst @@ -0,0 +1,47 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.trading_pairs() -> List[dict] +{{< /highlight >}} + +.. raw:: html + +

+ Helper method that return all trading pairs on binance. Methods ause this data for input for e.g + building dataframe with all coins, or to build dict of all trading pairs. [Source: Binance] +

+ +* **Returns** + + List[dict] + list of dictionaries in format: + [ + {'symbol': 'ETHBTC', 'status': 'TRADING', 'baseAsset': 'ETH', 'baseAssetPrecision': 8, + 'quoteAsset': 'BTC', 'quotePrecision': 8, 'quoteAssetPrecision': 8, + 'baseCommissionPrecision': 8, 'quoteCommissionPrecision': 8, + 'orderTypes': ['LIMIT', 'LIMIT_MAKER', 'MARKET', 'STOP_LOSS_LIMIT', 'TAKE_PROFIT_LIMIT'], + 'icebergAllowed': True, + 'ocoAllowed': True, + 'quoteOrderQtyMarketAllowed': True, + 'isSpotTradingAllowed': True, + 'isMarginTradingAllowed': True, + 'filters': [{'filterType': 'PRICE_FILTER', 'minPrice': '0.00000100', + 'maxPrice': '922327.00000000', 'tickSize': '0.00000100'}, + {'filterType': 'PERCENT_PRICE', 'multiplierUp': '5', 'multiplierDown': '0.2', 'avgPriceMins': 5}, + {'filterType': 'LOT_SIZE', 'minQty': '0.00100000', 'maxQty': '100000.00000000', 'stepSize': '0.00100000'}, + {'filterType': 'MIN_NOTIONAL', 'minNotional': '0.00010000', 'applyToMarket': True, 'avgPriceMins': 5}, + {'filterType': 'ICEBERG_PARTS', 'limit': 10}, {'filterType': 'MARKET_LOT_SIZE', 'minQty': '0.00000000', + 'maxQty': '930.49505347', 'stepSize': '0.00000000'}, {'filterType': 'MAX_NUM_ORDERS', 'maxNumOrders': 200}, + {'filterType': 'MAX_NUM_ALGO_ORDERS', 'maxNumAlgoOrders': 5}], 'permissions': ['SPOT', 'MARGIN']}, + ... + ] diff --git a/website/content/SDK/crypto/dd/twitter/_index.md b/website/content/SDK/crypto/dd/twitter/_index.md deleted file mode 100644 index b0d047e31b2..00000000000 --- a/website/content/SDK/crypto/dd/twitter/_index.md +++ /dev/null @@ -1,42 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.dd.twitter(symbol: str = 'eth-ethereum', sortby: str = 'date', ascend: bool = True) -> pandas.core.frame.DataFrame - -Get twitter timeline for given coin id. Not more than last 50 tweets [Source: CoinPaprika] - - Parameters - ---------- - symbol: str - id of coin from coinpaprika e.g. Ethereum - > 'eth-ethereum' - sortby: str - Key by which to sort data. Every column name is valid - (see for possible values: - https://api.coinpaprika.com/docs#tag/Coins/paths/~1coins~1%7Bcoin_id%7D~1twitter/get). - ascend: bool - Flag to sort data descending - Returns - ------- - pandas.DataFrame - Twitter timeline for given coin. - Columns: date, user_name, status, retweet_count, like_count - -## Getting charts -### crypto.dd.twitter(symbol: str = 'BTC', limit: int = 10, sortby: str = 'date', ascend: bool = True, export: str = '', chart=True) -> None - -Get twitter timeline for given coin id. Not more than last 50 tweets [Source: CoinPaprika] - - Parameters - ---------- - symbol: str - Cryptocurrency symbol (e.g. BTC) - limit: int - Number of records to display - sortby: str - Key by which to sort data. Every column name is valid - (see for possible values: - https://api.coinpaprika.com/docs#tag/Coins/paths/~1coins~1%7Bcoin_id%7D~1twitter/get). - ascend: bool - Flag to sort data ascending - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/dd/twitter/_index.rst b/website/content/SDK/crypto/dd/twitter/_index.rst new file mode 100644 index 00000000000..47b85330c40 --- /dev/null +++ b/website/content/SDK/crypto/dd/twitter/_index.rst @@ -0,0 +1,91 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.dd.twitter( + symbol: str = 'eth-ethereum', + sortby: str = 'date', + ascend: bool = True, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get twitter timeline for given coin id. Not more than last 50 tweets [Source: CoinPaprika] +

+ +* **Parameters** + + symbol: str + id of coin from coinpaprika e.g. Ethereum - > 'eth-ethereum' + sortby: str + Key by which to sort data. Every column name is valid + (see for possible values: + https://api.coinpaprika.com/docs#tag/Coins/paths/~1coins~1%7Bcoin_id%7D~1twitter/get). + ascend: bool + Flag to sort data descending + chart: *bool* + Flag to display chart + + +* **Returns** + + pandas.DataFrame + Twitter timeline for given coin. + Columns: date, user_name, status, retweet_count, like_count + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.dd.twitter( + symbol: str = 'BTC', + limit: int = 10, + sortby: str = 'date', + ascend: bool = True, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Get twitter timeline for given coin id. Not more than last 50 tweets [Source: CoinPaprika] +

+ +* **Parameters** + + symbol: str + Cryptocurrency symbol (e.g. BTC) + limit: int + Number of records to display + sortby: str + Key by which to sort data. Every column name is valid + (see for possible values: + https://api.coinpaprika.com/docs#tag/Coins/paths/~1coins~1%7Bcoin_id%7D~1twitter/get). + ascend: bool + Flag to sort data ascending + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/defi/anchor_data/_index.md b/website/content/SDK/crypto/defi/anchor_data/_index.md deleted file mode 100644 index f5825dae567..00000000000 --- a/website/content/SDK/crypto/defi/anchor_data/_index.md +++ /dev/null @@ -1,37 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.defi.anchor_data(address: str = '') -> Tuple[Any, Any, str] - -Returns anchor protocol earnings data of a certain terra address - [Source: https://cryptosaurio.com/] - - Parameters - ---------- - address : str - Terra address. Valid terra addresses start with 'terra' - Returns - ------- - Tuple: - - pandas.DataFrame: Earnings over time in UST - - pandas.DataFrame: History of transactions - - str: Overall statistics - -## Getting charts -### crypto.defi.anchor_data(address: str = '', export: str = '', show_transactions: bool = False, external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) -> None - -Displays anchor protocol earnings data of a certain terra address - [Source: https://cryptosaurio.com/] - - Parameters - ---------- - asset : str - Terra asset {ust,luna,sdt} - address : str - Terra address. Valid terra addresses start with 'terra' - show_transactions : bool - Flag to show history of transactions in Anchor protocol for address. Default False - export : str - Export dataframe data to csv,json,xlsx file - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/crypto/defi/anchor_data/_index.rst b/website/content/SDK/crypto/defi/anchor_data/_index.rst new file mode 100644 index 00000000000..0c70cb83790 --- /dev/null +++ b/website/content/SDK/crypto/defi/anchor_data/_index.rst @@ -0,0 +1,83 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.defi.anchor_data( + address: str = '', + chart: bool = False, +) -> Tuple[Any, Any, str] +{{< /highlight >}} + +.. raw:: html + +

+ Returns anchor protocol earnings data of a certain terra address + [Source: https://cryptosaurio.com/] +

+ +* **Parameters** + + address : str + Terra address. Valid terra addresses start with 'terra' + chart: *bool* + Flag to display chart + + +* **Returns** + + Tuple: + - pandas.DataFrame: Earnings over time in UST + - pandas.DataFrame: History of transactions + - str: Overall statistics + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.defi.anchor_data( + address: str = '', + export: str = '', + show_transactions: bool = False, + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Displays anchor protocol earnings data of a certain terra address + [Source: https://cryptosaurio.com/] +

+ +* **Parameters** + + asset : str + Terra asset {ust,luna,sdt} + address : str + Terra address. Valid terra addresses start with 'terra' + show_transactions : bool + Flag to show history of transactions in Anchor protocol for address. Default False + export : str + Export dataframe data to csv,json,xlsx file + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/defi/aterra/_index.md b/website/content/SDK/crypto/defi/aterra/_index.md deleted file mode 100644 index 0f5222a4bbf..00000000000 --- a/website/content/SDK/crypto/defi/aterra/_index.md +++ /dev/null @@ -1,35 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.defi.aterra(asset: str = 'ust', address: str = 'terra1tmnqgvg567ypvsvk6rwsga3srp7e3lg6u0elp8') -> pandas.core.frame.DataFrame - -Returns historical data of an asset in a certain terra address - [Source: https://terra.engineer/] - - Parameters - ---------- - asset : str - Terra asset {ust,luna,sdt} - address : str - Terra address. Valid terra addresses start with 'terra' - Returns - ------- - pd.DataFrame - historical data - -## Getting charts -### crypto.defi.aterra(asset: str = '', address: str = '', export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) -> None - -Displays the 30-day history of specified asset in terra address - [Source: https://terra.engineer/] - - Parameters - ---------- - asset : str - Terra asset {ust,luna,sdt} - address : str - Terra address. Valid terra addresses start with 'terra' - export : str - Export dataframe data to csv,json,xlsx file - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/crypto/defi/aterra/_index.rst b/website/content/SDK/crypto/defi/aterra/_index.rst new file mode 100644 index 00000000000..cc14a7c6e55 --- /dev/null +++ b/website/content/SDK/crypto/defi/aterra/_index.rst @@ -0,0 +1,82 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.defi.aterra( + asset: str = 'ust', + address: str = 'terra1tmnqgvg567ypvsvk6rwsga3srp7e3lg6u0elp8', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Returns historical data of an asset in a certain terra address + [Source: https://terra.engineer/] +

+ +* **Parameters** + + asset : str + Terra asset {ust,luna,sdt} + address : str + Terra address. Valid terra addresses start with 'terra' + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + historical data + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.defi.aterra( + asset: str = '', + address: str = '', + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Displays the 30-day history of specified asset in terra address + [Source: https://terra.engineer/] +

+ +* **Parameters** + + asset : str + Terra asset {ust,luna,sdt} + address : str + Terra address. Valid terra addresses start with 'terra' + export : str + Export dataframe data to csv,json,xlsx file + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/defi/ayr/_index.md b/website/content/SDK/crypto/defi/ayr/_index.md deleted file mode 100644 index 4f145ed869e..00000000000 --- a/website/content/SDK/crypto/defi/ayr/_index.md +++ /dev/null @@ -1,25 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.defi.ayr() -> pandas.core.frame.DataFrame - -Displays the 30-day history of the Anchor Yield Reserve. - [Source: https://terra.engineer/] - - Returns - ---------- - pd.DataFrame - Dataframe containing historical data - -## Getting charts -### crypto.defi.ayr(export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) -> None - -Displays the 30-day history of the Anchor Yield Reserve. - [Source: https://terra.engineer/] - - Parameters - ---------- - export : str - Export dataframe data to csv,json,xlsx file, by default False - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/crypto/defi/ayr/_index.rst b/website/content/SDK/crypto/defi/ayr/_index.rst new file mode 100644 index 00000000000..e289440c60f --- /dev/null +++ b/website/content/SDK/crypto/defi/ayr/_index.rst @@ -0,0 +1,62 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.defi.ayr() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Displays the 30-day history of the Anchor Yield Reserve. + [Source: https://terra.engineer/] +

+ +* **Returns** + + pd.DataFrame + Dataframe containing historical data + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.defi.ayr( + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Displays the 30-day history of the Anchor Yield Reserve. + [Source: https://terra.engineer/] +

+ +* **Parameters** + + export : str + Export dataframe data to csv,json,xlsx file, by default False + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/defi/dpi/_index.md b/website/content/SDK/crypto/defi/dpi/_index.md deleted file mode 100644 index aea6d3a2588..00000000000 --- a/website/content/SDK/crypto/defi/dpi/_index.md +++ /dev/null @@ -1,30 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.defi.dpi(sortby: str = 'TVL_$', ascend: bool = False) -> pandas.core.frame.DataFrame - -Scrapes data from DeFi Pulse with all DeFi Pulse crypto protocols. - [Source: https://defipulse.com/] - - Returns - ------- - pd.DataFrame - List of DeFi Pulse protocols. - -## Getting charts -### crypto.defi.dpi(limit: int = 10, sortby: str = 'TVL_$', ascend: bool = False, export: str = '', chart=True) -> None - -Displays all DeFi Pulse crypto protocols. - [Source: https://defipulse.com/] - - Parameters - ---------- - limit: int - Number of records to display - sortby: str - Key by which to sort data (Possible values are: "Rank", "Name", "Chain", "Sector", - "30D_Users", "TVL_$", "1_Day_%"), by default TVL - ascend: bool - Flag to sort data ascending, by default False - export : str - Export dataframe data to csv,json,xlsx file, by default False diff --git a/website/content/SDK/crypto/defi/dpi/_index.rst b/website/content/SDK/crypto/defi/dpi/_index.rst new file mode 100644 index 00000000000..b3d9d636244 --- /dev/null +++ b/website/content/SDK/crypto/defi/dpi/_index.rst @@ -0,0 +1,76 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.defi.dpi( + sortby: str = 'TVL_$', ascend: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Scrapes data from DeFi Pulse with all DeFi Pulse crypto protocols. + [Source: https://defipulse.com/] + + Returns + ------- + pd.DataFrame + List of DeFi Pulse protocols. +

+ +* **Returns** + + pd.DataFrame + List of DeFi Pulse protocols. + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.defi.dpi( + limit: int = 10, + sortby: str = 'TVL_$', ascend: bool = False, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Displays all DeFi Pulse crypto protocols. + [Source: https://defipulse.com/] +

+ +* **Parameters** + + limit: *int* + Number of records to display + sortby: *str* + Key by which to sort data (Possible values are: "Rank", "Name", "Chain", "Sector", + "30D_Users", "TVL_$", "1_Day_%"), by default TVL + ascend: *bool* + Flag to sort data ascending, by default False + export : *str* + Export dataframe data to csv,json,xlsx file, by default False + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/defi/dtvl/_index.md b/website/content/SDK/crypto/defi/dtvl/_index.md deleted file mode 100644 index b6f414662a0..00000000000 --- a/website/content/SDK/crypto/defi/dtvl/_index.md +++ /dev/null @@ -1,27 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.defi.dtvl(protocol: str) -> pandas.core.frame.DataFrame - -Returns information about historical tvl of a defi protocol. - [Source: https://docs.llama.fi/api] - - Returns - ------- - pd.DataFrame - Historical tvl - -## Getting charts -### crypto.defi.dtvl(dapps: str = '', export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Displays historical TVL of different dApps - [Source: https://docs.llama.fi/api] - - Parameters - ---------- - dapps: str - dApps to search historical TVL. Should be split by , e.g.: anchor,sushiswap,pancakeswap - export : str - Export dataframe data to csv,json,xlsx file - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/crypto/defi/dtvl/_index.rst b/website/content/SDK/crypto/defi/dtvl/_index.rst new file mode 100644 index 00000000000..6e253cc04c3 --- /dev/null +++ b/website/content/SDK/crypto/defi/dtvl/_index.rst @@ -0,0 +1,73 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.defi.dtvl( + protocol: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Returns information about historical tvl of a defi protocol. + [Source: https://docs.llama.fi/api] + + Returns + ------- + pd.DataFrame + Historical tvl +

+ +* **Returns** + + pd.DataFrame + Historical tvl + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.defi.dtvl( + dapps: str = '', + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Displays historical TVL of different dApps + [Source: https://docs.llama.fi/api] +

+ +* **Parameters** + + dapps: str + dApps to search historical TVL. Should be split by , e.g.: anchor,sushiswap,pancakeswap + export : str + Export dataframe data to csv,json,xlsx file + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/defi/gacc/_index.md b/website/content/SDK/crypto/defi/gacc/_index.md deleted file mode 100644 index 0b1e463f70a..00000000000 --- a/website/content/SDK/crypto/defi/gacc/_index.md +++ /dev/null @@ -1,33 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.defi.gacc(cumulative: bool = True) -> pandas.core.frame.DataFrame - -Get terra blockchain account growth history [Source: https://fcd.terra.dev/swagger] - - Parameters - ---------- - cumulative: bool - distinguish between periodical and cumulative account growth data - Returns - ------- - pd.DataFrame - historical data of accounts growth - -## Getting charts -### crypto.defi.gacc(kind: str = 'total', cumulative: bool = False, limit: int = 90, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) -> None - -Display terra blockchain account growth history [Source: https://fcd.terra.dev/swagger] - - Parameters - ---------- - limit: int - Number of records to display - kind: str - display total account count or active account count. One from list [active, total] - cumulative: bool - Flag to show cumulative or discrete values. For active accounts only discrete value are available. - export : str - Export dataframe data to csv,json,xlsx file - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/crypto/defi/gacc/_index.rst b/website/content/SDK/crypto/defi/gacc/_index.rst new file mode 100644 index 00000000000..d0a92fcd17e --- /dev/null +++ b/website/content/SDK/crypto/defi/gacc/_index.rst @@ -0,0 +1,80 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.defi.gacc( + cumulative: bool = True, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get terra blockchain account growth history [Source: https://fcd.terra.dev/swagger] +

+ +* **Parameters** + + cumulative: bool + distinguish between periodical and cumulative account growth data + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + historical data of accounts growth + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.defi.gacc( + kind: str = 'total', + cumulative: bool = False, + limit: int = 90, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display terra blockchain account growth history [Source: https://fcd.terra.dev/swagger] +

+ +* **Parameters** + + limit: int + Number of records to display + kind: str + display total account count or active account count. One from list [active, total] + cumulative: bool + Flag to show cumulative or discrete values. For active accounts only discrete value are available. + export : str + Export dataframe data to csv,json,xlsx file + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/defi/gdapps/_index.md b/website/content/SDK/crypto/defi/gdapps/_index.md deleted file mode 100644 index 665a2d79ff7..00000000000 --- a/website/content/SDK/crypto/defi/gdapps/_index.md +++ /dev/null @@ -1,32 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.defi.gdapps(limit: int = 50) -> pandas.core.frame.DataFrame - -Display top dApps (in terms of TVL) grouped by chain. - [Source: https://docs.llama.fi/api] - - Parameters - ---------- - limit: int - Number of top dApps to display - - Returns - ------- - pd.DataFrame - Information about DeFi protocols grouped by chain - -## Getting charts -### crypto.defi.gdapps(limit: int = 50, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) -> None - -Display top dApps (in terms of TVL) grouped by chain. - [Source: https://docs.llama.fi/api] - - Parameters - ---------- - num: int - Number of top dApps to display - export : str - Export dataframe data to csv,json,xlsx file - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/crypto/defi/gdapps/_index.rst b/website/content/SDK/crypto/defi/gdapps/_index.rst new file mode 100644 index 00000000000..32577b74f7e --- /dev/null +++ b/website/content/SDK/crypto/defi/gdapps/_index.rst @@ -0,0 +1,76 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.defi.gdapps( + limit: int = 50, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Display top dApps (in terms of TVL) grouped by chain. + [Source: https://docs.llama.fi/api] +

+ +* **Parameters** + + limit: int + Number of top dApps to display + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Information about DeFi protocols grouped by chain + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.defi.gdapps( + limit: int = 50, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display top dApps (in terms of TVL) grouped by chain. + [Source: https://docs.llama.fi/api] +

+ +* **Parameters** + + num: int + Number of top dApps to display + export : str + Export dataframe data to csv,json,xlsx file + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/defi/gov_proposals/_index.md b/website/content/SDK/crypto/defi/gov_proposals/_index.md deleted file mode 100644 index 782f38a2a3f..00000000000 --- a/website/content/SDK/crypto/defi/gov_proposals/_index.md +++ /dev/null @@ -1,40 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.defi.gov_proposals(status: str = '', sortby: str = 'id', ascend: bool = True, limit: int = 10) -> pandas.core.frame.DataFrame - -Get terra blockchain governance proposals list [Source: https://fcd.terra.dev/swagger] - - Parameters - ---------- - status: str - status of proposal, one from list: ['Voting','Deposit','Passed','Rejected'] - sortby: str - Key by which to sort data - ascend: bool - Flag to sort data ascending - limit: int - Number of records to display - - Returns - ------- - pd.DataFrame - Terra blockchain governance proposals list - -## Getting charts -### crypto.defi.gov_proposals(limit: int = 10, status: str = 'all', sortby: str = 'id', ascend: bool = True, export: str = '', chart=True) -> None - -Display terra blockchain governance proposals list [Source: https://fcd.terra.dev/swagger] - - Parameters - ---------- - limit: int - Number of records to display - status: str - status of proposal, one from list: ['Voting','Deposit','Passed','Rejected'] - sortby: str - Key by which to sort data - ascend: bool - Flag to sort data ascend - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/defi/gov_proposals/_index.rst b/website/content/SDK/crypto/defi/gov_proposals/_index.rst new file mode 100644 index 00000000000..649e2e25e4e --- /dev/null +++ b/website/content/SDK/crypto/defi/gov_proposals/_index.rst @@ -0,0 +1,89 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.defi.gov_proposals( + status: str = '', + sortby: str = 'id', + ascend: bool = True, + limit: int = 10, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get terra blockchain governance proposals list [Source: https://fcd.terra.dev/swagger] +

+ +* **Parameters** + + status: str + status of proposal, one from list: ['Voting','Deposit','Passed','Rejected'] + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data ascending + limit: int + Number of records to display + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Terra blockchain governance proposals list + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.defi.gov_proposals( + limit: int = 10, + status: str = 'all', + sortby: str = 'id', + ascend: bool = True, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display terra blockchain governance proposals list [Source: https://fcd.terra.dev/swagger] +

+ +* **Parameters** + + limit: int + Number of records to display + status: str + status of proposal, one from list: ['Voting','Deposit','Passed','Rejected'] + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data ascend + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/defi/ldapps/_index.md b/website/content/SDK/crypto/defi/ldapps/_index.md deleted file mode 100644 index 046c881158c..00000000000 --- a/website/content/SDK/crypto/defi/ldapps/_index.md +++ /dev/null @@ -1,44 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.defi.ldapps(limit: int = 100, sortby: str = '', ascend: bool = False, description: bool = False, drop_chain: bool = True) -> pandas.core.frame.DataFrame - -Returns information about listed DeFi protocols, their current TVL and changes to it in the last hour/day/week. - [Source: https://docs.llama.fi/api] - - Parameters - ---------- - limit: int - The number of dApps to display - sortby: str - Key by which to sort data - ascend: bool - Flag to sort data descending - description: bool - Flag to display description of protocol - drop_chain: bool - Whether to drop the chain column - - Returns - ------- - pd.DataFrame - Information about DeFi protocols - -## Getting charts -### crypto.defi.ldapps(sortby: str, limit: int = 20, ascend: bool = False, description: bool = False, export: str = '', chart=True) -> None - -Display information about listed DeFi protocols, their current TVL and changes to it in - the last hour/day/week. [Source: https://docs.llama.fi/api] - - Parameters - ---------- - limit: int - Number of records to display - sortby: str - Key by which to sort data - ascend: bool - Flag to sort data descending - description: bool - Flag to display description of protocol - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/defi/ldapps/_index.rst b/website/content/SDK/crypto/defi/ldapps/_index.rst new file mode 100644 index 00000000000..85d8d92d1a0 --- /dev/null +++ b/website/content/SDK/crypto/defi/ldapps/_index.rst @@ -0,0 +1,94 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.defi.ldapps( + limit: int = 100, + sortby: str = '', + ascend: bool = False, + description: bool = False, + drop_chain: bool = True, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Returns information about listed DeFi protocols, their current TVL and changes to it in the last hour/day/week. + [Source: https://docs.llama.fi/api] +

+ +* **Parameters** + + limit: int + The number of dApps to display + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data descending + description: bool + Flag to display description of protocol + drop_chain: bool + Whether to drop the chain column + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Information about DeFi protocols + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.defi.ldapps( + sortby: str, + limit: int = 20, + ascend: bool = False, + description: bool = False, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display information about listed DeFi protocols, their current TVL and changes to it in + the last hour/day/week. [Source: https://docs.llama.fi/api] +

+ +* **Parameters** + + limit: int + Number of records to display + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data descending + description: bool + Flag to display description of protocol + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/defi/luna_supply/_index.md b/website/content/SDK/crypto/defi/luna_supply/_index.md deleted file mode 100644 index 49132075fe3..00000000000 --- a/website/content/SDK/crypto/defi/luna_supply/_index.md +++ /dev/null @@ -1,42 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.defi.luna_supply(supply_type: str = 'lunaSupplyChallengeStats', days: int = 30) -> pandas.core.frame.DataFrame - -Get supply history of the Terra ecosystem - - Source: [Smartstake.io] - - Parameters - ---------- - supply_type: str - Supply type to unpack json - days: int - Day count to fetch data - - Returns - ------- - pd.DataFrame - Dataframe of supply history data - -## Getting charts -### crypto.defi.luna_supply(days: int = 30, export: str = '', supply_type: str = 'lunaSupplyChallengeStats', limit: int = 5, external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display Luna circulating supply stats - - Parameters - ---------- - days: int - Number of days - supply_type: str - Supply type to unpack json - export: str - Export type - limit: int - Number of results display on the terminal - Default: 5 - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None - Returns - None - ------- diff --git a/website/content/SDK/crypto/defi/luna_supply/_index.rst b/website/content/SDK/crypto/defi/luna_supply/_index.rst new file mode 100644 index 00000000000..8fb8d7e2ae0 --- /dev/null +++ b/website/content/SDK/crypto/defi/luna_supply/_index.rst @@ -0,0 +1,86 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.defi.luna_supply( + supply_type: str = 'lunaSupplyChallengeStats', + days: int = 30, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get supply history of the Terra ecosystem + + Source: [Smartstake.io] +

+ +* **Parameters** + + supply_type: str + Supply type to unpack json + days: int + Day count to fetch data + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Dataframe of supply history data + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.defi.luna_supply( + days: int = 30, + export: str = '', + supply_type: str = 'lunaSupplyChallengeStats', + limit: int = 5, + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display Luna circulating supply stats +

+ +* **Parameters** + + days: int + Number of days + supply_type: str + Supply type to unpack json + export: str + Export type + limit: int + Number of results display on the terminal + Default: 5 + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/defi/newsletters/_index.md b/website/content/SDK/crypto/defi/newsletters/_index.md deleted file mode 100644 index 1d76ae007fa..00000000000 --- a/website/content/SDK/crypto/defi/newsletters/_index.md +++ /dev/null @@ -1,25 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.defi.newsletters() -> pandas.core.frame.DataFrame - -Scrape all substack newsletters from url list. - [Source: substack.com] - - Returns - ------- - pd.DataFrame - DataFrame with recent news from most popular DeFi related newsletters. - -## Getting charts -### crypto.defi.newsletters(limit: int = 10, export: str = '', chart=True) -> None - -Display DeFi related substack newsletters. - [Source: substack.com] - - Parameters - ---------- - limit: int - Number of records to display - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/defi/newsletters/_index.rst b/website/content/SDK/crypto/defi/newsletters/_index.rst new file mode 100644 index 00000000000..24402b8cc27 --- /dev/null +++ b/website/content/SDK/crypto/defi/newsletters/_index.rst @@ -0,0 +1,62 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.defi.newsletters() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Scrape all substack newsletters from url list. + [Source: substack.com] +

+ +* **Returns** + + pd.DataFrame + DataFrame with recent news from most popular DeFi related newsletters. + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.defi.newsletters( + limit: int = 10, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display DeFi related substack newsletters. + [Source: substack.com] +

+ +* **Parameters** + + limit: int + Number of records to display + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/defi/pairs/_index.md b/website/content/SDK/crypto/defi/pairs/_index.md deleted file mode 100644 index 046f576af2e..00000000000 --- a/website/content/SDK/crypto/defi/pairs/_index.md +++ /dev/null @@ -1,53 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.defi.pairs(last_days: int = 14, min_volume: int = 100, min_liquidity: int = 0, min_tx: int = 100) -> pandas.core.frame.DataFrame - -Get lastly added trade-able pairs on Uniswap with parameters like: - * number of days the pair has been active, - * minimum trading volume, - * minimum liquidity, - * number of transactions. - - [Source: https://thegraph.com/en/] - - Parameters - ---------- - last_days: int - How many days back to look for added pairs. - min_volume: int - Minimum volume - min_liquidity: int - Minimum liquidity - min_tx: int - Minimum number of transactions done in given pool. - - Returns - ------- - pd.DataFrame - Lastly added pairs on Uniswap DEX. - -## Getting charts -### crypto.defi.pairs(limit: int = 20, days: int = 7, min_volume: int = 20, min_liquidity: int = 0, min_tx: int = 100, sortby: str = 'created', ascend: bool = False, export: str = '', chart=True) -> None - -Displays Lastly added pairs on Uniswap DEX. - [Source: https://thegraph.com/en/] - - Parameters - ---------- - limit: int - Number of records to display - days: int - Number of days the pair has been active, - min_volume: int - Minimum trading volume, - min_liquidity: int - Minimum liquidity - min_tx: int - Minimum number of transactions - sortby: str - Key by which to sort data - ascend: bool - Flag to sort data descending - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/defi/pairs/_index.rst b/website/content/SDK/crypto/defi/pairs/_index.rst new file mode 100644 index 00000000000..e681bf7088e --- /dev/null +++ b/website/content/SDK/crypto/defi/pairs/_index.rst @@ -0,0 +1,105 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.defi.pairs( + last_days: int = 14, + min_volume: int = 100, + min_liquidity: int = 0, + min_tx: int = 100, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get lastly added trade-able pairs on Uniswap with parameters like: + * number of days the pair has been active, + * minimum trading volume, + * minimum liquidity, + * number of transactions. + + [Source: https://thegraph.com/en/] +

+ +* **Parameters** + + last_days: int + How many days back to look for added pairs. + min_volume: int + Minimum volume + min_liquidity: int + Minimum liquidity + min_tx: int + Minimum number of transactions done in given pool. + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Lastly added pairs on Uniswap DEX. + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.defi.pairs( + limit: int = 20, + days: int = 7, + min_volume: int = 20, + min_liquidity: int = 0, + min_tx: int = 100, + sortby: str = 'created', + ascend: bool = False, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Displays Lastly added pairs on Uniswap DEX. + [Source: https://thegraph.com/en/] +

+ +* **Parameters** + + limit: int + Number of records to display + days: int + Number of days the pair has been active, + min_volume: int + Minimum trading volume, + min_liquidity: int + Minimum liquidity + min_tx: int + Minimum number of transactions + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data descending + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/defi/pools/_index.md b/website/content/SDK/crypto/defi/pools/_index.md deleted file mode 100644 index 62ce7bbda11..00000000000 --- a/website/content/SDK/crypto/defi/pools/_index.md +++ /dev/null @@ -1,29 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.defi.pools() -> pandas.core.frame.DataFrame - -Get uniswap pools by volume. [Source: https://thegraph.com/en/] - - Returns - ------- - pd.DataFrame - Trade-able pairs listed on Uniswap by top volume. - -## Getting charts -### crypto.defi.pools(limit: int = 20, sortby: str = 'volumeUSD', ascend: bool = True, export: str = '', chart=True) -> None - -Displays uniswap pools by volume. - [Source: https://thegraph.com/en/] - - Parameters - ---------- - limit: int - Number of records to display - sortby: str - Key by which to sort data. The table can be sorted by every of its columns - (see https://bit.ly/3ORagr1 then press ctrl-enter or execute the query). - ascend: bool - Flag to sort data descending - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/defi/pools/_index.rst b/website/content/SDK/crypto/defi/pools/_index.rst new file mode 100644 index 00000000000..30106861761 --- /dev/null +++ b/website/content/SDK/crypto/defi/pools/_index.rst @@ -0,0 +1,68 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.defi.pools() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get uniswap pools by volume. [Source: https://thegraph.com/en/] +

+ +* **Returns** + + pd.DataFrame + Trade-able pairs listed on Uniswap by top volume. + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.defi.pools( + limit: int = 20, + sortby: str = 'volumeUSD', + ascend: bool = True, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Displays uniswap pools by volume. + [Source: https://thegraph.com/en/] +

+ +* **Parameters** + + limit: int + Number of records to display + sortby: str + Key by which to sort data. The table can be sorted by every of its columns + (see https://bit.ly/3ORagr1 then press ctrl-enter or execute the query). + ascend: bool + Flag to sort data descending + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/defi/sinfo/_index.md b/website/content/SDK/crypto/defi/sinfo/_index.md deleted file mode 100644 index 3c3a19b14d9..00000000000 --- a/website/content/SDK/crypto/defi/sinfo/_index.md +++ /dev/null @@ -1,29 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.defi.sinfo(address: str = '') -> Tuple[pandas.core.frame.DataFrame, str] - -Get staking info for provided terra account [Source: https://fcd.terra.dev/swagger] - - Parameters - ---------- - address: str - terra blockchain address e.g. terra1jvwelvs7rdk6j3mqdztq5tya99w8lxk6l9hcqg - Returns - ------- - Tuple[pd.DataFrame, str]: - luna delegations and summary report for given address - -## Getting charts -### crypto.defi.sinfo(address: str = '', limit: int = 10, export: str = '', chart=True) -> None - -Display staking info for provided terra account address [Source: https://fcd.terra.dev/swagger] - - Parameters - ---------- - address: str - terra blockchain address e.g. terra1jvwelvs7rdk6j3mqdztq5tya99w8lxk6l9hcqg - limit: int - Number of records to display - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/defi/sinfo/_index.rst b/website/content/SDK/crypto/defi/sinfo/_index.rst new file mode 100644 index 00000000000..e175027c477 --- /dev/null +++ b/website/content/SDK/crypto/defi/sinfo/_index.rst @@ -0,0 +1,74 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.defi.sinfo( + address: str = '', + chart: bool = False, +) -> Tuple[pandas.core.frame.DataFrame, str] +{{< /highlight >}} + +.. raw:: html + +

+ Get staking info for provided terra account [Source: https://fcd.terra.dev/swagger] +

+ +* **Parameters** + + address: str + terra blockchain address e.g. terra1jvwelvs7rdk6j3mqdztq5tya99w8lxk6l9hcqg + chart: *bool* + Flag to display chart + + +* **Returns** + + Tuple[pd.DataFrame, str]: + luna delegations and summary report for given address + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.defi.sinfo( + address: str = '', + limit: int = 10, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display staking info for provided terra account address [Source: https://fcd.terra.dev/swagger] +

+ +* **Parameters** + + address: str + terra blockchain address e.g. terra1jvwelvs7rdk6j3mqdztq5tya99w8lxk6l9hcqg + limit: int + Number of records to display + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/defi/sratio/_index.md b/website/content/SDK/crypto/defi/sratio/_index.md deleted file mode 100644 index 3331de3690b..00000000000 --- a/website/content/SDK/crypto/defi/sratio/_index.md +++ /dev/null @@ -1,30 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.defi.sratio(limit: int = 200) - -Get terra blockchain staking ratio history [Source: https://fcd.terra.dev/swagger] - - Parameters - ---------- - limit: int - The number of ratios to show - - Returns - ------- - pd.DataFrame - historical staking ratio - -## Getting charts -### crypto.defi.sratio(limit: int = 90, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) -> None - -Display terra blockchain staking ratio history [Source: https://fcd.terra.dev/v1] - - Parameters - ---------- - limit: int - Number of records to display - export : str - Export dataframe data to csv,json,xlsx file - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/crypto/defi/sratio/_index.rst b/website/content/SDK/crypto/defi/sratio/_index.rst new file mode 100644 index 00000000000..e7ad7e04c93 --- /dev/null +++ b/website/content/SDK/crypto/defi/sratio/_index.rst @@ -0,0 +1,74 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.defi.sratio( + limit: int = 200, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Get terra blockchain staking ratio history [Source: https://fcd.terra.dev/swagger] +

+ +* **Parameters** + + limit: int + The number of ratios to show + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + historical staking ratio + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.defi.sratio( + limit: int = 90, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display terra blockchain staking ratio history [Source: https://fcd.terra.dev/v1] +

+ +* **Parameters** + + limit: int + Number of records to display + export : str + Export dataframe data to csv,json,xlsx file + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/defi/sreturn/_index.md b/website/content/SDK/crypto/defi/sreturn/_index.md deleted file mode 100644 index f3c43a80b48..00000000000 --- a/website/content/SDK/crypto/defi/sreturn/_index.md +++ /dev/null @@ -1,31 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.defi.sreturn(limit: int = 200) - -Get terra blockchain staking returns history [Source: https://fcd.terra.dev/v1] - - Parameters - ---------- - limit: int - The number of returns to show - - Returns - ------- - pd.DataFrame - historical staking returns - -## Getting charts -### crypto.defi.sreturn(limit: int = 90, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) -> None - -Display terra blockchain staking returns history [Source: https://fcd.terra.dev/swagger] - - Parameters - ---------- - limit: int - Number of records to display - export : str - Export dataframe data to csv,json,xlsx file - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None - diff --git a/website/content/SDK/crypto/defi/sreturn/_index.rst b/website/content/SDK/crypto/defi/sreturn/_index.rst new file mode 100644 index 00000000000..56868b3dab9 --- /dev/null +++ b/website/content/SDK/crypto/defi/sreturn/_index.rst @@ -0,0 +1,74 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.defi.sreturn( + limit: int = 200, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Get terra blockchain staking returns history [Source: https://fcd.terra.dev/v1] +

+ +* **Parameters** + + limit: int + The number of returns to show + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + historical staking returns + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.defi.sreturn( + limit: int = 90, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display terra blockchain staking returns history [Source: https://fcd.terra.dev/swagger] +

+ +* **Parameters** + + limit: int + Number of records to display + export : str + Export dataframe data to csv,json,xlsx file + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/defi/stats/_index.md b/website/content/SDK/crypto/defi/stats/_index.rst similarity index 54% rename from website/content/SDK/crypto/defi/stats/_index.md rename to website/content/SDK/crypto/defi/stats/_index.rst index ceb0ade7707..3690bb2d875 100644 --- a/website/content/SDK/crypto/defi/stats/_index.md +++ b/website/content/SDK/crypto/defi/stats/_index.rst @@ -1,9 +1,25 @@ -To obtain charts, make sure to add `chart=True` as the last parameter +.. role:: python(code) + :language: python + :class: highlight -## Get underlying data -### crypto.defi.stats() -> pandas.core.frame.DataFrame +| -Get base statistics about Uniswap DEX. [Source: https://thegraph.com/en/] +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.defi.stats() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get base statistics about Uniswap DEX. [Source: https://thegraph.com/en/] uniswapFactory id: 0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f - ethereum address on which Uniswap Factory smart contract was deployed. The factory contract is deployed once from the off-chain source code, and it contains @@ -12,21 +28,39 @@ Get base statistics about Uniswap DEX. [Source: https://thegraph.com/en/] are associated. More: https://docs.uniswap.org/protocol/V1/guides/connect-to-uniswap We use 0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f address to fetch all smart contracts that were created with usage of this factory. +

+* **Returns** - Returns - ------- pd.DataFrame Uniswap DEX statistics like liquidity, volume, number of pairs, number of transactions. -## Getting charts -### crypto.defi.stats(export: str = '', chart=True) -> None +| -Displays base statistics about Uniswap DEX. [Source: https://thegraph.com/en/] +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.defi.stats( + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Displays base statistics about Uniswap DEX. [Source: https://thegraph.com/en/] [Source: https://thegraph.com/en/] +

- Parameters - ---------- +* **Parameters** export : str Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/defi/stvl/_index.md b/website/content/SDK/crypto/defi/stvl/_index.md deleted file mode 100644 index 464b4cf81bd..00000000000 --- a/website/content/SDK/crypto/defi/stvl/_index.md +++ /dev/null @@ -1,27 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.defi.stvl() -> pandas.core.frame.DataFrame - -Returns historical values of the total sum of TVLs from all listed protocols. - [Source: https://docs.llama.fi/api] - - Returns - ------- - pd.DataFrame - Historical values of total sum of Total Value Locked from all listed protocols. - -## Getting charts -### crypto.defi.stvl(limit: int = 5, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) -> None - -Displays historical values of the total sum of TVLs from all listed protocols. - [Source: https://docs.llama.fi/api] - - Parameters - ---------- - limit: int - Number of records to display, by default 5 - export : str - Export dataframe data to csv,json,xlsx file - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/crypto/defi/stvl/_index.rst b/website/content/SDK/crypto/defi/stvl/_index.rst new file mode 100644 index 00000000000..ef427657d5e --- /dev/null +++ b/website/content/SDK/crypto/defi/stvl/_index.rst @@ -0,0 +1,65 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.defi.stvl() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Returns historical values of the total sum of TVLs from all listed protocols. + [Source: https://docs.llama.fi/api] +

+ +* **Returns** + + pd.DataFrame + Historical values of total sum of Total Value Locked from all listed protocols. + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.defi.stvl( + limit: int = 5, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Displays historical values of the total sum of TVLs from all listed protocols. + [Source: https://docs.llama.fi/api] +

+ +* **Parameters** + + limit: int + Number of records to display, by default 5 + export : str + Export dataframe data to csv,json,xlsx file + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/defi/swaps/_index.md b/website/content/SDK/crypto/defi/swaps/_index.md deleted file mode 100644 index 4bb122a10f3..00000000000 --- a/website/content/SDK/crypto/defi/swaps/_index.md +++ /dev/null @@ -1,38 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.defi.swaps(limit: int = 100, sortby: str = 'timestamp', ascend: bool = False) -> pandas.core.frame.DataFrame - -Get the last 100 swaps done on Uniswap [Source: https://thegraph.com/en/] - - Parameters - ------- - limit: int - Number of swaps to return. Maximum possible number: 1000. - sortby: str - Key by which to sort data. The table can be sorted by every of its columns - (see https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v2). - ascend: bool - Flag to sort data descending - Returns - ------- - pd.DataFrame - Last 100 swaps on Uniswap - -## Getting charts -### crypto.defi.swaps(limit: int = 10, sortby: str = 'timestamp', ascend: bool = False, export: str = '', chart=True) -> None - -Displays last swaps done on Uniswap - [Source: https://thegraph.com/en/] - - Parameters - ---------- - limit: int - Number of records to display - sortby: str - Key by which to sort data. The table can be sorted by every of its columns - (see https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v2). - ascend: bool - Flag to sort data descending - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/defi/swaps/_index.rst b/website/content/SDK/crypto/defi/swaps/_index.rst new file mode 100644 index 00000000000..5f0798d6a46 --- /dev/null +++ b/website/content/SDK/crypto/defi/swaps/_index.rst @@ -0,0 +1,86 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.defi.swaps( + limit: int = 100, + sortby: str = 'timestamp', + ascend: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get the last 100 swaps done on Uniswap [Source: https://thegraph.com/en/] +

+ +* **Parameters** + + limit: int + Number of swaps to return. Maximum possible number: 1000. + sortby: str + Key by which to sort data. The table can be sorted by every of its columns + (see https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v2). + ascend: bool + Flag to sort data descending + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Last 100 swaps on Uniswap + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.defi.swaps( + limit: int = 10, + sortby: str = 'timestamp', + ascend: bool = False, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Displays last swaps done on Uniswap + [Source: https://thegraph.com/en/] +

+ +* **Parameters** + + limit: int + Number of records to display + sortby: str + Key by which to sort data. The table can be sorted by every of its columns + (see https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v2). + ascend: bool + Flag to sort data descending + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/defi/tokens/_index.md b/website/content/SDK/crypto/defi/tokens/_index.md deleted file mode 100644 index 5fb2eeed8c3..00000000000 --- a/website/content/SDK/crypto/defi/tokens/_index.md +++ /dev/null @@ -1,41 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.defi.tokens(skip: int = 0, limit: int = 100, sortby: str = 'index', ascend: bool = False) -> pandas.core.frame.DataFrame - -Get list of tokens trade-able on Uniswap DEX. [Source: https://thegraph.com/en/] - - Parameters - ---------- - skip: int - Skip n number of records. - limit: int - Show n number of records. - sortby: str - The column to sort by - ascend: bool - Whether to sort in ascending order - - Returns - ------- - pd.DataFrame - Uniswap tokens with trading volume, transaction count, liquidity. - -## Getting charts -### crypto.defi.tokens(skip: int = 0, limit: int = 20, sortby: str = 'index', ascend: bool = False, export: str = '', chart=True) -> None - -Displays tokens trade-able on Uniswap DEX. - [Source: https://thegraph.com/en/] - - Parameters - ---------- - skip: int - Number of records to skip - limit: int - Number of records to display - sortby: str - Key by which to sort data - ascend: bool - Flag to sort data descending - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/defi/tokens/_index.rst b/website/content/SDK/crypto/defi/tokens/_index.rst new file mode 100644 index 00000000000..7b16506436e --- /dev/null +++ b/website/content/SDK/crypto/defi/tokens/_index.rst @@ -0,0 +1,90 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.defi.tokens( + skip: int = 0, + limit: int = 100, + sortby: str = 'index', + ascend: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get list of tokens trade-able on Uniswap DEX. [Source: https://thegraph.com/en/] +

+ +* **Parameters** + + skip: int + Skip n number of records. + limit: int + Show n number of records. + sortby: str + The column to sort by + ascend: bool + Whether to sort in ascending order + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Uniswap tokens with trading volume, transaction count, liquidity. + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.defi.tokens( + skip: int = 0, + limit: int = 20, + sortby: str = 'index', + ascend: bool = False, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Displays tokens trade-able on Uniswap DEX. + [Source: https://thegraph.com/en/] +

+ +* **Parameters** + + skip: int + Number of records to skip + limit: int + Number of records to display + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data descending + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/defi/validators/_index.md b/website/content/SDK/crypto/defi/validators/_index.md deleted file mode 100644 index 8822333c3be..00000000000 --- a/website/content/SDK/crypto/defi/validators/_index.md +++ /dev/null @@ -1,36 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.defi.validators(sortby: str = 'votingPower', ascend: bool = True) -> pandas.core.frame.DataFrame - -Get information about terra validators [Source: https://fcd.terra.dev/swagger] - - Parameters - ----------- - sortby: str - Key by which to sort data. Choose from: - validatorName, tokensAmount, votingPower, commissionRate, status, uptime - ascend: bool - Flag to sort data descending - - Returns - ------- - pd.DataFrame - terra validators details - -## Getting charts -### crypto.defi.validators(limit: int = 10, sortby: str = 'votingPower', ascend: bool = True, export: str = '', chart=True) -> None - -Display information about terra validators [Source: https://fcd.terra.dev/swagger] - - Parameters - ---------- - limit: int - Number of records to display - sortby: str - Key by which to sort data. Choose from: - validatorName, tokensAmount, votingPower, commissionRate, status, uptime - ascend: bool - Flag to sort data descending - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/defi/validators/_index.rst b/website/content/SDK/crypto/defi/validators/_index.rst new file mode 100644 index 00000000000..e53fa484128 --- /dev/null +++ b/website/content/SDK/crypto/defi/validators/_index.rst @@ -0,0 +1,82 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.defi.validators( + sortby: str = 'votingPower', + ascend: bool = True, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get information about terra validators [Source: https://fcd.terra.dev/swagger] +

+ +* **Parameters** + + sortby: str + Key by which to sort data. Choose from: + validatorName, tokensAmount, votingPower, commissionRate, status, uptime + ascend: bool + Flag to sort data descending + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + terra validators details + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.defi.validators( + limit: int = 10, + sortby: str = 'votingPower', + ascend: bool = True, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display information about terra validators [Source: https://fcd.terra.dev/swagger] +

+ +* **Parameters** + + limit: int + Number of records to display + sortby: str + Key by which to sort data. Choose from: + validatorName, tokensAmount, votingPower, commissionRate, status, uptime + ascend: bool + Flag to sort data descending + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/defi/vaults/_index.md b/website/content/SDK/crypto/defi/vaults/_index.md deleted file mode 100644 index d07cc30f5bf..00000000000 --- a/website/content/SDK/crypto/defi/vaults/_index.md +++ /dev/null @@ -1,64 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.defi.vaults(chain: Optional[str] = None, protocol: Optional[str] = None, kind: Optional[str] = None, ascend: bool = True, sortby: str = 'apy') -> pandas.core.frame.DataFrame - -Get DeFi Vaults Information. DeFi Vaults are pools of funds with an assigned strategy which main goal is to - maximize returns of its crypto assets. [Source: https://coindix.com/] - - Parameters - ---------- - chain: str - Blockchain - one from list [ - 'ethereum', 'polygon', 'avalanche', 'bsc', 'terra', 'fantom', - 'moonriver', 'celo', 'heco', 'okex', 'cronos', 'arbitrum', 'eth', - 'harmony', 'fuse', 'defichain', 'solana', 'optimism' - ] - protocol: str - DeFi protocol - one from list: [ - 'aave', 'acryptos', 'alpaca', 'anchor', 'autofarm', 'balancer', 'bancor', - 'beefy', 'belt', 'compound', 'convex', 'cream', 'curve', 'defichain', 'geist', - 'lido', 'liquity', 'mirror', 'pancakeswap', 'raydium', 'sushi', 'tarot', 'traderjoe', - 'tulip', 'ubeswap', 'uniswap', 'venus', 'yearn' - ] - kind: str - Kind/type of vault - one from list: ['lp','single','noimploss','stable'] - - Returns - ------- - pd.DataFrame - Top 100 DeFi Vaults for given chain/protocol sorted by APY. - -## Getting charts -### crypto.defi.vaults(chain: Optional[str] = None, protocol: Optional[str] = None, kind: Optional[str] = None, limit: int = 10, sortby: str = 'apy', ascend: bool = True, link: bool = False, export: str = '', chart=True) -> None - -Display Top DeFi Vaults - pools of funds with an assigned strategy which main goal is to - maximize returns of its crypto assets. [Source: https://coindix.com/] - - Parameters - ---------- - chain: str - Blockchain - one from list [ - 'ethereum', 'polygon', 'avalanche', 'bsc', 'terra', 'fantom', - 'moonriver', 'celo', 'heco', 'okex', 'cronos', 'arbitrum', 'eth', - 'harmony', 'fuse', 'defichain', 'solana', 'optimism' - ] - protocol: str - DeFi protocol - one from list: [ - 'aave', 'acryptos', 'alpaca', 'anchor', 'autofarm', 'balancer', 'bancor', - 'beefy', 'belt', 'compound', 'convex', 'cream', 'curve', 'defichain', 'geist', - 'lido', 'liquity', 'mirror', 'pancakeswap', 'raydium', 'sushi', 'tarot', 'traderjoe', - 'tulip', 'ubeswap', 'uniswap', 'venus', 'yearn' - ] - kind: str - Kind/type of vault - one from list: ['lp','single','noimploss','stable'] - limit: int - Number of records to display - sortby: str - Key by which to sort data - ascend: bool - Flag to sort data descending - link: bool - Flag to show links - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/defi/vaults/_index.rst b/website/content/SDK/crypto/defi/vaults/_index.rst new file mode 100644 index 00000000000..c642c657f92 --- /dev/null +++ b/website/content/SDK/crypto/defi/vaults/_index.rst @@ -0,0 +1,117 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.defi.vaults( + chain: Optional[str] = None, + protocol: Optional[str] = None, + kind: Optional[str] = None, + ascend: bool = True, + sortby: str = 'apy', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get DeFi Vaults Information. DeFi Vaults are pools of funds with an assigned strategy which main goal is to + maximize returns of its crypto assets. [Source: https://coindix.com/] +

+ +* **Parameters** + + chain: str + Blockchain - one from list [ + 'ethereum', 'polygon', 'avalanche', 'bsc', 'terra', 'fantom', + 'moonriver', 'celo', 'heco', 'okex', 'cronos', 'arbitrum', 'eth', + 'harmony', 'fuse', 'defichain', 'solana', 'optimism' + ] + protocol: str + DeFi protocol - one from list: [ + 'aave', 'acryptos', 'alpaca', 'anchor', 'autofarm', 'balancer', 'bancor', + 'beefy', 'belt', 'compound', 'convex', 'cream', 'curve', 'defichain', 'geist', + 'lido', 'liquity', 'mirror', 'pancakeswap', 'raydium', 'sushi', 'tarot', 'traderjoe', + 'tulip', 'ubeswap', 'uniswap', 'venus', 'yearn' + ] + kind: str + Kind/type of vault - one from list: ['lp','single','noimploss','stable'] + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Top 100 DeFi Vaults for given chain/protocol sorted by APY. + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.defi.vaults( + chain: Optional[str] = None, + protocol: Optional[str] = None, + kind: Optional[str] = None, + limit: int = 10, + sortby: str = 'apy', + ascend: bool = True, + link: bool = False, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display Top DeFi Vaults - pools of funds with an assigned strategy which main goal is to + maximize returns of its crypto assets. [Source: https://coindix.com/] +

+ +* **Parameters** + + chain: str + Blockchain - one from list [ + 'ethereum', 'polygon', 'avalanche', 'bsc', 'terra', 'fantom', + 'moonriver', 'celo', 'heco', 'okex', 'cronos', 'arbitrum', 'eth', + 'harmony', 'fuse', 'defichain', 'solana', 'optimism' + ] + protocol: str + DeFi protocol - one from list: [ + 'aave', 'acryptos', 'alpaca', 'anchor', 'autofarm', 'balancer', 'bancor', + 'beefy', 'belt', 'compound', 'convex', 'cream', 'curve', 'defichain', 'geist', + 'lido', 'liquity', 'mirror', 'pancakeswap', 'raydium', 'sushi', 'tarot', 'traderjoe', + 'tulip', 'ubeswap', 'uniswap', 'venus', 'yearn' + ] + kind: str + Kind/type of vault - one from list: ['lp','single','noimploss','stable'] + limit: int + Number of records to display + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data descending + link: bool + Flag to show links + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/disc/categories_keys/_index.md b/website/content/SDK/crypto/disc/categories_keys/_index.md deleted file mode 100644 index ce34151dc02..00000000000 --- a/website/content/SDK/crypto/disc/categories_keys/_index.md +++ /dev/null @@ -1,4 +0,0 @@ -## Get underlying data -### crypto.disc.categories_keys() -> List[str] - - diff --git a/website/content/SDK/crypto/disc/categories_keys/_index.rst b/website/content/SDK/crypto/disc/categories_keys/_index.rst new file mode 100644 index 00000000000..c470ed52155 --- /dev/null +++ b/website/content/SDK/crypto/disc/categories_keys/_index.rst @@ -0,0 +1,12 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ diff --git a/website/content/SDK/crypto/disc/cmctop/_index.md b/website/content/SDK/crypto/disc/cmctop/_index.md deleted file mode 100644 index 6101e8d37ee..00000000000 --- a/website/content/SDK/crypto/disc/cmctop/_index.md +++ /dev/null @@ -1,40 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.disc.cmctop(sortby: str = 'CMC_Rank', ascend: bool = True) -> pandas.core.frame.DataFrame - -Shows top n coins. [Source: CoinMarketCap] - - Parameters - ---------- - sortby: str - Key to sort data. The table can be sorted by every of its columns. Refer to - Coin Market Cap:s API documentation, see: - https://coinmarketcap.com/api/documentation/v1/#operation/getV1CryptocurrencyListingsLatest - ascend: bool - Whether to sort ascending or descending - - Returns - ------- - pd.DataFrame - Top coin on CoinMarketCap - - -## Getting charts -### crypto.disc.cmctop(limit: int = 15, sortby: str = 'CMC_Rank', ascend: bool = True, export: str = '', chart=True) -> None - -Shows top n coins. [Source: CoinMarketCap] - - Parameters - ---------- - limit: int - Number of records to display - sortby: str - Key to sort data. The table can be sorted by every of its columns. Refer to - Coin Market Cap:s API documentation, see: - https://coinmarketcap.com/api/documentation/v1/#operation/getV1CryptocurrencyListingsLatest - ascend: bool - Flag to sort data ascending - export : str - Export dataframe data to csv,json,xlsx file - diff --git a/website/content/SDK/crypto/disc/cmctop/_index.rst b/website/content/SDK/crypto/disc/cmctop/_index.rst new file mode 100644 index 00000000000..8f08329be0e --- /dev/null +++ b/website/content/SDK/crypto/disc/cmctop/_index.rst @@ -0,0 +1,84 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.disc.cmctop( + sortby: str = 'CMC_Rank', + ascend: bool = True, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Shows top n coins. [Source: CoinMarketCap] +

+ +* **Parameters** + + sortby: str + Key to sort data. The table can be sorted by every of its columns. Refer to + Coin Market Cap:s API documentation, see: + https://coinmarketcap.com/api/documentation/v1/#operation/getV1CryptocurrencyListingsLatest + ascend: bool + Whether to sort ascending or descending + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Top coin on CoinMarketCap + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.disc.cmctop( + limit: int = 15, + sortby: str = 'CMC_Rank', + ascend: bool = True, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Shows top n coins. [Source: CoinMarketCap] +

+ +* **Parameters** + + limit: int + Number of records to display + sortby: str + Key to sort data. The table can be sorted by every of its columns. Refer to + Coin Market Cap:s API documentation, see: + https://coinmarketcap.com/api/documentation/v1/#operation/getV1CryptocurrencyListingsLatest + ascend: bool + Flag to sort data ascending + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/disc/coin_list/_index.md b/website/content/SDK/crypto/disc/coin_list/_index.md deleted file mode 100644 index 0dd055b00bb..00000000000 --- a/website/content/SDK/crypto/disc/coin_list/_index.md +++ /dev/null @@ -1,10 +0,0 @@ -## Get underlying data -### crypto.disc.coin_list() -> pandas.core.frame.DataFrame - -Get list of coins available on CoinGecko [Source: CoinGecko] - - Returns - ------- - pandas.DataFrame - Coins available on CoinGecko - Columns: id, symbol, name diff --git a/website/content/SDK/crypto/disc/coin_list/_index.rst b/website/content/SDK/crypto/disc/coin_list/_index.rst new file mode 100644 index 00000000000..86d07128f2c --- /dev/null +++ b/website/content/SDK/crypto/disc/coin_list/_index.rst @@ -0,0 +1,27 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.disc.coin_list() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get list of coins available on CoinGecko [Source: CoinGecko] +

+ +* **Returns** + + pandas.DataFrame + Coins available on CoinGecko + Columns: id, symbol, name diff --git a/website/content/SDK/crypto/disc/coins/_index.md b/website/content/SDK/crypto/disc/coins/_index.md deleted file mode 100644 index 94284113f5a..00000000000 --- a/website/content/SDK/crypto/disc/coins/_index.md +++ /dev/null @@ -1,40 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.disc.coins(limit: int = 250, category: str = '', sortby: str = 'Symbol', ascend: bool = False) -> pandas.core.frame.DataFrame - -Get N coins from CoinGecko [Source: CoinGecko] - - Parameters - ---------- - limit: int - Number of top coins to grab from CoinGecko - category: str - Category of the coins we want to retrieve - sortby: str - Key to sort data - ascend: bool - Sort data in ascending order - - Returns - ------- - pandas.DataFrame - N coins - -## Getting charts -### crypto.disc.coins(category: str, limit: int = 250, sortby: str = 'Symbol', export: str = '', ascend: bool = False, chart=True) -> None - -Display top coins [Source: CoinGecko] - - Parameters - ---------- - category: str - If no category is passed it will search for all coins. (E.g., smart-contract-platform) - limit: int - Number of records to display - sortby: str - Key to sort data - export : str - Export dataframe data to csv,json,xlsx file - ascend: bool - Sort data in ascending order diff --git a/website/content/SDK/crypto/disc/coins/_index.rst b/website/content/SDK/crypto/disc/coins/_index.rst new file mode 100644 index 00000000000..5a582c17b5c --- /dev/null +++ b/website/content/SDK/crypto/disc/coins/_index.rst @@ -0,0 +1,89 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.disc.coins( + limit: int = 250, + category: str = '', + sortby: str = 'Symbol', + ascend: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get N coins from CoinGecko [Source: CoinGecko] +

+ +* **Parameters** + + limit: int + Number of top coins to grab from CoinGecko + category: str + Category of the coins we want to retrieve + sortby: str + Key to sort data + ascend: bool + Sort data in ascending order + chart: *bool* + Flag to display chart + + +* **Returns** + + pandas.DataFrame + N coins + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.disc.coins( + category: str, + limit: int = 250, + sortby: str = 'Symbol', + export: str = '', + ascend: bool = False, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display top coins [Source: CoinGecko] +

+ +* **Parameters** + + category: str + If no category is passed it will search for all coins. (E.g., smart-contract-platform) + limit: int + Number of records to display + sortby: str + Key to sort data + export : str + Export dataframe data to csv,json,xlsx file + ascend: bool + Sort data in ascending order + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/disc/coins_for_given_exchange/_index.md b/website/content/SDK/crypto/disc/coins_for_given_exchange/_index.md deleted file mode 100644 index 9522bde9120..00000000000 --- a/website/content/SDK/crypto/disc/coins_for_given_exchange/_index.md +++ /dev/null @@ -1,16 +0,0 @@ -## Get underlying data -### crypto.disc.coins_for_given_exchange(exchange_id: str = 'binance', page: int = 1) -> dict - -Helper method to get all coins available on binance exchange [Source: CoinGecko] - - Parameters - ---------- - exchange_id: str - id of exchange - page: int - number of page. One page contains 100 records - - Returns - ------- - dict - dictionary with all trading pairs on binance diff --git a/website/content/SDK/crypto/disc/coins_for_given_exchange/_index.rst b/website/content/SDK/crypto/disc/coins_for_given_exchange/_index.rst new file mode 100644 index 00000000000..bc60c7d3618 --- /dev/null +++ b/website/content/SDK/crypto/disc/coins_for_given_exchange/_index.rst @@ -0,0 +1,37 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.disc.coins_for_given_exchange( + exchange_id: str = 'binance', + page: int = 1, + chart: bool = False, +) -> dict +{{< /highlight >}} + +.. raw:: html + +

+ Helper method to get all coins available on binance exchange [Source: CoinGecko] +

+ +* **Parameters** + + exchange_id: str + id of exchange + page: int + number of page. One page contains 100 records + +* **Returns** + + dict + dictionary with all trading pairs on binance diff --git a/website/content/SDK/crypto/disc/cpsearch/_index.md b/website/content/SDK/crypto/disc/cpsearch/_index.rst similarity index 53% rename from website/content/SDK/crypto/disc/cpsearch/_index.md rename to website/content/SDK/crypto/disc/cpsearch/_index.rst index 9d098b17a3a..1265a73a426 100644 --- a/website/content/SDK/crypto/disc/cpsearch/_index.md +++ b/website/content/SDK/crypto/disc/cpsearch/_index.rst @@ -1,12 +1,36 @@ -To obtain charts, make sure to add `chart=True` as the last parameter +.. role:: python(code) + :language: python + :class: highlight -## Get underlying data -### crypto.disc.cpsearch(query: str, category: Optional[Any] = None, modifier: Optional[Any] = None, sortby: str = 'id', ascend: bool = True) -> pandas.core.frame.DataFrame +| -Search CoinPaprika. [Source: CoinPaprika] +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.disc.cpsearch( + query: str, + category: Optional[Any] = None, + modifier: Optional[Any] = None, + sortby: str = 'id', + ascend: bool = True, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Search CoinPaprika. [Source: CoinPaprika] +

+ +* **Parameters** - Parameters - ---------- query: str phrase for search category: Optional[Any] @@ -21,20 +45,44 @@ Search CoinPaprika. [Source: CoinPaprika] API documentation (see https://api.coinpaprika.com/docs#tag/Tools/paths/~1search/get) ascend: bool Flag to sort data descending + chart: *bool* + Flag to display chart + + +* **Returns** - Returns - ------- pandas.DataFrame Search Results Columns: Metric, Value -## Getting charts -### crypto.disc.cpsearch(query: str, category: str = 'all', limit: int = 10, sortby: str = 'id', ascend: bool = True, export: str = '', chart=True) -> None +| -Search over CoinPaprika. [Source: CoinPaprika] +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.disc.cpsearch( + query: str, + category: str = 'all', + limit: int = 10, + sortby: str = 'id', + ascend: bool = True, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Search over CoinPaprika. [Source: CoinPaprika] +

+ +* **Parameters** - Parameters - ---------- query: str Search query category: str @@ -48,3 +96,6 @@ Search over CoinPaprika. [Source: CoinPaprika] Flag to sort data descending export : str Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/disc/gainers/_index.md b/website/content/SDK/crypto/disc/gainers/_index.md deleted file mode 100644 index f1786bb1ce8..00000000000 --- a/website/content/SDK/crypto/disc/gainers/_index.md +++ /dev/null @@ -1,39 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.disc.gainers(interval: str = '1h', limit: int = 50, sortby: str = 'market_cap_rank') -> pandas.core.frame.DataFrame - -Shows Largest Gainers - coins which gain the most in given period. [Source: CoinGecko] - - Parameters - ---------- - interval: str - Time interval by which data is displayed. One from [1h, 24h, 7d, 14d, 30d, 60d, 1y] - limit: int - Number of records to display - sortby: str - Key to sort data. The table can be sorted by every of its columns. Refer to - API documentation (see /coins/markets in https://www.coingecko.com/en/api/documentation) - - Returns - ------- - pd.DataFrame - Top Gainers - coins which gain most in price in given period of time. - Columns: Symbol, Name, Volume, Price, %Change_{interval}, Url - -## Getting charts -### crypto.disc.gainers(interval: str = '1h', limit: int = 20, sortby: str = 'market_cap_rank', export: str = '', chart=True) -> None - -Shows Largest Gainers - coins which gain the most in given period. [Source: CoinGecko] - - Parameters - ---------- - interval: str - Time period by which data is displayed. One from [1h, 24h, 7d, 14d, 30d, 60d, 1y] - limit: int - Number of records to display - sortby: str - Key to sort data. The table can be sorted by every of its columns. Refer to - API documentation (see /coins/markets in https://www.coingecko.com/en/api/documentation) - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/disc/gainers/_index.rst b/website/content/SDK/crypto/disc/gainers/_index.rst new file mode 100644 index 00000000000..03bd1072983 --- /dev/null +++ b/website/content/SDK/crypto/disc/gainers/_index.rst @@ -0,0 +1,86 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.disc.gainers( + interval: str = '1h', + limit: int = 50, + sortby: str = 'market_cap_rank', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Shows Largest Gainers - coins which gain the most in given period. [Source: CoinGecko] +

+ +* **Parameters** + + interval: str + Time interval by which data is displayed. One from [1h, 24h, 7d, 14d, 30d, 60d, 1y] + limit: int + Number of records to display + sortby: str + Key to sort data. The table can be sorted by every of its columns. Refer to + API documentation (see /coins/markets in https://www.coingecko.com/en/api/documentation) + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Top Gainers - coins which gain most in price in given period of time. + Columns: Symbol, Name, Volume, Price, %Change_{interval}, Url + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.disc.gainers( + interval: str = '1h', + limit: int = 20, + sortby: str = 'market_cap_rank', + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Shows Largest Gainers - coins which gain the most in given period. [Source: CoinGecko] +

+ +* **Parameters** + + interval: str + Time period by which data is displayed. One from [1h, 24h, 7d, 14d, 30d, 60d, 1y] + limit: int + Number of records to display + sortby: str + Key to sort data. The table can be sorted by every of its columns. Refer to + API documentation (see /coins/markets in https://www.coingecko.com/en/api/documentation) + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/disc/gainers_or_losers/_index.md b/website/content/SDK/crypto/disc/gainers_or_losers/_index.rst similarity index 55% rename from website/content/SDK/crypto/disc/gainers_or_losers/_index.md rename to website/content/SDK/crypto/disc/gainers_or_losers/_index.rst index 46660fb300d..dc07f6174ce 100644 --- a/website/content/SDK/crypto/disc/gainers_or_losers/_index.md +++ b/website/content/SDK/crypto/disc/gainers_or_losers/_index.rst @@ -1,11 +1,34 @@ -## Get underlying data -### crypto.disc.gainers_or_losers(limit: int = 20, interval: str = '1h', typ: str = 'gainers', sortby: str = 'market_cap') -> pandas.core.frame.DataFrame +.. role:: python(code) + :language: python + :class: highlight -Returns data about top gainers - coins which gain the most in given period and +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.disc.gainers_or_losers( + limit: int = 20, + interval: str = '1h', + typ: str = 'gainers', + sortby: str = 'market_cap', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Returns data about top gainers - coins which gain the most in given period and top losers - coins that lost the most in given period of time. [Source: CoinGecko] +

+ +* **Parameters** - Parameters - ---------- limit: int Num of coins to get sortby: str @@ -15,8 +38,9 @@ Returns data about top gainers - coins which gain the most in given period and One from {14d,1h,1y,200d,24h,30d,7d} typ: str Either "gainers" or "losers" - Returns - ------- + +* **Returns** + pandas.DataFrame Top Gainers / Top Losers - coins which gain/lost most in price in given period of time. Columns: Symbol, Name, Volume, Price, %Change_{interval}, Url diff --git a/website/content/SDK/crypto/disc/losers/_index.md b/website/content/SDK/crypto/disc/losers/_index.md deleted file mode 100644 index f1d031683e4..00000000000 --- a/website/content/SDK/crypto/disc/losers/_index.md +++ /dev/null @@ -1,39 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.disc.losers(interval: str = '1h', limit: int = 50, sortby: str = 'market_cap_rank') -> pandas.core.frame.DataFrame - -Shows Largest Losers - coins which lose the most in given period. [Source: CoinGecko] - - Parameters - ---------- - interval: str - Time interval by which data is displayed. One from [1h, 24h, 7d, 14d, 30d, 60d, 1y] - limit: int - Number of records to display - sortby: str - Key to sort data. The table can be sorted by every of its columns. Refer to - API documentation (see /coins/markets in https://www.coingecko.com/en/api/documentation) - - Returns - ------- - pd.DataFrame - Top Losers - coins which lost most in price in given period of time. - Columns: Symbol, Name, Volume, Price, %Change_{interval}, Url - -## Getting charts -### crypto.disc.losers(interval: str = '1h', limit: int = 20, export: str = '', sortby: str = 'Market Cap Rank', chart=True) -> None - -Shows Largest Losers - coins which lost the most in given period of time. [Source: CoinGecko] - - Parameters - ---------- - interval: str - Time period by which data is displayed. One from [1h, 24h, 7d, 14d, 30d, 60d, 1y] - limit: int - Number of records to display - sortby: str - Key to sort data. The table can be sorted by every of its columns. Refer to - API documentation (see /coins/markets in https://www.coingecko.com/en/api/documentation) - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/disc/losers/_index.rst b/website/content/SDK/crypto/disc/losers/_index.rst new file mode 100644 index 00000000000..febef6b417d --- /dev/null +++ b/website/content/SDK/crypto/disc/losers/_index.rst @@ -0,0 +1,86 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.disc.losers( + interval: str = '1h', + limit: int = 50, + sortby: str = 'market_cap_rank', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Shows Largest Losers - coins which lose the most in given period. [Source: CoinGecko] +

+ +* **Parameters** + + interval: str + Time interval by which data is displayed. One from [1h, 24h, 7d, 14d, 30d, 60d, 1y] + limit: int + Number of records to display + sortby: str + Key to sort data. The table can be sorted by every of its columns. Refer to + API documentation (see /coins/markets in https://www.coingecko.com/en/api/documentation) + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Top Losers - coins which lost most in price in given period of time. + Columns: Symbol, Name, Volume, Price, %Change_{interval}, Url + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.disc.losers( + interval: str = '1h', + limit: int = 20, + export: str = '', + sortby: str = 'Market Cap Rank', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Shows Largest Losers - coins which lost the most in given period of time. [Source: CoinGecko] +

+ +* **Parameters** + + interval: str + Time period by which data is displayed. One from [1h, 24h, 7d, 14d, 30d, 60d, 1y] + limit: int + Number of records to display + sortby: str + Key to sort data. The table can be sorted by every of its columns. Refer to + API documentation (see /coins/markets in https://www.coingecko.com/en/api/documentation) + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/disc/top_dapps/_index.md b/website/content/SDK/crypto/disc/top_dapps/_index.md deleted file mode 100644 index d0a3e07607d..00000000000 --- a/website/content/SDK/crypto/disc/top_dapps/_index.md +++ /dev/null @@ -1,31 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.disc.top_dapps(sortby: str = '', limit: int = 10) -> pandas.core.frame.DataFrame - -Get top decentralized applications by daily volume and users [Source: https://dappradar.com/] - - Parameters - ---------- - sortby: str - Key by which to sort data - - Returns - ------- - pd.DataFrame - Top decentralized exchanges. - Columns: Name, Category, Protocols, Daily Users, Daily Volume [$] - -## Getting charts -### crypto.disc.top_dapps(limit: int = 10, export: str = '', sortby: str = '', chart=True) -> None - -Displays top decentralized exchanges [Source: https://dappradar.com/] - - Parameters - ---------- - limit: int - Number of records to display - sortby: str - Key by which to sort data - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/disc/top_dapps/_index.rst b/website/content/SDK/crypto/disc/top_dapps/_index.rst new file mode 100644 index 00000000000..99bc933aead --- /dev/null +++ b/website/content/SDK/crypto/disc/top_dapps/_index.rst @@ -0,0 +1,76 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.disc.top_dapps( + sortby: str = '', + limit: int = 10, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get top decentralized applications by daily volume and users [Source: https://dappradar.com/] +

+ +* **Parameters** + + sortby: str + Key by which to sort data + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Top decentralized exchanges. + Columns: Name, Category, Protocols, Daily Users, Daily Volume [$] + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.disc.top_dapps( + limit: int = 10, + export: str = '', + sortby: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Displays top decentralized exchanges [Source: https://dappradar.com/] +

+ +* **Parameters** + + limit: int + Number of records to display + sortby: str + Key by which to sort data + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/disc/top_dexes/_index.md b/website/content/SDK/crypto/disc/top_dexes/_index.md deleted file mode 100644 index abbc8af5ced..00000000000 --- a/website/content/SDK/crypto/disc/top_dexes/_index.md +++ /dev/null @@ -1,30 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.disc.top_dexes(sortby: str = '', limit: int = 10) -> pandas.core.frame.DataFrame - -Get top dexes by daily volume and users [Source: https://dappradar.com/] - - Parameters - ---------- - sortby: str - Key by which to sort data - - Returns - ------- - pd.DataFrame - Top decentralized exchanges. Columns: Name, Daily Users, Daily Volume [$] - -## Getting charts -### crypto.disc.top_dexes(limit: int = 10, export: str = '', sortby: str = '', chart=True) -> None - -Displays top decentralized exchanges [Source: https://dappradar.com/] - - Parameters - ---------- - limit: int - Number of records to display - sortby: str - Key by which to sort data - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/disc/top_dexes/_index.rst b/website/content/SDK/crypto/disc/top_dexes/_index.rst new file mode 100644 index 00000000000..88aab660437 --- /dev/null +++ b/website/content/SDK/crypto/disc/top_dexes/_index.rst @@ -0,0 +1,75 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.disc.top_dexes( + sortby: str = '', + limit: int = 10, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get top dexes by daily volume and users [Source: https://dappradar.com/] +

+ +* **Parameters** + + sortby: str + Key by which to sort data + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Top decentralized exchanges. Columns: Name, Daily Users, Daily Volume [$] + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.disc.top_dexes( + limit: int = 10, + export: str = '', + sortby: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Displays top decentralized exchanges [Source: https://dappradar.com/] +

+ +* **Parameters** + + limit: int + Number of records to display + sortby: str + Key by which to sort data + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/disc/top_games/_index.md b/website/content/SDK/crypto/disc/top_games/_index.md deleted file mode 100644 index 057c80e3736..00000000000 --- a/website/content/SDK/crypto/disc/top_games/_index.md +++ /dev/null @@ -1,31 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.disc.top_games(sortby: str = '', limit: int = 10) -> pandas.core.frame.DataFrame - -Get top blockchain games by daily volume and users [Source: https://dappradar.com/] - - Parameters - ---------- - limit: int - Number of records to display - sortby: str - Key by which to sort data - Returns - ------- - pd.DataFrame - Top blockchain games. Columns: Name, Daily Users, Daily Volume [$] - -## Getting charts -### crypto.disc.top_games(limit: int = 10, export: str = '', sortby: str = '', chart=True) -> None - -Displays top blockchain games [Source: https://dappradar.com/] - - Parameters - ---------- - limit: int - Number of records to display - sortby: str - Key by which to sort data - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/disc/top_games/_index.rst b/website/content/SDK/crypto/disc/top_games/_index.rst new file mode 100644 index 00000000000..f6264837fa9 --- /dev/null +++ b/website/content/SDK/crypto/disc/top_games/_index.rst @@ -0,0 +1,77 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.disc.top_games( + sortby: str = '', + limit: int = 10, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get top blockchain games by daily volume and users [Source: https://dappradar.com/] +

+ +* **Parameters** + + limit: int + Number of records to display + sortby: str + Key by which to sort data + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Top blockchain games. Columns: Name, Daily Users, Daily Volume [$] + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.disc.top_games( + limit: int = 10, + export: str = '', + sortby: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Displays top blockchain games [Source: https://dappradar.com/] +

+ +* **Parameters** + + limit: int + Number of records to display + sortby: str + Key by which to sort data + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/disc/top_nfts/_index.md b/website/content/SDK/crypto/disc/top_nfts/_index.md deleted file mode 100644 index b992615116f..00000000000 --- a/website/content/SDK/crypto/disc/top_nfts/_index.md +++ /dev/null @@ -1,30 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.disc.top_nfts(sortby: str = '', limit: int = 10) -> pandas.core.frame.DataFrame - -Get top nft collections [Source: https://dappradar.com/] - - Parameters - ---------- - sortby: str - Key by which to sort data - - Returns - ------- - pd.DataFrame - NFTs Columns: Name, Protocols, Floor Price [$], Avg Price [$], Market Cap [$], Volume [$] - -## Getting charts -### crypto.disc.top_nfts(limit: int = 10, sortby: str = '', export: str = '', chart=True) -> None - -Displays top nft collections [Source: https://dappradar.com/] - - Parameters - ---------- - limit: int - Number of records to display - sortby: str - Key by which to sort data - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/disc/top_nfts/_index.rst b/website/content/SDK/crypto/disc/top_nfts/_index.rst new file mode 100644 index 00000000000..6114e6718ea --- /dev/null +++ b/website/content/SDK/crypto/disc/top_nfts/_index.rst @@ -0,0 +1,75 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.disc.top_nfts( + sortby: str = '', + limit: int = 10, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get top nft collections [Source: https://dappradar.com/] +

+ +* **Parameters** + + sortby: str + Key by which to sort data + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + NFTs Columns: Name, Protocols, Floor Price [$], Avg Price [$], Market Cap [$], Volume [$] + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.disc.top_nfts( + limit: int = 10, + sortby: str = '', + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Displays top nft collections [Source: https://dappradar.com/] +

+ +* **Parameters** + + limit: int + Number of records to display + sortby: str + Key by which to sort data + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/disc/trending/_index.md b/website/content/SDK/crypto/disc/trending/_index.md deleted file mode 100644 index c0fc96a7414..00000000000 --- a/website/content/SDK/crypto/disc/trending/_index.md +++ /dev/null @@ -1,24 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.disc.trending() -> pandas.core.frame.DataFrame - -Returns trending coins [Source: CoinGecko] - - Parameters - ---------- - - Returns - ------- - pandas.DataFrame: - Trending Coins - -## Getting charts -### crypto.disc.trending(export: str = '', chart=True) -> None - -Display trending coins [Source: CoinGecko] - - Parameters - ---------- - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/disc/trending/_index.rst b/website/content/SDK/crypto/disc/trending/_index.rst new file mode 100644 index 00000000000..bc921e3a4fb --- /dev/null +++ b/website/content/SDK/crypto/disc/trending/_index.rst @@ -0,0 +1,67 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.disc.trending() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Returns trending coins [Source: CoinGecko] + + Parameters + ---------- +

+ +* **Parameters** + + + chart: *bool* + Flag to display chart + + +* **Returns** + + pandas.DataFrame: + Trending Coins + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.disc.trending( + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display trending coins [Source: CoinGecko] +

+ +* **Parameters** + + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/find/_index.md b/website/content/SDK/crypto/find/_index.rst similarity index 67% rename from website/content/SDK/crypto/find/_index.md rename to website/content/SDK/crypto/find/_index.rst index 95eddac0c65..252d53cdd13 100644 --- a/website/content/SDK/crypto/find/_index.md +++ b/website/content/SDK/crypto/find/_index.rst @@ -1,7 +1,30 @@ -## Get underlying data -### crypto.find(query: 'str', source: 'str' = 'CoinGecko', key: 'str' = 'symbol', limit: 'int' = 10, export: 'str' = '') -> 'None' +.. role:: python(code) + :language: python + :class: highlight -Find similar coin by coin name,symbol or id. +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.find( + query: 'str', + source: 'str' = 'CoinGecko', + key: 'str' = 'symbol', + limit: 'int' = 10, + export: 'str' = '', + chart: bool = False, +) -> 'None' +{{< /highlight >}} + +.. raw:: html + +

+ Find similar coin by coin name,symbol or id. If you don't know exact name or id of the Coin at CoinGecko CoinPaprika, Binance or Coinbase you use this command to display coins with similar name, symbol or id to your search query. @@ -11,9 +34,10 @@ Find similar coin by coin name,symbol or id. -c, --coin stands for coin - you provide here your search query -k, --key it's a searching key. You can search by symbol, id or name of coin -t, --top it displays top N number of records. +

+ +* **Parameters** - Parameters - ---------- query: str Cryptocurrency source: str diff --git a/website/content/SDK/crypto/load/_index.md b/website/content/SDK/crypto/load/_index.md deleted file mode 100644 index d46276553db..00000000000 --- a/website/content/SDK/crypto/load/_index.md +++ /dev/null @@ -1,28 +0,0 @@ -## Get underlying data -### crypto.load(symbol: 'str', start_date: 'datetime' = datetime.datetime(2019, 10, 30, 17, 23, 0, 264750), interval: 'str' = '1440', exchange: 'str' = 'binance', vs_currency: 'str' = 'usdt', end_date: 'datetime' = datetime.datetime(2022, 11, 3, 17, 23, 0, 264752), source: 'str' = 'CCXT') -> 'pd.DataFrame' - -Load crypto currency to get data for - - Parameters - ---------- - symbol: str - Coin to get - start_date: datetime - The datetime to start at - interval: str - The interval between data points in minutes. - Choose from: 1, 15, 30, 60, 240, 1440, 10080, 43200 - exchange: str: - The exchange to get data from. - vs_currency: str - Quote Currency (Defaults to usdt) - end_date: datetime - The datetime to end at - source: str - The source of the data - Choose from: CCXT, CoinGecko, YahooFinance - - Returns - ------- - pd.DataFrame - Dataframe consisting of price and volume data diff --git a/website/content/SDK/crypto/load/_index.rst b/website/content/SDK/crypto/load/_index.rst new file mode 100644 index 00000000000..6640f1edfcb --- /dev/null +++ b/website/content/SDK/crypto/load/_index.rst @@ -0,0 +1,56 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.load( + symbol: 'str', + start_date: 'datetime' = datetime.datetime( + 2019, 11, 4, 12, 2, 54, 720992, chart: bool = False, +), interval: 'str' = '1440', + exchange: 'str' = 'binance', + vs_currency: 'str' = 'usdt', + end_date: 'datetime' = datetime.datetime( + 2022, 11, 8, 12, 2, 54, 720993, chart: bool = False, +), source: 'str' = 'CCXT', + chart: bool = False, +) -> 'pd.DataFrame' +{{< /highlight >}} + +.. raw:: html + +

+ Load crypto currency to get data for +

+ +* **Parameters** + + symbol: str + Coin to get + start_date: datetime + The datetime to start at + interval: str + The interval between data points in minutes. + Choose from: 1, 15, 30, 60, 240, 1440, 10080, 43200 + exchange: str: + The exchange to get data from. + vs_currency: str + Quote Currency (Defaults to usdt) + end_date: datetime + The datetime to end at + source: str + The source of the data + Choose from: CCXT, CoinGecko, YahooFinance + +* **Returns** + + pd.DataFrame + Dataframe consisting of price and volume data diff --git a/website/content/SDK/crypto/nft/collections/_index.md b/website/content/SDK/crypto/nft/collections/_index.md deleted file mode 100644 index 60ca1dcd2b2..00000000000 --- a/website/content/SDK/crypto/nft/collections/_index.md +++ /dev/null @@ -1,28 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.nft.collections() -> pandas.core.frame.DataFrame - -Get nft collections [Source: https://nftpricefloor.com/] - - Parameters - ------- - - Returns - ------- - pd.DataFrame - nft collections - -## Getting charts -### crypto.nft.collections(show_fp: bool = False, show_sales: bool = False, limit: int = 5, export: str = '', chart=True) - -Display NFT collections. [Source: https://nftpricefloor.com/] - - Parameters - ---------- - show_fp : bool - Show NFT Price Floor for top collections - limit: int - Number of NFT collections to display - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/nft/collections/_index.rst b/website/content/SDK/crypto/nft/collections/_index.rst new file mode 100644 index 00000000000..aa1a0a717a1 --- /dev/null +++ b/website/content/SDK/crypto/nft/collections/_index.rst @@ -0,0 +1,74 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.nft.collections() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get nft collections [Source: https://nftpricefloor.com/] + + Parameters + ---------- +

+ +* **Parameters** + + + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + nft collections + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.nft.collections( + show_fp: bool = False, + show_sales: bool = False, + limit: int = 5, + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display NFT collections. [Source: https://nftpricefloor.com/] +

+ +* **Parameters** + + show_fp : bool + Show NFT Price Floor for top collections + limit: int + Number of NFT collections to display + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/nft/fp/_index.md b/website/content/SDK/crypto/nft/fp/_index.md deleted file mode 100644 index e582a9a216c..00000000000 --- a/website/content/SDK/crypto/nft/fp/_index.md +++ /dev/null @@ -1,34 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.nft.fp(slug) -> pandas.core.frame.DataFrame - -Get nft collections [Source: https://nftpricefloor.com/] - - Parameters - ------- - slug: str - nft collection slug - - Returns - ------- - pd.DataFrame - nft collections - -## Getting charts -### crypto.nft.fp(slug: str, limit: int = 10, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, raw: bool = False, chart=True) - -Display NFT collection floor price over time. [Source: https://nftpricefloor.com/] - - Parameters - ---------- - slug: str - NFT collection slug - raw: bool - Flag to display raw data - limit: int - Number of raw data to show - export: str - Format to export data - external_axes : Optional[List[plt.Axes]], optional - External axes (2 axes are expected in the list), by default None diff --git a/website/content/SDK/crypto/nft/fp/_index.rst b/website/content/SDK/crypto/nft/fp/_index.rst new file mode 100644 index 00000000000..1051e4145a6 --- /dev/null +++ b/website/content/SDK/crypto/nft/fp/_index.rst @@ -0,0 +1,79 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.nft.fp( + slug, chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get nft collections [Source: https://nftpricefloor.com/] +

+ +* **Parameters** + + slug: str + nft collection slug + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + nft collections + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.nft.fp( + slug: str, + limit: int = 10, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + raw: bool = False, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display NFT collection floor price over time. [Source: https://nftpricefloor.com/] +

+ +* **Parameters** + + slug: str + NFT collection slug + raw: bool + Flag to display raw data + limit: int + Number of raw data to show + export: str + Format to export data + external_axes : Optional[List[plt.Axes]], optional + External axes (2 axes are expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/nft/stats/_index.md b/website/content/SDK/crypto/nft/stats/_index.md deleted file mode 100644 index 7e3a64103ea..00000000000 --- a/website/content/SDK/crypto/nft/stats/_index.md +++ /dev/null @@ -1,29 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.nft.stats(slug: str) -> pandas.core.frame.DataFrame - -Get stats of a nft collection [Source: opensea.io] - - Parameters - ------- - slug : str - Opensea collection slug. If the name of the collection is Mutant Ape Yacht Club the slug is mutant-ape-yacht-club - - Returns - ------- - pd.DataFrame - collection stats - -## Getting charts -### crypto.nft.stats(slug: str, export: str, chart=True) - -Display collection stats. [Source: opensea.io] - - Parameters - ---------- - slug: str - Opensea collection slug. - If the name of the collection is Mutant Ape Yacht Club the slug is mutant-ape-yacht-club - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/nft/stats/_index.rst b/website/content/SDK/crypto/nft/stats/_index.rst new file mode 100644 index 00000000000..2be3c3f555a --- /dev/null +++ b/website/content/SDK/crypto/nft/stats/_index.rst @@ -0,0 +1,72 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.nft.stats( + slug: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get stats of a nft collection [Source: opensea.io] +

+ +* **Parameters** + + slug : str + Opensea collection slug. If the name of the collection is Mutant Ape Yacht Club the slug is mutant-ape-yacht-club + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + collection stats + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.nft.stats( + slug: str, + export: str, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display collection stats. [Source: opensea.io] +

+ +* **Parameters** + + slug: str + Opensea collection slug. + If the name of the collection is Mutant Ape Yacht Club the slug is mutant-ape-yacht-club + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/onchain/baas/_index.md b/website/content/SDK/crypto/onchain/baas/_index.md deleted file mode 100644 index 7ce2f1eae06..00000000000 --- a/website/content/SDK/crypto/onchain/baas/_index.md +++ /dev/null @@ -1,51 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.onchain.baas(symbol: str = 'WETH', to_symbol: str = 'USDT', limit: int = 30, sortby: str = 'tradeAmount', ascend: bool = True) -> pandas.core.frame.DataFrame - -Get an average bid and ask prices, average spread for given crypto pair for chosen time period. - [Source: https://graphql.bitquery.io/] - - Parameters - ---------- - limit: int - Last n days to query data - symbol: str - ERC20 token symbol - to_symbol: str - Quoted currency. - sortby: str - Key by which to sort data - ascend: bool - Flag to sort data ascending - - Returns - ------- - pd.DataFrame - Average bid and ask prices, spread for given crypto pair for chosen time period - -## Getting charts -### crypto.onchain.baas(symbol='ETH', to_symbol='USDC', days: int = 10, sortby: str = 'date', ascend: bool = True, export: str = '', chart=True) -> None - -Display an average bid and ask prices, average spread for given crypto pair for chosen - time period. [Source: https://graphql.bitquery.io/] - - Parameters - ---------- - days: int - Last n days to query data - symbol: str - ERC20 token symbol - to_symbol: str - Quoted currency. - sortby: str - Key by which to sort data - ascend: bool - Flag to sort data ascending - export : str - Export dataframe data to csv,json,xlsx file - - Returns - ------- - pd.DataFrame - Average bid and ask prices, spread for given crypto pair for chosen time period diff --git a/website/content/SDK/crypto/onchain/baas/_index.rst b/website/content/SDK/crypto/onchain/baas/_index.rst new file mode 100644 index 00000000000..5604f0174f9 --- /dev/null +++ b/website/content/SDK/crypto/onchain/baas/_index.rst @@ -0,0 +1,100 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.onchain.baas( + symbol: str = 'WETH', + to_symbol: str = 'USDT', + limit: int = 30, + sortby: str = 'tradeAmount', + ascend: bool = True, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get an average bid and ask prices, average spread for given crypto pair for chosen time period. + [Source: https://graphql.bitquery.io/] +

+ +* **Parameters** + + limit: int + Last n days to query data + symbol: str + ERC20 token symbol + to_symbol: str + Quoted currency. + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data ascending + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Average bid and ask prices, spread for given crypto pair for chosen time period + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.onchain.baas( + symbol='ETH', to_symbol='USDC', days: int = 10, + sortby: str = 'date', + ascend: bool = True, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display an average bid and ask prices, average spread for given crypto pair for chosen + time period. [Source: https://graphql.bitquery.io/] +

+ +* **Parameters** + + days: int + Last n days to query data + symbol: str + ERC20 token symbol + to_symbol: str + Quoted currency. + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data ascending + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Average bid and ask prices, spread for given crypto pair for chosen time period diff --git a/website/content/SDK/crypto/onchain/balance/_index.md b/website/content/SDK/crypto/onchain/balance/_index.md deleted file mode 100644 index b565fd9e200..00000000000 --- a/website/content/SDK/crypto/onchain/balance/_index.md +++ /dev/null @@ -1,40 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.onchain.balance(address: str, sortby: str = 'index', ascend: bool = False) -> pandas.core.frame.DataFrame - -Get info about tokens on you ethereum blockchain balance. Eth balance, balance of all tokens which - have name and symbol. [Source: Ethplorer] - - Parameters - ---------- - address: str - Blockchain balance e.g. 0x3cD751E6b0078Be393132286c442345e5DC49699 - sortby: str - Key to sort by. - ascend: str - Sort in descending order. - - Returns - ------- - pd.DataFrame: - DataFrame with list of tokens and their balances. - -## Getting charts -### crypto.onchain.balance(address: str, limit: int = 15, sortby: str = 'index', ascend: bool = False, export: str = '', chart=True) -> None - -Display info about tokens for given ethereum blockchain balance e.g. ETH balance, - balance of all tokens with name and symbol. [Source: Ethplorer] - - Parameters - ---------- - address: str - Ethereum balance. - limit: int - Limit of transactions. Maximum 100 - sortby: str - Key to sort by. - ascend: str - Sort in descending order. - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/onchain/balance/_index.rst b/website/content/SDK/crypto/onchain/balance/_index.rst new file mode 100644 index 00000000000..a1966aaeb3b --- /dev/null +++ b/website/content/SDK/crypto/onchain/balance/_index.rst @@ -0,0 +1,88 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.onchain.balance( + address: str, + sortby: str = 'index', + ascend: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get info about tokens on you ethereum blockchain balance. Eth balance, balance of all tokens which + have name and symbol. [Source: Ethplorer] +

+ +* **Parameters** + + address: str + Blockchain balance e.g. 0x3cD751E6b0078Be393132286c442345e5DC49699 + sortby: str + Key to sort by. + ascend: str + Sort in descending order. + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame: + DataFrame with list of tokens and their balances. + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.onchain.balance( + address: str, + limit: int = 15, + sortby: str = 'index', + ascend: bool = False, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display info about tokens for given ethereum blockchain balance e.g. ETH balance, + balance of all tokens with name and symbol. [Source: Ethplorer] +

+ +* **Parameters** + + address: str + Ethereum balance. + limit: int + Limit of transactions. Maximum 100 + sortby: str + Key to sort by. + ascend: str + Sort in descending order. + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/onchain/btc_supply/_index.md b/website/content/SDK/crypto/onchain/btc_supply/_index.md deleted file mode 100644 index dc65ba0539d..00000000000 --- a/website/content/SDK/crypto/onchain/btc_supply/_index.md +++ /dev/null @@ -1,27 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.onchain.btc_supply() -> pandas.core.frame.DataFrame - -Returns BTC circulating supply [Source: https://api.blockchain.info/] - - Returns - ------- - pd.DataFrame - BTC circulating supply - -## Getting charts -### crypto.onchain.btc_supply(start_date: int = 1262322000, end_date: int = 1667510580, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) -> None - -Returns BTC circulating supply [Source: https://api.blockchain.info/] - - Parameters - ---------- - start_date : int - Initial date timestamp (e.g., 1_609_459_200) - until : int - End date timestamp (e.g., 1_641_588_030) - export : str - Export dataframe data to csv,json,xlsx file - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/crypto/onchain/btc_supply/_index.rst b/website/content/SDK/crypto/onchain/btc_supply/_index.rst new file mode 100644 index 00000000000..d06aa0e3b55 --- /dev/null +++ b/website/content/SDK/crypto/onchain/btc_supply/_index.rst @@ -0,0 +1,66 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.onchain.btc_supply() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Returns BTC circulating supply [Source: https://api.blockchain.info/] +

+ +* **Returns** + + pd.DataFrame + BTC circulating supply + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.onchain.btc_supply( + start_date: int = 1262304000, + end_date: int = 1667908975, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Returns BTC circulating supply [Source: https://api.blockchain.info/] +

+ +* **Parameters** + + start_date : int + Initial date timestamp (e.g., 1_609_459_200) + until : int + End date timestamp (e.g., 1_641_588_030) + export : str + Export dataframe data to csv,json,xlsx file + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/onchain/btc_transac/_index.md b/website/content/SDK/crypto/onchain/btc_transac/_index.md deleted file mode 100644 index 15be38d562e..00000000000 --- a/website/content/SDK/crypto/onchain/btc_transac/_index.md +++ /dev/null @@ -1,27 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.onchain.btc_transac() -> pandas.core.frame.DataFrame - -Returns BTC confirmed transactions [Source: https://api.blockchain.info/] - - Returns - ------- - pd.DataFrame - BTC confirmed transactions - -## Getting charts -### crypto.onchain.btc_transac(start_date: int = 1262322000, end_date: int = 1667510580, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) -> None - -Returns BTC confirmed transactions [Source: https://api.blockchain.info/] - - Parameters - ---------- - since : int - Initial date timestamp (e.g., 1_609_459_200) - until : int - End date timestamp (e.g., 1_641_588_030) - export : str - Export dataframe data to csv,json,xlsx file - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/crypto/onchain/btc_transac/_index.rst b/website/content/SDK/crypto/onchain/btc_transac/_index.rst new file mode 100644 index 00000000000..86552efde59 --- /dev/null +++ b/website/content/SDK/crypto/onchain/btc_transac/_index.rst @@ -0,0 +1,66 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.onchain.btc_transac() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Returns BTC confirmed transactions [Source: https://api.blockchain.info/] +

+ +* **Returns** + + pd.DataFrame + BTC confirmed transactions + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.onchain.btc_transac( + start_date: int = 1262304000, + end_date: int = 1667908975, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Returns BTC confirmed transactions [Source: https://api.blockchain.info/] +

+ +* **Parameters** + + since : int + Initial date timestamp (e.g., 1_609_459_200) + until : int + End date timestamp (e.g., 1_641_588_030) + export : str + Export dataframe data to csv,json,xlsx file + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/onchain/dex_trades_monthly/_index.md b/website/content/SDK/crypto/onchain/dex_trades_monthly/_index.md deleted file mode 100644 index df975ef4380..00000000000 --- a/website/content/SDK/crypto/onchain/dex_trades_monthly/_index.md +++ /dev/null @@ -1,20 +0,0 @@ -## Get underlying data -### crypto.onchain.dex_trades_monthly(trade_amount_currency: str = 'USD', limit: int = 90, ascend: bool = True) -> pandas.core.frame.DataFrame - -Get list of trades on Decentralized Exchanges monthly aggregated. - [Source: https://graphql.bitquery.io/] - - Parameters - ---------- - trade_amount_currency: str - Currency of displayed trade amount. Default: USD - limit: int - Last n days to query data. Maximum 365 (bigger numbers can cause timeouts - on server side) - ascend: bool - Flag to sort data ascending - - Returns - ------- - pd.DataFrame - Trades on Decentralized Exchanges monthly aggregated diff --git a/website/content/SDK/crypto/onchain/dex_trades_monthly/_index.rst b/website/content/SDK/crypto/onchain/dex_trades_monthly/_index.rst new file mode 100644 index 00000000000..71755383d99 --- /dev/null +++ b/website/content/SDK/crypto/onchain/dex_trades_monthly/_index.rst @@ -0,0 +1,42 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.onchain.dex_trades_monthly( + trade_amount_currency: str = 'USD', + limit: int = 90, + ascend: bool = True, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get list of trades on Decentralized Exchanges monthly aggregated. + [Source: https://graphql.bitquery.io/] +

+ +* **Parameters** + + trade_amount_currency: str + Currency of displayed trade amount. Default: USD + limit: int + Last n days to query data. Maximum 365 (bigger numbers can cause timeouts + on server side) + ascend: bool + Flag to sort data ascending + +* **Returns** + + pd.DataFrame + Trades on Decentralized Exchanges monthly aggregated diff --git a/website/content/SDK/crypto/onchain/dvcp/_index.md b/website/content/SDK/crypto/onchain/dvcp/_index.md deleted file mode 100644 index f7bb94c4c59..00000000000 --- a/website/content/SDK/crypto/onchain/dvcp/_index.md +++ /dev/null @@ -1,50 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.onchain.dvcp(limit: int = 100, symbol: str = 'UNI', to_symbol: str = 'USDT', sortby: str = 'date', ascend: bool = True) -> pandas.core.frame.DataFrame - -Get daily volume for given pair [Source: https://graphql.bitquery.io/] - - Parameters - ------- - limit: int - Last n days to query data - symbol: str - ERC20 token symbol - to_symbol: str - Quote currency. - sortby: str - Key by which to sort data - ascend: bool - Flag to sort data ascending - - Returns - ------- - pd.DataFrame - Daily volume for given pair - -## Getting charts -### crypto.onchain.dvcp(symbol: str = 'WBTC', to_symbol: str = 'USDT', limit: int = 20, sortby: str = 'date', ascend: bool = True, export: str = '', chart=True) -> None - -Display daily volume for given pair - [Source: https://graphql.bitquery.io/] - - Parameters - ---------- - symbol: str - ERC20 token symbol or address - to_symbol: str - Quote currency. - limit: int - Number of records to display - sortby: str - Key by which to sort data - ascend: bool - Flag to sort data ascending - export : str - Export dataframe data to csv,json,xlsx file - - Returns - ------- - pd.DataFrame - Token volume on different decentralized exchanges diff --git a/website/content/SDK/crypto/onchain/dvcp/_index.rst b/website/content/SDK/crypto/onchain/dvcp/_index.rst new file mode 100644 index 00000000000..35df6a95ee7 --- /dev/null +++ b/website/content/SDK/crypto/onchain/dvcp/_index.rst @@ -0,0 +1,101 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.onchain.dvcp( + limit: int = 100, + symbol: str = 'UNI', + to_symbol: str = 'USDT', + sortby: str = 'date', + ascend: bool = True, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get daily volume for given pair [Source: https://graphql.bitquery.io/] +

+ +* **Parameters** + + limit: int + Last n days to query data + symbol: str + ERC20 token symbol + to_symbol: str + Quote currency. + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data ascending + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Daily volume for given pair + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.onchain.dvcp( + symbol: str = 'WBTC', + to_symbol: str = 'USDT', + limit: int = 20, + sortby: str = 'date', + ascend: bool = True, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display daily volume for given pair + [Source: https://graphql.bitquery.io/] +

+ +* **Parameters** + + symbol: str + ERC20 token symbol or address + to_symbol: str + Quote currency. + limit: int + Number of records to display + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data ascending + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Token volume on different decentralized exchanges diff --git a/website/content/SDK/crypto/onchain/erc20_tokens/_index.md b/website/content/SDK/crypto/onchain/erc20_tokens/_index.md deleted file mode 100644 index e5259c670a8..00000000000 --- a/website/content/SDK/crypto/onchain/erc20_tokens/_index.md +++ /dev/null @@ -1,10 +0,0 @@ -## Get underlying data -### crypto.onchain.erc20_tokens() -> pandas.core.frame.DataFrame - -Helper method that loads ~1500 most traded erc20 token. - [Source: json file] - - Returns - ------- - pd.DataFrame - ERC20 tokens with address, symbol and name diff --git a/website/content/SDK/crypto/onchain/erc20_tokens/_index.rst b/website/content/SDK/crypto/onchain/erc20_tokens/_index.rst new file mode 100644 index 00000000000..b1b1c18e4ca --- /dev/null +++ b/website/content/SDK/crypto/onchain/erc20_tokens/_index.rst @@ -0,0 +1,27 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.onchain.erc20_tokens() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Helper method that loads ~1500 most traded erc20 token. + [Source: json file] +

+ +* **Returns** + + pd.DataFrame + ERC20 tokens with address, symbol and name diff --git a/website/content/SDK/crypto/onchain/gwei/_index.md b/website/content/SDK/crypto/onchain/gwei/_index.md deleted file mode 100644 index 310c38ab138..00000000000 --- a/website/content/SDK/crypto/onchain/gwei/_index.md +++ /dev/null @@ -1,29 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.onchain.gwei() -> pandas.core.frame.DataFrame - -Returns the most recent Ethereum gas fees in gwei - [Source: https://ethgasstation.info] - - Parameters - ---------- - - Returns - ------- - pd.DataFrame - four gas fees and durations - (fees for slow, average, fast and - fastest transactions in gwei and - its average durations in seconds) - -## Getting charts -### crypto.onchain.gwei(export: str = '', chart=True) -> None - -Current gwei fees - [Source: https://ethgasstation.info] - - Parameters - ---------- - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/onchain/gwei/_index.rst b/website/content/SDK/crypto/onchain/gwei/_index.rst new file mode 100644 index 00000000000..fe694bc4374 --- /dev/null +++ b/website/content/SDK/crypto/onchain/gwei/_index.rst @@ -0,0 +1,72 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.onchain.gwei() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Returns the most recent Ethereum gas fees in gwei + [Source: https://ethgasstation.info] + + Parameters + ---------- +

+ +* **Parameters** + + + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + four gas fees and durations + (fees for slow, average, fast and + fastest transactions in gwei and + its average durations in seconds) + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.onchain.gwei( + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Current gwei fees + [Source: https://ethgasstation.info] +

+ +* **Parameters** + + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/onchain/hist/_index.md b/website/content/SDK/crypto/onchain/hist/_index.md deleted file mode 100644 index 3fbf8333af2..00000000000 --- a/website/content/SDK/crypto/onchain/hist/_index.md +++ /dev/null @@ -1,38 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.onchain.hist(address, sortby: str = 'timestamp', ascend: bool = True) -> pandas.core.frame.DataFrame - -Get information about balance historical transactions. [Source: Ethplorer] - - Parameters - ---------- - address: str - Blockchain balance e.g. 0x3cD751E6b0078Be393132286c442345e5DC49699 - sortby: str - Key to sort by. - ascend: str - Sort in ascending order. - - Returns - ------- - pd.DataFrame: - DataFrame with balance historical transactions (last 100) - -## Getting charts -### crypto.onchain.hist(address: str, limit: int = 10, sortby: str = 'timestamp', ascend: bool = True, export: str = '', chart=True) -> None - -Display information about balance historical transactions. [Source: Ethplorer] - - Parameters - ---------- - address: str - Ethereum blockchain balance e.g. 0x3cD751E6b0078Be393132286c442345e5DC49699 - limit: int - Limit of transactions. Maximum 100 - sortby: str - Key to sort by. - ascend: str - Sort in ascending order. - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/onchain/hist/_index.rst b/website/content/SDK/crypto/onchain/hist/_index.rst new file mode 100644 index 00000000000..424942d3f3c --- /dev/null +++ b/website/content/SDK/crypto/onchain/hist/_index.rst @@ -0,0 +1,85 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.onchain.hist( + address, sortby: str = 'timestamp', + ascend: bool = True, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get information about balance historical transactions. [Source: Ethplorer] +

+ +* **Parameters** + + address: str + Blockchain balance e.g. 0x3cD751E6b0078Be393132286c442345e5DC49699 + sortby: str + Key to sort by. + ascend: str + Sort in ascending order. + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame: + DataFrame with balance historical transactions (last 100) + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.onchain.hist( + address: str, + limit: int = 10, + sortby: str = 'timestamp', + ascend: bool = True, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display information about balance historical transactions. [Source: Ethplorer] +

+ +* **Parameters** + + address: str + Ethereum blockchain balance e.g. 0x3cD751E6b0078Be393132286c442345e5DC49699 + limit: int + Limit of transactions. Maximum 100 + sortby: str + Key to sort by. + ascend: str + Sort in ascending order. + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/onchain/holders/_index.md b/website/content/SDK/crypto/onchain/holders/_index.md deleted file mode 100644 index a776d81d356..00000000000 --- a/website/content/SDK/crypto/onchain/holders/_index.md +++ /dev/null @@ -1,38 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.onchain.holders(address, sortby: str = 'balance', ascend: bool = True) -> pandas.core.frame.DataFrame - -Get info about top token holders. [Source: Ethplorer] - - Parameters - ---------- - address: str - Token balance e.g. 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984 - sortby: str - Key to sort by. - ascend: str - Sort in descending order. - - Returns - ------- - pd.DataFrame: - DataFrame with list of top token holders. - -## Getting charts -### crypto.onchain.holders(address: str, limit: int = 10, sortby: str = 'balance', ascend: bool = True, export: str = '', chart=True) -> None - -Display info about top ERC20 token holders. [Source: Ethplorer] - - Parameters - ---------- - address: str - Token balance e.g. 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984 - limit: int - Limit of transactions. Maximum 100 - sortby: str - Key to sort by. - ascend: str - Sort in descending order. - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/onchain/holders/_index.rst b/website/content/SDK/crypto/onchain/holders/_index.rst new file mode 100644 index 00000000000..92676873eaa --- /dev/null +++ b/website/content/SDK/crypto/onchain/holders/_index.rst @@ -0,0 +1,85 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.onchain.holders( + address, sortby: str = 'balance', + ascend: bool = True, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get info about top token holders. [Source: Ethplorer] +

+ +* **Parameters** + + address: str + Token balance e.g. 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984 + sortby: str + Key to sort by. + ascend: str + Sort in descending order. + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame: + DataFrame with list of top token holders. + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.onchain.holders( + address: str, + limit: int = 10, + sortby: str = 'balance', + ascend: bool = True, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display info about top ERC20 token holders. [Source: Ethplorer] +

+ +* **Parameters** + + address: str + Token balance e.g. 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984 + limit: int + Limit of transactions. Maximum 100 + sortby: str + Key to sort by. + ascend: str + Sort in descending order. + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/onchain/hr/_index.md b/website/content/SDK/crypto/onchain/hr/_index.md deleted file mode 100644 index b338a069e7b..00000000000 --- a/website/content/SDK/crypto/onchain/hr/_index.md +++ /dev/null @@ -1,44 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.onchain.hr(symbol: str, interval: str = '24h', start_date: int = 1289078580, end_date: int = 1667510580) -> pandas.core.frame.DataFrame - -Returns dataframe with mean hashrate of btc or eth blockchain and symbol price - [Source: https://glassnode.com] - - Parameters - ---------- - symbol : str - Blockchain to check hashrate (BTC or ETH) - start_date : int - Initial date timestamp (e.g., 1_614_556_800) - end_date : int - End date timestamp (e.g., 1_614_556_800) - interval : str - Interval frequency (e.g., 24h) - - Returns - ------- - pd.DataFrame - mean hashrate and symbol price over time - -## Getting charts -### crypto.onchain.hr(symbol: str, start_date: int = 1635974580, end_date: int = 1667510580, interval: str = '24h', export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) -> None - -Display dataframe with mean hashrate of btc or eth blockchain and symbol price. - [Source: https://glassnode.org] - - Parameters - ---------- - symbol : str - Blockchain to check mean hashrate (BTC or ETH) - start_date : int - Initial date timestamp (e.g., 1_614_556_800) - end_date : int - End date timestamp (e.g., 1_614_556_800) - interval : str - Interval frequency (possible values are: 24, 1w, 1month) - export : str - Export dataframe data to csv,json,xlsx file - external_axes : Optional[List[plt.Axes]], optional - External axes (2 axes are expected in the list), by default None diff --git a/website/content/SDK/crypto/onchain/hr/_index.rst b/website/content/SDK/crypto/onchain/hr/_index.rst new file mode 100644 index 00000000000..4064d84eec1 --- /dev/null +++ b/website/content/SDK/crypto/onchain/hr/_index.rst @@ -0,0 +1,94 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.onchain.hr( + symbol: str, + interval: str = '24h', + start_date: int = 1289476975, + end_date: int = 1667908975, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Returns dataframe with mean hashrate of btc or eth blockchain and symbol price + [Source: https://glassnode.com] +

+ +* **Parameters** + + symbol : str + Blockchain to check hashrate (BTC or ETH) + start_date : int + Initial date timestamp (e.g., 1_614_556_800) + end_date : int + End date timestamp (e.g., 1_614_556_800) + interval : str + Interval frequency (e.g., 24h) + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + mean hashrate and symbol price over time + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.onchain.hr( + symbol: str, + start_date: int = 1636372975, + end_date: int = 1667908975, + interval: str = '24h', + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display dataframe with mean hashrate of btc or eth blockchain and symbol price. + [Source: https://glassnode.org] +

+ +* **Parameters** + + symbol : str + Blockchain to check mean hashrate (BTC or ETH) + start_date : int + Initial date timestamp (e.g., 1_614_556_800) + end_date : int + End date timestamp (e.g., 1_614_556_800) + interval : str + Interval frequency (possible values are: 24, 1w, 1month) + export : str + Export dataframe data to csv,json,xlsx file + external_axes : Optional[List[plt.Axes]], optional + External axes (2 axes are expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/onchain/info/_index.md b/website/content/SDK/crypto/onchain/info/_index.md deleted file mode 100644 index 55d047e4e14..00000000000 --- a/website/content/SDK/crypto/onchain/info/_index.md +++ /dev/null @@ -1,30 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.onchain.info(address) -> pandas.core.frame.DataFrame - -Get info about ERC20 token. [Source: Ethplorer] - - Parameters - ---------- - address: str - Token balance e.g. 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984 - - Returns - ------- - pd.DataFrame: - DataFrame with information about provided ERC20 token. - -## Getting charts -### crypto.onchain.info(address: str, social: bool = False, export: str = '', chart=True) -> None - -Display info about ERC20 token. [Source: Ethplorer] - - Parameters - ---------- - address: str - Token balance e.g. 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984 - social: bool - Flag to display social media links - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/onchain/info/_index.rst b/website/content/SDK/crypto/onchain/info/_index.rst new file mode 100644 index 00000000000..4af6e159479 --- /dev/null +++ b/website/content/SDK/crypto/onchain/info/_index.rst @@ -0,0 +1,73 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.onchain.info( + address, chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get info about ERC20 token. [Source: Ethplorer] +

+ +* **Parameters** + + address: str + Token balance e.g. 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984 + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame: + DataFrame with information about provided ERC20 token. + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.onchain.info( + address: str, + social: bool = False, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display info about ERC20 token. [Source: Ethplorer] +

+ +* **Parameters** + + address: str + Token balance e.g. 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984 + social: bool + Flag to display social media links + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/onchain/lt/_index.md b/website/content/SDK/crypto/onchain/lt/_index.md deleted file mode 100644 index 0e89b5d7f1d..00000000000 --- a/website/content/SDK/crypto/onchain/lt/_index.md +++ /dev/null @@ -1,47 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.onchain.lt(trade_amount_currency: str = 'USD', limit: int = 90, sortby: str = 'tradeAmount', ascend: bool = True) -> pandas.core.frame.DataFrame - -Get trades on Decentralized Exchanges aggregated by DEX [Source: https://graphql.bitquery.io/] - - Parameters - ---------- - trade_amount_currency: str - Currency of displayed trade amount. Default: USD - limit: int - Last n days to query data. Maximum 365 (bigger numbers can cause timeouts - on server side) - sortby: str - Key by which to sort data - ascend: bool - Flag to sort data ascending - - Returns - ------- - pd.DataFrame - Trades on Decentralized Exchanges aggregated by DEX - -## Getting charts -### crypto.onchain.lt(trade_amount_currency: str = 'USD', kind: str = 'dex', limit: int = 20, days: int = 90, sortby: str = 'tradeAmount', ascend: bool = True, export: str = '', chart=True) -> None - -Trades on Decentralized Exchanges aggregated by DEX or Month - [Source: https://graphql.bitquery.io/] - - Parameters - ---------- - kind: str - Aggregate trades by dex or time - trade_amount_currency: str - Currency of displayed trade amount. Default: USD - limit: int - Number of records to display - sortby: str - Key by which to sort data - ascend: bool - Flag to sort data ascending - days: int - Last n days to query data. Maximum 365 (bigger numbers can cause timeouts - on server side) - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/onchain/lt/_index.rst b/website/content/SDK/crypto/onchain/lt/_index.rst new file mode 100644 index 00000000000..2b607e8ea40 --- /dev/null +++ b/website/content/SDK/crypto/onchain/lt/_index.rst @@ -0,0 +1,98 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.onchain.lt( + trade_amount_currency: str = 'USD', + limit: int = 90, + sortby: str = 'tradeAmount', + ascend: bool = True, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get trades on Decentralized Exchanges aggregated by DEX [Source: https://graphql.bitquery.io/] +

+ +* **Parameters** + + trade_amount_currency: str + Currency of displayed trade amount. Default: USD + limit: int + Last n days to query data. Maximum 365 (bigger numbers can cause timeouts + on server side) + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data ascending + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Trades on Decentralized Exchanges aggregated by DEX + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.onchain.lt( + trade_amount_currency: str = 'USD', + kind: str = 'dex', + limit: int = 20, + days: int = 90, + sortby: str = 'tradeAmount', + ascend: bool = True, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Trades on Decentralized Exchanges aggregated by DEX or Month + [Source: https://graphql.bitquery.io/] +

+ +* **Parameters** + + kind: str + Aggregate trades by dex or time + trade_amount_currency: str + Currency of displayed trade amount. Default: USD + limit: int + Number of records to display + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data ascending + days: int + Last n days to query data. Maximum 365 (bigger numbers can cause timeouts + on server side) + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/onchain/prices/_index.md b/website/content/SDK/crypto/onchain/prices/_index.md deleted file mode 100644 index 72a7cd20178..00000000000 --- a/website/content/SDK/crypto/onchain/prices/_index.md +++ /dev/null @@ -1,39 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.onchain.prices(address, sortby: str = 'date', ascend: bool = False) -> pandas.core.frame.DataFrame - -Get token historical prices with volume and market cap, and average price. [Source: Ethplorer] - - Parameters - ---------- - address: str - Token e.g. 0xf3db5fa2c66b7af3eb0c0b782510816cbe4813b8 - sortby: str - Key to sort by. - ascend: str - Sort in descending order. - - Returns - ------- - pd.DataFrame: - DataFrame with token historical prices. - -## Getting charts -### crypto.onchain.prices(address: str, limit: int = 30, sortby: str = 'date', ascend: bool = False, export: str = '', chart=True) -> None - -Display token historical prices with volume and market cap, and average price. - [Source: Ethplorer] - - Parameters - ---------- - address: str - Token balance e.g. 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984 - limit: int - Limit of transactions. Maximum 100 - sortby: str - Key to sort by. - ascend: str - Sort in descending order. - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/onchain/prices/_index.rst b/website/content/SDK/crypto/onchain/prices/_index.rst new file mode 100644 index 00000000000..1a13aa3bebe --- /dev/null +++ b/website/content/SDK/crypto/onchain/prices/_index.rst @@ -0,0 +1,86 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.onchain.prices( + address, sortby: str = 'date', + ascend: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get token historical prices with volume and market cap, and average price. [Source: Ethplorer] +

+ +* **Parameters** + + address: str + Token e.g. 0xf3db5fa2c66b7af3eb0c0b782510816cbe4813b8 + sortby: str + Key to sort by. + ascend: str + Sort in descending order. + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame: + DataFrame with token historical prices. + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.onchain.prices( + address: str, + limit: int = 30, + sortby: str = 'date', + ascend: bool = False, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display token historical prices with volume and market cap, and average price. + [Source: Ethplorer] +

+ +* **Parameters** + + address: str + Token balance e.g. 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984 + limit: int + Limit of transactions. Maximum 100 + sortby: str + Key to sort by. + ascend: str + Sort in descending order. + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/onchain/query_graph/_index.md b/website/content/SDK/crypto/onchain/query_graph/_index.md deleted file mode 100644 index 6c265882641..00000000000 --- a/website/content/SDK/crypto/onchain/query_graph/_index.md +++ /dev/null @@ -1,16 +0,0 @@ -## Get underlying data -### crypto.onchain.query_graph(url: str, query: str) -> dict - -Helper methods for querying graphql api. [Source: https://bitquery.io/] - - Parameters - ---------- - url: str - Endpoint url - query: str - Graphql query - - Returns - ------- - dict: - Dictionary with response data diff --git a/website/content/SDK/crypto/onchain/query_graph/_index.rst b/website/content/SDK/crypto/onchain/query_graph/_index.rst new file mode 100644 index 00000000000..734895c3bde --- /dev/null +++ b/website/content/SDK/crypto/onchain/query_graph/_index.rst @@ -0,0 +1,37 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.onchain.query_graph( + url: str, + query: str, + chart: bool = False, +) -> dict +{{< /highlight >}} + +.. raw:: html + +

+ Helper methods for querying graphql api. [Source: https://bitquery.io/] +

+ +* **Parameters** + + url: str + Endpoint url + query: str + Graphql query + +* **Returns** + + dict: + Dictionary with response data diff --git a/website/content/SDK/crypto/onchain/th/_index.md b/website/content/SDK/crypto/onchain/th/_index.md deleted file mode 100644 index d45a24ac363..00000000000 --- a/website/content/SDK/crypto/onchain/th/_index.md +++ /dev/null @@ -1,40 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.onchain.th(address, sortby: str = 'timestamp', ascend: bool = False) -> pandas.core.frame.DataFrame - -Get info about token historical transactions. [Source: Ethplorer] - - Parameters - ---------- - address: str - Token e.g. 0xf3db5fa2c66b7af3eb0c0b782510816cbe4813b8 - sortby: str - Key to sort by. - ascend: str - Sort in descending order. - - Returns - ------- - pd.DataFrame: - DataFrame with token historical transactions. - -## Getting charts -### crypto.onchain.th(address: str, limit: int = 10, sortby: str = 'timestamp', ascend: bool = False, hash_: bool = False, export: str = '', chart=True) -> None - -Display info about token history. [Source: Ethplorer] - - Parameters - ---------- - address: str - Token balance e.g. 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984 - limit: int - Limit of transactions. Maximum 100 - sortby: str - Key to sort by. - ascend: str - Sort in descending order. - hash_: bool, - Flag to show transaction hash. - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/onchain/th/_index.rst b/website/content/SDK/crypto/onchain/th/_index.rst new file mode 100644 index 00000000000..384d14f447e --- /dev/null +++ b/website/content/SDK/crypto/onchain/th/_index.rst @@ -0,0 +1,88 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.onchain.th( + address, sortby: str = 'timestamp', + ascend: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get info about token historical transactions. [Source: Ethplorer] +

+ +* **Parameters** + + address: str + Token e.g. 0xf3db5fa2c66b7af3eb0c0b782510816cbe4813b8 + sortby: str + Key to sort by. + ascend: str + Sort in descending order. + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame: + DataFrame with token historical transactions. + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.onchain.th( + address: str, + limit: int = 10, + sortby: str = 'timestamp', + ascend: bool = False, + hash_: bool = False, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display info about token history. [Source: Ethplorer] +

+ +* **Parameters** + + address: str + Token balance e.g. 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984 + limit: int + Limit of transactions. Maximum 100 + sortby: str + Key to sort by. + ascend: str + Sort in descending order. + hash\_: bool, + Flag to show transaction hash. + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/onchain/token_decimals/_index.md b/website/content/SDK/crypto/onchain/token_decimals/_index.md deleted file mode 100644 index 727ef5bd07a..00000000000 --- a/website/content/SDK/crypto/onchain/token_decimals/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### crypto.onchain.token_decimals(address: str) -> Optional[int] - -Helper methods that gets token decimals number. [Source: Ethplorer] - - Parameters - ---------- - address: str - Blockchain balance e.g. 0x1f9840a85d5af5bf1d1762f925bdaddc4201f984 - - Returns - ------- - pd.DataFrame: - DataFrame with list of tokens and their balances. diff --git a/website/content/SDK/crypto/onchain/token_decimals/_index.rst b/website/content/SDK/crypto/onchain/token_decimals/_index.rst new file mode 100644 index 00000000000..bafe5cd06fb --- /dev/null +++ b/website/content/SDK/crypto/onchain/token_decimals/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.onchain.token_decimals( + address: str, + chart: bool = False, +) -> Optional[int] +{{< /highlight >}} + +.. raw:: html + +

+ Helper methods that gets token decimals number. [Source: Ethplorer] +

+ +* **Parameters** + + address: str + Blockchain balance e.g. 0x1f9840a85d5af5bf1d1762f925bdaddc4201f984 + +* **Returns** + + pd.DataFrame: + DataFrame with list of tokens and their balances. diff --git a/website/content/SDK/crypto/onchain/top/_index.md b/website/content/SDK/crypto/onchain/top/_index.md deleted file mode 100644 index ea3d1ad3ee4..00000000000 --- a/website/content/SDK/crypto/onchain/top/_index.md +++ /dev/null @@ -1,27 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.onchain.top(sortby: str = 'rank', ascend: bool = False) -> pandas.core.frame.DataFrame - -Get top 50 tokens. [Source: Ethplorer] - - Returns - ------- - pd.DataFrame: - DataFrame with list of top 50 tokens. - -## Getting charts -### crypto.onchain.top(limit: int = 15, sortby: str = 'rank', ascend: bool = True, export: str = '', chart=True) -> None - -Display top ERC20 tokens [Source: Ethplorer] - - Parameters - ---------- - limit: int - Limit of transactions. Maximum 100 - sortby: str - Key to sort by. - ascend: str - Sort in descending order. - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/onchain/top/_index.rst b/website/content/SDK/crypto/onchain/top/_index.rst new file mode 100644 index 00000000000..220aab59a3d --- /dev/null +++ b/website/content/SDK/crypto/onchain/top/_index.rst @@ -0,0 +1,75 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.onchain.top( + sortby: str = 'rank', + ascend: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get top 50 tokens. [Source: Ethplorer] + + Returns + ------- + pd.DataFrame: + DataFrame with list of top 50 tokens. +

+ +* **Returns** + + pd.DataFrame: + DataFrame with list of top 50 tokens. + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.onchain.top( + limit: int = 15, + sortby: str = 'rank', + ascend: bool = True, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display top ERC20 tokens [Source: Ethplorer] +

+ +* **Parameters** + + limit: int + Limit of transactions. Maximum 100 + sortby: str + Key to sort by. + ascend: str + Sort in descending order. + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/onchain/ttcp/_index.md b/website/content/SDK/crypto/onchain/ttcp/_index.md deleted file mode 100644 index 3722a863d46..00000000000 --- a/website/content/SDK/crypto/onchain/ttcp/_index.md +++ /dev/null @@ -1,47 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.onchain.ttcp(network: str = 'ethereum', exchange: str = 'Uniswap', limit: int = 90, sortby: str = 'tradeAmount', ascend: bool = True) -> pandas.core.frame.DataFrame - -Get most traded crypto pairs on given decentralized exchange in chosen time period. - [Source: https://graphql.bitquery.io/] - - Parameters - ---------- - network: str - EVM network. One from list: bsc (binance smart chain), ethereum or matic - exchange: - Decentralized exchange name - limit: - Number of days taken into calculation account. - sortby: str - Key by which to sort data - ascend: bool - Flag to sort data ascending - - Returns - ------- - - -## Getting charts -### crypto.onchain.ttcp(exchange='Uniswap', days: int = 10, limit: int = 10, sortby: str = 'tradeAmount', ascend: bool = True, export: str = '', chart=True) -> None - -Display most traded crypto pairs on given decentralized exchange in chosen time period. - [Source: https://graphql.bitquery.io/] - - Parameters - ---------- - exchange: - Decentralized exchange name - days: - Number of days taken into calculation account. - sortby: str - Key by which to sort data - ascend: bool - Flag to sort data ascending - export : str - Export dataframe data to csv,json,xlsx file - Returns - ------- - pd.DataFrame - Most traded crypto pairs on given decentralized exchange in chosen time period. diff --git a/website/content/SDK/crypto/onchain/ttcp/_index.rst b/website/content/SDK/crypto/onchain/ttcp/_index.rst new file mode 100644 index 00000000000..fe1063315f8 --- /dev/null +++ b/website/content/SDK/crypto/onchain/ttcp/_index.rst @@ -0,0 +1,98 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.onchain.ttcp( + network: str = 'ethereum', + exchange: str = 'Uniswap', + limit: int = 90, + sortby: str = 'tradeAmount', + ascend: bool = True, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get most traded crypto pairs on given decentralized exchange in chosen time period. + [Source: https://graphql.bitquery.io/] +

+ +* **Parameters** + + network: str + EVM network. One from list: bsc (binance smart chain), ethereum or matic + exchange: + Decentralized exchange name + limit: + Number of days taken into calculation account. + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data ascending + chart: *bool* + Flag to display chart + + +* **Returns** + + + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.onchain.ttcp( + exchange='Uniswap', days: int = 10, + limit: int = 10, + sortby: str = 'tradeAmount', + ascend: bool = True, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display most traded crypto pairs on given decentralized exchange in chosen time period. + [Source: https://graphql.bitquery.io/] +

+ +* **Parameters** + + exchange: + Decentralized exchange name + days: + Number of days taken into calculation account. + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data ascending + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Most traded crypto pairs on given decentralized exchange in chosen time period. diff --git a/website/content/SDK/crypto/onchain/tv/_index.md b/website/content/SDK/crypto/onchain/tv/_index.md deleted file mode 100644 index 322eeedcb24..00000000000 --- a/website/content/SDK/crypto/onchain/tv/_index.md +++ /dev/null @@ -1,47 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.onchain.tv(symbol: str = 'UNI', trade_amount_currency: str = 'USD', sortby: str = 'tradeAmount', ascend: bool = True) -> pandas.core.frame.DataFrame - -Get token volume on different Decentralized Exchanges. [Source: https://graphql.bitquery.io/] - - Parameters - ---------- - symbol: str - ERC20 token symbol. - trade_amount_currency: str - Currency to display trade amount in. - sortby: str - Key by which to sort data - ascend: bool - Flag to sort data ascending - - Returns - ------- - pd.DataFrame - Token volume on Decentralized Exchanges - -## Getting charts -### crypto.onchain.tv(symbol: str = 'WBTC', trade_amount_currency: str = 'USD', limit: int = 10, sortby: str = 'tradeAmount', ascend: bool = True, export: str = '', chart=True) -> None - -Display token volume on different Decentralized Exchanges. - [Source: https://graphql.bitquery.io/] - - Parameters - ---------- - symbol: str - ERC20 token symbol or address - trade_amount_currency: str - Currency of displayed trade amount. Default: USD - limit: int - Number of records to display - sortby: str - Key by which to sort data - ascend: bool - Flag to sort data ascending - export : str - Export dataframe data to csv,json,xlsx file - Returns - ------- - pd.DataFrame - Token volume on different decentralized exchanges diff --git a/website/content/SDK/crypto/onchain/tv/_index.rst b/website/content/SDK/crypto/onchain/tv/_index.rst new file mode 100644 index 00000000000..ef2df222805 --- /dev/null +++ b/website/content/SDK/crypto/onchain/tv/_index.rst @@ -0,0 +1,98 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.onchain.tv( + symbol: str = 'UNI', + trade_amount_currency: str = 'USD', + sortby: str = 'tradeAmount', + ascend: bool = True, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get token volume on different Decentralized Exchanges. [Source: https://graphql.bitquery.io/] +

+ +* **Parameters** + + symbol: str + ERC20 token symbol. + trade_amount_currency: str + Currency to display trade amount in. + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data ascending + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Token volume on Decentralized Exchanges + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.onchain.tv( + symbol: str = 'WBTC', + trade_amount_currency: str = 'USD', + limit: int = 10, + sortby: str = 'tradeAmount', + ascend: bool = True, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display token volume on different Decentralized Exchanges. + [Source: https://graphql.bitquery.io/] +

+ +* **Parameters** + + symbol: str + ERC20 token symbol or address + trade_amount_currency: str + Currency of displayed trade amount. Default: USD + limit: int + Number of records to display + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data ascending + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Token volume on different decentralized exchanges diff --git a/website/content/SDK/crypto/onchain/tx/_index.md b/website/content/SDK/crypto/onchain/tx/_index.md deleted file mode 100644 index 2ca0c31c2dd..00000000000 --- a/website/content/SDK/crypto/onchain/tx/_index.md +++ /dev/null @@ -1,28 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.onchain.tx(tx_hash) -> pandas.core.frame.DataFrame - -Get info about transaction. [Source: Ethplorer] - - Parameters - ---------- - tx_hash: str - Transaction hash e.g. 0x9dc7b43ad4288c624fdd236b2ecb9f2b81c93e706b2ffd1d19b112c1df7849e6 - - Returns - ------- - pd.DataFrame: - DataFrame with information about ERC20 token transaction. - -## Getting charts -### crypto.onchain.tx(tx_hash: str, export: str = '', chart=True) -> None - -Display info about transaction. [Source: Ethplorer] - - Parameters - ---------- - tx_hash: str - Transaction hash e.g. 0x9dc7b43ad4288c624fdd236b2ecb9f2b81c93e706b2ffd1d19b112c1df7849e6 - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/onchain/tx/_index.rst b/website/content/SDK/crypto/onchain/tx/_index.rst new file mode 100644 index 00000000000..751e3deac7e --- /dev/null +++ b/website/content/SDK/crypto/onchain/tx/_index.rst @@ -0,0 +1,70 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.onchain.tx( + tx_hash, chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get info about transaction. [Source: Ethplorer] +

+ +* **Parameters** + + tx_hash: str + Transaction hash e.g. 0x9dc7b43ad4288c624fdd236b2ecb9f2b81c93e706b2ffd1d19b112c1df7849e6 + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame: + DataFrame with information about ERC20 token transaction. + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.onchain.tx( + tx_hash: str, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display info about transaction. [Source: Ethplorer] +

+ +* **Parameters** + + tx_hash: str + Transaction hash e.g. 0x9dc7b43ad4288c624fdd236b2ecb9f2b81c93e706b2ffd1d19b112c1df7849e6 + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/onchain/ueat/_index.md b/website/content/SDK/crypto/onchain/ueat/_index.rst similarity index 50% rename from website/content/SDK/crypto/onchain/ueat/_index.md rename to website/content/SDK/crypto/onchain/ueat/_index.rst index 7b9f4d7645e..7a175f591dd 100644 --- a/website/content/SDK/crypto/onchain/ueat/_index.md +++ b/website/content/SDK/crypto/onchain/ueat/_index.rst @@ -1,12 +1,35 @@ -To obtain charts, make sure to add `chart=True` as the last parameter +.. role:: python(code) + :language: python + :class: highlight -## Get underlying data -### crypto.onchain.ueat(interval: str = 'day', limit: int = 90, sortby: str = 'tradeAmount', ascend: bool = True) -> pandas.core.frame.DataFrame +| -Get number of unique ethereum addresses which made a transaction in given time interval. +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.onchain.ueat( + interval: str = 'day', + limit: int = 90, + sortby: str = 'tradeAmount', + ascend: bool = True, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get number of unique ethereum addresses which made a transaction in given time interval. +

+ +* **Parameters** - Parameters - ---------- interval: str Time interval in which count unique ethereum addresses which made transaction. day, month or week. @@ -16,20 +39,43 @@ Get number of unique ethereum addresses which made a transaction in given time i Key by which to sort data ascend: bool Flag to sort data ascending + chart: *bool* + Flag to display chart + + +* **Returns** - Returns - ------- pd.DataFrame Unique ethereum addresses which made a transaction -## Getting charts -### crypto.onchain.ueat(interval: str = 'days', limit: int = 10, sortby: str = 'date', ascend: bool = True, export: str = '', chart=True) -> None +| -Display number of unique ethereum addresses which made a transaction in given time interval +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.onchain.ueat( + interval: str = 'days', + limit: int = 10, + sortby: str = 'date', + ascend: bool = True, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display number of unique ethereum addresses which made a transaction in given time interval [Source: https://graphql.bitquery.io/] +

+ +* **Parameters** - Parameters - ---------- interval: str Time interval in which ethereum address made transaction. month, week or day limit: int @@ -43,7 +89,11 @@ Display number of unique ethereum addresses which made a transaction in given ti Flag to sort data ascending export : str Export dataframe data to csv,json,xlsx file - Returns - ------- + chart: *bool* + Flag to display chart + + +* **Returns** + pd.DataFrame Number of unique ethereum addresses which made a transaction in given time interval diff --git a/website/content/SDK/crypto/onchain/whales/_index.md b/website/content/SDK/crypto/onchain/whales/_index.md deleted file mode 100644 index 561cc8bb708..00000000000 --- a/website/content/SDK/crypto/onchain/whales/_index.md +++ /dev/null @@ -1,43 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.onchain.whales(min_value: int = 800000, limit: int = 100, sortby: str = 'date', ascend: bool = False) -> pandas.core.frame.DataFrame - -Whale Alert's API allows you to retrieve live and historical transaction data from major blockchains. - Supported blockchain: Bitcoin, Ethereum, Ripple, NEO, EOS, Stellar and Tron. [Source: https://docs.whale-alert.io/] - - Parameters - ---------- - min_value: int - Minimum value of trade to track. - limit: int - Limit of transactions. Max 100 - sortby: str - Key to sort by. - ascend: str - Sort in ascending order. - - Returns - ------- - pd.DataFrame - Crypto wales transactions - -## Getting charts -### crypto.onchain.whales(min_value: int = 800000, limit: int = 100, sortby: str = 'date', ascend: bool = False, show_address: bool = False, export: str = '', chart=True) -> None - -Display huge value transactions from major blockchains. [Source: https://docs.whale-alert.io/] - - Parameters - ---------- - min_value: int - Minimum value of trade to track. - limit: int - Limit of transactions. Maximum 100 - sortby: str - Key to sort by. - ascend: str - Sort in ascending order. - show_address: bool - Flag to show addresses of transactions. - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/onchain/whales/_index.rst b/website/content/SDK/crypto/onchain/whales/_index.rst new file mode 100644 index 00000000000..8144b8cd798 --- /dev/null +++ b/website/content/SDK/crypto/onchain/whales/_index.rst @@ -0,0 +1,93 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.onchain.whales( + min_value: int = 800000, + limit: int = 100, + sortby: str = 'date', + ascend: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Whale Alert's API allows you to retrieve live and historical transaction data from major blockchains. + Supported blockchain: Bitcoin, Ethereum, Ripple, NEO, EOS, Stellar and Tron. [Source: https://docs.whale-alert.io/] +

+ +* **Parameters** + + min_value: int + Minimum value of trade to track. + limit: int + Limit of transactions. Max 100 + sortby: str + Key to sort by. + ascend: str + Sort in ascending order. + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Crypto wales transactions + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.onchain.whales( + min_value: int = 800000, + limit: int = 100, + sortby: str = 'date', + ascend: bool = False, + show_address: bool = False, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display huge value transactions from major blockchains. [Source: https://docs.whale-alert.io/] +

+ +* **Parameters** + + min_value: int + Minimum value of trade to track. + limit: int + Limit of transactions. Maximum 100 + sortby: str + Key to sort by. + ascend: str + Sort in ascending order. + show_address: bool + Flag to show addresses of transactions. + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/ov/altindex/_index.md b/website/content/SDK/crypto/ov/altindex/_index.rst similarity index 52% rename from website/content/SDK/crypto/ov/altindex/_index.md rename to website/content/SDK/crypto/ov/altindex/_index.rst index c2701a72325..0cd011f8d71 100644 --- a/website/content/SDK/crypto/ov/altindex/_index.md +++ b/website/content/SDK/crypto/ov/altindex/_index.rst @@ -1,13 +1,35 @@ -To obtain charts, make sure to add `chart=True` as the last parameter +.. role:: python(code) + :language: python + :class: highlight -## Get underlying data -### crypto.ov.altindex(period: int = 30, start_date: int = 1262322000, end_date: int = 1667510580) -> pandas.core.frame.DataFrame +| -Get altcoin index overtime +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.ov.altindex( + period: int = 30, + start_date: int = 1262304000, + end_date: int = 1667908975, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get altcoin index overtime [Source: https://blockchaincenter.net] +

+ +* **Parameters** - Parameters - ---------- period: int Number of days {30,90,365} to check performance of coins and calculate the altcoin index. E.g., 365 checks yearly performance, 90 will check seasonal performance (90 days), @@ -16,20 +38,43 @@ Get altcoin index overtime Initial date timestamp (e.g., 1_609_459_200) end_date : int End date timestamp (e.g., 1_641_588_030) + chart: *bool* + Flag to display chart + + +* **Returns** - Returns - ------- pandas.DataFrame: Date, Value (Altcoin Index) -## Getting charts -### crypto.ov.altindex(period: int = 365, start_date: int = 1262322000, end_date: int = 1667510580, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) -> None +| -Displays altcoin index overtime +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.ov.altindex( + period: int = 365, + start_date: int = 1262304000, + end_date: int = 1667908975, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Displays altcoin index overtime [Source: https://blockchaincenter.net] +

+ +* **Parameters** - Parameters - ---------- start_date : int Initial date timestamp (e.g., 1_609_459_200) end_date : int @@ -42,3 +87,6 @@ Displays altcoin index overtime Export dataframe data to csv,json,xlsx file external_axes : Optional[List[plt.Axes]], optional External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/ov/btcrb/_index.rst b/website/content/SDK/crypto/ov/btcrb/_index.rst new file mode 100644 index 00000000000..0c3376ff1f6 --- /dev/null +++ b/website/content/SDK/crypto/ov/btcrb/_index.rst @@ -0,0 +1,79 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.ov.btcrb( + start_date: str = '2010-01-01', + end_date: str = '2022-11-08', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Get bitcoin price data + [Price data from source: https://glassnode.com] + [Inspired by: https://blockchaincenter.net] +

+ +* **Parameters** + + start_date : str + Initial date, format YYYY-MM-DD + end_date : str + Final date, format YYYY-MM-DD + chart: *bool* + Flag to display chart + + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.ov.btcrb( + start_date: str = '2010-01-01', + end_date: str = '2022-11-08', + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Displays bitcoin rainbow chart + [Price data from source: https://glassnode.com] + [Inspired by: https://blockchaincenter.net] +

+ +* **Parameters** + + start_date : int + Initial date, format YYYY-MM-DD + end_date : int + Final date, format YYYY-MM-DD + export : str + Export dataframe data to csv,json,xlsx file + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/ov/cbpairs/_index.md b/website/content/SDK/crypto/ov/cbpairs/_index.md deleted file mode 100644 index 55660d2163d..00000000000 --- a/website/content/SDK/crypto/ov/cbpairs/_index.md +++ /dev/null @@ -1,41 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.ov.cbpairs(limit: int = 50, sortby: str = 'quote_increment', ascend: bool = True) -> pandas.core.frame.DataFrame - -Get a list of available currency pairs for trading. [Source: Coinbase] - - base_min_size - min order size - base_max_size - max order size - min_market_funds - min funds allowed in a market order. - max_market_funds - max funds allowed in a market order. - - Parameters - ---------- - limit: int - Top n of pairs - sortby: str - Key to sortby data - ascend: bool - Sort descending flag - - Returns - ------- - pd.DataFrame - Available trading pairs on Coinbase - -## Getting charts -### crypto.ov.cbpairs(limit: int = 20, sortby: str = 'quote_increment', ascend: bool = True, export: str = '', chart=True) -> None - -Displays a list of available currency pairs for trading. [Source: Coinbase] - - Parameters - ---------- - limit: int - Top n of pairs - sortby: str - Key to sortby data - ascend: bool - Sort ascending flag - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/ov/cbpairs/_index.rst b/website/content/SDK/crypto/ov/cbpairs/_index.rst new file mode 100644 index 00000000000..d54d7d8364b --- /dev/null +++ b/website/content/SDK/crypto/ov/cbpairs/_index.rst @@ -0,0 +1,88 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.ov.cbpairs( + limit: int = 50, + sortby: str = 'quote_increment', + ascend: bool = True, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get a list of available currency pairs for trading. [Source: Coinbase] + + base_min_size - min order size + base_max_size - max order size + min_market_funds - min funds allowed in a market order. + max_market_funds - max funds allowed in a market order. +

+ +* **Parameters** + + limit: int + Top n of pairs + sortby: str + Key to sortby data + ascend: bool + Sort descending flag + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Available trading pairs on Coinbase + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.ov.cbpairs( + limit: int = 20, + sortby: str = 'quote_increment', + ascend: bool = True, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Displays a list of available currency pairs for trading. [Source: Coinbase] +

+ +* **Parameters** + + limit: int + Top n of pairs + sortby: str + Key to sortby data + ascend: bool + Sort ascending flag + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/ov/cgcategories/_index.md b/website/content/SDK/crypto/ov/cgcategories/_index.md deleted file mode 100644 index 1729bd501ee..00000000000 --- a/website/content/SDK/crypto/ov/cgcategories/_index.md +++ /dev/null @@ -1,29 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.ov.cgcategories(sort_filter: str = 'market_cap_desc') -> pandas.core.frame.DataFrame - -Returns top crypto categories [Source: CoinGecko] - - Returns - ------- - pandas.DataFrame - Rank, Name, Change_1h, Change_7d, Market_Cap, Volume_24h,Coins, Url - -## Getting charts -### crypto.ov.cgcategories(sortby: str = 'market_cap_desc', limit: int = 15, export: str = '', pie: bool = False, chart=True) -> None - -Shows top cryptocurrency categories by market capitalization - - The cryptocurrency category ranking is based on market capitalization. [Source: CoinGecko] - - Parameters - ---------- - sortby: str - Key by which to sort data - limit: int - Number of records to display - export: str - Export dataframe data to csv,json,xlsx file - pie: bool - Whether to show the pie chart diff --git a/website/content/SDK/crypto/ov/cgcategories/_index.rst b/website/content/SDK/crypto/ov/cgcategories/_index.rst new file mode 100644 index 00000000000..55b6170a78a --- /dev/null +++ b/website/content/SDK/crypto/ov/cgcategories/_index.rst @@ -0,0 +1,76 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.ov.cgcategories( + sort_filter: str = 'market_cap_desc', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Returns top crypto categories [Source: CoinGecko] + + Returns + ------- + pandas.DataFrame + Rank, Name, Change_1h, Change_7d, Market_Cap, Volume_24h,Coins, Url +

+ +* **Returns** + + pandas.DataFrame + Rank, Name, Change_1h, Change_7d, Market_Cap, Volume_24h,Coins, Url + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.ov.cgcategories( + sortby: str = 'market_cap_desc', + limit: int = 15, + export: str = '', + pie: bool = False, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Shows top cryptocurrency categories by market capitalization + + The cryptocurrency category ranking is based on market capitalization. [Source: CoinGecko] +

+ +* **Parameters** + + sortby: str + Key by which to sort data + limit: int + Number of records to display + export: str + Export dataframe data to csv,json,xlsx file + pie: bool + Whether to show the pie chart + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/ov/cgdefi/_index.md b/website/content/SDK/crypto/ov/cgdefi/_index.md deleted file mode 100644 index f77932d9a7c..00000000000 --- a/website/content/SDK/crypto/ov/cgdefi/_index.md +++ /dev/null @@ -1,21 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.ov.cgdefi() -> pandas.core.frame.DataFrame - -Get global statistics about Decentralized Finances [Source: CoinGecko] - - Returns - ------- - pandas.DataFrame - Metric, Value - -## Getting charts -### crypto.ov.cgdefi(export: str = '', chart=True) -> None - -Shows global statistics about Decentralized Finances. [Source: CoinGecko] - - Parameters - ---------- - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/ov/cgdefi/_index.rst b/website/content/SDK/crypto/ov/cgdefi/_index.rst new file mode 100644 index 00000000000..33ea6c52402 --- /dev/null +++ b/website/content/SDK/crypto/ov/cgdefi/_index.rst @@ -0,0 +1,57 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.ov.cgdefi() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get global statistics about Decentralized Finances [Source: CoinGecko] +

+ +* **Returns** + + pandas.DataFrame + Metric, Value + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.ov.cgdefi( + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Shows global statistics about Decentralized Finances. [Source: CoinGecko] +

+ +* **Parameters** + + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/ov/cgderivatives/_index.md b/website/content/SDK/crypto/ov/cgderivatives/_index.md deleted file mode 100644 index 69ea158a7e3..00000000000 --- a/website/content/SDK/crypto/ov/cgderivatives/_index.md +++ /dev/null @@ -1,35 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.ov.cgderivatives(sortby: str = 'Rank', ascend: bool = False) -> pandas.core.frame.DataFrame - -Get list of crypto derivatives from CoinGecko API [Source: CoinGecko] - - Parameters - ---------- - sortby: str - Key by which to sort data - ascend: bool - Flag to sort data descending - - Returns - ------- - pandas.DataFrame - Rank, Market, Symbol, Price, Pct_Change_24h, Contract_Type, Basis, Spread, - Funding_Rate, Volume_24h, - -## Getting charts -### crypto.ov.cgderivatives(sortby: str = 'Rank', ascend: bool = False, limit: int = 15, export: str = '', chart=True) -> None - -Shows list of crypto derivatives. [Source: CoinGecko] - - Parameters - ---------- - limit: int - Number of records to display - sortby: str - Key by which to sort data - ascend: bool - Flag to sort data descending - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/ov/cgderivatives/_index.rst b/website/content/SDK/crypto/ov/cgderivatives/_index.rst new file mode 100644 index 00000000000..e39b83e3de0 --- /dev/null +++ b/website/content/SDK/crypto/ov/cgderivatives/_index.rst @@ -0,0 +1,81 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.ov.cgderivatives( + sortby: str = 'Rank', + ascend: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get list of crypto derivatives from CoinGecko API [Source: CoinGecko] +

+ +* **Parameters** + + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data descending + chart: *bool* + Flag to display chart + + +* **Returns** + + pandas.DataFrame + Rank, Market, Symbol, Price, Pct_Change_24h, Contract_Type, Basis, Spread, + Funding_Rate, Volume_24h, + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.ov.cgderivatives( + sortby: str = 'Rank', + ascend: bool = False, + limit: int = 15, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Shows list of crypto derivatives. [Source: CoinGecko] +

+ +* **Parameters** + + limit: int + Number of records to display + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data descending + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/ov/cgexrates/_index.md b/website/content/SDK/crypto/ov/cgexrates/_index.md deleted file mode 100644 index 36063501d51..00000000000 --- a/website/content/SDK/crypto/ov/cgexrates/_index.md +++ /dev/null @@ -1,34 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.ov.cgexrates(sortby: str = 'Name', ascend: bool = False) -> pandas.core.frame.DataFrame - -Get list of crypto, fiats, commodity exchange rates from CoinGecko API [Source: CoinGecko] - - Parameters - ---------- - sortby: str - Key by which to sort data - ascend: bool - Flag to sort data ascending - - Returns - ------- - pandas.DataFrame - Index, Name, Unit, Value, Type - -## Getting charts -### crypto.ov.cgexrates(sortby: str = 'Name', ascend: bool = False, limit: int = 15, export: str = '', chart=True) -> None - -Shows list of crypto, fiats, commodity exchange rates. [Source: CoinGecko] - - Parameters - ---------- - limit: int - Number of records to display - sortby: str - Key by which to sort data - ascend: bool - Flag to sort data ascending - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/ov/cgexrates/_index.rst b/website/content/SDK/crypto/ov/cgexrates/_index.rst new file mode 100644 index 00000000000..d1c1d645ec5 --- /dev/null +++ b/website/content/SDK/crypto/ov/cgexrates/_index.rst @@ -0,0 +1,80 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.ov.cgexrates( + sortby: str = 'Name', + ascend: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get list of crypto, fiats, commodity exchange rates from CoinGecko API [Source: CoinGecko] +

+ +* **Parameters** + + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data ascending + chart: *bool* + Flag to display chart + + +* **Returns** + + pandas.DataFrame + Index, Name, Unit, Value, Type + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.ov.cgexrates( + sortby: str = 'Name', + ascend: bool = False, + limit: int = 15, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Shows list of crypto, fiats, commodity exchange rates. [Source: CoinGecko] +

+ +* **Parameters** + + limit: int + Number of records to display + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data ascending + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/ov/cgglobal/_index.md b/website/content/SDK/crypto/ov/cgglobal/_index.md deleted file mode 100644 index c4fc450ab14..00000000000 --- a/website/content/SDK/crypto/ov/cgglobal/_index.md +++ /dev/null @@ -1,31 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.ov.cgglobal() -> pandas.core.frame.DataFrame - -Get global statistics about crypto markets from CoinGecko API like: - Market_Cap, Volume, Market_Cap_Percentage - - [Source: CoinGecko] - - Returns - ------- - pandas.DataFrame - Market_Cap, Volume, Market_Cap_Percentage - -## Getting charts -### crypto.ov.cgglobal(pie: bool = False, export: str = '', chart=True) -> None - -Shows global statistics about crypto. [Source: CoinGecko] - - market cap change - - number of markets - - icos - - number of active crypto - - market_cap_pct - - Parameters - ---------- - pie: bool - Whether to show a pie chart - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/ov/cgglobal/_index.rst b/website/content/SDK/crypto/ov/cgglobal/_index.rst new file mode 100644 index 00000000000..998e16b17d3 --- /dev/null +++ b/website/content/SDK/crypto/ov/cgglobal/_index.rst @@ -0,0 +1,68 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.ov.cgglobal() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get global statistics about crypto markets from CoinGecko API like: + Market_Cap, Volume, Market_Cap_Percentage + + [Source: CoinGecko] +

+ +* **Returns** + + pandas.DataFrame + Market_Cap, Volume, Market_Cap_Percentage + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.ov.cgglobal( + pie: bool = False, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Shows global statistics about crypto. [Source: CoinGecko] + - market cap change + - number of markets + - icos + - number of active crypto + - market_cap_pct +

+ +* **Parameters** + + pie: bool + Whether to show a pie chart + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/ov/cghm/_index.md b/website/content/SDK/crypto/ov/cghm/_index.md deleted file mode 100644 index 781822b5f8c..00000000000 --- a/website/content/SDK/crypto/ov/cghm/_index.md +++ /dev/null @@ -1,38 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.ov.cghm(limit: int = 250, category: str = '', sortby: str = 'Symbol', ascend: bool = False) -> pandas.core.frame.DataFrame - -Get N coins from CoinGecko [Source: CoinGecko] - - Parameters - ---------- - limit: int - Number of top coins to grab from CoinGecko - category: str - Category of the coins we want to retrieve - sortby: str - Key to sort data - ascend: bool - Sort data in ascending order - - Returns - ------- - pandas.DataFrame - N coins - -## Getting charts -### crypto.ov.cghm(category: str = '', limit: int = 15, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) -> None - -Shows cryptocurrencies heatmap [Source: CoinGecko] - - Parameters - ---------- - caterogy: str - Category (e.g., stablecoins). Empty for no category (default: ) - limit: int - Number of top cryptocurrencies to display - export: str - Export dataframe data to csv,json,xlsx - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/crypto/ov/cghm/_index.rst b/website/content/SDK/crypto/ov/cghm/_index.rst new file mode 100644 index 00000000000..d2f3173e1c6 --- /dev/null +++ b/website/content/SDK/crypto/ov/cghm/_index.rst @@ -0,0 +1,86 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.ov.cghm( + limit: int = 250, + category: str = '', + sortby: str = 'Symbol', + ascend: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get N coins from CoinGecko [Source: CoinGecko] +

+ +* **Parameters** + + limit: int + Number of top coins to grab from CoinGecko + category: str + Category of the coins we want to retrieve + sortby: str + Key to sort data + ascend: bool + Sort data in ascending order + chart: *bool* + Flag to display chart + + +* **Returns** + + pandas.DataFrame + N coins + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.ov.cghm( + category: str = '', + limit: int = 15, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Shows cryptocurrencies heatmap [Source: CoinGecko] +

+ +* **Parameters** + + caterogy: str + Category (e.g., stablecoins). Empty for no category (default: ) + limit: int + Number of top cryptocurrencies to display + export: str + Export dataframe data to csv,json,xlsx + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/ov/cghold/_index.md b/website/content/SDK/crypto/ov/cghold/_index.md deleted file mode 100644 index 02be22ee895..00000000000 --- a/website/content/SDK/crypto/ov/cghold/_index.md +++ /dev/null @@ -1,33 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.ov.cghold(endpoint: str = 'bitcoin') -> List[Any] - -Returns public companies that holds ethereum or bitcoin [Source: CoinGecko] - - Parameters - ---------- - endpoint : str - "bitcoin" or "ethereum" - - Returns - ------- - List: - - str: Overall statistics - - pandas.DataFrame: Companies holding crypto - -## Getting charts -### crypto.ov.cghold(symbol: str, show_bar: bool = False, export: str = '', limit: int = 15, chart=True) -> None - -Shows overview of public companies that holds ethereum or bitcoin. [Source: CoinGecko] - - Parameters - ---------- - symbol: str - Cryptocurrency: ethereum or bitcoin - show_bar : bool - Whether to show a bar graph for the data - export: str - Export dataframe data to csv,json,xlsx - limit: int - The number of rows to show diff --git a/website/content/SDK/crypto/ov/cghold/_index.rst b/website/content/SDK/crypto/ov/cghold/_index.rst new file mode 100644 index 00000000000..ca456b1f546 --- /dev/null +++ b/website/content/SDK/crypto/ov/cghold/_index.rst @@ -0,0 +1,78 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.ov.cghold( + endpoint: str = 'bitcoin', + chart: bool = False, +) -> List[Any] +{{< /highlight >}} + +.. raw:: html + +

+ Returns public companies that holds ethereum or bitcoin [Source: CoinGecko] +

+ +* **Parameters** + + endpoint : str + "bitcoin" or "ethereum" + chart: *bool* + Flag to display chart + + +* **Returns** + + List: + - str: Overall statistics + - pandas.DataFrame: Companies holding crypto + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.ov.cghold( + symbol: str, + show_bar: bool = False, + export: str = '', + limit: int = 15, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Shows overview of public companies that holds ethereum or bitcoin. [Source: CoinGecko] +

+ +* **Parameters** + + symbol: str + Cryptocurrency: ethereum or bitcoin + show_bar : bool + Whether to show a bar graph for the data + export: str + Export dataframe data to csv,json,xlsx + limit: int + The number of rows to show + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/ov/cgindexes/_index.md b/website/content/SDK/crypto/ov/cgindexes/_index.md deleted file mode 100644 index ec9d9045743..00000000000 --- a/website/content/SDK/crypto/ov/cgindexes/_index.md +++ /dev/null @@ -1,31 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.ov.cgindexes(sortby: str = 'Name', ascend: bool = True) -> pandas.core.frame.DataFrame - -Get list of crypto indexes from CoinGecko API [Source: CoinGecko] - - Returns - ------- - pandas.DataFrame - Name, Id, Market, Last, MultiAsset - sortby: str - Key by which to sort data - ascend: bool - Flag to sort data descending - -## Getting charts -### crypto.ov.cgindexes(sortby: str = 'Name', ascend: bool = True, limit: int = 15, export: str = '', chart=True) -> None - -Shows list of crypto indexes. [Source: CoinGecko] - - Parameters - ---------- - limit: int - Number of records to display - sortby: str - Key by which to sort data - ascend: bool - Flag to sort data descending - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/ov/cgindexes/_index.rst b/website/content/SDK/crypto/ov/cgindexes/_index.rst new file mode 100644 index 00000000000..50bf5898d42 --- /dev/null +++ b/website/content/SDK/crypto/ov/cgindexes/_index.rst @@ -0,0 +1,83 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.ov.cgindexes( + sortby: str = 'Name', + ascend: bool = True, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get list of crypto indexes from CoinGecko API [Source: CoinGecko] + + Returns + ------- + pandas.DataFrame + Name, Id, Market, Last, MultiAsset + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data descending +

+ +* **Returns** + + pandas.DataFrame + Name, Id, Market, Last, MultiAsset + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data descending + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.ov.cgindexes( + sortby: str = 'Name', + ascend: bool = True, + limit: int = 15, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Shows list of crypto indexes. [Source: CoinGecko] +

+ +* **Parameters** + + limit: int + Number of records to display + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data descending + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/ov/cgproducts/_index.md b/website/content/SDK/crypto/ov/cgproducts/_index.md deleted file mode 100644 index f02c97fa440..00000000000 --- a/website/content/SDK/crypto/ov/cgproducts/_index.md +++ /dev/null @@ -1,34 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.ov.cgproducts(sortby: str = 'Name', ascend: bool = True) -> pandas.core.frame.DataFrame - -Get list of financial products from CoinGecko API - - Parameters - ---------- - sortby: str - Key by which to sort data - ascend: bool - Flag to sort data ascending - - Returns - ------- - pandas.DataFrame - Rank, Platform, Identifier, Supply_Rate, Borrow_Rate - -## Getting charts -### crypto.ov.cgproducts(sortby: str = 'Platform', ascend: bool = False, limit: int = 15, export: str = '', chart=True) -> None - -Shows list of financial products. [Source: CoinGecko] - - Parameters - ---------- - limit: int - Number of records to display - sortby: str - Key by which to sort data - ascend: bool - Flag to sort data descending - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/ov/cgproducts/_index.rst b/website/content/SDK/crypto/ov/cgproducts/_index.rst new file mode 100644 index 00000000000..d6255dcab3a --- /dev/null +++ b/website/content/SDK/crypto/ov/cgproducts/_index.rst @@ -0,0 +1,80 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.ov.cgproducts( + sortby: str = 'Name', + ascend: bool = True, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get list of financial products from CoinGecko API +

+ +* **Parameters** + + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data ascending + chart: *bool* + Flag to display chart + + +* **Returns** + + pandas.DataFrame + Rank, Platform, Identifier, Supply_Rate, Borrow_Rate + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.ov.cgproducts( + sortby: str = 'Platform', + ascend: bool = False, + limit: int = 15, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Shows list of financial products. [Source: CoinGecko] +

+ +* **Parameters** + + limit: int + Number of records to display + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data descending + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/ov/cgstables/_index.md b/website/content/SDK/crypto/ov/cgstables/_index.md deleted file mode 100644 index 420d0c29296..00000000000 --- a/website/content/SDK/crypto/ov/cgstables/_index.md +++ /dev/null @@ -1,38 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.ov.cgstables(limit: int = 20, sortby: str = 'rank', ascend: bool = False) -> pandas.core.frame.DataFrame - -Returns top stable coins [Source: CoinGecko] - - Parameters - ---------- - limit: int - How many rows to show - sortby: str - Key by which to sort data - ascend: bool - Flag to sort data ascending - - Returns - ------- - pandas.DataFrame - Rank, Name, Symbol, Price, Change_24h, Exchanges, Market_Cap, Change_30d, Url - -## Getting charts -### crypto.ov.cgstables(limit: int = 15, export: str = '', sortby: str = 'rank', ascend: bool = False, pie: bool = False, chart=True) -> None - -Shows stablecoins data [Source: CoinGecko] - - Parameters - ---------- - limit: int - Number of records to display - sortby: str - Key by which to sort data - ascend: bool - Flag to sort data ascending - export : str - Export dataframe data to csv,json,xlsx file - pie : bool - Whether to show a pie chart diff --git a/website/content/SDK/crypto/ov/cgstables/_index.rst b/website/content/SDK/crypto/ov/cgstables/_index.rst new file mode 100644 index 00000000000..cc7889b5ed1 --- /dev/null +++ b/website/content/SDK/crypto/ov/cgstables/_index.rst @@ -0,0 +1,86 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.ov.cgstables( + limit: int = 20, + sortby: str = 'rank', + ascend: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Returns top stable coins [Source: CoinGecko] +

+ +* **Parameters** + + limit: int + How many rows to show + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data ascending + chart: *bool* + Flag to display chart + + +* **Returns** + + pandas.DataFrame + Rank, Name, Symbol, Price, Change_24h, Exchanges, Market_Cap, Change_30d, Url + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.ov.cgstables( + limit: int = 15, + export: str = '', + sortby: str = 'rank', + ascend: bool = False, + pie: bool = False, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Shows stablecoins data [Source: CoinGecko] +

+ +* **Parameters** + + limit: int + Number of records to display + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data ascending + export : str + Export dataframe data to csv,json,xlsx file + pie : bool + Whether to show a pie chart + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/ov/cpcontracts/_index.md b/website/content/SDK/crypto/ov/cpcontracts/_index.md deleted file mode 100644 index 45ea73671ce..00000000000 --- a/website/content/SDK/crypto/ov/cpcontracts/_index.md +++ /dev/null @@ -1,37 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.ov.cpcontracts(platform_id: str = 'eth-ethereum', sortby: str = 'active', ascend: bool = True) -> pandas.core.frame.DataFrame - -Gets all contract addresses for given platform [Source: CoinPaprika] - Parameters - ---------- - platform_id: str - Blockchain platform like eth-ethereum - sortby: str - Key by which to sort data - ascend: bool - Flag to sort data ascend - - Returns - ------- - pandas.DataFrame - id, type, active - -## Getting charts -### crypto.ov.cpcontracts(symbol: str, sortby: str = 'active', ascend: bool = True, limit: int = 15, export: str = '', chart=True) -> None - -Gets all contract addresses for given platform. [Source: CoinPaprika] - - Parameters - ---------- - platform: str - Blockchain platform like eth-ethereum - limit: int - Number of records to display - sortby: str - Key by which to sort data - ascend: bool - Flag to sort data ascending - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/ov/cpcontracts/_index.rst b/website/content/SDK/crypto/ov/cpcontracts/_index.rst new file mode 100644 index 00000000000..40bd7b099be --- /dev/null +++ b/website/content/SDK/crypto/ov/cpcontracts/_index.rst @@ -0,0 +1,86 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.ov.cpcontracts( + platform_id: str = 'eth-ethereum', + sortby: str = 'active', + ascend: bool = True, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Gets all contract addresses for given platform [Source: CoinPaprika] +

+ +* **Parameters** + + platform_id: str + Blockchain platform like eth-ethereum + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data ascend + chart: *bool* + Flag to display chart + + +* **Returns** + + pandas.DataFrame + id, type, active + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.ov.cpcontracts( + symbol: str, + sortby: str = 'active', + ascend: bool = True, + limit: int = 15, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Gets all contract addresses for given platform. [Source: CoinPaprika] +

+ +* **Parameters** + + platform: str + Blockchain platform like eth-ethereum + limit: int + Number of records to display + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data ascending + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/ov/cpexchanges/_index.md b/website/content/SDK/crypto/ov/cpexchanges/_index.md deleted file mode 100644 index 2ab526adc8f..00000000000 --- a/website/content/SDK/crypto/ov/cpexchanges/_index.md +++ /dev/null @@ -1,43 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.ov.cpexchanges(symbols: str = 'USD', sortby: str = 'rank', ascend: bool = True) -> pandas.core.frame.DataFrame - - - List exchanges from CoinPaprika API [Source: CoinPaprika] - - Parameters - ---------- - symbols: str - Comma separated quotes to return e.g quotes=USD,BTC - sortby: str - Key by which to sort data - ascend: bool - Flag to sort data ascend - - Returns - ------- - pandas.DataFrame - rank, name, currencies, markets, fiats, confidence_score, reported_volume_24h, - reported_volume_7d ,reported_volume_30d, sessions_per_month, - -## Getting charts -### crypto.ov.cpexchanges(symbol: str, sortby: str = 'rank', ascend: bool = True, limit: int = 15, export: str = '', chart=True) -> None - -List exchanges from CoinPaprika API. [Source: CoinPaprika] - - Parameters - ---------- - currency: str - Quoted currency - limit: int - Number of records to display - sortby: str - Key by which to sort data - ascend: bool - Flag to sort data ascending - links: bool - Flag to display urls - export : str - Export dataframe data to csv,json,xlsx file - diff --git a/website/content/SDK/crypto/ov/cpexchanges/_index.rst b/website/content/SDK/crypto/ov/cpexchanges/_index.rst new file mode 100644 index 00000000000..04eb748c688 --- /dev/null +++ b/website/content/SDK/crypto/ov/cpexchanges/_index.rst @@ -0,0 +1,89 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.ov.cpexchanges( + symbols: str = 'USD', + sortby: str = 'rank', + ascend: bool = True, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ List exchanges from CoinPaprika API [Source: CoinPaprika] +

+ +* **Parameters** + + symbols: str + Comma separated quotes to return e.g quotes=USD,BTC + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data ascend + chart: *bool* + Flag to display chart + + +* **Returns** + + pandas.DataFrame + rank, name, currencies, markets, fiats, confidence_score, reported_volume_24h, + reported_volume_7d ,reported_volume_30d, sessions_per_month, + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.ov.cpexchanges( + symbol: str, + sortby: str = 'rank', + ascend: bool = True, + limit: int = 15, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ List exchanges from CoinPaprika API. [Source: CoinPaprika] +

+ +* **Parameters** + + currency: str + Quoted currency + limit: int + Number of records to display + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data ascending + links: bool + Flag to display urls + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/ov/cpexmarkets/_index.md b/website/content/SDK/crypto/ov/cpexmarkets/_index.md deleted file mode 100644 index 7d668da6f18..00000000000 --- a/website/content/SDK/crypto/ov/cpexmarkets/_index.md +++ /dev/null @@ -1,43 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.ov.cpexmarkets(exchange_id: str = 'binance', symbols: str = 'USD', sortby: str = 'pair', ascend: bool = True) -> pandas.core.frame.DataFrame - -List markets by exchange ID [Source: CoinPaprika] - - Parameters - ---------- - exchange_id: str - identifier of exchange e.g for Binance Exchange -> binance - symbols: str - Comma separated quotes to return e.g quotes=USD,BTC - sortby: str - Key by which to sort data - ascend: bool - Flag to sort data ascending - - Returns - ------- - pandas.DataFrame - pair, base_currency_name, quote_currency_name, market_url, - category, reported_volume_24h_share, trust_score, - -## Getting charts -### crypto.ov.cpexmarkets(exchange: str = 'binance', sortby: str = 'pair', ascend: bool = True, limit: int = 15, links: bool = False, export: str = '', chart=True) -> None - -Get all markets for given exchange [Source: CoinPaprika] - - Parameters - ---------- - exchange: str - Exchange identifier e.g Binance - limit: int - Number of records to display - sortby: str - Key by which to sort data - ascend: bool - Flag to sort data descending - links: bool - Flag to display urls - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/ov/cpexmarkets/_index.rst b/website/content/SDK/crypto/ov/cpexmarkets/_index.rst new file mode 100644 index 00000000000..5ac10e291b8 --- /dev/null +++ b/website/content/SDK/crypto/ov/cpexmarkets/_index.rst @@ -0,0 +1,93 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.ov.cpexmarkets( + exchange_id: str = 'binance', + symbols: str = 'USD', + sortby: str = 'pair', + ascend: bool = True, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ List markets by exchange ID [Source: CoinPaprika] +

+ +* **Parameters** + + exchange_id: str + identifier of exchange e.g for Binance Exchange -> binance + symbols: str + Comma separated quotes to return e.g quotes=USD,BTC + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data ascending + chart: *bool* + Flag to display chart + + +* **Returns** + + pandas.DataFrame + pair, base_currency_name, quote_currency_name, market_url, + category, reported_volume_24h_share, trust_score, + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.ov.cpexmarkets( + exchange: str = 'binance', + sortby: str = 'pair', + ascend: bool = True, + limit: int = 15, + links: bool = False, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Get all markets for given exchange [Source: CoinPaprika] +

+ +* **Parameters** + + exchange: str + Exchange identifier e.g Binance + limit: int + Number of records to display + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data descending + links: bool + Flag to display urls + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/ov/cpglobal/_index.md b/website/content/SDK/crypto/ov/cpglobal/_index.md deleted file mode 100644 index cdeda210502..00000000000 --- a/website/content/SDK/crypto/ov/cpglobal/_index.md +++ /dev/null @@ -1,28 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.ov.cpglobal() -> pandas.core.frame.DataFrame - -Return data frame with most important global crypto statistics like: - market_cap_usd, volume_24h_usd, bitcoin_dominance_percentage, cryptocurrencies_number, - market_cap_ath_value, market_cap_ath_date, volume_24h_ath_value, volume_24h_ath_date, - market_cap_change_24h, volume_24h_change_24h, last_updated. [Source: CoinPaprika] - - Returns - ------- - pandas.DataFrame - Most important global crypto statistics - Metric, Value - -## Getting charts -### crypto.ov.cpglobal(export: str = '', chart=True) -> None - -Return data frame with most important global crypto statistics like: - market_cap_usd, volume_24h_usd, bitcoin_dominance_percentage, cryptocurrencies_number, - market_cap_ath_value, market_cap_ath_date, volume_24h_ath_value, volume_24h_ath_date, - market_cap_change_24h, volume_24h_change_24h, last_updated [Source: CoinPaprika] - - Parameters - ---------- - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/ov/cpglobal/_index.rst b/website/content/SDK/crypto/ov/cpglobal/_index.rst new file mode 100644 index 00000000000..08892471825 --- /dev/null +++ b/website/content/SDK/crypto/ov/cpglobal/_index.rst @@ -0,0 +1,64 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.ov.cpglobal() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Return data frame with most important global crypto statistics like: + market_cap_usd, volume_24h_usd, bitcoin_dominance_percentage, cryptocurrencies_number, + market_cap_ath_value, market_cap_ath_date, volume_24h_ath_value, volume_24h_ath_date, + market_cap_change_24h, volume_24h_change_24h, last_updated. [Source: CoinPaprika] +

+ +* **Returns** + + pandas.DataFrame + Most important global crypto statistics + Metric, Value + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.ov.cpglobal( + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Return data frame with most important global crypto statistics like: + market_cap_usd, volume_24h_usd, bitcoin_dominance_percentage, cryptocurrencies_number, + market_cap_ath_value, market_cap_ath_date, volume_24h_ath_value, volume_24h_ath_date, + market_cap_change_24h, volume_24h_change_24h, last_updated [Source: CoinPaprika] +

+ +* **Parameters** + + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/ov/cpinfo/_index.md b/website/content/SDK/crypto/ov/cpinfo/_index.md deleted file mode 100644 index 4e22ac2e196..00000000000 --- a/website/content/SDK/crypto/ov/cpinfo/_index.md +++ /dev/null @@ -1,41 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.ov.cpinfo(symbols: str = 'USD', sortby: str = 'rank', ascend: bool = True) -> pandas.core.frame.DataFrame - -Returns basic coin information for all coins from CoinPaprika API [Source: CoinPaprika] - - Parameters - ---------- - symbols: str - Comma separated quotes to return e.g quotes=USD,BTC - sortby: str - Key by which to sort data - ascend: bool - Flag to sort data descending - - Returns - ------- - pandas.DataFrame - rank, name, symbol, price, volume_24h, circulating_supply, total_supply, - max_supply, market_cap, beta_value, ath_price, - -## Getting charts -### crypto.ov.cpinfo(symbol: str, sortby: str = 'rank', ascend: bool = True, limit: int = 15, export: str = '', chart=True) -> None - -Displays basic coin information for all coins from CoinPaprika API. [Source: CoinPaprika] - - Parameters - ---------- - symbol: str - Quoted currency - limit: int - Number of records to display - sortby: str - Key by which to sort data - ascend: bool - Flag to sort data descending - links: bool - Flag to display urls - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/ov/cpinfo/_index.rst b/website/content/SDK/crypto/ov/cpinfo/_index.rst new file mode 100644 index 00000000000..a00b5b5e658 --- /dev/null +++ b/website/content/SDK/crypto/ov/cpinfo/_index.rst @@ -0,0 +1,89 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.ov.cpinfo( + symbols: str = 'USD', + sortby: str = 'rank', + ascend: bool = True, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Returns basic coin information for all coins from CoinPaprika API [Source: CoinPaprika] +

+ +* **Parameters** + + symbols: str + Comma separated quotes to return e.g quotes=USD,BTC + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data descending + chart: *bool* + Flag to display chart + + +* **Returns** + + pandas.DataFrame + rank, name, symbol, price, volume_24h, circulating_supply, total_supply, + max_supply, market_cap, beta_value, ath_price, + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.ov.cpinfo( + symbol: str, + sortby: str = 'rank', + ascend: bool = True, + limit: int = 15, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Displays basic coin information for all coins from CoinPaprika API. [Source: CoinPaprika] +

+ +* **Parameters** + + symbol: str + Quoted currency + limit: int + Number of records to display + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data descending + links: bool + Flag to display urls + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/ov/cpmarkets/_index.md b/website/content/SDK/crypto/ov/cpmarkets/_index.md deleted file mode 100644 index 60a0876c057..00000000000 --- a/website/content/SDK/crypto/ov/cpmarkets/_index.md +++ /dev/null @@ -1,41 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.ov.cpmarkets(symbols: str = 'USD', sortby: str = 'rank', ascend: bool = True) -> pandas.core.frame.DataFrame - -Returns basic coin information for all coins from CoinPaprika API [Source: CoinPaprika] - - Parameters - ---------- - symbols: str - Comma separated quotes to return e.g quotes=USD,BTC - sortby: str - Key by which to sort data - ascend: bool - Flag to sort data ascend - - Returns - ------- - pandas.DataFrame - rank, name, symbol, price, volume_24h, mcap_change_24h, - pct_change_1h, pct_change_24h, ath_price, pct_from_ath, - -## Getting charts -### crypto.ov.cpmarkets(symbol: str, sortby: str = 'rank', ascend: bool = True, limit: int = 15, export: str = '', chart=True) -> None - -Displays basic market information for all coins from CoinPaprika API. [Source: CoinPaprika] - - Parameters - ---------- - symbol: str - Quoted currency - limit: int - Number of records to display - sortby: str - Key by which to sort data - ascend: bool - Flag to sort data ascending - links: bool - Flag to display urls - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/ov/cpmarkets/_index.rst b/website/content/SDK/crypto/ov/cpmarkets/_index.rst new file mode 100644 index 00000000000..faa65f9a9eb --- /dev/null +++ b/website/content/SDK/crypto/ov/cpmarkets/_index.rst @@ -0,0 +1,89 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.ov.cpmarkets( + symbols: str = 'USD', + sortby: str = 'rank', + ascend: bool = True, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Returns basic coin information for all coins from CoinPaprika API [Source: CoinPaprika] +

+ +* **Parameters** + + symbols: str + Comma separated quotes to return e.g quotes=USD,BTC + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data ascend + chart: *bool* + Flag to display chart + + +* **Returns** + + pandas.DataFrame + rank, name, symbol, price, volume_24h, mcap_change_24h, + pct_change_1h, pct_change_24h, ath_price, pct_from_ath, + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.ov.cpmarkets( + symbol: str, + sortby: str = 'rank', + ascend: bool = True, + limit: int = 15, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Displays basic market information for all coins from CoinPaprika API. [Source: CoinPaprika] +

+ +* **Parameters** + + symbol: str + Quoted currency + limit: int + Number of records to display + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data ascending + links: bool + Flag to display urls + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/ov/cpplatforms/_index.md b/website/content/SDK/crypto/ov/cpplatforms/_index.md deleted file mode 100644 index 01f0e6f7982..00000000000 --- a/website/content/SDK/crypto/ov/cpplatforms/_index.md +++ /dev/null @@ -1,22 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.ov.cpplatforms() -> pandas.core.frame.DataFrame - -List all smart contract platforms like ethereum, solana, cosmos, polkadot, kusama ... [Source: CoinPaprika] - - Returns - ------- - pandas.DataFrame - index, platform_id - -## Getting charts -### crypto.ov.cpplatforms(export: str, chart=True) -> None - -List all smart contract platforms like ethereum, solana, cosmos, polkadot, kusama. - [Source: CoinPaprika] - - Parameters - ---------- - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/ov/cpplatforms/_index.rst b/website/content/SDK/crypto/ov/cpplatforms/_index.rst new file mode 100644 index 00000000000..a7340e82166 --- /dev/null +++ b/website/content/SDK/crypto/ov/cpplatforms/_index.rst @@ -0,0 +1,58 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.ov.cpplatforms() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ List all smart contract platforms like ethereum, solana, cosmos, polkadot, kusama ... [Source: CoinPaprika] +

+ +* **Returns** + + pandas.DataFrame + index, platform_id + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.ov.cpplatforms( + export: str, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ List all smart contract platforms like ethereum, solana, cosmos, polkadot, kusama. + [Source: CoinPaprika] +

+ +* **Parameters** + + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/ov/cr/_index.md b/website/content/SDK/crypto/ov/cr/_index.md deleted file mode 100644 index 159e881fe45..00000000000 --- a/website/content/SDK/crypto/ov/cr/_index.md +++ /dev/null @@ -1,34 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.ov.cr(rate_type: str = 'borrow') -> pandas.core.frame.DataFrame - -Returns crypto {borrow,supply} interest rates for cryptocurrencies across several platforms - [Source: https://loanscan.io/] - - Parameters - ---------- - rate_type : str - Interest rate type: {borrow, supply}. Default: supply - Returns - ------- - pandas.DataFrame: crypto interest rates per platform - -## Getting charts -### crypto.ov.cr(symbols: str, platforms: str, rate_type: str = 'borrow', limit: int = 10, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) -> None - -Displays crypto {borrow,supply} interest rates for cryptocurrencies across several platforms - [Source: https://loanscan.io/] - - Parameters - ---------- - rate_type: str - Interest rate type: {borrow, supply}. Default: supply - symbols: str - Crypto separated by commas. Default: BTC,ETH,USDT,USDC - platforms: str - Platforms separated by commas. Default: BlockFi,Ledn,SwissBorg,Youhodler - limit: int - Number of records to show - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/ov/cr/_index.rst b/website/content/SDK/crypto/ov/cr/_index.rst new file mode 100644 index 00000000000..fa67bb794d6 --- /dev/null +++ b/website/content/SDK/crypto/ov/cr/_index.rst @@ -0,0 +1,82 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.ov.cr( + rate_type: str = 'borrow', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Returns crypto {borrow,supply} interest rates for cryptocurrencies across several platforms + [Source: https://loanscan.io/] +

+ +* **Parameters** + + rate_type : str + Interest rate type: {borrow, supply}. Default: supply + chart: *bool* + Flag to display chart + + +* **Returns** + + pandas.DataFrame: crypto interest rates per platform + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.ov.cr( + symbols: str, + platforms: str, + rate_type: str = 'borrow', + limit: int = 10, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Displays crypto {borrow,supply} interest rates for cryptocurrencies across several platforms + [Source: https://loanscan.io/] +

+ +* **Parameters** + + rate_type: str + Interest rate type: {borrow, supply}. Default: supply + symbols: str + Crypto separated by commas. Default: BTC,ETH,USDT,USDC + platforms: str + Platforms separated by commas. Default: BlockFi,Ledn,SwissBorg,Youhodler + limit: int + Number of records to show + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/ov/crypto_hack/_index.md b/website/content/SDK/crypto/ov/crypto_hack/_index.md deleted file mode 100644 index 652998e5c69..00000000000 --- a/website/content/SDK/crypto/ov/crypto_hack/_index.md +++ /dev/null @@ -1,15 +0,0 @@ -## Get underlying data -### crypto.ov.crypto_hack(slug: str) -> Optional[str] - -Get crypto hack - [Source: https://rekt.news] - - Parameters - ---------- - slug: str - slug of crypto hack - - Returns - ------- - pandas.DataFrame: - Hacks with columns {Platform,Date,Amount [$],Audited,URL} diff --git a/website/content/SDK/crypto/ov/crypto_hack/_index.rst b/website/content/SDK/crypto/ov/crypto_hack/_index.rst new file mode 100644 index 00000000000..24c0cc55d35 --- /dev/null +++ b/website/content/SDK/crypto/ov/crypto_hack/_index.rst @@ -0,0 +1,35 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.ov.crypto_hack( + slug: str, + chart: bool = False, +) -> Optional[str] +{{< /highlight >}} + +.. raw:: html + +

+ Get crypto hack + [Source: https://rekt.news] +

+ +* **Parameters** + + slug: str + slug of crypto hack + +* **Returns** + + pandas.DataFrame: + Hacks with columns {Platform,Date,Amount [$],Audited,URL} diff --git a/website/content/SDK/crypto/ov/crypto_hack_slugs/_index.md b/website/content/SDK/crypto/ov/crypto_hack_slugs/_index.md deleted file mode 100644 index 8bd78f08e4e..00000000000 --- a/website/content/SDK/crypto/ov/crypto_hack_slugs/_index.md +++ /dev/null @@ -1,9 +0,0 @@ -## Get underlying data -### crypto.ov.crypto_hack_slugs() -> List[str] - -Get all crypto hack slugs - [Source: https://rekt.news] - Returns - ------- - List[str]: - List with slugs diff --git a/website/content/SDK/crypto/ov/crypto_hack_slugs/_index.rst b/website/content/SDK/crypto/ov/crypto_hack_slugs/_index.rst new file mode 100644 index 00000000000..770472a7952 --- /dev/null +++ b/website/content/SDK/crypto/ov/crypto_hack_slugs/_index.rst @@ -0,0 +1,27 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.ov.crypto_hack_slugs() -> List[str] +{{< /highlight >}} + +.. raw:: html + +

+ Get all crypto hack slugs + [Source: https://rekt.news] +

+ +* **Returns** + + List[str]: + List with slugs diff --git a/website/content/SDK/crypto/ov/crypto_hacks/_index.md b/website/content/SDK/crypto/ov/crypto_hacks/_index.md deleted file mode 100644 index 467f03d7b01..00000000000 --- a/website/content/SDK/crypto/ov/crypto_hacks/_index.md +++ /dev/null @@ -1,39 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.ov.crypto_hacks(sortby: str = 'Platform', ascend: bool = False) -> pandas.core.frame.DataFrame - -Get major crypto-related hacks - [Source: https://rekt.news] - - Parameters - ---------- - sortby: str - Key by which to sort data {Platform,Date,Amount [$],Audit,Slug,URL} - ascend - Flag to sort data ascending - - Returns - ------- - pandas.DataFrame: - Hacks with columns {Platform,Date,Amount [$],Audited,Slug,URL} - -## Getting charts -### crypto.ov.crypto_hacks(limit: int = 15, sortby: str = 'Platform', ascend: bool = False, slug: str = 'polyntwork-rekt', export: str = '', chart=True) -> None - -Display list of major crypto-related hacks. If slug is passed - individual crypto hack is displayed instead of list of crypto hacks - [Source: https://rekt.news] - - Parameters - ---------- - slug: str - Crypto hack slug to check (e.g., polynetwork-rekt) - limit: int - Number of hacks to search - sortby: str - Key by which to sort data {Platform,Date,Amount [$],Audit,Slug,URL} - ascend: bool - Flag to sort data ascending - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/ov/crypto_hacks/_index.rst b/website/content/SDK/crypto/ov/crypto_hacks/_index.rst new file mode 100644 index 00000000000..1a16590197e --- /dev/null +++ b/website/content/SDK/crypto/ov/crypto_hacks/_index.rst @@ -0,0 +1,86 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.ov.crypto_hacks( + sortby: str = 'Platform', + ascend: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get major crypto-related hacks + [Source: https://rekt.news] +

+ +* **Parameters** + + sortby: str + Key by which to sort data {Platform,Date,Amount [$],Audit,Slug,URL} + ascend + Flag to sort data ascending + chart: *bool* + Flag to display chart + + +* **Returns** + + pandas.DataFrame: + Hacks with columns {Platform,Date,Amount [$],Audited,Slug,URL} + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.ov.crypto_hacks( + limit: int = 15, + sortby: str = 'Platform', + ascend: bool = False, + slug: str = 'polyntwork-rekt', + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display list of major crypto-related hacks. If slug is passed + individual crypto hack is displayed instead of list of crypto hacks + [Source: https://rekt.news] +

+ +* **Parameters** + + slug: str + Crypto hack slug to check (e.g., polynetwork-rekt) + limit: int + Number of hacks to search + sortby: str + Key by which to sort data {Platform,Date,Amount [$],Audit,Slug,URL} + ascend: bool + Flag to sort data ascending + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/ov/ewf/_index.md b/website/content/SDK/crypto/ov/ewf/_index.md deleted file mode 100644 index 501ab1b0ae1..00000000000 --- a/website/content/SDK/crypto/ov/ewf/_index.md +++ /dev/null @@ -1,26 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.ov.ewf() -> pandas.core.frame.DataFrame - -Scrapes exchange withdrawal fees - [Source: https://withdrawalfees.com/] - - Parameters - ---------- - - Returns - ------- - pandas.DataFrame: - Exchange, Coins, Lowest, Average, Median, Highest - -## Getting charts -### crypto.ov.ewf(export: str = '', chart=True) -> None - -Exchange withdrawal fees - [Source: https://withdrawalfees.com/] - - Parameters - ---------- - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/ov/ewf/_index.rst b/website/content/SDK/crypto/ov/ewf/_index.rst new file mode 100644 index 00000000000..29cdc35b012 --- /dev/null +++ b/website/content/SDK/crypto/ov/ewf/_index.rst @@ -0,0 +1,69 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.ov.ewf() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Scrapes exchange withdrawal fees + [Source: https://withdrawalfees.com/] + + Parameters + ---------- +

+ +* **Parameters** + + + chart: *bool* + Flag to display chart + + +* **Returns** + + pandas.DataFrame: + Exchange, Coins, Lowest, Average, Median, Highest + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.ov.ewf( + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Exchange withdrawal fees + [Source: https://withdrawalfees.com/] +

+ +* **Parameters** + + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/ov/exchanges/_index.md b/website/content/SDK/crypto/ov/exchanges/_index.md deleted file mode 100644 index 6bcf580b2c3..00000000000 --- a/website/content/SDK/crypto/ov/exchanges/_index.md +++ /dev/null @@ -1,36 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.ov.exchanges(sortby: str = 'Rank', ascend: bool = True) -> pandas.core.frame.DataFrame - -Get list of top exchanges from CoinGecko API [Source: CoinGecko] - - Parameters - ---------- - sortby: str - Key by which to sort data - ascend: bool - Flag to sort data descending - - Returns - ------- - pandas.DataFrame - Trust_Score, Id, Name, Country, Year_Established, Trade_Volume_24h_BTC, Url - -## Getting charts -### crypto.ov.exchanges(sortby: str = 'Rank', ascend: bool = False, limit: int = 15, links: bool = False, export: str = '', chart=True) -> None - -Shows list of top exchanges from CoinGecko. [Source: CoinGecko] - - Parameters - ---------- - limit: int - Number of records to display - sortby: str - Key by which to sort data - ascend: bool - Flag to sort data descending - links: bool - Flag to display urls - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/ov/exchanges/_index.rst b/website/content/SDK/crypto/ov/exchanges/_index.rst new file mode 100644 index 00000000000..ef9a62e68ee --- /dev/null +++ b/website/content/SDK/crypto/ov/exchanges/_index.rst @@ -0,0 +1,83 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.ov.exchanges( + sortby: str = 'Rank', + ascend: bool = True, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get list of top exchanges from CoinGecko API [Source: CoinGecko] +

+ +* **Parameters** + + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data descending + chart: *bool* + Flag to display chart + + +* **Returns** + + pandas.DataFrame + Trust_Score, Id, Name, Country, Year_Established, Trade_Volume_24h_BTC, Url + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.ov.exchanges( + sortby: str = 'Rank', + ascend: bool = False, + limit: int = 15, + links: bool = False, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Shows list of top exchanges from CoinGecko. [Source: CoinGecko] +

+ +* **Parameters** + + limit: int + Number of records to display + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data descending + links: bool + Flag to display urls + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/ov/global_info/_index.md b/website/content/SDK/crypto/ov/global_info/_index.md deleted file mode 100644 index e099f47d7bb..00000000000 --- a/website/content/SDK/crypto/ov/global_info/_index.md +++ /dev/null @@ -1,15 +0,0 @@ -## Get underlying data -### crypto.ov.global_info() -> pandas.core.frame.DataFrame - -Get global statistics about crypto from CoinGecko API like: - - market cap change - - number of markets - - icos - - number of active crypto - - [Source: CoinGecko] - - Returns - ------- - pandas.DataFrame - Metric, Value diff --git a/website/content/SDK/crypto/ov/global_info/_index.rst b/website/content/SDK/crypto/ov/global_info/_index.rst new file mode 100644 index 00000000000..feef8f644ca --- /dev/null +++ b/website/content/SDK/crypto/ov/global_info/_index.rst @@ -0,0 +1,32 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.ov.global_info() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get global statistics about crypto from CoinGecko API like: + - market cap change + - number of markets + - icos + - number of active crypto + + [Source: CoinGecko] +

+ +* **Returns** + + pandas.DataFrame + Metric, Value diff --git a/website/content/SDK/crypto/ov/list_of_coins/_index.md b/website/content/SDK/crypto/ov/list_of_coins/_index.md deleted file mode 100644 index 78434a60a17..00000000000 --- a/website/content/SDK/crypto/ov/list_of_coins/_index.md +++ /dev/null @@ -1,10 +0,0 @@ -## Get underlying data -### crypto.ov.list_of_coins() -> pandas.core.frame.DataFrame - -Get list of all available coins on CoinPaprika [Source: CoinPaprika] - - Returns - ------- - pandas.DataFrame - Available coins on CoinPaprika - rank, id, name, symbol, type diff --git a/website/content/SDK/crypto/ov/list_of_coins/_index.rst b/website/content/SDK/crypto/ov/list_of_coins/_index.rst new file mode 100644 index 00000000000..5c8f4c970da --- /dev/null +++ b/website/content/SDK/crypto/ov/list_of_coins/_index.rst @@ -0,0 +1,27 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.ov.list_of_coins() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get list of all available coins on CoinPaprika [Source: CoinPaprika] +

+ +* **Returns** + + pandas.DataFrame + Available coins on CoinPaprika + rank, id, name, symbol, type diff --git a/website/content/SDK/crypto/ov/news/_index.md b/website/content/SDK/crypto/ov/news/_index.md deleted file mode 100644 index 1fd01333af8..00000000000 --- a/website/content/SDK/crypto/ov/news/_index.md +++ /dev/null @@ -1,53 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.ov.news(limit: int = 60, post_kind: str = 'news', filter_: Optional[str] = None, region: str = 'en', source: Optional[str] = None, symbol: Optional[str] = None, sortby: str = 'published_at', ascend: bool = True) -> pandas.core.frame.DataFrame - -Get recent posts from CryptoPanic news aggregator platform. [Source: https://cryptopanic.com/] - - Parameters - ---------- - limit: int - number of news to fetch - post_kind: str - Filter by category of news. Available values: news or media. - filter_: Optional[str] - Filter by kind of news. One from list: rising|hot|bullish|bearish|important|saved|lol - region: str - Filter news by regions. Available regions are: en (English), de (Deutsch), nl (Dutch), - es (Español), fr (Français), it (Italiano), pt (Português), ru (Русский) - sortby: str - Key to sort by. - ascend: bool - Sort in ascend order. - - Returns - ------- - pd.DataFrame - DataFrame with recent news from different sources filtered by provided parameters. - -## Getting charts -### crypto.ov.news(post_kind: str = 'news', region: str = 'en', filter_: Optional[str] = None, limit: int = 25, sortby: str = 'published_at', ascend: bool = False, links: bool = False, export: str = '', chart=True) -> None - -Display recent posts from CryptoPanic news aggregator platform. - [Source: https://cryptopanic.com/] - - Parameters - ---------- - limit: int - number of news to display - post_kind: str - Filter by category of news. Available values: news or media. - filter_: Optional[str] - Filter by kind of news. One from list: rising|hot|bullish|bearish|important|saved|lol - region: str - Filter news by regions. Available regions are: en (English), de (Deutsch), nl (Dutch), - es (Español), fr (Français), it (Italiano), pt (Português), ru (Русский) - sortby: str - Key to sort by. - ascend: bool - Sort in ascending order. - links: bool - Show urls for news - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/ov/news/_index.rst b/website/content/SDK/crypto/ov/news/_index.rst new file mode 100644 index 00000000000..b358a4e51ea --- /dev/null +++ b/website/content/SDK/crypto/ov/news/_index.rst @@ -0,0 +1,109 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.ov.news( + limit: int = 60, + post_kind: str = 'news', + filter_: Optional[str] = None, + region: str = 'en', + source: Optional[str] = None, + symbol: Optional[str] = None, + sortby: str = 'published_at', + ascend: bool = True, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get recent posts from CryptoPanic news aggregator platform. [Source: https://cryptopanic.com/] +

+ +* **Parameters** + + limit: int + number of news to fetch + post_kind: str + Filter by category of news. Available values: news or media. + filter\_: Optional[str] + Filter by kind of news. One from list: rising|hot|bullish|bearish|important|saved|lol + region: str + Filter news by regions. Available regions are: en (English), de (Deutsch), nl (Dutch), + es (Español), fr (Français), it (Italiano), pt (Português), ru (Русский) + sortby: str + Key to sort by. + ascend: bool + Sort in ascend order. + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + DataFrame with recent news from different sources filtered by provided parameters. + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.ov.news( + post_kind: str = 'news', + region: str = 'en', + filter_: Optional[str] = None, + limit: int = 25, + sortby: str = 'published_at', + ascend: bool = False, + links: bool = False, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display recent posts from CryptoPanic news aggregator platform. + [Source: https://cryptopanic.com/] +

+ +* **Parameters** + + limit: int + number of news to display + post_kind: str + Filter by category of news. Available values: news or media. + filter\_: Optional[str] + Filter by kind of news. One from list: rising|hot|bullish|bearish|important|saved|lol + region: str + Filter news by regions. Available regions are: en (English), de (Deutsch), nl (Dutch), + es (Español), fr (Français), it (Italiano), pt (Português), ru (Русский) + sortby: str + Key to sort by. + ascend: bool + Sort in ascending order. + links: bool + Show urls for news + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/ov/platforms/_index.md b/website/content/SDK/crypto/ov/platforms/_index.md deleted file mode 100644 index 8e2a65a447b..00000000000 --- a/website/content/SDK/crypto/ov/platforms/_index.md +++ /dev/null @@ -1,34 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.ov.platforms(sortby: str = 'Name', ascend: bool = True) -> pandas.core.frame.DataFrame - -Get list of financial platforms from CoinGecko API [Source: CoinGecko] - - Parameter - ---------- - sortby: str - Key by which to sort data - ascend: bool - Flag to sort data ascending - - Returns - ------- - pandas.DataFrame - Rank, Name, Category, Centralized, Url - -## Getting charts -### crypto.ov.platforms(sortby: str = 'Name', ascend: bool = True, limit: int = 15, export: str = '', chart=True) -> None - -Shows list of financial platforms. [Source: CoinGecko] - - Parameters - ---------- - limit: int - Number of records to display - sortby: str - Key by which to sort data - ascend: bool - Flag to sort data ascending - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/ov/platforms/_index.rst b/website/content/SDK/crypto/ov/platforms/_index.rst new file mode 100644 index 00000000000..742aadbfe94 --- /dev/null +++ b/website/content/SDK/crypto/ov/platforms/_index.rst @@ -0,0 +1,80 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.ov.platforms( + sortby: str = 'Name', + ascend: bool = True, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get list of financial platforms from CoinGecko API [Source: CoinGecko] +

+ +* **Parameters** + + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data ascending + chart: *bool* + Flag to display chart + + +* **Returns** + + pandas.DataFrame + Rank, Name, Category, Centralized, Url + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.ov.platforms( + sortby: str = 'Name', + ascend: bool = True, + limit: int = 15, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Shows list of financial platforms. [Source: CoinGecko] +

+ +* **Parameters** + + limit: int + Number of records to display + sortby: str + Key by which to sort data + ascend: bool + Flag to sort data ascending + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/ov/wf/_index.md b/website/content/SDK/crypto/ov/wf/_index.md deleted file mode 100644 index 8eb347ab67e..00000000000 --- a/website/content/SDK/crypto/ov/wf/_index.md +++ /dev/null @@ -1,29 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.ov.wf(limit: int = 100) -> pandas.core.frame.DataFrame - -Scrapes top coins withdrawal fees - [Source: https://withdrawalfees.com/] - - Parameters - ---------- - limit: int - Number of coins to search, by default n=100, one page has 100 coins, so 1 page is scraped. - Returns - ------- - pandas.DataFrame: - Coin, Lowest, Average, Median, Highest, Exchanges Compared - -## Getting charts -### crypto.ov.wf(limit: int = 15, export: str = '', chart=True) -> None - -Top coins withdrawal fees - [Source: https://withdrawalfees.com/] - - Parameters - ---------- - limit: int - Number of coins to search - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/ov/wf/_index.rst b/website/content/SDK/crypto/ov/wf/_index.rst new file mode 100644 index 00000000000..c78457dec70 --- /dev/null +++ b/website/content/SDK/crypto/ov/wf/_index.rst @@ -0,0 +1,73 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.ov.wf( + limit: int = 100, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Scrapes top coins withdrawal fees + [Source: https://withdrawalfees.com/] +

+ +* **Parameters** + + limit: int + Number of coins to search, by default n=100, one page has 100 coins, so 1 page is scraped. + chart: *bool* + Flag to display chart + + +* **Returns** + + pandas.DataFrame: + Coin, Lowest, Average, Median, Highest, Exchanges Compared + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.ov.wf( + limit: int = 15, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Top coins withdrawal fees + [Source: https://withdrawalfees.com/] +

+ +* **Parameters** + + limit: int + Number of coins to search + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/ov/wfpe/_index.md b/website/content/SDK/crypto/ov/wfpe/_index.md deleted file mode 100644 index 02892b51160..00000000000 --- a/website/content/SDK/crypto/ov/wfpe/_index.md +++ /dev/null @@ -1,30 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.ov.wfpe(symbol: str) -> List[Any] - -Scrapes coin withdrawal fees per exchange - [Source: https://withdrawalfees.com/] - - Parameters - ---------- - symbol: str - Coin to check withdrawal fees. By default bitcoin - Returns - ------- - List: - - str: Overall statistics (exchanges, lowest, average and median) - - pandas.DataFrame: Exchange, Withdrawal Fee, Minimum Withdrawal Amount - -## Getting charts -### crypto.ov.wfpe(symbol: str, export: str = '', chart=True) -> None - -Coin withdrawal fees per exchange - [Source: https://withdrawalfees.com/] - - Parameters - ---------- - symbol: str - Coin to check withdrawal fees - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/crypto/ov/wfpe/_index.rst b/website/content/SDK/crypto/ov/wfpe/_index.rst new file mode 100644 index 00000000000..7ffc3647a57 --- /dev/null +++ b/website/content/SDK/crypto/ov/wfpe/_index.rst @@ -0,0 +1,74 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.ov.wfpe( + symbol: str, + chart: bool = False, +) -> List[Any] +{{< /highlight >}} + +.. raw:: html + +

+ Scrapes coin withdrawal fees per exchange + [Source: https://withdrawalfees.com/] +

+ +* **Parameters** + + symbol: str + Coin to check withdrawal fees. By default bitcoin + chart: *bool* + Flag to display chart + + +* **Returns** + + List: + - str: Overall statistics (exchanges, lowest, average and median) + - pandas.DataFrame: Exchange, Withdrawal Fee, Minimum Withdrawal Amount + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.ov.wfpe( + symbol: str, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Coin withdrawal fees per exchange + [Source: https://withdrawalfees.com/] +

+ +* **Parameters** + + symbol: str + Coin to check withdrawal fees + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/crypto/price/_index.md b/website/content/SDK/crypto/price/_index.md deleted file mode 100644 index c05cad51d25..00000000000 --- a/website/content/SDK/crypto/price/_index.md +++ /dev/null @@ -1,18 +0,0 @@ -## Get underlying data -### crypto.price(symbol: str) - -Returns price and confidence interval from pyth live feed. [Source: Pyth] - - Parameters - ---------- - symbol : str - Symbol of the asset to get price and confidence interval from - - Returns - ------- - float - Price of the asset - float - Confidence level - float - Previous price of the asset diff --git a/website/content/SDK/crypto/price/_index.rst b/website/content/SDK/crypto/price/_index.rst new file mode 100644 index 00000000000..f333e88681a --- /dev/null +++ b/website/content/SDK/crypto/price/_index.rst @@ -0,0 +1,38 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.price( + symbol: str, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Returns price and confidence interval from pyth live feed. [Source: Pyth] +

+ +* **Parameters** + + symbol : str + Symbol of the asset to get price and confidence interval from + +* **Returns** + + float + Price of the asset + float + Confidence level + float + Previous price of the asset diff --git a/website/content/SDK/crypto/tools/apy/_index.md b/website/content/SDK/crypto/tools/apy/_index.md deleted file mode 100644 index b15d73237a2..00000000000 --- a/website/content/SDK/crypto/tools/apy/_index.md +++ /dev/null @@ -1,38 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.tools.apy(apr: float, compounding_times: int) -> Tuple[pandas.core.frame.DataFrame, str] - -Converts apr into apy - - Parameters - ---------- - apr: float - value in percentage - compounding_times: int - number of compounded periods in a year - - Returns - ------- - Tuple: - - pd.DataFrame: dataframe with results - - str: narrative version of results - -## Getting charts -### crypto.tools.apy(apr: float, compounding_times: int, narrative: bool = False, export: str = '', chart=True) - -Displays APY value converted from APR - - Parameters - ---------- - apr: float - value in percentage - compounding_times: int - number of compounded periods in a year - narrative: str - display narrative version instead of dataframe - export : str - Export dataframe data to csv,json,xlsx file - - Returns - ------- diff --git a/website/content/SDK/crypto/tools/apy/_index.rst b/website/content/SDK/crypto/tools/apy/_index.rst new file mode 100644 index 00000000000..4c57f0b5bce --- /dev/null +++ b/website/content/SDK/crypto/tools/apy/_index.rst @@ -0,0 +1,85 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.tools.apy( + apr: float, + compounding_times: int, + chart: bool = False, +) -> Tuple[pandas.core.frame.DataFrame, str] +{{< /highlight >}} + +.. raw:: html + +

+ Converts apr into apy +

+ +* **Parameters** + + apr: float + value in percentage + compounding_times: int + number of compounded periods in a year + chart: *bool* + Flag to display chart + + +* **Returns** + + Tuple: + - pd.DataFrame: dataframe with results + - str: narrative version of results + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.tools.apy( + apr: float, + compounding_times: int, + narrative: bool = False, + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Displays APY value converted from APR +

+ +* **Parameters** + + apr: float + value in percentage + compounding_times: int + number of compounded periods in a year + narrative: str + display narrative version instead of dataframe + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + + +* **Returns** + + diff --git a/website/content/SDK/crypto/tools/il/_index.md b/website/content/SDK/crypto/tools/il/_index.md deleted file mode 100644 index 98c18decdec..00000000000 --- a/website/content/SDK/crypto/tools/il/_index.md +++ /dev/null @@ -1,46 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### crypto.tools.il(price_changeA: float, price_changeB: float, proportion: float, initial_pool_value: float) -> Tuple[pandas.core.frame.DataFrame, str] - -Calculates Impermanent Loss in a custom liquidity pool - - Parameters - ---------- - price_changeA: float - price change of crypto A in percentage - price_changeB: float - price change of crypto B in percentage - proportion: float - percentage of first token in pool - initial_pool_value: float - initial value that pool contains - - Returns - ------- - Tuple: - - pd.DataFrame: dataframe with results - - str: narrative version of results - -## Getting charts -### crypto.tools.il(price_changeA: int, price_changeB: int, proportion: int, initial_pool_value: int, narrative: bool = False, export: str = '', chart=True) - -Displays Impermanent Loss in a custom liquidity pool - - Parameters - ---------- - price_changeA: float - price change of crypto A in percentage - price_changeB: float - price change of crypto B in percentage - proportion: float - percentage of first token in pool - initial_pool_value: float - initial value that pool contains - narrative: str - display narrative version instead of dataframe - export : str - Export dataframe data to csv,json,xlsx file - - Returns - ------- diff --git a/website/content/SDK/crypto/tools/il/_index.rst b/website/content/SDK/crypto/tools/il/_index.rst new file mode 100644 index 00000000000..c119d565a15 --- /dev/null +++ b/website/content/SDK/crypto/tools/il/_index.rst @@ -0,0 +1,97 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +crypto.tools.il( + price_changeA: float, + price_changeB: float, + proportion: float, + initial_pool_value: float, + chart: bool = False, +) -> Tuple[pandas.core.frame.DataFrame, str] +{{< /highlight >}} + +.. raw:: html + +

+ Calculates Impermanent Loss in a custom liquidity pool +

+ +* **Parameters** + + price_changeA: float + price change of crypto A in percentage + price_changeB: float + price change of crypto B in percentage + proportion: float + percentage of first token in pool + initial_pool_value: float + initial value that pool contains + chart: *bool* + Flag to display chart + + +* **Returns** + + Tuple: + - pd.DataFrame: dataframe with results + - str: narrative version of results + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +crypto.tools.il( + price_changeA: int, + price_changeB: int, + proportion: int, + initial_pool_value: int, + narrative: bool = False, + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Displays Impermanent Loss in a custom liquidity pool +

+ +* **Parameters** + + price_changeA: float + price change of crypto A in percentage + price_changeB: float + price change of crypto B in percentage + proportion: float + percentage of first token in pool + initial_pool_value: float + initial value that pool contains + narrative: str + display narrative version instead of dataframe + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + + +* **Returns** + + diff --git a/website/content/SDK/econometrics/bgod/_index.md b/website/content/SDK/econometrics/bgod/_index.md deleted file mode 100644 index cf28dca5cec..00000000000 --- a/website/content/SDK/econometrics/bgod/_index.md +++ /dev/null @@ -1,31 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### econometrics.bgod(model: pandas.core.frame.DataFrame, lags: int = 3) -> tuple - -Calculate test statistics for autocorrelation - - Parameters - ---------- - model : OLS Model - Model containing residual values. - lags : int - The amount of lags. - - Returns - ------- - Test results from the Breusch-Godfrey Test - -## Getting charts -### econometrics.bgod(model: pandas.core.frame.DataFrame, lags: int = 3, export: str = '', chart=True) - -Show Breusch-Godfrey autocorrelation test - - Parameters - ---------- - model : OLS Model - Model containing residual values. - lags : int - The amount of lags included. - export : str - Format to export data diff --git a/website/content/SDK/econometrics/bgod/_index.rst b/website/content/SDK/econometrics/bgod/_index.rst new file mode 100644 index 00000000000..5a13ccd25b5 --- /dev/null +++ b/website/content/SDK/econometrics/bgod/_index.rst @@ -0,0 +1,76 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +econometrics.bgod( + model: pandas.core.frame.DataFrame, + lags: int = 3, + chart: bool = False, +) -> tuple +{{< /highlight >}} + +.. raw:: html + +

+ Calculate test statistics for autocorrelation +

+ +* **Parameters** + + model : OLS Model + Model containing residual values. + lags : int + The amount of lags. + chart: *bool* + Flag to display chart + + +* **Returns** + + Test results from the Breusch-Godfrey Test + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +econometrics.bgod( + model: pandas.core.frame.DataFrame, + lags: int = 3, + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Show Breusch-Godfrey autocorrelation test +

+ +* **Parameters** + + model : OLS Model + Model containing residual values. + lags : int + The amount of lags included. + export : str + Format to export data + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/econometrics/bols/_index.md b/website/content/SDK/econometrics/bols/_index.md deleted file mode 100644 index 4052b28db19..00000000000 --- a/website/content/SDK/econometrics/bols/_index.md +++ /dev/null @@ -1,19 +0,0 @@ -## Get underlying data -### econometrics.bols(regression_variables: List[Tuple], data: Dict[str, pandas.core.frame.DataFrame]) -> Tuple[pandas.core.frame.DataFrame, Any, List[Any], Any] - -The between estimator is an alternative, usually less efficient estimator, can can be used to - estimate model parameters. It is particular simple since it first computes the time averages of - y and x and then runs a simple regression using these averages. [Source: LinearModels] - - Parameters - ---------- - regression_variables : list - The regressions variables entered where the first variable is - the dependent variable. - data : dict - A dictionary containing the datasets. - - Returns - ------- - The dataset used, the dependent variable, the independent variable and - the Between OLS model. diff --git a/website/content/SDK/econometrics/bols/_index.rst b/website/content/SDK/econometrics/bols/_index.rst new file mode 100644 index 00000000000..aa2df70b992 --- /dev/null +++ b/website/content/SDK/econometrics/bols/_index.rst @@ -0,0 +1,40 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +econometrics.bols( + regression_variables: List[Tuple], + data: Dict[str, pandas.core.frame.DataFrame], + chart: bool = False, +) -> Tuple[pandas.core.frame.DataFrame, Any, List[Any], Any] +{{< /highlight >}} + +.. raw:: html + +

+ The between estimator is an alternative, usually less efficient estimator, can can be used to + estimate model parameters. It is particular simple since it first computes the time averages of + y and x and then runs a simple regression using these averages. [Source: LinearModels] +

+ +* **Parameters** + + regression_variables : list + The regressions variables entered where the first variable is + the dependent variable. + data : dict + A dictionary containing the datasets. + +* **Returns** + + The dataset used, the dependent variable, the independent variable and + the Between OLS model. diff --git a/website/content/SDK/econometrics/bpag/_index.md b/website/content/SDK/econometrics/bpag/_index.md deleted file mode 100644 index 7d1760783fc..00000000000 --- a/website/content/SDK/econometrics/bpag/_index.md +++ /dev/null @@ -1,27 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### econometrics.bpag(model: pandas.core.frame.DataFrame) -> tuple - -Calculate test statistics for heteroscedasticity - - Parameters - ---------- - model : OLS Model - Model containing residual values. - - Returns - ------- - Test results from the Breusch-Pagan Test - -## Getting charts -### econometrics.bpag(model: pandas.core.frame.DataFrame, export: str = '', chart=True) - -Show Breusch-Pagan heteroscedasticity test - - Parameters - ---------- - model : OLS Model - Model containing residual values. - export : str - Format to export data diff --git a/website/content/SDK/econometrics/bpag/_index.rst b/website/content/SDK/econometrics/bpag/_index.rst new file mode 100644 index 00000000000..5b9c2ceae1f --- /dev/null +++ b/website/content/SDK/econometrics/bpag/_index.rst @@ -0,0 +1,70 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +econometrics.bpag( + model: pandas.core.frame.DataFrame, + chart: bool = False, +) -> tuple +{{< /highlight >}} + +.. raw:: html + +

+ Calculate test statistics for heteroscedasticity +

+ +* **Parameters** + + model : OLS Model + Model containing residual values. + chart: *bool* + Flag to display chart + + +* **Returns** + + Test results from the Breusch-Pagan Test + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +econometrics.bpag( + model: pandas.core.frame.DataFrame, + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Show Breusch-Pagan heteroscedasticity test +

+ +* **Parameters** + + model : OLS Model + Model containing residual values. + export : str + Format to export data + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/econometrics/clean/_index.md b/website/content/SDK/econometrics/clean/_index.md deleted file mode 100644 index ca7827fc9d7..00000000000 --- a/website/content/SDK/econometrics/clean/_index.md +++ /dev/null @@ -1,22 +0,0 @@ -## Get underlying data -### econometrics.clean(dataset: pandas.core.frame.DataFrame, fill: str = '', drop: str = '', limit: Optional[int] = None) -> pandas.core.frame.DataFrame - -Clean up NaNs from the dataset - - Parameters - ---------- - dataset : pd.DataFrame - The dataset you wish to clean - fill : str - The method of filling NaNs. Choose from: - rfill, cfill, rbfill, cbfill, rffill, cffill - drop : str - The method of dropping NaNs. Choose from: - rdrop, cdrop - limit : int - The maximum limit you wish to apply that can be forward or backward filled - - Returns - ------- - pd.DataFrame: - Dataframe with cleaned up data diff --git a/website/content/SDK/econometrics/clean/_index.rst b/website/content/SDK/econometrics/clean/_index.rst new file mode 100644 index 00000000000..913e9eb50f5 --- /dev/null +++ b/website/content/SDK/econometrics/clean/_index.rst @@ -0,0 +1,45 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +econometrics.clean( + dataset: pandas.core.frame.DataFrame, + fill: str = '', + drop: str = '', + limit: Optional[int] = None, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Clean up NaNs from the dataset +

+ +* **Parameters** + + dataset : pd.DataFrame + The dataset you wish to clean + fill : str + The method of filling NaNs. Choose from: + rfill, cfill, rbfill, cbfill, rffill, cffill + drop : str + The method of dropping NaNs. Choose from: + rdrop, cdrop + limit : int + The maximum limit you wish to apply that can be forward or backward filled + +* **Returns** + + pd.DataFrame: + Dataframe with cleaned up data diff --git a/website/content/SDK/econometrics/coint/_index.md b/website/content/SDK/econometrics/coint/_index.rst similarity index 72% rename from website/content/SDK/econometrics/coint/_index.md rename to website/content/SDK/econometrics/coint/_index.rst index 87b2bd68cf8..df0a7c286fa 100644 --- a/website/content/SDK/econometrics/coint/_index.md +++ b/website/content/SDK/econometrics/coint/_index.rst @@ -1,9 +1,27 @@ -To obtain charts, make sure to add `chart=True` as the last parameter +.. role:: python(code) + :language: python + :class: highlight -## Get underlying data -### econometrics.coint(dependent_series, independent_series) +| -Estimates long-run and short-run cointegration relationship for series y and x and apply +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +econometrics.coint( + dependent_series, independent_series, chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Estimates long-run and short-run cointegration relationship for series y and x and apply the two-step Engle & Granger test for cointegration. Uses a 2-step process to first estimate coefficients for the long-run relationship @@ -19,17 +37,21 @@ Estimates long-run and short-run cointegration relationship for series y and x a If this implies phi < 1, the z series is stationary is concluded to be stationary, and thus the series y and x are concluded to be cointegrated. +

+ +* **Parameters** - Parameters - ---------- dependent_series : pd.Series The first time series of the pair to analyse. independent_series : pd.Series The second time series of the pair to analyse. + chart: *bool* + Flag to display chart + + +* **Returns** - Returns - ------- c : float The constant term in the long-run relationship y_t = c + gamma * x_t + z_t. This describes the static shift of y with respect to gamma * x. @@ -54,11 +76,29 @@ Estimates long-run and short-run cointegration relationship for series y and x a The p-value corresponding to the Dickey Fuller test-statistic. A lower value implies stronger rejection of no-cointegration, thus stronger evidence of cointegration. +| -## Getting charts -### econometrics.coint(datasets: Union[pandas.core.frame.DataFrame, Dict[str, pandas.core.series.Series]], significant: bool = False, plot: bool = False, export: str = '', external_axes: Optional[List[axes]] = None, chart=True) +.. raw:: html -Estimates long-run and short-run cointegration relationship for series y and x and apply +

+ > Getting charts +

+ +{{< highlight python >}} +econometrics.coint( + datasets: Union[pandas.core.frame.DataFrame, Dict[str, pandas.core.series.Series]], + significant: bool = False, + plot: bool = False, + export: str = '', + external_axes: Optional[List[axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Estimates long-run and short-run cointegration relationship for series y and x and apply the two-step Engle & Granger test for cointegration. Uses a 2-step process to first estimate coefficients for the long-run relationship @@ -74,9 +114,10 @@ Estimates long-run and short-run cointegration relationship for series y and x a If this implies phi < 1, the z series is stationary is concluded to be stationary, and thus the series y and x are concluded to be cointegrated. +

+ +* **Parameters** - Parameters - ---------- datasets: Union[pd.DataFrame, Dict[str, pd.Series]] All time series to perform co-integration tests on. significant: float @@ -87,3 +128,6 @@ Estimates long-run and short-run cointegration relationship for series y and x a Format to export data external_axes:Optional[List[plt.axes]] External axes to plot on + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/econometrics/comparison/_index.md b/website/content/SDK/econometrics/comparison/_index.md deleted file mode 100644 index 4eb6c1239b4..00000000000 --- a/website/content/SDK/econometrics/comparison/_index.md +++ /dev/null @@ -1,15 +0,0 @@ -## Get underlying data -### econometrics.comparison(regressions, export: str = '') - -Compare regression results between Panel Data regressions. - - Parameters - ---------- - regressions : Dict - Dictionary with regression results. - export : str - Format to export data - - Returns - ------- - Returns a PanelModelComparison which shows an overview of the different regression results. diff --git a/website/content/SDK/econometrics/comparison/_index.rst b/website/content/SDK/econometrics/comparison/_index.rst new file mode 100644 index 00000000000..b752aa4c669 --- /dev/null +++ b/website/content/SDK/econometrics/comparison/_index.rst @@ -0,0 +1,35 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +econometrics.comparison( + regressions, export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Compare regression results between Panel Data regressions. +

+ +* **Parameters** + + regressions : Dict + Dictionary with regression results. + export : str + Format to export data + +* **Returns** + + Returns a PanelModelComparison which shows an overview of the different regression results. diff --git a/website/content/SDK/econometrics/dwat/_index.md b/website/content/SDK/econometrics/dwat/_index.md deleted file mode 100644 index 796f5cf3ca4..00000000000 --- a/website/content/SDK/econometrics/dwat/_index.md +++ /dev/null @@ -1,33 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### econometrics.dwat(residual: pandas.core.frame.DataFrame) -> pandas.core.frame.DataFrame - -Calculate test statistics for Durbing Watson autocorrelation - - Parameters - ---------- - residual : OLS Model - Model containing residual values. - - Returns - ------- - Test statistic of the Durbin Watson test. - -## Getting charts -### econometrics.dwat(dependent_variable: pandas.core.series.Series, residual: pandas.core.frame.DataFrame, plot: bool = False, export: str = '', external_axes: Optional[List[axes]] = None, chart=True) - -Show Durbin-Watson autocorrelation tests - - Parameters - ---------- - dependent_variable : pd.Series - The dependent variable. - residual : OLS Model - The residual of an OLS model. - plot : bool - Whether to plot the residuals - export : str - Format to export data - external_axes: Optional[List[plt.axes]] - External axes to plot on diff --git a/website/content/SDK/econometrics/dwat/_index.rst b/website/content/SDK/econometrics/dwat/_index.rst new file mode 100644 index 00000000000..c265dd3ebef --- /dev/null +++ b/website/content/SDK/econometrics/dwat/_index.rst @@ -0,0 +1,79 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +econometrics.dwat( + residual: pandas.core.frame.DataFrame, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Calculate test statistics for Durbing Watson autocorrelation +

+ +* **Parameters** + + residual : OLS Model + Model containing residual values. + chart: *bool* + Flag to display chart + + +* **Returns** + + Test statistic of the Durbin Watson test. + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +econometrics.dwat( + dependent_variable: pandas.core.series.Series, + residual: pandas.core.frame.DataFrame, + plot: bool = False, + export: str = '', + external_axes: Optional[List[axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Show Durbin-Watson autocorrelation tests +

+ +* **Parameters** + + dependent_variable : pd.Series + The dependent variable. + residual : OLS Model + The residual of an OLS model. + plot : bool + Whether to plot the residuals + export : str + Format to export data + external_axes: Optional[List[plt.axes]] + External axes to plot on + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/econometrics/fdols/_index.md b/website/content/SDK/econometrics/fdols/_index.rst similarity index 54% rename from website/content/SDK/econometrics/fdols/_index.md rename to website/content/SDK/econometrics/fdols/_index.rst index 9e6cbdf58a3..6534759473e 100644 --- a/website/content/SDK/econometrics/fdols/_index.md +++ b/website/content/SDK/econometrics/fdols/_index.rst @@ -1,21 +1,42 @@ -## Get underlying data -### econometrics.fdols(regression_variables: List[Tuple], data: Dict[str, pandas.core.frame.DataFrame]) -> Tuple[pandas.core.frame.DataFrame, Any, List[Any], Any] +.. role:: python(code) + :language: python + :class: highlight -First differencing is an alternative to using fixed effects when there might be correlation. +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +econometrics.fdols( + regression_variables: List[Tuple], + data: Dict[str, pandas.core.frame.DataFrame], + chart: bool = False, +) -> Tuple[pandas.core.frame.DataFrame, Any, List[Any], Any] +{{< /highlight >}} + +.. raw:: html + +

+ First differencing is an alternative to using fixed effects when there might be correlation. When using first differences, time-invariant variables must be excluded. Additionally, only one linear time-trending variable can be included since this will look like a constant. This variable will soak up all time-trends in the data, and so interpretations of these variable can be challenging. [Source: LinearModels] +

+ +* **Parameters** - Parameters - ---------- regression_variables : list The regressions variables entered where the first variable is the dependent variable. data : dict A dictionary containing the datasets. - Returns - ------- +* **Returns** + The dataset used, the dependent variable, the independent variable and the OLS model. diff --git a/website/content/SDK/econometrics/fe/_index.md b/website/content/SDK/econometrics/fe/_index.rst similarity index 50% rename from website/content/SDK/econometrics/fe/_index.md rename to website/content/SDK/econometrics/fe/_index.rst index bcde4246770..29779dc8782 100644 --- a/website/content/SDK/econometrics/fe/_index.md +++ b/website/content/SDK/econometrics/fe/_index.rst @@ -1,12 +1,35 @@ -## Get underlying data -### econometrics.fe(regression_variables: List[Tuple], data: Dict[str, pandas.core.frame.DataFrame], entity_effects: bool = False, time_effects: bool = False) -> Tuple[pandas.core.frame.DataFrame, Any, List[Any], Any] +.. role:: python(code) + :language: python + :class: highlight -When effects are correlated with the regressors the RE and BE estimators are not consistent. +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +econometrics.fe( + regression_variables: List[Tuple], + data: Dict[str, pandas.core.frame.DataFrame], + entity_effects: bool = False, + time_effects: bool = False, + chart: bool = False, +) -> Tuple[pandas.core.frame.DataFrame, Any, List[Any], Any] +{{< /highlight >}} + +.. raw:: html + +

+ When effects are correlated with the regressors the RE and BE estimators are not consistent. The usual solution is to use Fixed Effects which are called entity_effects when applied to entities and time_effects when applied to the time dimension. [Source: LinearModels] +

+ +* **Parameters** - Parameters - ---------- regression_variables : list The regressions variables entered where the first variable is the dependent variable. @@ -17,7 +40,7 @@ When effects are correlated with the regressors the RE and BE estimators are not time_effects : bool Whether to include time effects - Returns - ------- +* **Returns** + The dataset used, the dependent variable, the independent variable and the OLS model. diff --git a/website/content/SDK/econometrics/get_regression_data/_index.md b/website/content/SDK/econometrics/get_regression_data/_index.md deleted file mode 100644 index 177e55530ba..00000000000 --- a/website/content/SDK/econometrics/get_regression_data/_index.md +++ /dev/null @@ -1,20 +0,0 @@ -## Get underlying data -### econometrics.get_regression_data(regression_variables: List[tuple], data: Dict[str, pandas.core.frame.DataFrame], regression_type: str = '') -> Tuple[pandas.core.frame.DataFrame, Any, List[Any]] - -This function creates a DataFrame with the required regression data as - well sets up the dependent and independent variables. - - Parameters - ---------- - regression_variables : list - The regressions variables entered where the first variable is - the dependent variable. - data : dict - A dictionary containing the datasets. - regression_type: str - The type of regression that is executed. - - Returns - ------- - The dataset used, the dependent variable, the independent variable and - the OLS model. diff --git a/website/content/SDK/econometrics/get_regression_data/_index.rst b/website/content/SDK/econometrics/get_regression_data/_index.rst new file mode 100644 index 00000000000..a2dac5a3ea0 --- /dev/null +++ b/website/content/SDK/econometrics/get_regression_data/_index.rst @@ -0,0 +1,42 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +econometrics.get_regression_data( + regression_variables: List[tuple], + data: Dict[str, pandas.core.frame.DataFrame], + regression_type: str = '', + chart: bool = False, +) -> Tuple[pandas.core.frame.DataFrame, Any, List[Any]] +{{< /highlight >}} + +.. raw:: html + +

+ This function creates a DataFrame with the required regression data as + well sets up the dependent and independent variables. +

+ +* **Parameters** + + regression_variables : list + The regressions variables entered where the first variable is + the dependent variable. + data : dict + A dictionary containing the datasets. + regression_type: str + The type of regression that is executed. + +* **Returns** + + The dataset used, the dependent variable, the independent variable and + the OLS model. diff --git a/website/content/SDK/econometrics/granger/_index.md b/website/content/SDK/econometrics/granger/_index.md deleted file mode 100644 index 409ea834675..00000000000 --- a/website/content/SDK/econometrics/granger/_index.md +++ /dev/null @@ -1,33 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### econometrics.granger(dependent_series, independent_series, lags) - -Calculate granger tests - - Parameters - ---------- - dependent_series: Series - The series you want to test Granger Causality for. - independent_series: Series - The series that you want to test whether it Granger-causes time_series_y - lags : int - The amount of lags for the Granger test. By default, this is set to 3. - -## Getting charts -### econometrics.granger(dependent_series: pandas.core.series.Series, independent_series: pandas.core.series.Series, lags: int = 3, confidence_level: float = 0.05, export: str = '', chart=True) - -Show granger tests - - Parameters - ---------- - dependent_series: Series - The series you want to test Granger Causality for. - independent_series: Series - The series that you want to test whether it Granger-causes dependent_series - lags : int - The amount of lags for the Granger test. By default, this is set to 3. - confidence_level: float - The confidence level you wish to use. By default, this is set to 0.05. - export : str - Format to export data diff --git a/website/content/SDK/econometrics/granger/_index.rst b/website/content/SDK/econometrics/granger/_index.rst new file mode 100644 index 00000000000..0af9a4822f0 --- /dev/null +++ b/website/content/SDK/econometrics/granger/_index.rst @@ -0,0 +1,78 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +econometrics.granger( + dependent_series, independent_series, lags, chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Calculate granger tests +

+ +* **Parameters** + + dependent_series: Series + The series you want to test Granger Causality for. + independent_series: Series + The series that you want to test whether it Granger-causes time_series_y + lags : int + The amount of lags for the Granger test. By default, this is set to 3. + chart: *bool* + Flag to display chart + + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +econometrics.granger( + dependent_series: pandas.core.series.Series, + independent_series: pandas.core.series.Series, + lags: int = 3, + confidence_level: float = 0.05, + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Show granger tests +

+ +* **Parameters** + + dependent_series: Series + The series you want to test Granger Causality for. + independent_series: Series + The series that you want to test whether it Granger-causes dependent_series + lags : int + The amount of lags for the Granger test. By default, this is set to 3. + confidence_level: float + The confidence level you wish to use. By default, this is set to 0.05. + export : str + Format to export data + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/econometrics/load/_index.md b/website/content/SDK/econometrics/load/_index.md deleted file mode 100644 index 58f3383e828..00000000000 --- a/website/content/SDK/econometrics/load/_index.md +++ /dev/null @@ -1,20 +0,0 @@ -## Get underlying data -### econometrics.load(file: str, file_types: Optional[List[str]] = None, data_files: Optional[Dict[Any, Any]] = None, data_examples: Optional[Dict[Any, Any]] = None) -> pandas.core.frame.DataFrame - -Load custom file into dataframe. - - Parameters - ---------- - file: str - Path to file - file_types: list - Supported file types - data_files: dict - Contains all available data files within the Export folder - data_examples: dict - Contains all available examples from Statsmodels - - Returns - ------- - pd.DataFrame: - Dataframe with custom data diff --git a/website/content/SDK/econometrics/load/_index.rst b/website/content/SDK/econometrics/load/_index.rst new file mode 100644 index 00000000000..4a827a7c5c2 --- /dev/null +++ b/website/content/SDK/econometrics/load/_index.rst @@ -0,0 +1,40 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +econometrics.load( + file: str, + data_files: Optional[Dict[Any, Any]] = None, + data_examples: Optional[Dict[Any, Any]] = None, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Load custom file into dataframe. +

+ +* **Parameters** + + file: str + Path to file + data_files: dict + Contains all available data files within the Export folder + data_examples: dict + Contains all available examples from Statsmodels + +* **Returns** + + pd.DataFrame: + Dataframe with custom data diff --git a/website/content/SDK/econometrics/norm/_index.md b/website/content/SDK/econometrics/norm/_index.md deleted file mode 100644 index 01f776d8b0a..00000000000 --- a/website/content/SDK/econometrics/norm/_index.md +++ /dev/null @@ -1,39 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### econometrics.norm(data: pandas.core.series.Series) -> pandas.core.frame.DataFrame - - - The distribution of returns and generate statistics on the relation to the normal curve. - This function calculates skew and kurtosis (the third and fourth moments) and performs both - a Jarque-Bera and Shapiro Wilk test to determine if data is normally distributed. - - Parameters - ---------- - data : pd.Series - A series or column of a DataFrame to test normality for - - Returns - ------- - pd.DataFrame - Dataframe containing statistics of normality - -## Getting charts -### econometrics.norm(data: pandas.core.series.Series, dataset: str = '', column: str = '', plot: bool = False, export: str = '', external_axes: Optional[List[axes]] = None, chart=True) - -Determine the normality of a timeseries. - - Parameters - ---------- - data: pd.Series - Series of custom data - dataset: str - Dataset name - column: str - Column for y data - plot : bool - Whether you wish to plot a histogram - export: str - Format to export data. - external_axes: Optional[List[plt.axes]] - External axes to plot on diff --git a/website/content/SDK/econometrics/norm/_index.rst b/website/content/SDK/econometrics/norm/_index.rst new file mode 100644 index 00000000000..2d42e21b98e --- /dev/null +++ b/website/content/SDK/econometrics/norm/_index.rst @@ -0,0 +1,85 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +econometrics.norm( + data: pandas.core.series.Series, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ The distribution of returns and generate statistics on the relation to the normal curve. + This function calculates skew and kurtosis (the third and fourth moments) and performs both + a Jarque-Bera and Shapiro Wilk test to determine if data is normally distributed. +

+ +* **Parameters** + + data : pd.Series + A series or column of a DataFrame to test normality for + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Dataframe containing statistics of normality + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +econometrics.norm( + data: pandas.core.series.Series, + dataset: str = '', + column: str = '', + plot: bool = False, + export: str = '', + external_axes: Optional[List[axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Determine the normality of a timeseries. +

+ +* **Parameters** + + data: pd.Series + Series of custom data + dataset: str + Dataset name + column: str + Column for y data + plot : bool + Whether you wish to plot a histogram + export: str + Format to export data. + external_axes: Optional[List[plt.axes]] + External axes to plot on + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/econometrics/ols/_index.md b/website/content/SDK/econometrics/ols/_index.md deleted file mode 100644 index ba472cf15c2..00000000000 --- a/website/content/SDK/econometrics/ols/_index.md +++ /dev/null @@ -1,21 +0,0 @@ -## Get underlying data -### econometrics.ols(regression_variables: List[Tuple], data: Dict[str, pandas.core.frame.DataFrame], show_regression: bool = True, export: str = '') -> Tuple[pandas.core.frame.DataFrame, Any, List[Any], Any] - -Performs an OLS regression on timeseries data. [Source: Statsmodels] - - Parameters - ---------- - regression_variables : list - The regressions variables entered where the first variable is - the dependent variable. - data : dict - A dictionary containing the datasets. - show_regression: bool - Whether to show the regression results table. - export: str - Format to export data - - Returns - ------- - The dataset used, the dependent variable, the independent variable and - the OLS model. diff --git a/website/content/SDK/econometrics/ols/_index.rst b/website/content/SDK/econometrics/ols/_index.rst new file mode 100644 index 00000000000..225b46c5715 --- /dev/null +++ b/website/content/SDK/econometrics/ols/_index.rst @@ -0,0 +1,44 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +econometrics.ols( + regression_variables: List[Tuple], + data: Dict[str, pandas.core.frame.DataFrame], + show_regression: bool = True, + export: str = '', + chart: bool = False, +) -> Tuple[pandas.core.frame.DataFrame, Any, List[Any], Any] +{{< /highlight >}} + +.. raw:: html + +

+ Performs an OLS regression on timeseries data. [Source: Statsmodels] +

+ +* **Parameters** + + regression_variables : list + The regressions variables entered where the first variable is + the dependent variable. + data : dict + A dictionary containing the datasets. + show_regression: bool + Whether to show the regression results table. + export: str + Format to export data + +* **Returns** + + The dataset used, the dependent variable, the independent variable and + the OLS model. diff --git a/website/content/SDK/econometrics/options/_index.md b/website/content/SDK/econometrics/options/_index.md deleted file mode 100644 index a52aaa778f4..00000000000 --- a/website/content/SDK/econometrics/options/_index.md +++ /dev/null @@ -1,33 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### econometrics.options(datasets: Dict[str, pandas.core.frame.DataFrame], dataset_name: str = '') -> Dict[Union[str, Any], pandas.core.frame.DataFrame] - -Obtain columns-dataset combinations from loaded in datasets that can be used in other commands - - Parameters - ---------- - datasets: dict - The available datasets. - dataset_name: str - The dataset you wish to show the options for. - - Returns - ------- - option_tables: dict - A dictionary with a DataFrame for each option. With dataset_name set, only shows one - options table. - -## Getting charts -### econometrics.options(datasets: Dict[str, pandas.core.frame.DataFrame], dataset_name: str = None, export: str = '', chart=True) - -Plot custom data - - Parameters - ---------- - datasets: dict - The loaded in datasets - dataset_name: str - The name of the dataset you wish to show options for - export: str - Format to export image diff --git a/website/content/SDK/econometrics/options/_index.rst b/website/content/SDK/econometrics/options/_index.rst new file mode 100644 index 00000000000..7ce52896207 --- /dev/null +++ b/website/content/SDK/econometrics/options/_index.rst @@ -0,0 +1,78 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +econometrics.options( + datasets: Dict[str, pandas.core.frame.DataFrame], + dataset_name: str = '', + chart: bool = False, +) -> Dict[Union[str, Any], pandas.core.frame.DataFrame] +{{< /highlight >}} + +.. raw:: html + +

+ Obtain columns-dataset combinations from loaded in datasets that can be used in other commands +

+ +* **Parameters** + + datasets: dict + The available datasets. + dataset_name: str + The dataset you wish to show the options for. + chart: *bool* + Flag to display chart + + +* **Returns** + + option_tables: dict + A dictionary with a DataFrame for each option. With dataset_name set, only shows one + options table. + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +econometrics.options( + datasets: Dict[str, pandas.core.frame.DataFrame], + dataset_name: str = None, + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Plot custom data +

+ +* **Parameters** + + datasets: dict + The loaded in datasets + dataset_name: str + The name of the dataset you wish to show options for + export: str + Format to export image + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/econometrics/panel/_index.md b/website/content/SDK/econometrics/panel/_index.md deleted file mode 100644 index 6e0b14546f8..00000000000 --- a/website/content/SDK/econometrics/panel/_index.md +++ /dev/null @@ -1,53 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### econometrics.panel(regression_type: str, regression_variables: List[Tuple], data: Dict[str, pandas.core.frame.DataFrame], entity_effects: bool = False, time_effects: bool = False) -> Tuple[pandas.core.frame.DataFrame, Any, List[Any], Any] - -Based on the regression type, this function decides what regression to run. - - Parameters - ---------- - regression_type: str - The type of regression you wish to execute. - regression_variables : list - The regressions variables entered where the first variable is - the dependent variable. - data : dict - A dictionary containing the datasets. - entity_effects: bool - Whether to apply Fixed Effects on entities. - time_effects: bool - Whether to apply Fixed Effects on time. - - Returns - ------- - The dataset used, the dependent variable, the independent variable and - the regression model. - -## Getting charts -### econometrics.panel(data: Dict[str, pandas.core.frame.DataFrame], regression_variables: List[Tuple], regression_type: str = 'OLS', entity_effects: bool = False, time_effects: bool = False, export: str = '', chart=True) - -Based on the regression type, this function decides what regression to run. - - Parameters - ---------- - data : dict - A dictionary containing the datasets. - regression_variables : list - The regressions variables entered where the first variable is - the dependent variable. - each column/dataset combination. - regression_type: str - The type of regression you wish to execute. Choose from: - OLS, POLS, RE, BOLS, FE - entity_effects: bool - Whether to apply Fixed Effects on entities. - time_effects: bool - Whether to apply Fixed Effects on time. - export : str - Format to export data - - Returns - ------- - The dataset used, the dependent variable, the independent variable and - the regression model. diff --git a/website/content/SDK/econometrics/panel/_index.rst b/website/content/SDK/econometrics/panel/_index.rst new file mode 100644 index 00000000000..2bdd941c4ee --- /dev/null +++ b/website/content/SDK/econometrics/panel/_index.rst @@ -0,0 +1,104 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +econometrics.panel( + regression_type: str, + regression_variables: List[Tuple], + data: Dict[str, pandas.core.frame.DataFrame], + entity_effects: bool = False, + time_effects: bool = False, + chart: bool = False, +) -> Tuple[pandas.core.frame.DataFrame, Any, List[Any], Any] +{{< /highlight >}} + +.. raw:: html + +

+ Based on the regression type, this function decides what regression to run. +

+ +* **Parameters** + + regression_type: str + The type of regression you wish to execute. + regression_variables : list + The regressions variables entered where the first variable is + the dependent variable. + data : dict + A dictionary containing the datasets. + entity_effects: bool + Whether to apply Fixed Effects on entities. + time_effects: bool + Whether to apply Fixed Effects on time. + chart: *bool* + Flag to display chart + + +* **Returns** + + The dataset used, the dependent variable, the independent variable and + the regression model. + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +econometrics.panel( + data: Dict[str, pandas.core.frame.DataFrame], + regression_variables: List[Tuple], + regression_type: str = 'OLS', + entity_effects: bool = False, + time_effects: bool = False, + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Based on the regression type, this function decides what regression to run. +

+ +* **Parameters** + + data : dict + A dictionary containing the datasets. + regression_variables : list + The regressions variables entered where the first variable is + the dependent variable. + each column/dataset combination. + regression_type: str + The type of regression you wish to execute. Choose from: + OLS, POLS, RE, BOLS, FE + entity_effects: bool + Whether to apply Fixed Effects on entities. + time_effects: bool + Whether to apply Fixed Effects on time. + export : str + Format to export data + chart: *bool* + Flag to display chart + + +* **Returns** + + The dataset used, the dependent variable, the independent variable and + the regression model. diff --git a/website/content/SDK/econometrics/pols/_index.md b/website/content/SDK/econometrics/pols/_index.md deleted file mode 100644 index c1aa1cbee6a..00000000000 --- a/website/content/SDK/econometrics/pols/_index.md +++ /dev/null @@ -1,18 +0,0 @@ -## Get underlying data -### econometrics.pols(regression_variables: List[Tuple], data: Dict[str, pandas.core.frame.DataFrame]) -> Tuple[pandas.core.frame.DataFrame, Any, List[Any], Any] - -PooledOLS is just plain OLS that understands that various panel data structures. - It is useful as a base model. [Source: LinearModels] - - Parameters - ---------- - regression_variables : list - The regressions variables entered where the first variable is - the dependent variable. - data : dict - A dictionary containing the datasets. - - Returns - ------- - The dataset used, the dependent variable, the independent variable and - the Pooled OLS model. diff --git a/website/content/SDK/econometrics/pols/_index.rst b/website/content/SDK/econometrics/pols/_index.rst new file mode 100644 index 00000000000..b1c2d1364ce --- /dev/null +++ b/website/content/SDK/econometrics/pols/_index.rst @@ -0,0 +1,39 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +econometrics.pols( + regression_variables: List[Tuple], + data: Dict[str, pandas.core.frame.DataFrame], + chart: bool = False, +) -> Tuple[pandas.core.frame.DataFrame, Any, List[Any], Any] +{{< /highlight >}} + +.. raw:: html + +

+ PooledOLS is just plain OLS that understands that various panel data structures. + It is useful as a base model. [Source: LinearModels] +

+ +* **Parameters** + + regression_variables : list + The regressions variables entered where the first variable is + the dependent variable. + data : dict + A dictionary containing the datasets. + +* **Returns** + + The dataset used, the dependent variable, the independent variable and + the Pooled OLS model. diff --git a/website/content/SDK/econometrics/re/_index.md b/website/content/SDK/econometrics/re/_index.md deleted file mode 100644 index 71af95cd2f4..00000000000 --- a/website/content/SDK/econometrics/re/_index.md +++ /dev/null @@ -1,19 +0,0 @@ -## Get underlying data -### econometrics.re(regression_variables: List[Tuple], data: Dict[str, pandas.core.frame.DataFrame]) -> Tuple[pandas.core.frame.DataFrame, Any, List[Any], Any] - -The random effects model is virtually identical to the pooled OLS model except that is accounts for the - structure of the model and so is more efficient. Random effects uses a quasi-demeaning strategy which - subtracts the time average of the within entity values to account for the common shock. [Source: LinearModels] - - Parameters - ---------- - regression_variables : list - The regressions variables entered where the first variable is - the dependent variable. - data : dict - A dictionary containing the datasets. - - Returns - ------- - The dataset used, the dependent variable, the independent variable and - the RandomEffects model. diff --git a/website/content/SDK/econometrics/re/_index.rst b/website/content/SDK/econometrics/re/_index.rst new file mode 100644 index 00000000000..d3a13d8f220 --- /dev/null +++ b/website/content/SDK/econometrics/re/_index.rst @@ -0,0 +1,40 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +econometrics.re( + regression_variables: List[Tuple], + data: Dict[str, pandas.core.frame.DataFrame], + chart: bool = False, +) -> Tuple[pandas.core.frame.DataFrame, Any, List[Any], Any] +{{< /highlight >}} + +.. raw:: html + +

+ The random effects model is virtually identical to the pooled OLS model except that is accounts for the + structure of the model and so is more efficient. Random effects uses a quasi-demeaning strategy which + subtracts the time average of the within entity values to account for the common shock. [Source: LinearModels] +

+ +* **Parameters** + + regression_variables : list + The regressions variables entered where the first variable is + the dependent variable. + data : dict + A dictionary containing the datasets. + +* **Returns** + + The dataset used, the dependent variable, the independent variable and + the RandomEffects model. diff --git a/website/content/SDK/econometrics/root/_index.md b/website/content/SDK/econometrics/root/_index.md deleted file mode 100644 index 47d45bcb89f..00000000000 --- a/website/content/SDK/econometrics/root/_index.md +++ /dev/null @@ -1,40 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### econometrics.root(data: pandas.core.series.Series, fuller_reg: str = 'c', kpss_reg: str = 'c') -> pandas.core.frame.DataFrame - -Calculate test statistics for unit roots - - Parameters - ---------- - data : pd.Series - Series or column of DataFrame of target variable - fuller_reg : str - Type of regression of ADF test - kpss_reg : str - Type of regression for KPSS test - - Returns - ------- - pd.DataFrame - Dataframe with results of ADF test and KPSS test - -## Getting charts -### econometrics.root(data: pandas.core.series.Series, dataset: str = '', column: str = '', fuller_reg: str = 'c', kpss_reg: str = 'c', export: str = '', chart=True) - -Determine the normality of a timeseries. - - Parameters - ---------- - data : pd.Series - Series of target variable - dataset: str - Name of the dataset - column: str - Name of the column - fuller_reg : str - Type of regression of ADF test. Choose c, ct, ctt, or nc - kpss_reg : str - Type of regression for KPSS test. Choose c or ct - export: str - Format to export data. diff --git a/website/content/SDK/econometrics/root/_index.rst b/website/content/SDK/econometrics/root/_index.rst new file mode 100644 index 00000000000..385d10a7fb0 --- /dev/null +++ b/website/content/SDK/econometrics/root/_index.rst @@ -0,0 +1,89 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +econometrics.root( + data: pandas.core.series.Series, + fuller_reg: str = 'c', + kpss_reg: str = 'c', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Calculate test statistics for unit roots +

+ +* **Parameters** + + data : pd.Series + Series or column of DataFrame of target variable + fuller_reg : str + Type of regression of ADF test + kpss_reg : str + Type of regression for KPSS test + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Dataframe with results of ADF test and KPSS test + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +econometrics.root( + data: pandas.core.series.Series, + dataset: str = '', + column: str = '', + fuller_reg: str = 'c', + kpss_reg: str = 'c', + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Determine the normality of a timeseries. +

+ +* **Parameters** + + data : pd.Series + Series of target variable + dataset: str + Name of the dataset + column: str + Name of the column + fuller_reg : str + Type of regression of ADF test. Choose c, ct, ctt, or nc + kpss_reg : str + Type of regression for KPSS test. Choose c or ct + export: str + Format to export data. + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/economy/available_indices/_index.md b/website/content/SDK/economy/available_indices/_index.md deleted file mode 100644 index 04e64922f50..00000000000 --- a/website/content/SDK/economy/available_indices/_index.md +++ /dev/null @@ -1,7 +0,0 @@ -## Get underlying data -### economy.available_indices() -> dict - -Get available indices - - Returns: - dict: dictionary with available indices and respective detail diff --git a/website/content/SDK/economy/available_indices/_index.rst b/website/content/SDK/economy/available_indices/_index.rst new file mode 100644 index 00000000000..a7ca511bb80 --- /dev/null +++ b/website/content/SDK/economy/available_indices/_index.rst @@ -0,0 +1,24 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +economy.available_indices() -> dict +{{< /highlight >}} + +.. raw:: html + +

+ Get available indices + + Returns: + dict: dictionary with available indices and respective detail +

diff --git a/website/content/SDK/economy/bigmac/_index.md b/website/content/SDK/economy/bigmac/_index.md deleted file mode 100644 index ae2659f06ec..00000000000 --- a/website/content/SDK/economy/bigmac/_index.md +++ /dev/null @@ -1,32 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### economy.bigmac(country_codes: List[str] = None) -> pandas.core.frame.DataFrame - -Display Big Mac Index for given countries - - Parameters - ---------- - country_codes : List[str] - List of country codes (ISO-3 letter country code). Codes available through economy.country_codes(). - - Returns - ------- - pd.DataFrame - Dataframe with Big Mac indices converted to USD equivalent. - -## Getting charts -### economy.bigmac(country_codes: List[str] = None, raw: bool = False, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display Big Mac Index for given countries - - Parameters - ---------- - country_codes : List[str] - List of country codes (ISO-3 letter country code). Codes available through economy.country_codes(). - raw : bool, optional - Flag to display raw data, by default False - export : str, optional - Format data, by default "" - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/economy/bigmac/_index.rst b/website/content/SDK/economy/bigmac/_index.rst new file mode 100644 index 00000000000..ea0daa0947c --- /dev/null +++ b/website/content/SDK/economy/bigmac/_index.rst @@ -0,0 +1,77 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +economy.bigmac( + country_codes: List[str] = None, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Display Big Mac Index for given countries +

+ +* **Parameters** + + country_codes : List[str] + List of country codes (ISO-3 letter country code). Codes available through economy.country_codes(). + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Dataframe with Big Mac indices converted to USD equivalent. + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +economy.bigmac( + country_codes: List[str] = None, + raw: bool = False, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display Big Mac Index for given countries +

+ +* **Parameters** + + country_codes : List[str] + List of country codes (ISO-3 letter country code). Codes available through economy.country_codes(). + raw : bool, optional + Flag to display raw data, by default False + export : str, optional + Format data, by default "" + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/economy/country_codes/_index.md b/website/content/SDK/economy/country_codes/_index.md deleted file mode 100644 index ce7602f57d7..00000000000 --- a/website/content/SDK/economy/country_codes/_index.md +++ /dev/null @@ -1,9 +0,0 @@ -## Get underlying data -### economy.country_codes() -> List[str] - -Get available country codes for Bigmac index - - Returns - ------- - List[str] - List of ISO-3 letter country codes. diff --git a/website/content/SDK/economy/country_codes/_index.rst b/website/content/SDK/economy/country_codes/_index.rst new file mode 100644 index 00000000000..b22baa41b9a --- /dev/null +++ b/website/content/SDK/economy/country_codes/_index.rst @@ -0,0 +1,26 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +economy.country_codes() -> List[str] +{{< /highlight >}} + +.. raw:: html + +

+ Get available country codes for Bigmac index +

+ +* **Returns** + + List[str] + List of ISO-3 letter country codes. diff --git a/website/content/SDK/economy/cpi/_index.md b/website/content/SDK/economy/cpi/_index.md deleted file mode 100644 index 321605731a3..00000000000 --- a/website/content/SDK/economy/cpi/_index.md +++ /dev/null @@ -1,36 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### economy.cpi(interval: str = 'm', start_year: int = 2010) -> pandas.core.frame.DataFrame - -Get Consumer Price Index from Alpha Vantage - - Parameters - ---------- - interval : str - Interval for data. Either "m" or "s" for monthly or semiannual - start_year : int, optional - Start year for plot, by default 2010 - - Returns - ------- - pd.DataFrame - Dataframe of CPI - -## Getting charts -### economy.cpi(interval: str = 'm', start_year: int = 2010, raw: bool = False, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display US consumer price index (CPI) from AlphaVantage - - Parameters - ---------- - interval : str - Interval for GDP. Either "m" or "s" - start_year : int, optional - Start year for plot, by default 2010 - raw : bool, optional - Flag to show raw data, by default False - export : str, optional - Format to export data, by default "" - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/economy/cpi/_index.rst b/website/content/SDK/economy/cpi/_index.rst new file mode 100644 index 00000000000..4977d2b4c32 --- /dev/null +++ b/website/content/SDK/economy/cpi/_index.rst @@ -0,0 +1,83 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +economy.cpi( + interval: str = 'm', + start_year: int = 2010, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get Consumer Price Index from Alpha Vantage +

+ +* **Parameters** + + interval : str + Interval for data. Either "m" or "s" for monthly or semiannual + start_year : int, optional + Start year for plot, by default 2010 + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Dataframe of CPI + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +economy.cpi( + interval: str = 'm', + start_year: int = 2010, + raw: bool = False, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display US consumer price index (CPI) from AlphaVantage +

+ +* **Parameters** + + interval : str + Interval for GDP. Either "m" or "s" + start_year : int, optional + Start year for plot, by default 2010 + raw : bool, optional + Flag to show raw data, by default False + export : str, optional + Format to export data, by default "" + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/economy/currencies/_index.md b/website/content/SDK/economy/currencies/_index.md deleted file mode 100644 index b28e95d7dc5..00000000000 --- a/website/content/SDK/economy/currencies/_index.md +++ /dev/null @@ -1,9 +0,0 @@ -## Get underlying data -### economy.currencies() -> pandas.core.frame.DataFrame - -Scrape data for global currencies - - Returns - ------- - currencies: pd.DataFrame - Dataframe containing name, price, net change and percent change diff --git a/website/content/SDK/economy/currencies/_index.rst b/website/content/SDK/economy/currencies/_index.rst new file mode 100644 index 00000000000..fe54ac2f222 --- /dev/null +++ b/website/content/SDK/economy/currencies/_index.rst @@ -0,0 +1,26 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +economy.currencies() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Scrape data for global currencies +

+ +* **Returns** + + currencies: pd.DataFrame + Dataframe containing name, price, net change and percent change diff --git a/website/content/SDK/economy/events/_index.md b/website/content/SDK/economy/events/_index.md deleted file mode 100644 index b0599697ac0..00000000000 --- a/website/content/SDK/economy/events/_index.md +++ /dev/null @@ -1,18 +0,0 @@ -## Get underlying data -### economy.events(countries: Union[List[str], str] = '', start_date: str = '2022-11-03', end_date: str = '2022-11-03') -> pandas.core.frame.DataFrame - -Get economic calendar for countries between specified dates - - Parameters - ---------- - countries : [List[str],str] - List of countries to include in calendar. Empty returns all - start_date : str - Start date for calendar - end_date : str - End date for calendar - - Returns - ------- - pd.DataFrame - Economic calendar diff --git a/website/content/SDK/economy/events/_index.rst b/website/content/SDK/economy/events/_index.rst new file mode 100644 index 00000000000..694f913ae8d --- /dev/null +++ b/website/content/SDK/economy/events/_index.rst @@ -0,0 +1,40 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +economy.events( + countries: Union[List[str], str] = '', + start_date: str = '2022-11-08', + end_date: str = '2022-11-08', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get economic calendar for countries between specified dates +

+ +* **Parameters** + + countries : [List[str],str] + List of countries to include in calendar. Empty returns all + start_date : str + Start date for calendar + end_date : str + End date for calendar + +* **Returns** + + pd.DataFrame + Economic calendar diff --git a/website/content/SDK/economy/fred_ids/_index.md b/website/content/SDK/economy/fred_ids/_index.md deleted file mode 100644 index ce376d2d21c..00000000000 --- a/website/content/SDK/economy/fred_ids/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### economy.fred_ids(search_query: str, limit: int = -1) -> pandas.core.frame.DataFrame - -Get Series IDs. [Source: FRED] - Parameters - ---------- - search_query : str - Text query to search on fred series notes database - limit : int - Maximum number of series IDs to output - Returns - ---------- - pd.Dataframe - Dataframe with series IDs and titles diff --git a/website/content/SDK/economy/fred_ids/_index.rst b/website/content/SDK/economy/fred_ids/_index.rst new file mode 100644 index 00000000000..651086f448b --- /dev/null +++ b/website/content/SDK/economy/fred_ids/_index.rst @@ -0,0 +1,37 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +economy.fred_ids( + search_query: str, + limit: int = -1, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get Series IDs. [Source: FRED] +

+ +* **Parameters** + + search_query : str + Text query to search on fred series notes database + limit : int + Maximum number of series IDs to output + +* **Returns** + + pd.Dataframe + Dataframe with series IDs and titles diff --git a/website/content/SDK/economy/fred_notes/_index.md b/website/content/SDK/economy/fred_notes/_index.md deleted file mode 100644 index 2bc5dd8d2a6..00000000000 --- a/website/content/SDK/economy/fred_notes/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### economy.fred_notes(search_query: str, limit: int = -1) -> pandas.core.frame.DataFrame - -Get series notes. [Source: FRED] - Parameters - ---------- - search_query : str - Text query to search on fred series notes database - limit : int - Maximum number of series notes to display - Returns - ---------- - pd.DataFrame - DataFrame of matched series diff --git a/website/content/SDK/economy/fred_notes/_index.rst b/website/content/SDK/economy/fred_notes/_index.rst new file mode 100644 index 00000000000..85f3a7073f9 --- /dev/null +++ b/website/content/SDK/economy/fred_notes/_index.rst @@ -0,0 +1,37 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +economy.fred_notes( + search_query: str, + limit: int = -1, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get series notes. [Source: FRED] +

+ +* **Parameters** + + search_query : str + Text query to search on fred series notes database + limit : int + Maximum number of series notes to display + +* **Returns** + + pd.DataFrame + DataFrame of matched series diff --git a/website/content/SDK/economy/fred_series/_index.md b/website/content/SDK/economy/fred_series/_index.md deleted file mode 100644 index f2cf82f1c72..00000000000 --- a/website/content/SDK/economy/fred_series/_index.md +++ /dev/null @@ -1,41 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### economy.fred_series(series_ids: List[str], start_date: str = None, end_date: str = None) -> pandas.core.frame.DataFrame - -Get Series data. [Source: FRED] - Parameters - ---------- - series_ids : List[str] - Series ID to get data from - start_date : str - Start date to get data from, format yyyy-mm-dd - end_date : str - End data to get from, format yyyy-mm-dd - - Returns - ---------- - pd.DataFrame - Series data - -## Getting charts -### economy.fred_series(series_ids: List[str], start_date: str = None, end_date: str = None, limit: int = 10, raw: bool = False, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display (multiple) series from https://fred.stlouisfed.org. [Source: FRED] - - Parameters - ---------- - series_ids : List[str] - FRED Series ID from https://fred.stlouisfed.org. For multiple series use: series1,series2,series3 - start_date : str - Starting date (YYYY-MM-DD) of data - end_date : str - Ending date (YYYY-MM-DD) of data - limit : int - Number of data points to display. - raw : bool - Output only raw data - export : str - Export data to csv,json,xlsx or png,jpg,pdf,svg file - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/economy/fred_series/_index.rst b/website/content/SDK/economy/fred_series/_index.rst new file mode 100644 index 00000000000..0f34a2d7f37 --- /dev/null +++ b/website/content/SDK/economy/fred_series/_index.rst @@ -0,0 +1,92 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +economy.fred_series( + series_ids: List[str], + start_date: str = None, + end_date: str = None, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get Series data. [Source: FRED] +

+ +* **Parameters** + + series_ids : List[str] + Series ID to get data from + start_date : str + Start date to get data from, format yyyy-mm-dd + end_date : str + End data to get from, format yyyy-mm-dd + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Series data + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +economy.fred_series( + series_ids: List[str], + start_date: str = None, + end_date: str = None, + limit: int = 10, + raw: bool = False, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display (multiple) series from https://fred.stlouisfed.org. [Source: FRED] +

+ +* **Parameters** + + series_ids : List[str] + FRED Series ID from https://fred.stlouisfed.org. For multiple series use: series1,series2,series3 + start_date : str + Starting date (YYYY-MM-DD) of data + end_date : str + Ending date (YYYY-MM-DD) of data + limit : int + Number of data points to display. + raw : bool + Output only raw data + export : str + Export data to csv,json,xlsx or png,jpg,pdf,svg file + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/economy/fred_yield_curve/_index.md b/website/content/SDK/economy/fred_yield_curve/_index.md deleted file mode 100644 index d49ebcbca6a..00000000000 --- a/website/content/SDK/economy/fred_yield_curve/_index.md +++ /dev/null @@ -1,30 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### economy.fred_yield_curve(date: datetime.datetime = None) -> Tuple[pandas.core.frame.DataFrame, datetime.datetime] - -Gets yield curve data from FRED - - Parameters - ---------- - date: datetime - Date to get curve for. If None, gets most recent date - - Returns - ------- - pd.DataFrame: - Dataframe of yields and maturities - str - Date for which the yield curve is obtained - -## Getting charts -### economy.fred_yield_curve(date: datetime.datetime = None, external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, raw: bool = False, export: str = '', chart=True) - -Display yield curve based on US Treasury rates for a specified date. - - Parameters - ---------- - date: datetime - Date to get yield curve for - external_axes: Optional[List[plt.Axes]] - External axes to plot data on diff --git a/website/content/SDK/economy/fred_yield_curve/_index.rst b/website/content/SDK/economy/fred_yield_curve/_index.rst new file mode 100644 index 00000000000..7ee8b0857c6 --- /dev/null +++ b/website/content/SDK/economy/fred_yield_curve/_index.rst @@ -0,0 +1,75 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +economy.fred_yield_curve( + date: datetime.datetime = None, + chart: bool = False, +) -> Tuple[pandas.core.frame.DataFrame, datetime.datetime] +{{< /highlight >}} + +.. raw:: html + +

+ Gets yield curve data from FRED +

+ +* **Parameters** + + date: datetime + Date to get curve for. If None, gets most recent date + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame: + Dataframe of yields and maturities + str + Date for which the yield curve is obtained + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +economy.fred_yield_curve( + date: datetime.datetime = None, + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + raw: bool = False, + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display yield curve based on US Treasury rates for a specified date. +

+ +* **Parameters** + + date: datetime + Date to get yield curve for + external_axes: Optional[List[plt.Axes]] + External axes to plot data on + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/economy/future/_index.md b/website/content/SDK/economy/future/_index.md deleted file mode 100644 index fece820ae46..00000000000 --- a/website/content/SDK/economy/future/_index.md +++ /dev/null @@ -1,18 +0,0 @@ -## Get underlying data -### economy.future(future_type: str = 'Indices', sortby: str = 'ticker', ascend: bool = False) -> pandas.core.frame.DataFrame - -Get futures data. [Source: Finviz] - - Parameters - ---------- - future_type : str - From the following: Indices, Energy, Metals, Meats, Grains, Softs, Bonds, Currencies - sortby : str - Column to sort by - ascend : bool - Flag to sort in ascending order - - Returns - ---------- - pd.Dataframe - Indices, Energy, Metals, Meats, Grains, Softs, Bonds, Currencies diff --git a/website/content/SDK/economy/future/_index.rst b/website/content/SDK/economy/future/_index.rst new file mode 100644 index 00000000000..94e6605dff2 --- /dev/null +++ b/website/content/SDK/economy/future/_index.rst @@ -0,0 +1,40 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +economy.future( + future_type: str = 'Indices', + sortby: str = 'ticker', + ascend: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get futures data. [Source: Finviz] +

+ +* **Parameters** + + future_type : str + From the following: Indices, Energy, Metals, Meats, Grains, Softs, Bonds, Currencies + sortby : str + Column to sort by + ascend : bool + Flag to sort in ascending order + +* **Returns** + + pd.Dataframe + Indices, Energy, Metals, Meats, Grains, Softs, Bonds, Currencies diff --git a/website/content/SDK/economy/futures/_index.md b/website/content/SDK/economy/futures/_index.md deleted file mode 100644 index a23f87274d7..00000000000 --- a/website/content/SDK/economy/futures/_index.md +++ /dev/null @@ -1,9 +0,0 @@ -## Get underlying data -### economy.futures() -> pandas.core.frame.DataFrame - -Scrape data for top commodities - - Returns - ------- - commodities: pd.DataFrame - Dataframe containing name, price, net change and percent change diff --git a/website/content/SDK/economy/futures/_index.rst b/website/content/SDK/economy/futures/_index.rst new file mode 100644 index 00000000000..8e62750e2ae --- /dev/null +++ b/website/content/SDK/economy/futures/_index.rst @@ -0,0 +1,26 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +economy.futures() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Scrape data for top commodities +

+ +* **Returns** + + commodities: pd.DataFrame + Dataframe containing name, price, net change and percent change diff --git a/website/content/SDK/economy/gdp/_index.md b/website/content/SDK/economy/gdp/_index.md deleted file mode 100644 index da541a892ba..00000000000 --- a/website/content/SDK/economy/gdp/_index.md +++ /dev/null @@ -1,35 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### economy.gdp(interval: str = 'q', start_year: int = 2010) -> pandas.core.frame.DataFrame - -Get annual or quarterly Real GDP for US - - Parameters - ---------- - interval : str, optional - Interval for GDP, by default "a" for annual, by default "q" - start_year : int, optional - Start year for plot, by default 2010 - Returns - ------- - pd.DataFrame - Dataframe of GDP - -## Getting charts -### economy.gdp(interval: str = 'q', start_year: int = 2010, raw: bool = False, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display US GDP from AlphaVantage - - Parameters - ---------- - interval : str - Interval for GDP. Either "a" or "q", by default "q" - start_year : int, optional - Start year for plot, by default 2010 - raw : bool, optional - Flag to show raw data, by default False - export : str, optional - Format to export data, by default "" - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/economy/gdp/_index.rst b/website/content/SDK/economy/gdp/_index.rst new file mode 100644 index 00000000000..106ae4da00d --- /dev/null +++ b/website/content/SDK/economy/gdp/_index.rst @@ -0,0 +1,83 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +economy.gdp( + interval: str = 'q', + start_year: int = 2010, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get annual or quarterly Real GDP for US +

+ +* **Parameters** + + interval : str, optional + Interval for GDP, by default "a" for annual, by default "q" + start_year : int, optional + Start year for plot, by default 2010 + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Dataframe of GDP + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +economy.gdp( + interval: str = 'q', + start_year: int = 2010, + raw: bool = False, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display US GDP from AlphaVantage +

+ +* **Parameters** + + interval : str + Interval for GDP. Either "a" or "q", by default "q" + start_year : int, optional + Start year for plot, by default 2010 + raw : bool, optional + Flag to show raw data, by default False + export : str, optional + Format to export data, by default "" + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/economy/gdpc/_index.md b/website/content/SDK/economy/gdpc/_index.md deleted file mode 100644 index 2b82bd90218..00000000000 --- a/website/content/SDK/economy/gdpc/_index.md +++ /dev/null @@ -1,32 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### economy.gdpc(start_year: int = 2010) -> pandas.core.frame.DataFrame - -Real GDP per Capita for United States - - Parameters - ---------- - start_year : int, optional - Start year for plot, by default 2010 - - Returns - ------- - pd.DataFrame - DataFrame of GDP per Capita - -## Getting charts -### economy.gdpc(start_year: int = 2010, raw: bool = False, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display US GDP per Capita from AlphaVantage - - Parameters - ---------- - start_year : int, optional - Start year for plot, by default 2010 - raw : bool, optional - Flag to show raw data, by default False - export : str, optional - Format to export data, by default - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/economy/gdpc/_index.rst b/website/content/SDK/economy/gdpc/_index.rst new file mode 100644 index 00000000000..1348d1b5525 --- /dev/null +++ b/website/content/SDK/economy/gdpc/_index.rst @@ -0,0 +1,77 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +economy.gdpc( + start_year: int = 2010, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Real GDP per Capita for United States +

+ +* **Parameters** + + start_year : int, optional + Start year for plot, by default 2010 + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + DataFrame of GDP per Capita + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +economy.gdpc( + start_year: int = 2010, + raw: bool = False, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display US GDP per Capita from AlphaVantage +

+ +* **Parameters** + + start_year : int, optional + Start year for plot, by default 2010 + raw : bool, optional + Flag to show raw data, by default False + export : str, optional + Format to export data, by default + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/economy/get_events_countries/_index.md b/website/content/SDK/economy/get_events_countries/_index.md deleted file mode 100644 index 05956a272ec..00000000000 --- a/website/content/SDK/economy/get_events_countries/_index.md +++ /dev/null @@ -1,7 +0,0 @@ -## Get underlying data -### economy.get_events_countries() -> list - -Get available countries for events command. - - Returns: - list: List of available countries. diff --git a/website/content/SDK/economy/get_events_countries/_index.rst b/website/content/SDK/economy/get_events_countries/_index.rst new file mode 100644 index 00000000000..9cd7812039c --- /dev/null +++ b/website/content/SDK/economy/get_events_countries/_index.rst @@ -0,0 +1,24 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +economy.get_events_countries() -> list +{{< /highlight >}} + +.. raw:: html + +

+ Get available countries for events command. + + Returns: + list: List of available countries. +

diff --git a/website/content/SDK/economy/get_ycrv_countries/_index.md b/website/content/SDK/economy/get_ycrv_countries/_index.md deleted file mode 100644 index 43ff44d4d12..00000000000 --- a/website/content/SDK/economy/get_ycrv_countries/_index.md +++ /dev/null @@ -1,7 +0,0 @@ -## Get underlying data -### economy.get_ycrv_countries() -> list - -Get available countries for ycrv command. - - Returns: - list: List of available countries. diff --git a/website/content/SDK/economy/get_ycrv_countries/_index.rst b/website/content/SDK/economy/get_ycrv_countries/_index.rst new file mode 100644 index 00000000000..66c62885d47 --- /dev/null +++ b/website/content/SDK/economy/get_ycrv_countries/_index.rst @@ -0,0 +1,24 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +economy.get_ycrv_countries() -> list +{{< /highlight >}} + +.. raw:: html + +

+ Get available countries for ycrv command. + + Returns: + list: List of available countries. +

diff --git a/website/content/SDK/economy/glbonds/_index.md b/website/content/SDK/economy/glbonds/_index.md deleted file mode 100644 index 62ee7d4067b..00000000000 --- a/website/content/SDK/economy/glbonds/_index.md +++ /dev/null @@ -1,9 +0,0 @@ -## Get underlying data -### economy.glbonds() -> pandas.core.frame.DataFrame - -Scrape data for global bonds - - Returns - ------- - bonds: pd.DataFrame - Dataframe containing name, coupon rate, yield and change in yield diff --git a/website/content/SDK/economy/glbonds/_index.rst b/website/content/SDK/economy/glbonds/_index.rst new file mode 100644 index 00000000000..6ada14b7fac --- /dev/null +++ b/website/content/SDK/economy/glbonds/_index.rst @@ -0,0 +1,26 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +economy.glbonds() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Scrape data for global bonds +

+ +* **Returns** + + bonds: pd.DataFrame + Dataframe containing name, coupon rate, yield and change in yield diff --git a/website/content/SDK/economy/index/_index.md b/website/content/SDK/economy/index/_index.rst similarity index 55% rename from website/content/SDK/economy/index/_index.md rename to website/content/SDK/economy/index/_index.rst index 977f12d86f5..8fb5f782423 100644 --- a/website/content/SDK/economy/index/_index.md +++ b/website/content/SDK/economy/index/_index.rst @@ -1,11 +1,37 @@ -To obtain charts, make sure to add `chart=True` as the last parameter +.. role:: python(code) + :language: python + :class: highlight -## Get underlying data -### economy.index(indices: list, interval: str = '1d', start_date: int = None, end_date: int = None, column: str = 'Adj Close', returns: bool = False) -> pandas.core.frame.DataFrame +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +economy.index( + indices: list, + interval: str = '1d', + start_date: int = None, + end_date: int = None, + column: str = 'Adj Close', + returns: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get data on selected indices over time [Source: Yahoo Finance] +

+ +* **Parameters** -Get data on selected indices over time [Source: Yahoo Finance] - Parameters - ---------- indices: list A list of indices to get data. Available indices can be accessed through economy.available_indices(). interval: str @@ -19,17 +45,46 @@ Get data on selected indices over time [Source: Yahoo Finance] Which column to load in, by default this is the Adjusted Close. returns: bool Flag to show cumulative returns on index - Returns - ---------- + chart: *bool* + Flag to display chart + + +* **Returns** + pd.Dataframe Dataframe with historical data on selected indices. -## Getting charts -### economy.index(indices: list, interval: str = '1d', start_date: int = None, end_date: int = None, column: str = 'Adj Close', returns: bool = False, raw: bool = False, external_axes: Optional[List[axes]] = None, export: str = '', chart=True) +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +economy.index( + indices: list, + interval: str = '1d', + start_date: int = None, + end_date: int = None, + column: str = 'Adj Close', + returns: bool = False, + raw: bool = False, + external_axes: Optional[List[axes]] = None, + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Load (and show) the selected indices over time [Source: Yahoo Finance] +

+ +* **Parameters** -Load (and show) the selected indices over time [Source: Yahoo Finance] - Parameters - ---------- indices: list A list of indices you wish to load (and plot). Available indices can be accessed through economy.available_indices(). @@ -50,6 +105,10 @@ Load (and show) the selected indices over time [Source: Yahoo Finance] External axes to plot on export : str Export data to csv,json,xlsx or png,jpg,pdf,svg file - Returns - ---------- + chart: *bool* + Flag to display chart + + +* **Returns** + Plots the Series. diff --git a/website/content/SDK/economy/indices/_index.md b/website/content/SDK/economy/indices/_index.md deleted file mode 100644 index 01d8e8bd5dc..00000000000 --- a/website/content/SDK/economy/indices/_index.md +++ /dev/null @@ -1,9 +0,0 @@ -## Get underlying data -### economy.indices() -> pandas.core.frame.DataFrame - -Get the top US indices - - Returns - ------- - indices: pd.DataFrame - Dataframe containing name, price, net change and percent change diff --git a/website/content/SDK/economy/indices/_index.rst b/website/content/SDK/economy/indices/_index.rst new file mode 100644 index 00000000000..472ceb29bf4 --- /dev/null +++ b/website/content/SDK/economy/indices/_index.rst @@ -0,0 +1,26 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +economy.indices() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get the top US indices +

+ +* **Returns** + + indices: pd.DataFrame + Dataframe containing name, price, net change and percent change diff --git a/website/content/SDK/economy/inf/_index.md b/website/content/SDK/economy/inf/_index.md deleted file mode 100644 index cd22b91b87a..00000000000 --- a/website/content/SDK/economy/inf/_index.md +++ /dev/null @@ -1,32 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### economy.inf(start_year: int = 2010) -> pandas.core.frame.DataFrame - -Get historical Inflation for United States from AlphaVantage - - Parameters - ---------- - start_year : int, optional - Start year for plot, by default 2010 - - Returns - ------- - pd.DataFrame - DataFrame of inflation rates - -## Getting charts -### economy.inf(start_year: int = 2010, raw: bool = False, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display US Inflation from AlphaVantage - - Parameters - ---------- - start_year : int, optional - Start year for plot, by default 2010 - raw : bool, optional - Flag to show raw data, by default False - export : str, optional - Format to export data, by default "" - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/economy/inf/_index.rst b/website/content/SDK/economy/inf/_index.rst new file mode 100644 index 00000000000..02ac4fb5dc6 --- /dev/null +++ b/website/content/SDK/economy/inf/_index.rst @@ -0,0 +1,77 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +economy.inf( + start_year: int = 2010, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get historical Inflation for United States from AlphaVantage +

+ +* **Parameters** + + start_year : int, optional + Start year for plot, by default 2010 + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + DataFrame of inflation rates + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +economy.inf( + start_year: int = 2010, + raw: bool = False, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display US Inflation from AlphaVantage +

+ +* **Parameters** + + start_year : int, optional + Start year for plot, by default 2010 + raw : bool, optional + Flag to show raw data, by default False + export : str, optional + Format to export data, by default "" + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/economy/macro/_index.md b/website/content/SDK/economy/macro/_index.rst similarity index 59% rename from website/content/SDK/economy/macro/_index.md rename to website/content/SDK/economy/macro/_index.rst index ec881639ef8..20f1f7c05ca 100644 --- a/website/content/SDK/economy/macro/_index.md +++ b/website/content/SDK/economy/macro/_index.rst @@ -1,12 +1,38 @@ -To obtain charts, make sure to add `chart=True` as the last parameter +.. role:: python(code) + :language: python + :class: highlight -## Get underlying data -### economy.macro(parameters: list = None, countries: list = None, transform: str = '', start_date: str = '1900-01-01', end_date=datetime.date(2022, 11, 3), symbol: str = '') -> Tuple[Any, Dict[Any, Dict[Any, Any]], str] +| -This functions groups the data queried from the EconDB database [Source: EconDB] +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +economy.macro( + parameters: list = None, + countries: list = None, + transform: str = '', + start_date: str = '1900-01-01', + end_date=datetime.date( + 2022, 11, 8, chart: bool = False, +), symbol: str = '', + chart: bool = False, +) -> Tuple[Any, Dict[Any, Dict[Any, Any]], str] +{{< /highlight >}} + +.. raw:: html + +

+ This functions groups the data queried from the EconDB database [Source: EconDB] +

+ +* **Parameters** - Parameters - ---------- parameters: list The type of data you wish to download. Available parameters can be accessed through economy.macro_parameters(). countries : list @@ -19,9 +45,12 @@ This functions groups the data queried from the EconDB database [Source: EconDB] The end date, format "YEAR-MONTH-DAY", i.e. 2020-06-05. symbol : str In what currency you wish to convert all values. + chart: *bool* + Flag to display chart + + +* **Returns** - Returns - ---------- pd.DataFrame A DataFrame with the requested macro data of all chosen countries Dictionary @@ -29,13 +58,37 @@ This functions groups the data queried from the EconDB database [Source: EconDB] str Denomination which can be Trillions, Billions, Millions, Thousands -## Getting charts -### economy.macro(parameters: list = None, countries: list = None, transform: str = '', start_date: str = '1900-01-01', end_date: str = '2022-11-03', symbol: str = '', raw: bool = False, external_axes: Optional[List[axes]] = None, export: str = '', chart=True) +| -Show the received macro data about a company [Source: EconDB] +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +economy.macro( + parameters: list = None, + countries: list = None, + transform: str = '', + start_date: str = '1900-01-01', + end_date: str = '2022-11-08', + symbol: str = '', + raw: bool = False, + external_axes: Optional[List[axes]] = None, + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Show the received macro data about a company [Source: EconDB] +

+ +* **Parameters** - Parameters - ---------- parameters: list The type of data you wish to display. Available parameters can be accessed through get_macro_parameters(). countries : list @@ -60,7 +113,10 @@ Show the received macro data about a company [Source: EconDB] External axes to plot on export : str Export data to csv,json,xlsx or png,jpg,pdf,svg file + chart: *bool* + Flag to display chart + + +* **Returns** - Returns - ---------- Plots the Series. diff --git a/website/content/SDK/economy/macro_countries/_index.md b/website/content/SDK/economy/macro_countries/_index.md deleted file mode 100644 index b8a3d5be7bc..00000000000 --- a/website/content/SDK/economy/macro_countries/_index.md +++ /dev/null @@ -1,9 +0,0 @@ -## Get underlying data -### economy.macro_countries() -> Dict[str, str] - -This function returns the available countries and respective currencies. - - Returns - ---------- - Dict[str, str] - A dictionary with the available countries and respective currencies. diff --git a/website/content/SDK/economy/macro_countries/_index.rst b/website/content/SDK/economy/macro_countries/_index.rst new file mode 100644 index 00000000000..6b06e94d975 --- /dev/null +++ b/website/content/SDK/economy/macro_countries/_index.rst @@ -0,0 +1,26 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +economy.macro_countries() -> Dict[str, str] +{{< /highlight >}} + +.. raw:: html + +

+ This function returns the available countries and respective currencies. +

+ +* **Returns** + + Dict[str, str] + A dictionary with the available countries and respective currencies. diff --git a/website/content/SDK/economy/macro_parameters/_index.md b/website/content/SDK/economy/macro_parameters/_index.md deleted file mode 100644 index cdc0ef5d16a..00000000000 --- a/website/content/SDK/economy/macro_parameters/_index.md +++ /dev/null @@ -1,9 +0,0 @@ -## Get underlying data -### economy.macro_parameters() -> Dict[str, Dict[str, str]] - -This function returns the available macro parameters with detail. - - Returns - ---------- - Dict[str, Dict[str, str]] - A dictionary with the available macro parameters. diff --git a/website/content/SDK/economy/macro_parameters/_index.rst b/website/content/SDK/economy/macro_parameters/_index.rst new file mode 100644 index 00000000000..7cccfb11215 --- /dev/null +++ b/website/content/SDK/economy/macro_parameters/_index.rst @@ -0,0 +1,26 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +economy.macro_parameters() -> Dict[str, Dict[str, str]] +{{< /highlight >}} + +.. raw:: html + +

+ This function returns the available macro parameters with detail. +

+ +* **Returns** + + Dict[str, Dict[str, str]] + A dictionary with the available macro parameters. diff --git a/website/content/SDK/economy/overview/_index.md b/website/content/SDK/economy/overview/_index.md deleted file mode 100644 index 601ef1fc764..00000000000 --- a/website/content/SDK/economy/overview/_index.md +++ /dev/null @@ -1,9 +0,0 @@ -## Get underlying data -### economy.overview() -> pandas.core.frame.DataFrame - -Scrape data for market overview - - Returns - ------- - overview: pd.DataFrame - Dataframe containing name, price, net change and percent change diff --git a/website/content/SDK/economy/overview/_index.rst b/website/content/SDK/economy/overview/_index.rst new file mode 100644 index 00000000000..aca531cd58d --- /dev/null +++ b/website/content/SDK/economy/overview/_index.rst @@ -0,0 +1,26 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +economy.overview() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Scrape data for market overview +

+ +* **Returns** + + overview: pd.DataFrame + Dataframe containing name, price, net change and percent change diff --git a/website/content/SDK/economy/perfmap/_index.md b/website/content/SDK/economy/perfmap/_index.md deleted file mode 100644 index e1917ab2b36..00000000000 --- a/website/content/SDK/economy/perfmap/_index.md +++ /dev/null @@ -1,11 +0,0 @@ -## Get underlying data -### economy.perfmap(period: str = '1d', map_filter: str = 'sp500') - -Opens Finviz map website in a browser. [Source: Finviz] - - Parameters - ---------- - period : str - Performance period. Available periods are 1d, 1w, 1m, 3m, 6m, 1y. - scope : str - Map filter. Available map filters are sp500, world, full, etf. diff --git a/website/content/SDK/economy/perfmap/_index.rst b/website/content/SDK/economy/perfmap/_index.rst new file mode 100644 index 00000000000..348efbfe5b3 --- /dev/null +++ b/website/content/SDK/economy/perfmap/_index.rst @@ -0,0 +1,32 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +economy.perfmap( + period: str = '1d', + map_filter: str = 'sp500', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Opens Finviz map website in a browser. [Source: Finviz] +

+ +* **Parameters** + + period : str + Performance period. Available periods are 1d, 1w, 1m, 3m, 6m, 1y. + scope : str + Map filter. Available map filters are sp500, world, full, etf. diff --git a/website/content/SDK/economy/performance/_index.md b/website/content/SDK/economy/performance/_index.md deleted file mode 100644 index 6ce3a06e9cd..00000000000 --- a/website/content/SDK/economy/performance/_index.md +++ /dev/null @@ -1,18 +0,0 @@ -## Get underlying data -### economy.performance(group: str = 'sector', sortby: str = 'Name', ascend: bool = True) -> pandas.core.frame.DataFrame - -Get group (sectors, industry or country) performance data. [Source: Finviz] - - Parameters - ---------- - group : str - Group by category. Available groups can be accessed through get_groups(). - sortby : str - Column to sort by - ascend : bool - Flag to sort in ascending order - - Returns - ---------- - pd.DataFrame - dataframe with performance data diff --git a/website/content/SDK/economy/performance/_index.rst b/website/content/SDK/economy/performance/_index.rst new file mode 100644 index 00000000000..986f47f0b57 --- /dev/null +++ b/website/content/SDK/economy/performance/_index.rst @@ -0,0 +1,40 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +economy.performance( + group: str = 'sector', + sortby: str = 'Name', + ascend: bool = True, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get group (sectors, industry or country) performance data. [Source: Finviz] +

+ +* **Parameters** + + group : str + Group by category. Available groups can be accessed through get_groups(). + sortby : str + Column to sort by + ascend : bool + Flag to sort in ascending order + +* **Returns** + + pd.DataFrame + dataframe with performance data diff --git a/website/content/SDK/economy/rtps/_index.md b/website/content/SDK/economy/rtps/_index.md deleted file mode 100644 index 5913329e5ae..00000000000 --- a/website/content/SDK/economy/rtps/_index.md +++ /dev/null @@ -1,25 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### economy.rtps() -> pandas.core.frame.DataFrame - -Get real-time performance sector data - - Returns - ---------- - df_sectors : pd.Dataframe - Real-time performance data - -## Getting charts -### economy.rtps(raw: bool = False, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display Real-Time Performance sector. [Source: AlphaVantage] - - Parameters - ---------- - raw : bool - Output only raw data - export : str - Export dataframe data to csv,json,xlsx file - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/economy/rtps/_index.rst b/website/content/SDK/economy/rtps/_index.rst new file mode 100644 index 00000000000..e21209dab8b --- /dev/null +++ b/website/content/SDK/economy/rtps/_index.rst @@ -0,0 +1,63 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +economy.rtps() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get real-time performance sector data +

+ +* **Returns** + + df_sectors : pd.Dataframe + Real-time performance data + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +economy.rtps( + raw: bool = False, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display Real-Time Performance sector. [Source: AlphaVantage] +

+ +* **Parameters** + + raw : bool + Output only raw data + export : str + Export dataframe data to csv,json,xlsx file + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/economy/search_index/_index.md b/website/content/SDK/economy/search_index/_index.md deleted file mode 100644 index a20be24cd8c..00000000000 --- a/website/content/SDK/economy/search_index/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### economy.search_index(keyword: list, limit: int = 10) -> pandas.core.frame.DataFrame - -Search indices by keyword. [Source: FinanceDatabase] - Parameters - ---------- - keyword: list - The keyword you wish to search for. This can include spaces. - limit: int - The amount of views you want to show, by default this is set to 10. - Returns - ---------- - pd.Dataframe - Dataframe with the available options. diff --git a/website/content/SDK/economy/search_index/_index.rst b/website/content/SDK/economy/search_index/_index.rst new file mode 100644 index 00000000000..e6e337503ec --- /dev/null +++ b/website/content/SDK/economy/search_index/_index.rst @@ -0,0 +1,37 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +economy.search_index( + keyword: list, + limit: int = 10, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Search indices by keyword. [Source: FinanceDatabase] +

+ +* **Parameters** + + keyword: list + The keyword you wish to search for. This can include spaces. + limit: int + The amount of views you want to show, by default this is set to 10. + +* **Returns** + + pd.Dataframe + Dataframe with the available options. diff --git a/website/content/SDK/economy/spectrum/_index.md b/website/content/SDK/economy/spectrum/_index.md deleted file mode 100644 index 3912ba735c8..00000000000 --- a/website/content/SDK/economy/spectrum/_index.md +++ /dev/null @@ -1,23 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### economy.spectrum(group: str = 'sector') - -Get group (sectors, industry or country) valuation/performance data. [Source: Finviz] - - Parameters - ---------- - group : str - Group by category. Available groups can be accessed through get_groups(). - -## Getting charts -### economy.spectrum(group: str = 'sector', export: str = '', chart=True) - -Display finviz spectrum in system viewer [Source: Finviz] - - Parameters - ---------- - group: str - Group by category. Available groups can be accessed through get_groups(). - export: str - Format to export data diff --git a/website/content/SDK/economy/spectrum/_index.rst b/website/content/SDK/economy/spectrum/_index.rst new file mode 100644 index 00000000000..0d6a9c60edd --- /dev/null +++ b/website/content/SDK/economy/spectrum/_index.rst @@ -0,0 +1,66 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +economy.spectrum( + group: str = 'sector', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Get group (sectors, industry or country) valuation/performance data. [Source: Finviz] +

+ +* **Parameters** + + group : str + Group by category. Available groups can be accessed through get_groups(). + chart: *bool* + Flag to display chart + + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +economy.spectrum( + group: str = 'sector', + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display finviz spectrum in system viewer [Source: Finviz] +

+ +* **Parameters** + + group: str + Group by category. Available groups can be accessed through get_groups(). + export: str + Format to export data + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/economy/spread/_index.md b/website/content/SDK/economy/spread/_index.md deleted file mode 100644 index 157807a583f..00000000000 --- a/website/content/SDK/economy/spread/_index.md +++ /dev/null @@ -1,44 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### economy.spread(countries: Union[str, List[str]] = 'G7', maturity: str = '10Y', change: bool = False) -> pandas.core.frame.DataFrame - -Get spread matrix. [Source: Investing.com] - - Parameters - ---------- - countries: Union[str, List[str]] - Countries or group of countries. List of available countries is accessible through get_ycrv_countries(). - maturity: str - Maturity to get data. By default 10Y. - change: bool - Flag to use 1 day change or not. By default False. - - Returns - ------- - pd.DataFrame - Spread matrix. - - -## Getting charts -### economy.spread(countries: Union[str, List[str]] = 'G7', maturity: str = '10Y', change: bool = False, color: str = 'openbb', raw: bool = False, external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, export: str = '', chart=True) - -Display spread matrix. [Source: Investing.com] - - Parameters - ---------- - countries: Union[str, List[str]] - Countries or group of countries. List of available countries is accessible through get_ycrv_countries(). - maturity: str - Maturity to get data. By default 10Y. - change: bool - Flag to use 1 day change or not. By default False. - color: str - Color theme to use on heatmap, from rgb, binary or openbb By default, openbb. - raw : bool - Output only raw data. - export : str - Export dataframe data to csv,json,xlsx file - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None - diff --git a/website/content/SDK/economy/spread/_index.rst b/website/content/SDK/economy/spread/_index.rst new file mode 100644 index 00000000000..631b270e478 --- /dev/null +++ b/website/content/SDK/economy/spread/_index.rst @@ -0,0 +1,92 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +economy.spread( + countries: Union[str, List[str]] = 'G7', + maturity: str = '10Y', + change: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get spread matrix. [Source: Investing.com] +

+ +* **Parameters** + + countries: Union[str, List[str]] + Countries or group of countries. List of available countries is accessible through get_ycrv_countries(). + maturity: *str* + Maturity to get data. By default 10Y. + change: *bool* + Flag to use 1 day change or not. By default False. + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Spread matrix. + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +economy.spread( + countries: Union[str, List[str]] = 'G7', + maturity: str = '10Y', + change: bool = False, + color: str = 'openbb', + raw: bool = False, + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display spread matrix. [Source: Investing.com] +

+ +* **Parameters** + + countries: Union[str, List[str]] + Countries or group of countries. List of available countries is accessible through get_ycrv_countries(). + maturity: *str* + Maturity to get data. By default 10Y. + change: *bool* + Flag to use 1 day change or not. By default False. + color: *str* + Color theme to use on heatmap, from rgb, binary or openbb By default, openbb. + raw : *bool* + Output only raw data. + export : *str* + Export dataframe data to csv,json,xlsx file + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/economy/treasury/_index.md b/website/content/SDK/economy/treasury/_index.rst similarity index 55% rename from website/content/SDK/economy/treasury/_index.md rename to website/content/SDK/economy/treasury/_index.rst index d67187e4892..dd5ed885c87 100644 --- a/website/content/SDK/economy/treasury/_index.md +++ b/website/content/SDK/economy/treasury/_index.rst @@ -1,12 +1,36 @@ -To obtain charts, make sure to add `chart=True` as the last parameter +.. role:: python(code) + :language: python + :class: highlight -## Get underlying data -### economy.treasury(instruments: list = None, maturities: list = None, frequency: str = 'monthly', start_date: str = '1900-01-01', end_date: str = '2022-11-03') -> pandas.core.frame.DataFrame +| -Get U.S. Treasury rates [Source: EconDB] +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +economy.treasury( + instruments: list = None, + maturities: list = None, + frequency: str = 'monthly', + start_date: str = '1900-01-01', + end_date: str = '2022-11-08', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get U.S. Treasury rates [Source: EconDB] +

+ +* **Parameters** - Parameters - ---------- instruments: list Type(s) of treasuries, nominal, inflation-adjusted (long term average) or secondary market. Available options can be accessed through economy.treasury_maturities(). @@ -18,19 +42,45 @@ Get U.S. Treasury rates [Source: EconDB] Starting date, format "YEAR-MONTH-DAY", i.e. 2010-12-31. end_date : str End date, format "YEAR-MONTH-DAY", i.e. 2020-06-05. + chart: *bool* + Flag to display chart + + +* **Returns** - Returns - ---------- treasury_data: pd.Dataframe Holds data of the selected types and maturities -## Getting charts -### economy.treasury(instruments: list = None, maturities: list = None, frequency: str = 'monthly', start_date: str = '1900-01-01', end_date: str = '2022-11-03', raw: bool = False, external_axes: Optional[List[axes]] = None, export: str = '', chart=True) +| -Display U.S. Treasury rates [Source: EconDB] +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +economy.treasury( + instruments: list = None, + maturities: list = None, + frequency: str = 'monthly', + start_date: str = '1900-01-01', + end_date: str = '2022-11-08', + raw: bool = False, + external_axes: Optional[List[axes]] = None, + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display U.S. Treasury rates [Source: EconDB] +

+ +* **Parameters** - Parameters - ---------- instruments: list Type(s) of treasuries, nominal, inflation-adjusted or secondary market. Available options can be accessed through economy.treasury_maturities(). @@ -48,7 +98,10 @@ Display U.S. Treasury rates [Source: EconDB] External axes to plot on export : str Export data to csv,json,xlsx or png,jpg,pdf,svg file + chart: *bool* + Flag to display chart + + +* **Returns** - Returns - ---------- Plots the Treasury Series. diff --git a/website/content/SDK/economy/treasury_maturities/_index.md b/website/content/SDK/economy/treasury_maturities/_index.md deleted file mode 100644 index 1bfec045285..00000000000 --- a/website/content/SDK/economy/treasury_maturities/_index.md +++ /dev/null @@ -1,9 +0,0 @@ -## Get underlying data -### economy.treasury_maturities() -> pandas.core.frame.DataFrame - -Get treasury maturity options [Source: EconDB] - - Returns - ---------- - df: pd.DataFrame - Contains the name of the instruments and a string containing all options. diff --git a/website/content/SDK/economy/treasury_maturities/_index.rst b/website/content/SDK/economy/treasury_maturities/_index.rst new file mode 100644 index 00000000000..824b6b9b109 --- /dev/null +++ b/website/content/SDK/economy/treasury_maturities/_index.rst @@ -0,0 +1,26 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +economy.treasury_maturities() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get treasury maturity options [Source: EconDB] +

+ +* **Returns** + + df: pd.DataFrame + Contains the name of the instruments and a string containing all options. diff --git a/website/content/SDK/economy/tyld/_index.md b/website/content/SDK/economy/tyld/_index.md deleted file mode 100644 index 307a9fddec6..00000000000 --- a/website/content/SDK/economy/tyld/_index.md +++ /dev/null @@ -1,40 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### economy.tyld(interval: str = 'm', maturity: str = '10y', start_date: str = '2010-01-01') -> pandas.core.frame.DataFrame - -Get historical yield for a given maturity - - Parameters - ---------- - interval : str - Interval for data. Can be "d","w","m" for daily, weekly or monthly, by default "m" - start_date: str - Start date for data. Should be in YYYY-MM-DD format, by default "2010-01-01" - maturity : str - Maturity timeline. Can be "3mo","5y","10y" or "30y", by default "10y" - - Returns - ------- - pd.DataFrame - Dataframe of historical yields - -## Getting charts -### economy.tyld(interval: str = 'm', maturity: str = '10y', start_date: str = '2010-01-01', raw: bool = False, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display historical treasury yield for given maturity - - Parameters - ---------- - interval : str - Interval for data. Can be "d","w","m" for daily, weekly or monthly, by default "m" - maturity : str - Maturity timeline. Can be "3mo","5y","10y" or "30y", by default "10y" - start_date: str - Start date for data. Should be in YYYY-MM-DD format, by default "2010-01-01" - raw : bool, optional - Flag to display raw data, by default False - export : str, optional - Format to export data, by default "" - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/economy/tyld/_index.rst b/website/content/SDK/economy/tyld/_index.rst new file mode 100644 index 00000000000..e15ed5ed426 --- /dev/null +++ b/website/content/SDK/economy/tyld/_index.rst @@ -0,0 +1,89 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +economy.tyld( + interval: str = 'm', + maturity: str = '10y', + start_date: str = '2010-01-01', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get historical yield for a given maturity +

+ +* **Parameters** + + interval : str + Interval for data. Can be "d","w","m" for daily, weekly or monthly, by default "m" + start_date: str + Start date for data. Should be in YYYY-MM-DD format, by default "2010-01-01" + maturity : str + Maturity timeline. Can be "3mo","5y","10y" or "30y", by default "10y" + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Dataframe of historical yields + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +economy.tyld( + interval: str = 'm', + maturity: str = '10y', + start_date: str = '2010-01-01', + raw: bool = False, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display historical treasury yield for given maturity +

+ +* **Parameters** + + interval : str + Interval for data. Can be "d","w","m" for daily, weekly or monthly, by default "m" + maturity : str + Maturity timeline. Can be "3mo","5y","10y" or "30y", by default "10y" + start_date: str + Start date for data. Should be in YYYY-MM-DD format, by default "2010-01-01" + raw : bool, optional + Flag to display raw data, by default False + export : str, optional + Format to export data, by default "" + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/economy/unemp/_index.md b/website/content/SDK/economy/unemp/_index.md deleted file mode 100644 index eb813035d52..00000000000 --- a/website/content/SDK/economy/unemp/_index.md +++ /dev/null @@ -1,32 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### economy.unemp(start_year: int = 2010) -> pandas.core.frame.DataFrame - -Get historical unemployment for United States - - Parameters - ---------- - start_year : int, optional - Start year for plot, by default 2010 - - Returns - ------- - pd.DataFrame - Dataframe of historical yields - -## Getting charts -### economy.unemp(start_year: int = 2010, raw: bool = False, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display US unemployment AlphaVantage - - Parameters - ---------- - start_year : int, optional - Start year for plot, by default 2010 - raw : bool, optional - Flag to show raw data, by default False - export : str, optional - Format to export data, by default "" - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/economy/unemp/_index.rst b/website/content/SDK/economy/unemp/_index.rst new file mode 100644 index 00000000000..ee4e1eac360 --- /dev/null +++ b/website/content/SDK/economy/unemp/_index.rst @@ -0,0 +1,77 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +economy.unemp( + start_year: int = 2010, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get historical unemployment for United States +

+ +* **Parameters** + + start_year : int, optional + Start year for plot, by default 2010 + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Dataframe of historical yields + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +economy.unemp( + start_year: int = 2010, + raw: bool = False, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display US unemployment AlphaVantage +

+ +* **Parameters** + + start_year : int, optional + Start year for plot, by default 2010 + raw : bool, optional + Flag to show raw data, by default False + export : str, optional + Format to export data, by default "" + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/economy/usbonds/_index.md b/website/content/SDK/economy/usbonds/_index.md deleted file mode 100644 index af8b5b01954..00000000000 --- a/website/content/SDK/economy/usbonds/_index.md +++ /dev/null @@ -1,9 +0,0 @@ -## Get underlying data -### economy.usbonds() -> pandas.core.frame.DataFrame - -Scrape data for us bonds - - Returns - ------- - bonds: pd.DataFrame - Dataframe containing name, coupon rate, yield and change in yield diff --git a/website/content/SDK/economy/usbonds/_index.rst b/website/content/SDK/economy/usbonds/_index.rst new file mode 100644 index 00000000000..88b45b3864d --- /dev/null +++ b/website/content/SDK/economy/usbonds/_index.rst @@ -0,0 +1,26 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +economy.usbonds() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Scrape data for us bonds +

+ +* **Returns** + + bonds: pd.DataFrame + Dataframe containing name, coupon rate, yield and change in yield diff --git a/website/content/SDK/economy/valuation/_index.md b/website/content/SDK/economy/valuation/_index.md deleted file mode 100644 index 3e27c362123..00000000000 --- a/website/content/SDK/economy/valuation/_index.md +++ /dev/null @@ -1,18 +0,0 @@ -## Get underlying data -### economy.valuation(group: str = 'sector', sortby: str = 'Name', ascend: bool = True) -> pandas.core.frame.DataFrame - -Get group (sectors, industry or country) valuation data. [Source: Finviz] - - Parameters - ---------- - group : str - Group by category. Available groups can be accessed through get_groups(). - sortby : str - Column to sort by - ascend : bool - Flag to sort in ascending order - - Returns - ---------- - pd.DataFrame - dataframe with valuation/performance data diff --git a/website/content/SDK/economy/valuation/_index.rst b/website/content/SDK/economy/valuation/_index.rst new file mode 100644 index 00000000000..792932d6c27 --- /dev/null +++ b/website/content/SDK/economy/valuation/_index.rst @@ -0,0 +1,40 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +economy.valuation( + group: str = 'sector', + sortby: str = 'Name', + ascend: bool = True, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get group (sectors, industry or country) valuation data. [Source: Finviz] +

+ +* **Parameters** + + group : str + Group by category. Available groups can be accessed through get_groups(). + sortby : str + Column to sort by + ascend : bool + Flag to sort in ascending order + +* **Returns** + + pd.DataFrame + dataframe with valuation/performance data diff --git a/website/content/SDK/economy/ycrv/_index.md b/website/content/SDK/economy/ycrv/_index.md deleted file mode 100644 index 5f459372f5d..00000000000 --- a/website/content/SDK/economy/ycrv/_index.md +++ /dev/null @@ -1,28 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### economy.ycrv(country: str = 'United States') -> pandas.core.frame.DataFrame - -Get yield curve for specified country. [Source: Investing.com] - - Parameters - ---------- - country: str - Country to display yield curve. List of available countries is accessible through get_ycrv_countries(). - - Returns - ------- - pd.DataFrame - Country yield curve - -## Getting charts -### economy.ycrv(country: str = 'United States', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, raw: bool = False, export: str = '', chart=True) - -Display yield curve for specified country. [Source: Investing.com] - - Parameters - ---------- - country: str - Country to display yield curve. List of available countries is accessible through get_ycrv_countries(). - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/economy/ycrv/_index.rst b/website/content/SDK/economy/ycrv/_index.rst new file mode 100644 index 00000000000..5c4d8ef4c67 --- /dev/null +++ b/website/content/SDK/economy/ycrv/_index.rst @@ -0,0 +1,75 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +economy.ycrv( + date: datetime.datetime = None, + chart: bool = False, +) -> Tuple[pandas.core.frame.DataFrame, datetime.datetime] +{{< /highlight >}} + +.. raw:: html + +

+ Gets yield curve data from FRED +

+ +* **Parameters** + + date: datetime + Date to get curve for. If None, gets most recent date + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame: + Dataframe of yields and maturities + str + Date for which the yield curve is obtained + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +economy.ycrv( + date: datetime.datetime = None, + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + raw: bool = False, + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display yield curve based on US Treasury rates for a specified date. +

+ +* **Parameters** + + date: datetime + Date to get yield curve for + external_axes: Optional[List[plt.Axes]] + External axes to plot data on + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/candle/_index.md b/website/content/SDK/etf/candle/_index.rst similarity index 53% rename from website/content/SDK/stocks/candle/_index.md rename to website/content/SDK/etf/candle/_index.rst index 902925dd34e..c46c384fa09 100644 --- a/website/content/SDK/stocks/candle/_index.md +++ b/website/content/SDK/etf/candle/_index.rst @@ -1,12 +1,51 @@ -## Get underlying data -### stocks.candle(symbol: str, data: pandas.core.frame.DataFrame = None, use_matplotlib: bool = True, intraday: bool = False, add_trend: bool = False, ma: Optional[Iterable[int]] = None, asset_type: str = '', start_date: datetime.datetime = datetime.datetime(2019, 10, 30, 17, 22, 59, 707808), interval: int = 1440, end_date: datetime.datetime = datetime.datetime(2022, 11, 3, 17, 22, 59, 707818), prepost: bool = False, source: str = 'YahooFinance', iexrange: str = 'ytd', weekly: bool = False, monthly: bool = False, external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, raw: bool = False, yscale: str = 'linear') +.. role:: python(code) + :language: python + :class: highlight -Show candle plot of loaded ticker. +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +etf.candle( + symbol: str, + data: pandas.core.frame.DataFrame = None, + use_matplotlib: bool = True, + intraday: bool = False, + add_trend: bool = False, + ma: Optional[Iterable[int]] = None, + asset_type: str = '', + start_date: datetime.datetime = datetime.datetime( + 2019, 11, 4, 12, 2, 54, 348838, chart: bool = False, +), interval: int = 1440, + end_date: datetime.datetime = datetime.datetime( + 2022, 11, 8, 12, 2, 54, 348849, chart: bool = False, +), prepost: bool = False, + source: str = 'YahooFinance', + iexrange: str = 'ytd', + weekly: bool = False, + monthly: bool = False, + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + raw: bool = False, + yscale: str = 'linear', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Show candle plot of loaded ticker. [Source: Yahoo Finance, IEX Cloud or Alpha Vantage] +

+ +* **Parameters** - Parameters - ---------- symbol: str Ticker name data: pd.DataFrame @@ -19,11 +58,11 @@ Show candle plot of loaded ticker. Flag to add high and low trends to chart ma: Tuple[int] Moving averages to add to the candle - asset_type_: str + asset_type\_: str String to include in title external_axes : Optional[List[plt.Axes]], optional External axes (2 axes are expected in the list), by default None - asset_type_: str + asset_type\_: str String to include in title start_date: datetime Start date to get data from with diff --git a/website/content/SDK/etf/disc/mover/_index.md b/website/content/SDK/etf/disc/mover/_index.md deleted file mode 100644 index 0a7290c5287..00000000000 --- a/website/content/SDK/etf/disc/mover/_index.md +++ /dev/null @@ -1,30 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### etf.disc.mover(sort_type: str = 'gainers', export: bool = False) -> pandas.core.frame.DataFrame - - - Scrape data for top etf movers. - Parameters - ---------- - sort_type: str - Data to get. Can be "gainers", "decliners" or "active" - - Returns - ------- - etfmovers: pd.DataFrame - Datafame containing the name, price, change and the volume of the etf - -## Getting charts -### etf.disc.mover(sort_type: str = 'gainers', limit: int = 10, export='', chart=True) - - - Show top ETF movers from wsj.com - Parameters - ---------- - sort_type: str - What to show. Either Gainers, Decliners or Activity - limit: int - Number of etfs to show - export: str - Format to export data diff --git a/website/content/SDK/etf/disc/mover/_index.rst b/website/content/SDK/etf/disc/mover/_index.rst new file mode 100644 index 00000000000..baa75ec5bc1 --- /dev/null +++ b/website/content/SDK/etf/disc/mover/_index.rst @@ -0,0 +1,74 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +etf.disc.mover( + sort_type: str = 'gainers', + export: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Scrape data for top etf movers. +

+ +* **Parameters** + + sort_type: str + Data to get. Can be "gainers", "decliners" or "active" + chart: *bool* + Flag to display chart + + +* **Returns** + + etfmovers: pd.DataFrame + Datafame containing the name, price, change and the volume of the etf + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +etf.disc.mover( + sort_type: str = 'gainers', + limit: int = 10, export='', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Show top ETF movers from wsj.com +

+ +* **Parameters** + + sort_type: str + What to show. Either Gainers, Decliners or Activity + limit: int + Number of etfs to show + export: str + Format to export data + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/etf/etf_by_category/_index.md b/website/content/SDK/etf/etf_by_category/_index.md deleted file mode 100644 index 477330c4f76..00000000000 --- a/website/content/SDK/etf/etf_by_category/_index.md +++ /dev/null @@ -1,32 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### etf.etf_by_category(category: str) -> Dict - -Return a selection of ETFs based on category filtered by total assets. - [Source: Finance Database] - - Parameters - ---------- - category: str - Search by category to find ETFs matching the criteria. - - Returns - ---------- - data : Dict - Dictionary with ETFs that match a certain description - -## Getting charts -### etf.etf_by_category(category: str, limit: int = 10, export: str = '', chart=True) - -Display a selection of ETFs based on a category filtered by total assets. - [Source: Finance Database] - - Parameters - ---------- - description: str - Search by description to find ETFs matching the criteria. - limit: int - Limit of ETFs to display - export: str - Type of format to export data diff --git a/website/content/SDK/etf/etf_by_category/_index.rst b/website/content/SDK/etf/etf_by_category/_index.rst new file mode 100644 index 00000000000..0473905422a --- /dev/null +++ b/website/content/SDK/etf/etf_by_category/_index.rst @@ -0,0 +1,76 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +etf.etf_by_category( + category: str, + chart: bool = False, +) -> Dict +{{< /highlight >}} + +.. raw:: html + +

+ Return a selection of ETFs based on category filtered by total assets. + [Source: Finance Database] +

+ +* **Parameters** + + category: str + Search by category to find ETFs matching the criteria. + chart: *bool* + Flag to display chart + + +* **Returns** + + data : Dict + Dictionary with ETFs that match a certain description + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +etf.etf_by_category( + category: str, + limit: int = 10, + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display a selection of ETFs based on a category filtered by total assets. + [Source: Finance Database] +

+ +* **Parameters** + + description: str + Search by description to find ETFs matching the criteria. + limit: int + Limit of ETFs to display + export: str + Type of format to export data + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/etf/etf_by_name/_index.md b/website/content/SDK/etf/etf_by_name/_index.md deleted file mode 100644 index 636303810e7..00000000000 --- a/website/content/SDK/etf/etf_by_name/_index.md +++ /dev/null @@ -1,31 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### etf.etf_by_name(name_to_search: str) -> pandas.core.frame.DataFrame - -Get an ETF symbol and name based on ETF string to search. [Source: StockAnalysis] - - Parameters - ---------- - name_to_search: str - ETF name to match - - Returns - ------- - df: pd.Dataframe - Dataframe with symbols and names - -## Getting charts -### etf.etf_by_name(name: str, limit: int = 10, export: str = '', chart=True) - -Display ETFs matching search string. [Source: StockAnalysis] - - Parameters - ---------- - name: str - String being matched - limit: int - Limit of ETFs to display - export: str - Export to given file type - diff --git a/website/content/SDK/etf/etf_by_name/_index.rst b/website/content/SDK/etf/etf_by_name/_index.rst new file mode 100644 index 00000000000..a11621575ef --- /dev/null +++ b/website/content/SDK/etf/etf_by_name/_index.rst @@ -0,0 +1,74 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +etf.etf_by_name( + name_to_search: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get an ETF symbol and name based on ETF string to search. [Source: StockAnalysis] +

+ +* **Parameters** + + name_to_search: str + ETF name to match + chart: *bool* + Flag to display chart + + +* **Returns** + + df: pd.Dataframe + Dataframe with symbols and names + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +etf.etf_by_name( + name: str, + limit: int = 10, + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display ETFs matching search string. [Source: StockAnalysis] +

+ +* **Parameters** + + name: str + String being matched + limit: int + Limit of ETFs to display + export: str + Export to given file type + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/etf/holdings/_index.md b/website/content/SDK/etf/holdings/_index.md deleted file mode 100644 index cb994308c63..00000000000 --- a/website/content/SDK/etf/holdings/_index.md +++ /dev/null @@ -1,30 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### etf.holdings(symbol: str) -> pandas.core.frame.DataFrame - -Get ETF holdings - - Parameters - ---------- - symbol: str - Symbol to get holdings for - - Returns - ------- - df: pd.DataFrame - Dataframe of holdings - -## Getting charts -### etf.holdings(symbol: str, limit: int = 10, export: str = '', chart=True) - - - - Parameters - ---------- - symbol: str - ETF symbol to show holdings for - limit: int - Number of holdings to show - export: str - Format to export data diff --git a/website/content/SDK/etf/holdings/_index.rst b/website/content/SDK/etf/holdings/_index.rst new file mode 100644 index 00000000000..37e888d963c --- /dev/null +++ b/website/content/SDK/etf/holdings/_index.rst @@ -0,0 +1,74 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +etf.holdings( + symbol: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get ETF holdings +

+ +* **Parameters** + + symbol: str + Symbol to get holdings for + chart: *bool* + Flag to display chart + + +* **Returns** + + df: pd.DataFrame + Dataframe of holdings + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +etf.holdings( + symbol: str, + limit: int = 10, + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ +

+ +* **Parameters** + + symbol: str + ETF symbol to show holdings for + limit: int + Number of holdings to show + export: str + Format to export data + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/etf/ld/_index.md b/website/content/SDK/etf/ld/_index.md deleted file mode 100644 index 6b8de4490f9..00000000000 --- a/website/content/SDK/etf/ld/_index.md +++ /dev/null @@ -1,32 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### etf.ld(description: str) -> Dict - -Return a selection of ETFs based on description filtered by total assets. - [Source: Finance Database] - - Parameters - ---------- - description: str - Search by description to find ETFs matching the criteria. - - Returns - ---------- - data : Dict - Dictionary with ETFs that match a certain description - -## Getting charts -### etf.ld(description: str, limit: int = 10, export: str = '', chart=True) - -Display a selection of ETFs based on description filtered by total assets. - [Source: Finance Database] - - Parameters - ---------- - description: str - Search by description to find ETFs matching the criteria. - limit: int - Limit of ETFs to display - export: str - Type of format to export data diff --git a/website/content/SDK/etf/ld/_index.rst b/website/content/SDK/etf/ld/_index.rst new file mode 100644 index 00000000000..2c24a5c039a --- /dev/null +++ b/website/content/SDK/etf/ld/_index.rst @@ -0,0 +1,76 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +etf.ld( + description: str, + chart: bool = False, +) -> Dict +{{< /highlight >}} + +.. raw:: html + +

+ Return a selection of ETFs based on description filtered by total assets. + [Source: Finance Database] +

+ +* **Parameters** + + description: str + Search by description to find ETFs matching the criteria. + chart: *bool* + Flag to display chart + + +* **Returns** + + data : Dict + Dictionary with ETFs that match a certain description + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +etf.ld( + description: str, + limit: int = 10, + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display a selection of ETFs based on description filtered by total assets. + [Source: Finance Database] +

+ +* **Parameters** + + description: str + Search by description to find ETFs matching the criteria. + limit: int + Limit of ETFs to display + export: str + Type of format to export data + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/etf/ln/_index.md b/website/content/SDK/etf/ln/_index.md deleted file mode 100644 index f24748cc4ba..00000000000 --- a/website/content/SDK/etf/ln/_index.md +++ /dev/null @@ -1,30 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### etf.ln(name: str) -> Dict - -Return a selection of ETFs based on name filtered by total assets. [Source: Finance Database] - - Parameters - ---------- - name: str - Search by name to find ETFs matching the criteria. - - Returns - ---------- - data : Dict - Dictionary with ETFs that match a certain name - -## Getting charts -### etf.ln(name: str, limit: int = 10, export: str = '', chart=True) - -Display a selection of ETFs based on name filtered by total assets. [Source: Finance Database] - - Parameters - ---------- - name: str - Search by name to find ETFs matching the criteria. - limit: int - Limit of ETFs to display - export: str - Type of format to export data diff --git a/website/content/SDK/etf/ln/_index.rst b/website/content/SDK/etf/ln/_index.rst new file mode 100644 index 00000000000..4ec5b8d20fe --- /dev/null +++ b/website/content/SDK/etf/ln/_index.rst @@ -0,0 +1,74 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +etf.ln( + name: str, + chart: bool = False, +) -> Dict +{{< /highlight >}} + +.. raw:: html + +

+ Return a selection of ETFs based on name filtered by total assets. [Source: Finance Database] +

+ +* **Parameters** + + name: str + Search by name to find ETFs matching the criteria. + chart: *bool* + Flag to display chart + + +* **Returns** + + data : Dict + Dictionary with ETFs that match a certain name + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +etf.ln( + name: str, + limit: int = 10, + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display a selection of ETFs based on name filtered by total assets. [Source: Finance Database] +

+ +* **Parameters** + + name: str + Search by name to find ETFs matching the criteria. + limit: int + Limit of ETFs to display + export: str + Type of format to export data + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/load/_index.md b/website/content/SDK/etf/load/_index.rst similarity index 77% rename from website/content/SDK/stocks/load/_index.md rename to website/content/SDK/etf/load/_index.rst index afdbb3a63b8..58561a0c36a 100644 --- a/website/content/SDK/stocks/load/_index.md +++ b/website/content/SDK/etf/load/_index.rst @@ -1,7 +1,35 @@ -## Get underlying data -### stocks.load(symbol: str, start_date: datetime.datetime = None, interval: int = 1440, end_date: datetime.datetime = None, prepost: bool = False, source: str = 'YahooFinance', iexrange: str = 'ytd', weekly: bool = False, monthly: bool = False, verbose: bool = True) +.. role:: python(code) + :language: python + :class: highlight -Load a symbol to perform analysis using the string above as a template. +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +etf.load( + symbol: str, + start_date: datetime.datetime = None, + interval: int = 1440, + end_date: datetime.datetime = None, + prepost: bool = False, + source: str = 'YahooFinance', + iexrange: str = 'ytd', + weekly: bool = False, + monthly: bool = False, + verbose: bool = True, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Load a symbol to perform analysis using the string above as a template. Optional arguments and their descriptions are listed above. @@ -30,9 +58,10 @@ Load a symbol to perform analysis using the string above as a template. including Pre/After Market data, using the default source, yFinance. Certain features, such as the Prediction menu, require the symbol to be loaded as daily and not intraday. +

+ +* **Parameters** - Parameters - ---------- symbol: str Ticker to get data start_date: datetime @@ -54,7 +83,7 @@ Load a symbol to perform analysis using the string above as a template. verbose: bool Display verbose information on what was the symbol that was loaded - Returns - ------- +* **Returns** + df_stock_candidate: pd.DataFrame Dataframe of data diff --git a/website/content/SDK/etf/news/_index.md b/website/content/SDK/etf/news/_index.md deleted file mode 100644 index 3db05322733..00000000000 --- a/website/content/SDK/etf/news/_index.md +++ /dev/null @@ -1,42 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### etf.news(query: str, limit: int = 10, start_date: str = '2022-10-27', show_newest: bool = True, sources: str = '') -> List[Tuple[Any, Any]] - -Get news for a given term. [Source: NewsAPI] - - Parameters - ---------- - query : str - term to search on the news articles - start_date: str - date to start searching articles from formatted YYYY-MM-DD - show_newest: bool - flag to show newest articles first - sources: str - sources to exclusively show news from (comma separated) - - Returns - ---------- - tables : List[Tuple] - List of tuples containing news df in first index and dict containing title of news df - -## Getting charts -### etf.news(query: str, limit: int = 3, start_date: str = '2022-10-27', show_newest: bool = True, sources: str = '', export: str = '', chart=True) -> None - -Display news for a given term. [Source: NewsAPI] - - Parameters - ---------- - query : str - term to search on the news articles - start_date: str - date to start searching articles from formatted YYYY-MM-DD - limit : int - number of articles to display - show_newest: bool - flag to show newest articles first - sources: str - sources to exclusively show news from - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/etf/news/_index.rst b/website/content/SDK/etf/news/_index.rst new file mode 100644 index 00000000000..3f652b1a1c2 --- /dev/null +++ b/website/content/SDK/etf/news/_index.rst @@ -0,0 +1,93 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +etf.news( + query: str, + limit: int = 10, + start_date: str = '2022-11-01', + show_newest: bool = True, + sources: str = '', + chart: bool = False, +) -> List[Tuple[Any, Any]] +{{< /highlight >}} + +.. raw:: html + +

+ Get news for a given term. [Source: NewsAPI] +

+ +* **Parameters** + + query : str + term to search on the news articles + start_date: str + date to start searching articles from formatted YYYY-MM-DD + show_newest: bool + flag to show newest articles first + sources: str + sources to exclusively show news from (comma separated) + chart: *bool* + Flag to display chart + + +* **Returns** + + tables : List[Tuple] + List of tuples containing news df in first index and dict containing title of news df + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +etf.news( + query: str, + limit: int = 3, + start_date: str = '2022-11-01', + show_newest: bool = True, + sources: str = '', + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Display news for a given term. [Source: NewsAPI] +

+ +* **Parameters** + + query : str + term to search on the news articles + start_date: str + date to start searching articles from formatted YYYY-MM-DD + limit : int + number of articles to display + show_newest: bool + flag to show newest articles first + sources: str + sources to exclusively show news from + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/etf/overview/_index.md b/website/content/SDK/etf/overview/_index.md deleted file mode 100644 index 86f648d1ba7..00000000000 --- a/website/content/SDK/etf/overview/_index.md +++ /dev/null @@ -1,28 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### etf.overview(symbol: str) -> pandas.core.frame.DataFrame - -Get overview data for selected etf - - Parameters - ---------- - etf_symbol : str - Etf symbol to get overview for - - Returns - ---------- - df : pd.DataFrame - Dataframe of stock overview data - -## Getting charts -### etf.overview(symbol: str, export: str = '', chart=True) - -Print etf overview information - - Parameters - ---------- - symbol:str - ETF symbols to display overview for - export:str - Format to export data diff --git a/website/content/SDK/etf/overview/_index.rst b/website/content/SDK/etf/overview/_index.rst new file mode 100644 index 00000000000..e0e3e9cf5eb --- /dev/null +++ b/website/content/SDK/etf/overview/_index.rst @@ -0,0 +1,71 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +etf.overview( + symbol: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get overview data for selected etf +

+ +* **Parameters** + + etf_symbol : str + Etf symbol to get overview for + chart: *bool* + Flag to display chart + + +* **Returns** + + df : pd.DataFrame + Dataframe of stock overview data + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +etf.overview( + symbol: str, + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Print etf overview information +

+ +* **Parameters** + + symbol:str + ETF symbols to display overview for + export:str + Format to export data + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/etf/scr/screen/_index.md b/website/content/SDK/etf/scr/screen/_index.md deleted file mode 100644 index fb88601e4b0..00000000000 --- a/website/content/SDK/etf/scr/screen/_index.md +++ /dev/null @@ -1,37 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### etf.scr.screen(preset: str) - - - Screens the etfs pulled from my repo (https://github.com/jmaslek/etf_scraper), - which is updated hourly through the market day - - Parameters - ---------- - preset: str - Screener to use from presets - - Returns - ---------- - df : pd.DataFrame - Screened dataframe - -## Getting charts -### etf.scr.screen(preset: str, num_to_show: int, sortby: str, ascend: bool, export: str = '', chart=True) - -Display screener output - - Parameters - ---------- - preset: str - Preset to use - num_to_show: int - Number of etfs to show - sortby: str - Column to sort by - ascend: bool - Ascend when sorted - export: str - Output format of export - diff --git a/website/content/SDK/etf/scr/screen/_index.rst b/website/content/SDK/etf/scr/screen/_index.rst new file mode 100644 index 00000000000..4f0c898468a --- /dev/null +++ b/website/content/SDK/etf/scr/screen/_index.rst @@ -0,0 +1,81 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +etf.scr.screen( + preset: str, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Screens the etfs pulled from my repo (https://github.com/jmaslek/etf_scraper), + which is updated hourly through the market day +

+ +* **Parameters** + + preset: str + Screener to use from presets + chart: *bool* + Flag to display chart + + +* **Returns** + + df : pd.DataFrame + Screened dataframe + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +etf.scr.screen( + preset: str, + num_to_show: int, + sortby: str, + ascend: bool, + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display screener output +

+ +* **Parameters** + + preset: str + Preset to use + num_to_show: int + Number of etfs to show + sortby: str + Column to sort by + ascend: bool + Ascend when sorted + export: str + Output format of export + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/etf/summary/_index.md b/website/content/SDK/etf/summary/_index.md deleted file mode 100644 index 36e9a30546a..00000000000 --- a/website/content/SDK/etf/summary/_index.md +++ /dev/null @@ -1,26 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### etf.summary(name: str) -> str - -Return summary description of ETF. [Source: Yahoo Finance] - - Parameters - ---------- - name: str - ETF name - - Returns - ---------- - str - Summary description of the ETF - -## Getting charts -### etf.summary(name: str, chart=True) - -Display ETF description summary. [Source: Yahoo Finance] - - Parameters - ---------- - name: str - ETF name diff --git a/website/content/SDK/etf/summary/_index.rst b/website/content/SDK/etf/summary/_index.rst new file mode 100644 index 00000000000..458eb142a11 --- /dev/null +++ b/website/content/SDK/etf/summary/_index.rst @@ -0,0 +1,68 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +etf.summary( + name: str, + chart: bool = False, +) -> str +{{< /highlight >}} + +.. raw:: html + +

+ Return summary description of ETF. [Source: Yahoo Finance] +

+ +* **Parameters** + + name: str + ETF name + chart: *bool* + Flag to display chart + + +* **Returns** + + str + Summary description of the ETF + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +etf.summary( + name: str, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display ETF description summary. [Source: Yahoo Finance] +

+ +* **Parameters** + + name: str + ETF name + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/etf/symbols/_index.md b/website/content/SDK/etf/symbols/_index.md deleted file mode 100644 index 0d4fdd51f96..00000000000 --- a/website/content/SDK/etf/symbols/_index.md +++ /dev/null @@ -1,11 +0,0 @@ -## Get underlying data -### etf.symbols() -> Tuple[List[str], List[str]] - -Gets all etf names and symbols - - Returns - ------- - etf_symbols: List[str]: - List of all available etf symbols - etf_names: List[str] - List of all available etf names diff --git a/website/content/SDK/etf/symbols/_index.rst b/website/content/SDK/etf/symbols/_index.rst new file mode 100644 index 00000000000..a68408673f2 --- /dev/null +++ b/website/content/SDK/etf/symbols/_index.rst @@ -0,0 +1,28 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +etf.symbols() -> Tuple[List[str], List[str]] +{{< /highlight >}} + +.. raw:: html + +

+ Gets all etf names and symbols +

+ +* **Returns** + + etf_symbols: List[str]: + List of all available etf symbols + etf_names: List[str] + List of all available etf names diff --git a/website/content/SDK/etf/weights/_index.md b/website/content/SDK/etf/weights/_index.md deleted file mode 100644 index 2900e395a77..00000000000 --- a/website/content/SDK/etf/weights/_index.md +++ /dev/null @@ -1,34 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### etf.weights(name: str) -> Dict - -Return sector weightings allocation of ETF. [Source: Yahoo Finance] - - Parameters - ---------- - name: str - ETF name - - Returns - ---------- - Dict - Dictionary with sector weightings allocation - -## Getting charts -### etf.weights(name: str, raw: bool = False, min_pct_to_display: float = 5, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display sector weightings allocation of ETF. [Source: Yahoo Finance] - - Parameters - ---------- - name: str - ETF name - raw: bool - Display sector weighting allocation - min_pct_to_display: float - Minimum percentage to display sector - export: str - Type of format to export data - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/etf/weights/_index.rst b/website/content/SDK/etf/weights/_index.rst new file mode 100644 index 00000000000..d78430efabd --- /dev/null +++ b/website/content/SDK/etf/weights/_index.rst @@ -0,0 +1,80 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +etf.weights( + name: str, + chart: bool = False, +) -> Dict +{{< /highlight >}} + +.. raw:: html + +

+ Return sector weightings allocation of ETF. [Source: Yahoo Finance] +

+ +* **Parameters** + + name: str + ETF name + chart: *bool* + Flag to display chart + + +* **Returns** + + Dict + Dictionary with sector weightings allocation + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +etf.weights( + name: str, + raw: bool = False, + min_pct_to_display: float = 5, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display sector weightings allocation of ETF. [Source: Yahoo Finance] +

+ +* **Parameters** + + name: str + ETF name + raw: bool + Display sector weighting allocation + min_pct_to_display: float + Minimum percentage to display sector + export: str + Type of format to export data + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/forecast/atr/_index.md b/website/content/SDK/forecast/atr/_index.md deleted file mode 100644 index 8cade6938df..00000000000 --- a/website/content/SDK/forecast/atr/_index.md +++ /dev/null @@ -1,5 +0,0 @@ -## Get underlying data -### forecast.atr(dataset: pandas.core.frame.DataFrame, close_column: str = 'close', high_column: str = 'high', low_column: str = 'low') -> pandas.core.frame.DataFrame - - - Calculate the Average True Range of a variable based on a a specific stock ticker. diff --git a/website/content/SDK/forecast/atr/_index.rst b/website/content/SDK/forecast/atr/_index.rst new file mode 100644 index 00000000000..46c597829f5 --- /dev/null +++ b/website/content/SDK/forecast/atr/_index.rst @@ -0,0 +1,27 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forecast.atr( + dataset: pandas.core.frame.DataFrame, + close_column: str = 'close', + high_column: str = 'high', + low_column: str = 'low', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Calculate the Average True Range of a variable based on a a specific stock ticker. +

diff --git a/website/content/SDK/forecast/autoets/_index.md b/website/content/SDK/forecast/autoets/_index.rst similarity index 59% rename from website/content/SDK/forecast/autoets/_index.md rename to website/content/SDK/forecast/autoets/_index.rst index bc612af4200..815576fbdf8 100644 --- a/website/content/SDK/forecast/autoets/_index.md +++ b/website/content/SDK/forecast/autoets/_index.rst @@ -1,17 +1,42 @@ -To obtain charts, make sure to add `chart=True` as the last parameter +.. role:: python(code) + :language: python + :class: highlight -## Get underlying data -### forecast.autoets(data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], target_column: str = 'close', seasonal_periods: int = 7, n_predict: int = 5, start_window: float = 0.85, forecast_horizon: int = 5) -> Tuple[list[numpy.ndarray], List[numpy.ndarray], List[numpy.ndarray], Optional[float], Any] +| -Performs Automatic ETS forecasting +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forecast.autoets( + data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], + target_column: str = 'close', + seasonal_periods: int = 7, + n_predict: int = 5, + start_window: float = 0.85, + forecast_horizon: int = 5, + chart: bool = False, +) -> Tuple[list[numpy.ndarray], List[numpy.ndarray], List[numpy.ndarray], Optional[float], Any] +{{< /highlight >}} + +.. raw:: html + +

+ Performs Automatic ETS forecasting This is a wrapper around StatsForecast ETS; we refer to this link for the original and more complete documentation of the parameters. https://nixtla.github.io/statsforecast/models.html#ets +

+ +* **Parameters** - Parameters - ---------- data : Union[pd.Series, np.ndarray] Input data. target_column (str, optional): @@ -25,9 +50,12 @@ Performs Automatic ETS forecasting Size of sliding window from start of timeseries and onwards forecast_horizon: int Number of days to forecast when backtesting and retraining historical + chart: *bool* + Flag to display chart + + +* **Returns** - Returns - ------- list[float] Adjusted Data series list[float] @@ -39,13 +67,43 @@ Performs Automatic ETS forecasting Any Fit ETS model object. -## Getting charts -### forecast.autoets(data: Union[pandas.core.frame.DataFrame, pandas.core.series.Series], target_column: str = 'close', dataset_name: str = '', seasonal_periods: int = 7, n_predict: int = 5, start_window: float = 0.85, forecast_horizon: int = 5, export: str = '', residuals: bool = False, forecast_only: bool = False, start_date: Optional[datetime.datetime] = None, end_date: Optional[datetime.datetime] = None, naive: bool = False, export_pred_raw: bool = False, external_axes: Optional[List[axes]] = None, chart=True) +| -Display Automatic ETS (Error, Trend, Sesonality) Model +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +forecast.autoets( + data: Union[pandas.core.frame.DataFrame, pandas.core.series.Series], + target_column: str = 'close', + dataset_name: str = '', + seasonal_periods: int = 7, + n_predict: int = 5, + start_window: float = 0.85, + forecast_horizon: int = 5, + export: str = '', + residuals: bool = False, + forecast_only: bool = False, + start_date: Optional[datetime.datetime] = None, + end_date: Optional[datetime.datetime] = None, + naive: bool = False, + export_pred_raw: bool = False, + external_axes: Optional[List[axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display Automatic ETS (Error, Trend, Sesonality) Model +

+ +* **Parameters** - Parameters - ---------- data : Union[pd.Series, np.array] Data to forecast dataset_name str @@ -76,3 +134,6 @@ Display Automatic ETS (Error, Trend, Sesonality) Model as the previous day's closing price. Defaults to False. external_axes:Optional[List[plt.axes]] External axes to plot on + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/forecast/brnn/_index.md b/website/content/SDK/forecast/brnn/_index.md deleted file mode 100644 index 925222c3831..00000000000 --- a/website/content/SDK/forecast/brnn/_index.md +++ /dev/null @@ -1,116 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### forecast.brnn(data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], target_column: str = 'close', n_predict: int = 5, train_split: float = 0.85, past_covariates: str = None, forecast_horizon: int = 5, input_chunk_length: int = 14, output_chunk_length: int = 5, model_type: str = 'LSTM', n_rnn_layers: int = 1, dropout: float = 0.0, batch_size: int = 32, n_epochs: int = 100, learning_rate: float = 0.001, model_save_name: str = 'brnn_model', force_reset: bool = True, save_checkpoints: bool = True) -> Tuple[List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], Optional[float], Any] - -Performs Block RNN forecasting - - Args: - data (Union[pd.Series, pd.DataFrame]): - Input Data - target_column (str, optional): - Target column to forecast. Defaults to "close". - n_predict (int, optional): - Days to predict. Defaults to 5. - train_split (float, optional): - Train/val split. Defaults to 0.85. - past_covariates (str, optional): - Multiple secondary columns to factor in when forecasting. Defaults to None. - forecast_horizon (int, optional): - Forecast horizon when performing historical forecasting. Defaults to 5. - input_chunk_length (int, optional): - Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. - output_chunk_length (int, optional): - The length of the forecast of the model. Defaults to 5. - model_type (str, optional): - Either a string specifying the RNN module type ("RNN", "LSTM" or "GRU"). Defaults to "LSTM". - n_rnn_layers (int, optional): - Number of layers in the RNN module. Defaults to 1. - dropout (float, optional): - Fraction of neurons afected by Dropout. Defaults to 0.0. - batch_size (int, optional): - Number of time series (input and output sequences) used in each training pass. Defaults to 32. - n_epochs (int, optional): - Number of epochs over which to train the model. Defaults to 100. - learning_rate (float, optional): - Defaults to 1e-3. - model_save_name (str, optional): - Name for model. Defaults to "brnn_model". - force_reset (bool, optional): - If set to True, any previously-existing model with the same name will be reset (all checkpoints will be - discarded). Defaults to True. - save_checkpoints (bool, optional): - Whether or not to automatically save the untrained model and checkpoints from training. Defaults to True. - - Returns: - list[TimeSeries] - Adjusted Data series - list[TimeSeries] - Historical forecast by best RNN model - list[TimeSeries] - list of Predictions - Optional[float] - Mean average precision error - Any - Best BRNN Model - -## Getting charts -### forecast.brnn(data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], target_column: str = 'close', dataset_name: str = '', n_predict: int = 5, past_covariates: str = None, train_split: float = 0.85, forecast_horizon: int = 5, input_chunk_length: int = 14, output_chunk_length: int = 5, model_type: str = 'LSTM', n_rnn_layers: int = 1, dropout: float = 0.0, batch_size: int = 16, n_epochs: int = 100, learning_rate: float = 0.001, model_save_name: str = 'rnn_model', force_reset: bool = True, save_checkpoints: bool = True, export: str = '', residuals: bool = False, forecast_only: bool = False, start_date: Optional[datetime.datetime] = None, end_date: Optional[datetime.datetime] = None, naive: bool = False, export_pred_raw: bool = False, external_axes: Optional[List[axes]] = None, chart=True) - -Display BRNN forecast - - Parameters - ---------- - data (Union[pd.Series, pd.DataFrame]): - Input Data - target_column (str, optional): - Target column to forecast. Defaults to "close". - dataset_name str - The name of the ticker to be predicted - n_predict (int, optional): - Days to predict. Defaults to 5. - train_split (float, optional): - Train/val split. Defaults to 0.85. - past_covariates (str, optional): - Multiple secondary columns to factor in when forecasting. Defaults to None. - forecast_horizon (int, optional): - Forecast horizon when performing historical forecasting. Defaults to 5. - input_chunk_length (int, optional): - Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. - output_chunk_length (int, optional): - The length of the forecast of the model. Defaults to 5. - model_type (str, optional): - Either a string specifying the RNN module type ("RNN", "LSTM" or "GRU"). Defaults to "LSTM". - n_rnn_layers (int, optional): - Number of layers in the RNN module. Defaults to 1. - dropout (float, optional): - Fraction of neurons afected by Dropout. Defaults to 0.0. - batch_size (int, optional): - Number of time series (input and output sequences) used in each training pass. Defaults to 32. - n_epochs (int, optional): - Number of epochs over which to train the model. Defaults to 101. - learning_rate (float, optional): - Defaults to 1e-3. - model_save_name (str, optional): - Name for model. Defaults to "brnn_model". - force_reset (bool, optional): - If set to True, any previously-existing model with the same name will be reset - (all checkpoints will be discarded). Defaults to True. - save_checkpoints (bool, optional): - Whether or not to automatically save the untrained model and checkpoints from training. - Defaults to True. - export: str - Format to export data - residuals: bool - Whether to show residuals for the model. Defaults to False. - forecast_only: bool - Whether to only show dates in the forecasting range. Defaults to False. - start_date: Optional[datetime] - The starting date to perform analysis, data before this is trimmed. Defaults to None. - end_date: Optional[datetime] - The ending date to perform analysis, data after this is trimmed. Defaults to None. - naive: bool - Whether to show the naive baseline. This just assumes the closing price will be the same - as the previous day's closing price. Defaults to False. - external_axes:Optional[List[plt.axes]] - External axes to plot on diff --git a/website/content/SDK/forecast/brnn/_index.rst b/website/content/SDK/forecast/brnn/_index.rst new file mode 100644 index 00000000000..34954bac20b --- /dev/null +++ b/website/content/SDK/forecast/brnn/_index.rst @@ -0,0 +1,201 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forecast.brnn( + data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], + target_column: str = 'close', + n_predict: int = 5, + train_split: float = 0.85, + past_covariates: str = None, + forecast_horizon: int = 5, + input_chunk_length: int = 14, + output_chunk_length: int = 5, + model_type: str = 'LSTM', + n_rnn_layers: int = 1, + dropout: float = 0.0, + batch_size: int = 32, + n_epochs: int = 100, + learning_rate: float = 0.001, + model_save_name: str = 'brnn_model', + force_reset: bool = True, + save_checkpoints: bool = True, + chart: bool = False, +) -> Tuple[List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], Optional[float], Any] +{{< /highlight >}} + +.. raw:: html + +

+ Performs Block RNN forecasting +

+ +* **Parameters** + + data: Union[pd.Series, pd.DataFrame] + Input Data + target_column: str + Target column to forecast. Defaults to "close". + n_predict: int + Days to predict. Defaults to 5. + train_split: float + Train/val split. Defaults to 0.85. + past_covariates: str + Multiple secondary columns to factor in when forecasting. Defaults to None. + forecast_horizon: int + Forecast horizon when performing historical forecasting. Defaults to 5. + input_chunk_length: int + Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. + output_chunk_length: int + The length of the forecast of the model. Defaults to 5. + model_type: str + Either a string specifying the RNN module type ("RNN", "LSTM" or "GRU"). Defaults to "LSTM". + n_rnn_layers: int + Number of layers in the RNN module. Defaults to 1. + dropout: float + Fraction of neurons affected by Dropout. Defaults to 0.0. + batch_size: int + Number of time series (input and output sequences) used in each training pass. Defaults to 32. + n_epochs: int + Number of epochs over which to train the model. Defaults to 100. + learning_rate: float + Defaults to 1e-3. + model_save_name: str + Name for model. Defaults to "brnn_model". + force_reset: bool + If set to True, any previously-existing model with the same name will be reset (all checkpoints will be + discarded). Defaults to True. + save_checkpoints: bool + Whether or not to automatically save the untrained model and checkpoints from training. Defaults to True. + chart: *bool* + Flag to display chart + + +* **Returns** + + list[TimeSeries] + Adjusted Data series + list[TimeSeries] + Historical forecast by best RNN model + list[TimeSeries] + list of Predictions + Optional[float] + Mean average precision error + Any + Best BRNN Model + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +forecast.brnn( + data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], + target_column: str = 'close', + dataset_name: str = '', + n_predict: int = 5, + past_covariates: str = None, + train_split: float = 0.85, + forecast_horizon: int = 5, + input_chunk_length: int = 14, + output_chunk_length: int = 5, + model_type: str = 'LSTM', + n_rnn_layers: int = 1, + dropout: float = 0.0, + batch_size: int = 16, + n_epochs: int = 100, + learning_rate: float = 0.001, + model_save_name: str = 'rnn_model', + force_reset: bool = True, + save_checkpoints: bool = True, + export: str = '', + residuals: bool = False, + forecast_only: bool = False, + start_date: Optional[datetime.datetime] = None, + end_date: Optional[datetime.datetime] = None, + naive: bool = False, + export_pred_raw: bool = False, + external_axes: Optional[List[axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display BRNN forecast +

+ +* **Parameters** + + data: Union[pd.Series, pd.DataFrame] + Input Data + target_column: str + Target column to forecast. Defaults to "close". + dataset_name: str + The name of the ticker to be predicted + n_predict: int + Days to predict. Defaults to 5. + train_split: float + Train/val split. Defaults to 0.85. + past_covariates: str + Multiple secondary columns to factor in when forecasting. Defaults to None. + forecast_horizon: int + Forecast horizon when performing historical forecasting. Defaults to 5. + input_chunk_length: int + Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. + output_chunk_length: int + The length of the forecast of the model. Defaults to 5. + model_type: str + Either a string specifying the RNN module type ("RNN", "LSTM" or "GRU"). Defaults to "LSTM". + n_rnn_layers: int + Number of layers in the RNN module. Defaults to 1. + dropout: float + Fraction of neurons affected by Dropout. Defaults to 0.0. + batch_size: int + Number of time series (input and output sequences) used in each training pass. Defaults to 32. + n_epochs: int + Number of epochs over which to train the model. Defaults to 101. + learning_rate: float + Defaults to 1e-3. + model_save_name: str + Name for model. Defaults to "brnn_model". + force_reset: bool + If set to True, any previously-existing model with the same name will be reset + (all checkpoints will be discarded). Defaults to True. + save_checkpoints: bool + Whether or not to automatically save the untrained model and checkpoints from training. + Defaults to True. + export: str + Format to export data + residuals: bool + Whether to show residuals for the model. Defaults to False. + forecast_only: bool + Whether to only show dates in the forecasting range. Defaults to False. + start_date: Optional[datetime] + The starting date to perform analysis, data before this is trimmed. Defaults to None. + end_date: Optional[datetime] + The ending date to perform analysis, data after this is trimmed. Defaults to None. + naive: bool + Whether to show the naive baseline. This just assumes the closing price will be the same + as the previous day's closing price. Defaults to False. + external_axes: Optional[List[plt.axes]] + External axes to plot on + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/forecast/clean/_index.md b/website/content/SDK/forecast/clean/_index.md deleted file mode 100644 index b5397c7ab7f..00000000000 --- a/website/content/SDK/forecast/clean/_index.md +++ /dev/null @@ -1,20 +0,0 @@ -## Get underlying data -### forecast.clean(dataset: pandas.core.frame.DataFrame, fill: Optional[str] = None, drop: Optional[str] = None, limit: Optional[int] = None) -> pandas.core.frame.DataFrame - -Clean up NaNs from the dataset - - Parameters - ---------- - dataset : pd.DataFrame - The dataset you wish to clean - fill : Optional[str] - The method of filling NaNs - drop : Optional[str] - The method of dropping NaNs - limit : Optional[int] - The maximum limit you wish to apply that can be forward or backward filled - - Returns - ------- - pd.DataFrame: - Dataframe with cleaned up data diff --git a/website/content/SDK/forecast/clean/_index.rst b/website/content/SDK/forecast/clean/_index.rst new file mode 100644 index 00000000000..0079606d926 --- /dev/null +++ b/website/content/SDK/forecast/clean/_index.rst @@ -0,0 +1,43 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forecast.clean( + dataset: pandas.core.frame.DataFrame, + fill: Optional[str] = None, + drop: Optional[str] = None, + limit: Optional[int] = None, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Clean up NaNs from the dataset +

+ +* **Parameters** + + dataset : pd.DataFrame + The dataset you wish to clean + fill : Optional[str] + The method of filling NaNs + drop : Optional[str] + The method of dropping NaNs + limit : Optional[int] + The maximum limit you wish to apply that can be forward or backward filled + +* **Returns** + + pd.DataFrame: + Dataframe with cleaned up data diff --git a/website/content/SDK/forecast/combine/_index.md b/website/content/SDK/forecast/combine/_index.md deleted file mode 100644 index 53f00df6b98..00000000000 --- a/website/content/SDK/forecast/combine/_index.md +++ /dev/null @@ -1,20 +0,0 @@ -## Get underlying data -### forecast.combine(df1: pandas.core.frame.DataFrame, df2: pandas.core.frame.DataFrame, column: str, dataset: str = '') -> pandas.core.frame.DataFrame - -Adds the given column of df2 to df1 - - Parameters - ---------- - df1: pd.DataFrame - The dataframe to add a column to - df2: pd.DataFrame - The dataframe to lose a column - column: str - The column to transfer - dataset: str - A name for df2 (shows in name of new column) - - Returns - ---------- - data: pd.DataFrame - The new dataframe diff --git a/website/content/SDK/forecast/combine/_index.rst b/website/content/SDK/forecast/combine/_index.rst new file mode 100644 index 00000000000..7690d4c3025 --- /dev/null +++ b/website/content/SDK/forecast/combine/_index.rst @@ -0,0 +1,43 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forecast.combine( + df1: pandas.core.frame.DataFrame, + df2: pandas.core.frame.DataFrame, + column: str, + dataset: str = '', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Adds the given column of df2 to df1 +

+ +* **Parameters** + + df1: pd.DataFrame + The dataframe to add a column to + df2: pd.DataFrame + The dataframe to lose a column + column: str + The column to transfer + dataset: str + A name for df2 (shows in name of new column) + +* **Returns** + + data: pd.DataFrame + The new dataframe diff --git a/website/content/SDK/forecast/corr/_index.md b/website/content/SDK/forecast/corr/_index.md deleted file mode 100644 index 0adf669eb81..00000000000 --- a/website/content/SDK/forecast/corr/_index.md +++ /dev/null @@ -1,30 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### forecast.corr(df: pandas.core.frame.DataFrame) -> pandas.core.frame.DataFrame - -Returns correlation for a given df - - Parameters - ---------- - df: pd.DataFrame - The df to produce statistics for - - Returns - ---------- - df: pd.DataFrame - The df with the new data - -## Getting charts -### forecast.corr(dataset: pandas.core.frame.DataFrame, export: str = '', external_axes: Optional[List[axes]] = None, chart=True) - -Plot correlation coefficients for dataset features - - Parameters - ---------- - dataset : pd.DataFrame - The dataset fore calculating correlation coefficients - export: str - Format to export image - external_axes:Optional[List[plt.axes]] - External axes to plot on diff --git a/website/content/SDK/forecast/corr/_index.rst b/website/content/SDK/forecast/corr/_index.rst new file mode 100644 index 00000000000..be802e71c5d --- /dev/null +++ b/website/content/SDK/forecast/corr/_index.rst @@ -0,0 +1,74 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forecast.corr( + data: pandas.core.frame.DataFrame, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Returns correlation for a given df +

+ +* **Parameters** + + data: pd.DataFrame + The df to produce statistics for + chart: *bool* + Flag to display chart + + +* **Returns** + + df: pd.DataFrame + The df with the new data + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +forecast.corr( + dataset: pandas.core.frame.DataFrame, + export: str = '', + external_axes: Optional[List[axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Plot correlation coefficients for dataset features +

+ +* **Parameters** + + dataset : pd.DataFrame + The dataset fore calculating correlation coefficients + export: str + Format to export image + external_axes:Optional[List[plt.axes]] + External axes to plot on + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/forecast/delete/_index.md b/website/content/SDK/forecast/delete/_index.md deleted file mode 100644 index 017702de3f7..00000000000 --- a/website/content/SDK/forecast/delete/_index.md +++ /dev/null @@ -1,4 +0,0 @@ -## Get underlying data -### forecast.delete(df: pandas.core.frame.DataFrame, column: str) -> None - - diff --git a/website/content/SDK/forecast/delete/_index.rst b/website/content/SDK/forecast/delete/_index.rst new file mode 100644 index 00000000000..c470ed52155 --- /dev/null +++ b/website/content/SDK/forecast/delete/_index.rst @@ -0,0 +1,12 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ diff --git a/website/content/SDK/forecast/delta/_index.md b/website/content/SDK/forecast/delta/_index.md deleted file mode 100644 index e4fa2e31253..00000000000 --- a/website/content/SDK/forecast/delta/_index.md +++ /dev/null @@ -1,5 +0,0 @@ -## Get underlying data -### forecast.delta(dataset: pandas.core.frame.DataFrame, target_column: str = 'close') -> pandas.core.frame.DataFrame - - - Calculate the %change of a variable based on a specific column diff --git a/website/content/SDK/forecast/delta/_index.rst b/website/content/SDK/forecast/delta/_index.rst new file mode 100644 index 00000000000..c94135608e2 --- /dev/null +++ b/website/content/SDK/forecast/delta/_index.rst @@ -0,0 +1,25 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forecast.delta( + dataset: pandas.core.frame.DataFrame, + target_column: str = 'close', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Calculate the %change of a variable based on a specific column +

diff --git a/website/content/SDK/forecast/desc/_index.md b/website/content/SDK/forecast/desc/_index.md deleted file mode 100644 index 7214c81d133..00000000000 --- a/website/content/SDK/forecast/desc/_index.md +++ /dev/null @@ -1,21 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### forecast.desc(df: pandas.core.frame.DataFrame) -> pandas.core.frame.DataFrame - -Returns statistics for a given df - - Parameters - ---------- - df: pd.DataFrame - The df to produce statistics for - - Returns - ---------- - df: pd.DataFrame - The df with the new data - -## Getting charts -### forecast.desc(data: pandas.core.frame.DataFrame, name: str = '', export: str = '', chart=True) - - diff --git a/website/content/SDK/forecast/desc/_index.rst b/website/content/SDK/forecast/desc/_index.rst new file mode 100644 index 00000000000..64486737ec4 --- /dev/null +++ b/website/content/SDK/forecast/desc/_index.rst @@ -0,0 +1,48 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forecast.desc( + data: pandas.core.frame.DataFrame, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Returns statistics for a given df +

+ +* **Parameters** + + data: pd.DataFrame + The df to produce statistics for + chart: *bool* + Flag to display chart + + +* **Returns** + + df: pd.DataFrame + The df with the new data + +| + +.. raw:: html + +

+ > Getting charts +

+ diff --git a/website/content/SDK/forecast/ema/_index.md b/website/content/SDK/forecast/ema/_index.md deleted file mode 100644 index 91ea19c6d93..00000000000 --- a/website/content/SDK/forecast/ema/_index.md +++ /dev/null @@ -1,19 +0,0 @@ -## Get underlying data -### forecast.ema(dataset: pandas.core.frame.DataFrame, target_column: str = 'close', period: int = 10) -> pandas.core.frame.DataFrame - -A moving average provides an indication of the trend of the price movement - by cut down the amount of "noise" on a price chart. - - Parameters - ---------- - dataset : pd.DataFrame - The dataset you wish to clean - target_column : str - The column you wish to add the EMA to - period : int - Time Span - - Returns - ------- - pd.DataFrame: - Dataframe with added EMA column diff --git a/website/content/SDK/forecast/ema/_index.rst b/website/content/SDK/forecast/ema/_index.rst new file mode 100644 index 00000000000..a728af77070 --- /dev/null +++ b/website/content/SDK/forecast/ema/_index.rst @@ -0,0 +1,41 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forecast.ema( + dataset: pandas.core.frame.DataFrame, + target_column: str = 'close', + period: int = 10, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ A moving average provides an indication of the trend of the price movement + by cut down the amount of "noise" on a price chart. +

+ +* **Parameters** + + dataset : pd.DataFrame + The dataset you wish to clean + target_column : str + The column you wish to add the EMA to + period : int + Time Span + +* **Returns** + + pd.DataFrame: + Dataframe with added EMA column diff --git a/website/content/SDK/forecast/expo/_index.md b/website/content/SDK/forecast/expo/_index.rst similarity index 61% rename from website/content/SDK/forecast/expo/_index.md rename to website/content/SDK/forecast/expo/_index.rst index 90a13078500..c7fd500b398 100644 --- a/website/content/SDK/forecast/expo/_index.md +++ b/website/content/SDK/forecast/expo/_index.rst @@ -1,16 +1,44 @@ -To obtain charts, make sure to add `chart=True` as the last parameter +.. role:: python(code) + :language: python + :class: highlight -## Get underlying data -### forecast.expo(data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], target_column: str = 'close', trend: str = 'A', seasonal: str = 'A', seasonal_periods: int = 7, dampen: str = 'F', n_predict: int = 5, start_window: float = 0.85, forecast_horizon: int = 5) -> Tuple[List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], Optional[float], Any] +| -Performs Probabilistic Exponential Smoothing forecasting +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forecast.expo( + data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], + target_column: str = 'close', + trend: str = 'A', + seasonal: str = 'A', + seasonal_periods: int = 7, + dampen: str = 'F', + n_predict: int = 5, + start_window: float = 0.85, + forecast_horizon: int = 5, + chart: bool = False, +) -> Tuple[List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], Optional[float], Any] +{{< /highlight >}} + +.. raw:: html + +

+ Performs Probabilistic Exponential Smoothing forecasting This is a wrapper around statsmodels Holt-Winters' Exponential Smoothing; we refer to this link for the original and more complete documentation of the parameters. https://unit8co.github.io/darts/generated_api/darts.models.forecasting.exponential_smoothing.html?highlight=exponential +

+ +* **Parameters** - Parameters - ---------- data : Union[pd.Series, np.ndarray] Input data. target_column (str, optional): @@ -32,9 +60,12 @@ Performs Probabilistic Exponential Smoothing forecasting Size of sliding window from start of timeseries and onwards forecast_horizon: int Number of days to forecast when backtesting and retraining historical + chart: *bool* + Flag to display chart + + +* **Returns** - Returns - ------- list[float] Adjusted Data series list[float] @@ -46,13 +77,46 @@ Performs Probabilistic Exponential Smoothing forecasting Any Fit Prob. Expo model object. -## Getting charts -### forecast.expo(data: Union[pandas.core.frame.DataFrame, pandas.core.series.Series], target_column: str = 'close', dataset_name: str = '', trend: str = 'A', seasonal: str = 'A', seasonal_periods: int = 7, dampen: str = 'F', n_predict: int = 5, start_window: float = 0.85, forecast_horizon: int = 5, export: str = '', residuals: bool = False, forecast_only: bool = False, start_date: Optional[datetime.datetime] = None, end_date: Optional[datetime.datetime] = None, naive: bool = False, export_pred_raw: bool = False, external_axes: Optional[List[axes]] = None, chart=True) +| -Display Probabilistic Exponential Smoothing forecast +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +forecast.expo( + data: Union[pandas.core.frame.DataFrame, pandas.core.series.Series], + target_column: str = 'close', + dataset_name: str = '', + trend: str = 'A', + seasonal: str = 'A', + seasonal_periods: int = 7, + dampen: str = 'F', + n_predict: int = 5, + start_window: float = 0.85, + forecast_horizon: int = 5, + export: str = '', + residuals: bool = False, + forecast_only: bool = False, + start_date: Optional[datetime.datetime] = None, + end_date: Optional[datetime.datetime] = None, + naive: bool = False, + export_pred_raw: bool = False, + external_axes: Optional[List[axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display Probabilistic Exponential Smoothing forecast +

+ +* **Parameters** - Parameters - ---------- data : Union[pd.Series, np.array] Data to forecast dataset_name str @@ -91,3 +155,6 @@ Display Probabilistic Exponential Smoothing forecast as the previous day's closing price. Defaults to False. external_axes:Optional[List[plt.axes]] External axes to plot on + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/forecast/export/_index.md b/website/content/SDK/forecast/export/_index.md deleted file mode 100644 index 1a406a4e7a7..00000000000 --- a/website/content/SDK/forecast/export/_index.md +++ /dev/null @@ -1,4 +0,0 @@ -## Get underlying data -### forecast.export(data: pandas.core.frame.DataFrame, export: str, name: str = '') -> None - - diff --git a/website/content/SDK/forecast/export/_index.rst b/website/content/SDK/forecast/export/_index.rst new file mode 100644 index 00000000000..c470ed52155 --- /dev/null +++ b/website/content/SDK/forecast/export/_index.rst @@ -0,0 +1,12 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ diff --git a/website/content/SDK/forecast/linregr/_index.md b/website/content/SDK/forecast/linregr/_index.md deleted file mode 100644 index 95cd73792c3..00000000000 --- a/website/content/SDK/forecast/linregr/_index.md +++ /dev/null @@ -1,78 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### forecast.linregr(data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], target_column: str = 'close', n_predict: int = 5, past_covariates: str = None, train_split: float = 0.85, forecast_horizon: int = 5, output_chunk_length: int = 5, lags: Union[int, List[int]] = 14, random_state: Optional[int] = None) -> Tuple[List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], float, Any] - -Perform Linear Regression Forecasting - - Args: - data (Union[pd.Series, pd.DataFrame]): - Input Data - target_column (str, optional): - Target column to forecast. Defaults to "close". - n_predict (int, optional): - Days to predict. Defaults to 5. - train_split (float, optional): - Train/val split. Defaults to 0.85. - past_covariates (str, optional): - Multiple secondary columns to factor in when forecasting. Defaults to None. - forecast_horizon (int, optional): - Forecast horizon when performing historical forecasting. Defaults to 5. - output_chunk_length (int, optional): - The length of the forecast of the model. Defaults to 1. - lags (int, list) - lagged target values to predict the next time step - random_state (int, optional): - The state for the model - - Returns: - List[TimeSeries] - Adjusted Data series - List[TimeSeries] - Historical forecast by best RNN model - List[TimeSeries] - list of Predictions - float - Mean average precision error - Any - Best Linear Regression Model - -## Getting charts -### forecast.linregr(data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], target_column: str = 'close', dataset_name: str = '', n_predict: int = 5, past_covariates: str = None, train_split: float = 0.85, forecast_horizon: int = 5, output_chunk_length: int = 1, lags: Union[int, List[int]] = 72, export: str = '', residuals: bool = False, forecast_only: bool = False, start_date: Optional[datetime.datetime] = None, end_date: Optional[datetime.datetime] = None, naive: bool = False, explainability_raw: bool = False, export_pred_raw: bool = False, external_axes: Optional[List[axes]] = None, chart=True) - -Display Linear Regression Forecasting - - Args: - data (Union[pd.Series, pd.DataFrame]): - Input Data - dataset_name str - The name of the ticker to be predicted - n_predict (int, optional): - Days to predict. Defaults to 5. - target_col (str, optional): - Target column to forecast. Defaults to "close". - train_split (float, optional): - Train/val split. Defaults to 0.85. - past_covariates (str, optional): - Multiple secondary columns to factor in when forecasting. Defaults to None. - forecast_horizon (int, optional): - Forecast horizon when performing historical forecasting. Defaults to 5. - output_chunk_length (int, optional): - The length of the forecast of the model. Defaults to 1. - lags (int, list) - lagged target values to predict the next time step - export: str - Format to export data - residuals: bool - Whether to show residuals for the model. Defaults to False. - forecast_only: bool - Whether to only show dates in the forecasting range. Defaults to False. - start_date: Optional[datetime] - The starting date to perform analysis, data before this is trimmed. Defaults to None. - end_date: Optional[datetime] - The ending date to perform analysis, data after this is trimmed. Defaults to None. - naive: bool - Whether to show the naive baseline. This just assumes the closing price will be the - same as the previous day's closing price. Defaults to False. - external_axes:Optional[List[plt.axes]] - External axes to plot on diff --git a/website/content/SDK/forecast/linregr/_index.rst b/website/content/SDK/forecast/linregr/_index.rst new file mode 100644 index 00000000000..d490cd7411f --- /dev/null +++ b/website/content/SDK/forecast/linregr/_index.rst @@ -0,0 +1,148 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forecast.linregr( + data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], + target_column: str = 'close', + n_predict: int = 5, + past_covariates: str = None, + train_split: float = 0.85, + forecast_horizon: int = 5, + output_chunk_length: int = 5, + lags: Union[int, List[int]] = 14, + random_state: Optional[int] = None, + chart: bool = False, +) -> Tuple[List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], float, Any] +{{< /highlight >}} + +.. raw:: html + +

+ Perform Linear Regression Forecasting +

+ +* **Parameters** + + data: Union[pd.Series, pd.DataFrame] + Input Data + target_column: str + Target column to forecast. Defaults to "close". + n_predict: int + Days to predict. Defaults to 5. + train_split: float + Train/val split. Defaults to 0.85. + past_covariates: str + Multiple secondary columns to factor in when forecasting. Defaults to None. + forecast_horizon: int + Forecast horizon when performing historical forecasting. Defaults to 5. + output_chunk_length: int + The length of the forecast of the model. Defaults to 1. + lags: Union[int, List[int]] + lagged target values to predict the next time step + random_state: Optional[int] + The state for the model + chart: *bool* + Flag to display chart + + +* **Returns** + + List[TimeSeries] + Adjusted Data series + List[TimeSeries] + Historical forecast by best RNN model + List[TimeSeries] + list of Predictions + float + Mean average precision error + Any + Best Linear Regression Model + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +forecast.linregr( + data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], + target_column: str = 'close', + dataset_name: str = '', + n_predict: int = 5, + past_covariates: str = None, + train_split: float = 0.85, + forecast_horizon: int = 5, + output_chunk_length: int = 1, + lags: Union[int, List[int]] = 72, + export: str = '', + residuals: bool = False, + forecast_only: bool = False, + start_date: Optional[datetime.datetime] = None, + end_date: Optional[datetime.datetime] = None, + naive: bool = False, + explainability_raw: bool = False, + export_pred_raw: bool = False, + external_axes: Optional[List[axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display Linear Regression Forecasting +

+ +* **Parameters** + + data: Union[pd.Series, pd.DataFrame] + Input Data + dataset_name: str + The name of the ticker to be predicted + n_predict: int + Days to predict. Defaults to 5. + target_col: str + Target column to forecast. Defaults to "close". + train_split (float, optional): + Train/val split. Defaults to 0.85. + past_covariates: str + Multiple secondary columns to factor in when forecasting. Defaults to None. + forecast_horizon: int + Forecast horizon when performing historical forecasting. Defaults to 5. + output_chunk_length: int + The length of the forecast of the model. Defaults to 1. + lags: Union[int, List[int]] + lagged target values to predict the next time step + export: str + Format to export data + residuals: bool + Whether to show residuals for the model. Defaults to False. + forecast_only: bool + Whether to only show dates in the forecasting range. Defaults to False. + start_date: Optional[datetime] + The starting date to perform analysis, data before this is trimmed. Defaults to None. + end_date: Optional[datetime] + The ending date to perform analysis, data after this is trimmed. Defaults to None. + naive: bool + Whether to show the naive baseline. This just assumes the closing price will be the + same as the previous day's closing price. Defaults to False. + external_axes: Optional[List[plt.axes]] + External axes to plot on + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/forecast/load/_index.md b/website/content/SDK/forecast/load/_index.md deleted file mode 100644 index e0c0d454bc2..00000000000 --- a/website/content/SDK/forecast/load/_index.md +++ /dev/null @@ -1,20 +0,0 @@ -## Get underlying data -### forecast.load(file: str, file_types: Optional[List[str]] = None, data_files: Optional[Dict[Any, Any]] = None, add_extension: bool = False) -> pandas.core.frame.DataFrame - -Load custom file into dataframe. - - Parameters - ---------- - file: str - Path to file - file_types: list - Supported file types - data_files: dict - Contains all available data files within the Export folder - add_extension: - Takes a file name and tries loading with csv or xlsx extension - - Returns - ------- - pd.DataFrame: - Dataframe with custom data diff --git a/website/content/SDK/forecast/load/_index.rst b/website/content/SDK/forecast/load/_index.rst new file mode 100644 index 00000000000..d8d277b575b --- /dev/null +++ b/website/content/SDK/forecast/load/_index.rst @@ -0,0 +1,40 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forecast.load( + file: str, + data_files: Optional[Dict[Any, Any]] = None, + data_examples: Optional[Dict[Any, Any]] = None, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Load custom file into dataframe. +

+ +* **Parameters** + + file: str + Path to file + data_files: dict + Contains all available data files within the Export folder + data_examples: dict + Contains all available examples from Statsmodels + +* **Returns** + + pd.DataFrame: + Dataframe with custom data diff --git a/website/content/SDK/forecast/mom/_index.md b/website/content/SDK/forecast/mom/_index.md deleted file mode 100644 index 6daa474a157..00000000000 --- a/website/content/SDK/forecast/mom/_index.md +++ /dev/null @@ -1,19 +0,0 @@ -## Get underlying data -### forecast.mom(dataset: pandas.core.frame.DataFrame, target_column: str = 'close', period: int = 10) -> pandas.core.frame.DataFrame - -A momentum oscillator, which measures the percentage change between the current - value and the n period past value. - - Parameters - ---------- - dataset : pd.DataFrame - The dataset you wish to calculate with - target_column : str - The column you wish to add the MOM to - period : int - Time Span - - Returns - ------- - pd.DataFrame: - Dataframe with added MOM column diff --git a/website/content/SDK/forecast/mom/_index.rst b/website/content/SDK/forecast/mom/_index.rst new file mode 100644 index 00000000000..3cd20788326 --- /dev/null +++ b/website/content/SDK/forecast/mom/_index.rst @@ -0,0 +1,41 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forecast.mom( + dataset: pandas.core.frame.DataFrame, + target_column: str = 'close', + period: int = 10, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ A momentum oscillator, which measures the percentage change between the current + value and the n period past value. +

+ +* **Parameters** + + dataset : pd.DataFrame + The dataset you wish to calculate with + target_column : str + The column you wish to add the MOM to + period : int + Time Span + +* **Returns** + + pd.DataFrame: + Dataframe with added MOM column diff --git a/website/content/SDK/forecast/nbeats/_index.md b/website/content/SDK/forecast/nbeats/_index.md deleted file mode 100644 index 0e90559078e..00000000000 --- a/website/content/SDK/forecast/nbeats/_index.md +++ /dev/null @@ -1,126 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### forecast.nbeats(data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], target_column: str = 'close', n_predict: int = 5, past_covariates: str = None, train_split: float = 0.85, forecast_horizon: int = 5, input_chunk_length: int = 14, output_chunk_length: int = 5, num_stacks: int = 10, num_blocks: int = 3, num_layers: int = 4, layer_widths: int = 512, batch_size: int = 800, n_epochs: int = 100, learning_rate: float = 0.001, model_save_name: str = 'nbeats_model', force_reset: bool = True, save_checkpoints: bool = True) -> Tuple[List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], Optional[float], Any] - -Perform NBEATS Forecasting - - Args: - data (Union[pd.Series, pd.DataFrame]): - Input Data - target_column (str, optional): - Target column to forecast. Defaults to "close". - n_predict (int, optional): - Days to predict. Defaults to 5. - train_split (float, optional): - Train/val split. Defaults to 0.85. - past_covariates (str, optional): - Multiple secondary columns to factor in when forecasting. Defaults to None. - forecast_horizon (int, optional): - Forecast horizon when performing historical forecasting. Defaults to 5. - input_chunk_length (int, optional): - Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. - output_chunk_length (int, optional): - The length of the forecast of the model. Defaults to 5. - num_stacks (int, optional): - The number of stacks that make up the whole model. Defaults to 10. - num_blocks (int, optional): - The number of blocks making up every stack. Defaults to 3. - num_layers (int, optional): - The number of fully connected layers preceding the final forking layers in each block - of every stack. Defaults to 4. - layer_widths (int, optional): - Determines the number of neurons that make up each fully connected layer in each block - of every stack. Defaults to 512. - batch_size (int, optional): - Number of time series (input and output sequences) used in each training pass. Defaults to 32. - n_epochs (int, optional): - Number of epochs over which to train the model. Defaults to 100. - learning_rate (float, optional): - Defaults to 1e-3. - model_save_name (str, optional): - Name for model. Defaults to "brnn_model". - force_reset (bool, optional): - If set to True, any previously-existing model with the same name will be reset - (all checkpoints will be discarded). Defaults to True. - save_checkpoints (bool, optional): - Whether or not to automatically save the untrained model and checkpoints from training. - Defaults to True. - - Returns: - List[TimeSeries] - Adjusted Data series - List[TimeSeries] - Historical forecast by best RNN model - List[TimeSeries] - list of Predictions - Optional[float] - Mean average precision error - Any - Best NBEATS Model - -## Getting charts -### forecast.nbeats(data: Union[pandas.core.frame.DataFrame, pandas.core.series.Series], target_column: str = 'close', dataset_name: str = '', n_predict: int = 5, past_covariates: str = None, train_split: float = 0.85, forecast_horizon: int = 5, input_chunk_length: int = 14, output_chunk_length: int = 5, num_stacks: int = 10, num_blocks: int = 3, num_layers: int = 4, layer_widths: int = 512, n_epochs: int = 100, learning_rate: float = 0.001, batch_size: int = 800, model_save_name: str = 'nbeats_model', force_reset: bool = True, save_checkpoints: bool = True, export: str = '', residuals: bool = False, forecast_only: bool = False, start_date: Optional[datetime.datetime] = None, end_date: Optional[datetime.datetime] = None, naive: bool = False, export_pred_raw: bool = False, external_axes: Optional[List[axes]] = None, chart=True) - -Display NBEATS forecast - - Parameters - ---------- - data (Union[pd.Series, pd.DataFrame]): - Input Data - target_column (str, optional): - Target column to forecast. Defaults to "close". - dataset_name str - The name of the ticker to be predicted - n_predict (int, optional): - Days to predict. Defaults to 5. - train_split (float, optional): - Train/val split. Defaults to 0.85. - past_covariates (str, optional): - Multiple secondary columns to factor in when forecasting. Defaults to None. - forecast_horizon (int, optional): - Forecast horizon when performing historical forecasting. Defaults to 5. - input_chunk_length (int, optional): - Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. - output_chunk_length (int, optional): - The length of the forecast of the model. Defaults to 5. - num_stacks (int, optional): - The number of stacks that make up the whole model. Defaults to 10. - num_blocks (int, optional): - The number of blocks making up every stack. Defaults to 3. - num_layers (int, optional): - The number of fully connected layers preceding the final forking layers in each block - of every stack. Defaults to 4. - layer_widths (int, optional): - Determines the number of neurons that make up each fully connected layer in each block - of every stack. Defaults to 512. - batch_size (int, optional): - Number of time series (input and output sequences) used in each training pass. Defaults - to 32. - n_epochs (int, optional): - Number of epochs over which to train the model. Defaults to 100. - learning_rate (float, optional): - Defaults to 1e-3. - model_save_name (str, optional): - Name for model. Defaults to "brnn_model". - force_reset (bool, optional): - If set to True, any previously-existing model with the same name will be reset (all - checkpoints will be discarded). Defaults to True. - save_checkpoints (bool, optional): - Whether or not to automatically save the untrained model and checkpoints from training. - Defaults to True. - export: str - Format to export data - residuals: bool - Whether to show residuals for the model. Defaults to False. - forecast_only: bool - Whether to only show dates in the forecasting range. Defaults to False. - start_date: Optional[datetime] - The starting date to perform analysis, data before this is trimmed. Defaults to None. - end_date: Optional[datetime] - The ending date to perform analysis, data after this is trimmed. Defaults to None. - naive: bool - Whether to show the naive baseline. This just assumes the closing price will be the same - as the previous day's closing price. Defaults to False. - external_axes:Optional[List[plt.axes]] - External axes to plot on diff --git a/website/content/SDK/forecast/nbeats/_index.rst b/website/content/SDK/forecast/nbeats/_index.rst new file mode 100644 index 00000000000..bb1298ef19c --- /dev/null +++ b/website/content/SDK/forecast/nbeats/_index.rst @@ -0,0 +1,213 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forecast.nbeats( + data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], + target_column: str = 'close', + n_predict: int = 5, + past_covariates: str = None, + train_split: float = 0.85, + forecast_horizon: int = 5, + input_chunk_length: int = 14, + output_chunk_length: int = 5, + num_stacks: int = 10, + num_blocks: int = 3, + num_layers: int = 4, + layer_widths: int = 512, + batch_size: int = 800, + n_epochs: int = 100, + learning_rate: float = 0.001, + model_save_name: str = 'nbeats_model', + force_reset: bool = True, + save_checkpoints: bool = True, + chart: bool = False, +) -> Tuple[List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], Optional[float], Any] +{{< /highlight >}} + +.. raw:: html + +

+ Perform NBEATS Forecasting +

+ +* **Parameters** + + data: Union[pd.Series, pd.DataFrame] + Input Data + target_column: str + Target column to forecast. Defaults to "close". + n_predict: int + Days to predict. Defaults to 5. + train_split: float + Train/val split. Defaults to 0.85. + past_covariates: str + Multiple secondary columns to factor in when forecasting. Defaults to None. + forecast_horizon: int + Forecast horizon when performing historical forecasting. Defaults to 5. + input_chunk_length: int + Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. + output_chunk_length: int + The length of the forecast of the model. Defaults to 5. + num_stacks: int + The number of stacks that make up the whole model. Defaults to 10. + num_blocks: int + The number of blocks making up every stack. Defaults to 3. + num_layers: int + The number of fully connected layers preceding the final forking layers in each block + of every stack. Defaults to 4. + layer_widths: int + Determines the number of neurons that make up each fully connected layer in each block + of every stack. Defaults to 512. + batch_size: int + Number of time series (input and output sequences) used in each training pass. Defaults to 32. + n_epochs: int + Number of epochs over which to train the model. Defaults to 100. + learning_rate: float + Defaults to 1e-3. + model_save_name: str + Name for model. Defaults to "brnn_model". + force_reset: bool + If set to True, any previously-existing model with the same name will be reset + (all checkpoints will be discarded). Defaults to True. + save_checkpoints: bool + Whether or not to automatically save the untrained model and checkpoints from training. + Defaults to True. + chart: *bool* + Flag to display chart + + +* **Returns** + + List[TimeSeries] + Adjusted Data series + List[TimeSeries] + Historical forecast by best RNN model + List[TimeSeries] + list of Predictions + Optional[float] + Mean average precision error + Any + Best NBEATS Model + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +forecast.nbeats( + data: Union[pandas.core.frame.DataFrame, pandas.core.series.Series], + target_column: str = 'close', + dataset_name: str = '', + n_predict: int = 5, + past_covariates: str = None, + train_split: float = 0.85, + forecast_horizon: int = 5, + input_chunk_length: int = 14, + output_chunk_length: int = 5, + num_stacks: int = 10, + num_blocks: int = 3, + num_layers: int = 4, + layer_widths: int = 512, + n_epochs: int = 100, + learning_rate: float = 0.001, + batch_size: int = 800, + model_save_name: str = 'nbeats_model', + force_reset: bool = True, + save_checkpoints: bool = True, + export: str = '', + residuals: bool = False, + forecast_only: bool = False, + start_date: Optional[datetime.datetime] = None, + end_date: Optional[datetime.datetime] = None, + naive: bool = False, + export_pred_raw: bool = False, + external_axes: Optional[List[axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display NBEATS forecast +

+ +* **Parameters** + + data: Union[pd.Series, pd.DataFrame] + Input Data + target_column: str + Target column to forecast. Defaults to "close". + dataset_name: str + The name of the ticker to be predicted + n_predict: int + Days to predict. Defaults to 5. + train_split: float + Train/val split. Defaults to 0.85. + past_covariates: str + Multiple secondary columns to factor in when forecasting. Defaults to None. + forecast_horizon: int + Forecast horizon when performing historical forecasting. Defaults to 5. + input_chunk_length: int + Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. + output_chunk_length: int + The length of the forecast of the model. Defaults to 5. + num_stacks: int + The number of stacks that make up the whole model. Defaults to 10. + num_blocks: int + The number of blocks making up every stack. Defaults to 3. + num_layers: int + The number of fully connected layers preceding the final forking layers in each block + of every stack. Defaults to 4. + layer_widths: int + Determines the number of neurons that make up each fully connected layer in each block + of every stack. Defaults to 512. + batch_size: int + Number of time series (input and output sequences) used in each training pass. Defaults + to 32. + n_epochs: int + Number of epochs over which to train the model. Defaults to 100. + learning_rate: float + Defaults to 1e-3. + model_save_name: str + Name for model. Defaults to "brnn_model". + force_reset: bool + If set to True, any previously-existing model with the same name will be reset (all + checkpoints will be discarded). Defaults to True. + save_checkpoints: bool + Whether or not to automatically save the untrained model and checkpoints from training. + Defaults to True. + export: str + Format to export data + residuals: bool + Whether to show residuals for the model. Defaults to False. + forecast_only: bool + Whether to only show dates in the forecasting range. Defaults to False. + start_date: Optional[datetime] + The starting date to perform analysis, data before this is trimmed. Defaults to None. + end_date: Optional[datetime] + The ending date to perform analysis, data after this is trimmed. Defaults to None. + naive: bool + Whether to show the naive baseline. This just assumes the closing price will be the same + as the previous day's closing price. Defaults to False. + external_axes: Optional[List[plt.axes]] + External axes to plot on + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/forecast/nhits/_index.md b/website/content/SDK/forecast/nhits/_index.md deleted file mode 100644 index c31cc0b6264..00000000000 --- a/website/content/SDK/forecast/nhits/_index.md +++ /dev/null @@ -1,156 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### forecast.nhits(data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], target_column: str = 'close', n_predict: int = 5, train_split: float = 0.85, past_covariates: str = None, forecast_horizon: int = 5, input_chunk_length: int = 14, output_chunk_length: int = 5, num_stacks: int = 3, num_blocks: int = 1, num_layers: int = 2, layer_widths: int = 512, pooling_kernel_sizes: Optional[Tuple[Tuple[int]]] = None, n_freq_downsample: Optional[Tuple[Tuple[int]]] = None, dropout: float = 0.1, activation: str = 'ReLU', max_pool_1d: bool = True, batch_size: int = 32, n_epochs: int = 100, learning_rate: float = 0.001, model_save_name: str = 'brnn_model', force_reset: bool = True, save_checkpoints: bool = True) -> Tuple[List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], Optional[float], Any] - -Performs Nhits forecasting - - Args: - data (Union[pd.Series, pd.DataFrame]): - Input Data - target_column (str, optional): - Target column to forecast. Defaults to "close". - n_predict (int, optional): - Days to predict. Defaults to 5. - train_split (float, optional): - Train/val split. Defaults to 0.85. - past_covariates (str, optional): - Multiple secondary columns to factor in when forecasting. Defaults to None. - forecast_horizon (int, optional): - Forecast horizon when performing historical forecasting. Defaults to 5. - input_chunk_length (int, optional): - Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. - output_chunk_length (int, optional): - The length of the forecast of the model. Defaults to 5. - num_stacks int: - The number of stacks that make up the whole model. - num_blocks int: - The number of blocks making up every stack. - num_layers int: - The number of fully connected layers preceding the final forking layers in each block - of every stack. - layer_widths int: - Determines the number of neurons that make up each fully connected layer in each - block of every stack. If a list is passed, it must have a length equal to num_stacks - and every entry in that list corresponds to the layer width of the corresponding stack. - If an integer is passed, every stack will have blocks with FC layers of the same width. - pooling_kernel_size Optional[Tuple[Tuple[int]]]: - If set, this parameter must be a tuple of tuples, of size (num_stacks x num_blocks), - specifying the kernel size for each block in each stack used for the input pooling - layer. If left to None, some default values will be used based on input_chunk_length. - n_freq_downsample: Optional[Tuple[Tuple[int]]]: - If set, this parameter must be a tuple of tuples, of size (num_stacks x num_blocks), - specifying the downsampling factors before interpolation, for each block in each stack. - If left to None, some default values will be used based on output_chunk_length. - dropout float: - The dropout probability to be used in fully connected layers. - activation str: - Supported activations: [‘ReLU’,’RReLU’, ‘PReLU’, ‘Softplus’, ‘Tanh’, ‘SELU’, ‘LeakyReLU’, ‘Sigmoid’] - max_pool_1d bool: - Use max_pool_1d pooling. False uses AvgPool1d. - batch_size (int, optional): - Number of time series (input and output sequences) used in each training pass. Defaults to 32. - n_epochs (int, optional): - Number of epochs over which to train the model. Defaults to 100. - learning_rate (float, optional): - Defaults to 1e-3. - model_save_name (str, optional): - Name for model. Defaults to "brnn_model". - force_reset (bool, optional): - If set to True, any previously-existing model with the same name will be reset (all checkpoints will be - discarded). Defaults to True. - save_checkpoints (bool, optional): - Whether or not to automatically save the untrained model and checkpoints from training. Defaults to True. - - Returns: - list[TimeSeries] - Adjusted Data series - list[TimeSeries] - Historical forecast by best RNN model - list[TimeSeries] - list of Predictions - Optional[float] - Mean average precision error - Any - Best BRNN Model - -## Getting charts -### forecast.nhits(data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], target_column: str = 'close', dataset_name: str = '', n_predict: int = 5, past_covariates: str = None, train_split: float = 0.85, forecast_horizon: int = 5, input_chunk_length: int = 14, output_chunk_length: int = 5, num_stacks: int = 3, num_blocks: int = 1, num_layers: int = 2, layer_widths: int = 512, pooling_kernel_sizes: Optional[Tuple[Tuple[int]]] = None, n_freq_downsample: Optional[Tuple[Tuple[int]]] = None, dropout: float = 0.1, activation: str = 'ReLU', max_pool_1d: bool = True, batch_size: int = 32, n_epochs: int = 100, learning_rate: float = 0.001, model_save_name: str = 'rnn_model', force_reset: bool = True, save_checkpoints: bool = True, export: str = '', residuals: bool = False, forecast_only: bool = False, start_date: Optional[datetime.datetime] = None, end_date: Optional[datetime.datetime] = None, naive: bool = False, export_pred_raw: bool = False, external_axes: Optional[List[axes]] = None, chart=True) - -Display Nhits forecast - - Parameters - ---------- - data (Union[pd.Series, pd.DataFrame]): - Input Data - target_column (str, optional): - Target column to forecast. Defaults to "close". - dataset_name str - The name of the ticker to be predicted - n_predict (int, optional): - Days to predict. Defaults to 5. - train_split (float, optional): - Train/val split. Defaults to 0.85. - past_covariates (str, optional): - Multiple secondary columns to factor in when forecasting. Defaults to None. - forecast_horizon (int, optional): - Forecast horizon when performing historical forecasting. Defaults to 5. - input_chunk_length (int, optional): - Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. - output_chunk_length (int, optional): - The length of the forecast of the model. Defaults to 5. - num_stacks int: - The number of stacks that make up the whole model. - num_blocks int: - The number of blocks making up every stack. - num_layers int: - The number of fully connected layers preceding the final forking layers in each block - of every stack. - layer_widths int: - Determines the number of neurons that make up each fully connected layer in each - block of every stack. If a list is passed, it must have a length equal to num_stacks - and every entry in that list corresponds to the layer width of the corresponding stack. - If an integer is passed, every stack will have blocks with FC layers of the same width. - pooling_kernel_size Optional[Tuple[Tuple[int]]]: - If set, this parameter must be a tuple of tuples, of size (num_stacks x num_blocks), - specifying the kernel size for each block in each stack used for the input pooling - layer. If left to None, some default values will be used based on input_chunk_length. - n_freq_downsample: Optional[Tuple[Tuple[int]]]: - If set, this parameter must be a tuple of tuples, of size (num_stacks x num_blocks), - specifying the downsampling factors before interpolation, for each block in each stack. - If left to None, some default values will be used based on output_chunk_length. - dropout float: - The dropout probability to be used in fully connected layers. - activation str: - Supported activations: [[‘ReLU’,’RReLU’, ‘PReLU’, ‘Softplus’, ‘Tanh’, ‘SELU’, ‘LeakyReLU’, ‘Sigmoid’] - max_pool_1d bool: - Use max_pool_1d pooling. False uses AvgPool1d. - batch_size (int, optional): - Number of time series (input and output sequences) used in each training pass. Defaults to 32. - n_epochs (int, optional): - Number of epochs over which to train the model. Defaults to 100. - learning_rate (float, optional): - Defaults to 1e-3. - model_save_name (str, optional): - Name for model. Defaults to "brnn_model". - force_reset (bool, optional): - If set to True, any previously-existing model with the same name will be reset - (all checkpoints will be discarded). Defaults to True. - save_checkpoints (bool, optional): - Whether or not to automatically save the untrained model and checkpoints from training. - Defaults to True. - export: str - Format to export data - residuals: bool - Whether to show residuals for the model. Defaults to False. - forecast_only: bool - Whether to only show dates in the forecasting range. Defaults to False. - start_date: Optional[datetime] - The starting date to perform analysis, data before this is trimmed. Defaults to None. - end_date: Optional[datetime] - The ending date to perform analysis, data after this is trimmed. Defaults to None. - naive: bool - Whether to show the naive baseline. This just assumes the closing price will be the same - as the previous day's closing price. Defaults to False. - external_axes:Optional[List[plt.axes]] - External axes to plot on diff --git a/website/content/SDK/forecast/nhits/_index.rst b/website/content/SDK/forecast/nhits/_index.rst new file mode 100644 index 00000000000..117ecf51792 --- /dev/null +++ b/website/content/SDK/forecast/nhits/_index.rst @@ -0,0 +1,253 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forecast.nhits( + data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], + target_column: str = 'close', + n_predict: int = 5, + train_split: float = 0.85, + past_covariates: str = None, + forecast_horizon: int = 5, + input_chunk_length: int = 14, + output_chunk_length: int = 5, + num_stacks: int = 3, + num_blocks: int = 1, + num_layers: int = 2, + layer_widths: int = 512, + pooling_kernel_sizes: Optional[Tuple[Tuple[int]]] = None, + n_freq_downsample: Optional[Tuple[Tuple[int]]] = None, + dropout: float = 0.1, + activation: str = 'ReLU', + max_pool_1d: bool = True, + batch_size: int = 32, + n_epochs: int = 100, + learning_rate: float = 0.001, + model_save_name: str = 'brnn_model', + force_reset: bool = True, + save_checkpoints: bool = True, + chart: bool = False, +) -> Tuple[List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], Optional[float], Any] +{{< /highlight >}} + +.. raw:: html + +

+ Performs Nhits forecasting +

+ +* **Parameters** + + data: Union[pd.Series, pd.DataFrame] + Input Data + target_column: str + Target column to forecast. Defaults to "close". + n_predict: int + Days to predict. Defaults to 5. + train_split: float + Train/val split. Defaults to 0.85. + past_covariates: str + Multiple secondary columns to factor in when forecasting. Defaults to None. + forecast_horizon: int + Forecast horizon when performing historical forecasting. Defaults to 5. + input_chunk_length: int + Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. + output_chunk_length: int + The length of the forecast of the model. Defaults to 5. + num_stacks: int + The number of stacks that make up the whole model. + num_blocks: int + The number of blocks making up every stack. + num_layers: int + The number of fully connected layers preceding the final forking layers in each block + of every stack. + layer_widths: int + Determines the number of neurons that make up each fully connected layer in each + block of every stack. If a list is passed, it must have a length equal to num_stacks + and every entry in that list corresponds to the layer width of the corresponding stack. + If an integer is passed, every stack will have blocks with FC layers of the same width. + pooling_kernel_size: Optional[Tuple[Tuple[int]]]: + If set, this parameter must be a tuple of tuples, of size (num_stacks x num_blocks), + specifying the kernel size for each block in each stack used for the input pooling + layer. If left to None, some default values will be used based on input_chunk_length. + n_freq_downsample: Optional[Tuple[Tuple[int]]] + If set, this parameter must be a tuple of tuples, of size (num_stacks x num_blocks), + specifying the downsampling factors before interpolation, for each block in each stack. + If left to None, some default values will be used based on output_chunk_length. + dropout: float + The dropout probability to be used in fully connected layers. + activation: str + Supported activations: [‘ReLU’,’RReLU’, ‘PReLU’, ‘Softplus’, ‘Tanh’, ‘SELU’, ‘LeakyReLU’, ‘Sigmoid’] + max_pool_1d: bool + Use max_pool_1d pooling. False uses AvgPool1d. + batch_size: int + Number of time series (input and output sequences) used in each training pass. Defaults to 32. + n_epochs: int + Number of epochs over which to train the model. Defaults to 100. + learning_rate: float + Defaults to 1e-3. + model_save_name: str + Name for model. Defaults to "brnn_model". + force_reset: bool + If set to True, any previously-existing model with the same name will be reset (all checkpoints will be + discarded). Defaults to True. + save_checkpoints: bool + Whether or not to automatically save the untrained model and checkpoints from training. Defaults to True. + chart: *bool* + Flag to display chart + + +* **Returns** + + list[TimeSeries] + Adjusted Data series + list[TimeSeries] + Historical forecast by best RNN model + list[TimeSeries] + list of Predictions + Optional[float] + Mean average precision error + Any + Best BRNN Model + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +forecast.nhits( + data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], + target_column: str = 'close', + dataset_name: str = '', + n_predict: int = 5, + past_covariates: str = None, + train_split: float = 0.85, + forecast_horizon: int = 5, + input_chunk_length: int = 14, + output_chunk_length: int = 5, + num_stacks: int = 3, + num_blocks: int = 1, + num_layers: int = 2, + layer_widths: int = 512, + pooling_kernel_sizes: Optional[Tuple[Tuple[int]]] = None, + n_freq_downsample: Optional[Tuple[Tuple[int]]] = None, + dropout: float = 0.1, + activation: str = 'ReLU', + max_pool_1d: bool = True, + batch_size: int = 32, + n_epochs: int = 100, + learning_rate: float = 0.001, + model_save_name: str = 'rnn_model', + force_reset: bool = True, + save_checkpoints: bool = True, + export: str = '', + residuals: bool = False, + forecast_only: bool = False, + start_date: Optional[datetime.datetime] = None, + end_date: Optional[datetime.datetime] = None, + naive: bool = False, + export_pred_raw: bool = False, + external_axes: Optional[List[axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display Nhits forecast +

+ +* **Parameters** + + data: Union[pd.Series, pd.DataFrame] + Input Data + target_column: str + Target column to forecast. Defaults to "close". + dataset_name: str + The name of the ticker to be predicted + n_predict: int + Days to predict. Defaults to 5. + train_split: float + Train/val split. Defaults to 0.85. + past_covariates: str + Multiple secondary columns to factor in when forecasting. Defaults to None. + forecast_horizon: int + Forecast horizon when performing historical forecasting. Defaults to 5. + input_chunk_length: int + Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. + output_chunk_length: int + The length of the forecast of the model. Defaults to 5. + num_stacks: int + The number of stacks that make up the whole model. + num_blocks: int + The number of blocks making up every stack. + num_layers: int + The number of fully connected layers preceding the final forking layers in each block + of every stack. + layer_widths: int + Determines the number of neurons that make up each fully connected layer in each + block of every stack. If a list is passed, it must have a length equal to num_stacks + and every entry in that list corresponds to the layer width of the corresponding stack. + If an integer is passed, every stack will have blocks with FC layers of the same width. + pooling_kernel_size: Optional[Tuple[Tuple[int]]] + If set, this parameter must be a tuple of tuples, of size (num_stacks x num_blocks), + specifying the kernel size for each block in each stack used for the input pooling + layer. If left to None, some default values will be used based on input_chunk_length. + n_freq_downsample: Optional[Tuple[Tuple[int]]] + If set, this parameter must be a tuple of tuples, of size (num_stacks x num_blocks), + specifying the downsampling factors before interpolation, for each block in each stack. + If left to None, some default values will be used based on output_chunk_length. + dropout: float + The dropout probability to be used in fully connected layers. + activation: str + Supported activations: [[‘ReLU’,’RReLU’, ‘PReLU’, ‘Softplus’, ‘Tanh’, ‘SELU’, ‘LeakyReLU’, ‘Sigmoid’] + max_pool_1d: bool + Use max_pool_1d pooling. False uses AvgPool1d. + batch_size: int + Number of time series (input and output sequences) used in each training pass. Defaults to 32. + n_epochs: int + Number of epochs over which to train the model. Defaults to 100. + learning_rate: float + Defaults to 1e-3. + model_save_name: str + Name for model. Defaults to "brnn_model". + force_reset: bool + If set to True, any previously-existing model with the same name will be reset + (all checkpoints will be discarded). Defaults to True. + save_checkpoints: bool + Whether or not to automatically save the untrained model and checkpoints from training. + Defaults to True. + export: str + Format to export data + residuals: bool + Whether to show residuals for the model. Defaults to False. + forecast_only: bool + Whether to only show dates in the forecasting range. Defaults to False. + start_date: Optional[datetime] + The starting date to perform analysis, data before this is trimmed. Defaults to None. + end_date: Optional[datetime] + The ending date to perform analysis, data after this is trimmed. Defaults to None. + naive: bool + Whether to show the naive baseline. This just assumes the closing price will be the same + as the previous day's closing price. Defaults to False. + external_axes: Optional[List[plt.axes]] + External axes to plot on + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/forecast/plot/_index.md b/website/content/SDK/forecast/plot/_index.md deleted file mode 100644 index cabf4110a4c..00000000000 --- a/website/content/SDK/forecast/plot/_index.md +++ /dev/null @@ -1,31 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### forecast.plot(data: pandas.core.frame.DataFrame, columns: List[str], export: str = '', external_axes: Optional[List[axes]] = None) - -Plot data from a dataset - Parameters - ---------- - data: pd.DataFrame - The dataframe to plot - columns: List[str] - The columns to show - export: str - Format to export image - external_axes:Optional[List[plt.axes]] - External axes to plot on - -## Getting charts -### forecast.plot(data: pandas.core.frame.DataFrame, columns: List[str], export: str = '', external_axes: Optional[List[axes]] = None, chart=True) - -Plot data from a dataset - Parameters - ---------- - data: pd.DataFrame - The dataframe to plot - columns: List[str] - The columns to show - export: str - Format to export image - external_axes:Optional[List[plt.axes]] - External axes to plot on diff --git a/website/content/SDK/forecast/plot/_index.rst b/website/content/SDK/forecast/plot/_index.rst new file mode 100644 index 00000000000..0e9a51aad01 --- /dev/null +++ b/website/content/SDK/forecast/plot/_index.rst @@ -0,0 +1,81 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forecast.plot( + data: pandas.core.frame.DataFrame, + columns: List[str], + export: str = '', + external_axes: Optional[List[axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Plot data from a dataset +

+ +* **Parameters** + + data: pd.DataFrame + The dataframe to plot + columns: List[str] + The columns to show + export: str + Format to export image + external_axes:Optional[List[plt.axes]] + External axes to plot on + chart: *bool* + Flag to display chart + + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +forecast.plot( + data: pandas.core.frame.DataFrame, + columns: List[str], + export: str = '', + external_axes: Optional[List[axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Plot data from a dataset +

+ +* **Parameters** + + data: pd.DataFrame + The dataframe to plot + columns: List[str] + The columns to show + export: str + Format to export image + external_axes:Optional[List[plt.axes]] + External axes to plot on + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/forecast/regr/_index.md b/website/content/SDK/forecast/regr/_index.md deleted file mode 100644 index 9cc73c75d35..00000000000 --- a/website/content/SDK/forecast/regr/_index.md +++ /dev/null @@ -1,76 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### forecast.regr(data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], target_column: str = 'close', n_predict: int = 5, past_covariates: str = None, train_split: float = 0.85, forecast_horizon: int = 5, output_chunk_length: int = 1, lags: Union[int, List[int]] = 72) -> Tuple[List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], float, Any] - -Perform Regression Forecasting - - Args: - data (Union[pd.Series, pd.DataFrame]): - Input Data - n_predict (int, optional): - Days to predict. Defaults to 5. - target_column (str, optional): - Target column to forecast. Defaults to "close". - train_split (float, optional): - Train/val split. Defaults to 0.85. - past_covariates (str, optional): - Multiple secondary columns to factor in when forecasting. Defaults to None. - forecast_horizon (int, optional): - Forecast horizon when performing historical forecasting. Defaults to 5. - output_chunk_length (int, optional): - The length of the forecast of the model. Defaults to 1. - lags (int, list) - lagged target values to predict the next time step - - Returns: - List[TimeSeries] - Adjusted Data series - List[TimeSeries] - Historical forecast by best RNN model - List[TimeSeries] - list of Predictions - float - Mean average precision error - Any - Best Regression Model - -## Getting charts -### forecast.regr(data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], target_column: str = 'close', dataset_name: str = '', n_predict: int = 5, past_covariates: str = None, train_split: float = 0.85, forecast_horizon: int = 5, output_chunk_length: int = 1, lags: Union[int, List[int]] = 72, export: str = '', residuals: bool = False, forecast_only: bool = False, start_date: Optional[datetime.datetime] = None, end_date: Optional[datetime.datetime] = None, naive: bool = False, explainability_raw: bool = False, export_pred_raw: bool = False, external_axes: Optional[List[axes]] = None, chart=True) - -Display Regression Forecasting - - Args: - data (Union[pd.Series, pd.DataFrame]): - Input Data - target_column (str, optional): - Target column to forecast. Defaults to "close". - dataset_name str - The name of the ticker to be predicted - n_predict (int, optional): - Days to predict. Defaults to 5. - train_split (float, optional): - Train/val split. Defaults to 0.85. - past_covariates (str, optional): - Multiple secondary columns to factor in when forecasting. Defaults to None. - forecast_horizon (int, optional): - Forecast horizon when performing historical forecasting. Defaults to 5. - output_chunk_length (int, optional): - The length of the forecast of the model. Defaults to 1. - lags (int, list) - lagged target values to predict the next time step - export: str - Format to export data - residuals: bool - Whether to show residuals for the model. Defaults to False. - forecast_only: bool - Whether to only show dates in the forecasting range. Defaults to False. - start_date: Optional[datetime] - The starting date to perform analysis, data before this is trimmed. Defaults to None. - end_date: Optional[datetime] - The ending date to perform analysis, data after this is trimmed. Defaults to None. - naive: bool - Whether to show the naive baseline. This just assumes the closing price will be the same - as the previous day's closing price. Defaults to False. - external_axes:Optional[List[plt.axes]] - External axes to plot on diff --git a/website/content/SDK/forecast/regr/_index.rst b/website/content/SDK/forecast/regr/_index.rst new file mode 100644 index 00000000000..c167fe179df --- /dev/null +++ b/website/content/SDK/forecast/regr/_index.rst @@ -0,0 +1,145 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forecast.regr( + data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], + target_column: str = 'close', + n_predict: int = 5, + past_covariates: str = None, + train_split: float = 0.85, + forecast_horizon: int = 5, + output_chunk_length: int = 1, + lags: Union[int, List[int]] = 72, + chart: bool = False, +) -> Tuple[List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], float, Any] +{{< /highlight >}} + +.. raw:: html + +

+ Perform Regression Forecasting +

+ +* **Parameters** + + data: Union[pd.Series, pd.DataFrame] + Input Data + n_predict: int + Days to predict. Defaults to 5. + target_column: str + Target column to forecast. Defaults to "close". + train_split: float + Train/val split. Defaults to 0.85. + past_covariates: str + Multiple secondary columns to factor in when forecasting. Defaults to None. + forecast_horizon: int + Forecast horizon when performing historical forecasting. Defaults to 5. + output_chunk_length: int + The length of the forecast of the model. Defaults to 1. + lags: Union[int, List[int]] + lagged target values to predict the next time step + chart: *bool* + Flag to display chart + + +* **Returns** + + List[TimeSeries] + Adjusted Data series + List[TimeSeries] + Historical forecast by best RNN model + List[TimeSeries] + list of Predictions + float + Mean average precision error + Any + Best Regression Model + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +forecast.regr( + data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], + target_column: str = 'close', + dataset_name: str = '', + n_predict: int = 5, + past_covariates: str = None, + train_split: float = 0.85, + forecast_horizon: int = 5, + output_chunk_length: int = 1, + lags: Union[int, List[int]] = 72, + export: str = '', + residuals: bool = False, + forecast_only: bool = False, + start_date: Optional[datetime.datetime] = None, + end_date: Optional[datetime.datetime] = None, + naive: bool = False, + explainability_raw: bool = False, + export_pred_raw: bool = False, + external_axes: Optional[List[axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display Regression Forecasting +

+ +* **Parameters** + + data: Union[pd.Series, pd.DataFrame] + Input Data + target_column: str + Target column to forecast. Defaults to "close". + dataset_name: str + The name of the ticker to be predicted + n_predict: int + Days to predict. Defaults to 5. + train_split: float + Train/val split. Defaults to 0.85. + past_covariates: str + Multiple secondary columns to factor in when forecasting. Defaults to None. + forecast_horizon: int + Forecast horizon when performing historical forecasting. Defaults to 5. + output_chunk_length: int + The length of the forecast of the model. Defaults to 1. + lags: Union[int, List[int]] + lagged target values to predict the next time step + export: str + Format to export data + residuals: bool + Whether to show residuals for the model. Defaults to False. + forecast_only: bool + Whether to only show dates in the forecasting range. Defaults to False. + start_date: Optional[datetime] + The starting date to perform analysis, data before this is trimmed. Defaults to None. + end_date: Optional[datetime] + The ending date to perform analysis, data after this is trimmed. Defaults to None. + naive: bool + Whether to show the naive baseline. This just assumes the closing price will be the same + as the previous day's closing price. Defaults to False. + external_axes: Optional[List[plt.axes]] + External axes to plot on + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/forecast/rename/_index.md b/website/content/SDK/forecast/rename/_index.md deleted file mode 100644 index 8f9667585d9..00000000000 --- a/website/content/SDK/forecast/rename/_index.md +++ /dev/null @@ -1,18 +0,0 @@ -## Get underlying data -### forecast.rename(df: pandas.core.frame.DataFrame, old_column: str, new_column: str) -> pandas.core.frame.DataFrame - -Rename a column in a dataframe - - Parameters - ---------- - df: pd.DataFrame - The dataframe to have a column renamed - old_column: str - The column that will have its name changed - new_column: str - The name to update to - - Returns - ---------- - new_df: pd.DataFrame - The dataframe with the renamed column diff --git a/website/content/SDK/forecast/rename/_index.rst b/website/content/SDK/forecast/rename/_index.rst new file mode 100644 index 00000000000..04ea3ba37ec --- /dev/null +++ b/website/content/SDK/forecast/rename/_index.rst @@ -0,0 +1,40 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forecast.rename( + data: pandas.core.frame.DataFrame, + old_column: str, + new_column: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Rename a column in a dataframe +

+ +* **Parameters** + + data: pd.DataFrame + The dataframe to have a column renamed + old_column: str + The column that will have its name changed + new_column: str + The name to update to + +* **Returns** + + new_df: pd.DataFrame + The dataframe with the renamed column diff --git a/website/content/SDK/forecast/rnn/_index.md b/website/content/SDK/forecast/rnn/_index.md deleted file mode 100644 index 149b21daa99..00000000000 --- a/website/content/SDK/forecast/rnn/_index.md +++ /dev/null @@ -1,104 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### forecast.rnn(data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], target_column: str = 'close', n_predict: int = 5, train_split: float = 0.85, forecast_horizon: int = 5, model_type: str = 'LSTM', hidden_dim: int = 20, dropout: float = 0.0, batch_size: int = 16, n_epochs: int = 100, learning_rate: float = 0.001, model_save_name: str = 'rnn_model', training_length: int = 20, input_chunk_size: int = 14, force_reset: bool = True, save_checkpoints: bool = True) -> Tuple[List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], Optional[float], Any] - -Perform RNN forecasting - - Args: - data (Union[pd.Series, pd.DataFrame]): - Input Data - n_predict (int, optional): - Days to predict. Defaults to 5. - target_column (str, optional): - Target column to forecast. Defaults to "close". - train_split (float, optional): - Train/val split. Defaults to 0.85. - forecast_horizon (int, optional): - Forecast horizon when performing historical forecasting. Defaults to 5. - model_type (str, optional): - Either a string specifying the RNN module type ("RNN", "LSTM" or "GRU"). Defaults to "LSTM". - hidden_dim (int, optional): - Size for feature maps for each hidden RNN layer.. Defaults to 20. - dropout (float, optional): - Fraction of neurons afected by Dropout. Defaults to 0.0. - batch_size (int, optional): - Number of time series (input and output sequences) used in each training pass. Defaults to 32. - n_epochs (int, optional): - Number of epochs over which to train the model. Defaults to 100. - learning_rate (float, optional): - Defaults to 1e-3. - model_save_name (str, optional): - Name for model. Defaults to "brnn_model". - force_reset (bool, optional): - If set to True, any previously-existing model with the same name will be reset - (all checkpoints will be discarded). Defaults to True. - save_checkpoints (bool, optional): - Whether or not to automatically save the untrained model and checkpoints from training. - Defaults to True. - - Returns: - List[TimeSeries] - Adjusted Data series - List[TimeSeries] - Historical forecast by best RNN model - List[TimeSeries] - list of Predictions - float - Mean average precision error - Any - Best RNN Model - -## Getting charts -### forecast.rnn(data: Union[pandas.core.frame.DataFrame, pandas.core.series.Series], target_column: str = 'close', dataset_name: str = '', n_predict: int = 5, train_split: float = 0.85, forecast_horizon: int = 5, model_type: str = 'LSTM', hidden_dim: int = 20, dropout: float = 0.0, batch_size: int = 16, n_epochs: int = 100, learning_rate: float = 0.001, model_save_name: str = 'rnn_model', training_length: int = 20, input_chunk_size: int = 14, force_reset: bool = True, save_checkpoints: bool = True, export: str = '', residuals: bool = False, forecast_only: bool = False, start_date: Optional[datetime.datetime] = None, end_date: Optional[datetime.datetime] = None, naive: bool = False, export_pred_raw: bool = False, external_axes: Optional[List[axes]] = None, chart=True) - -Display RNN forecast - - Parameters - ---------- - data (Union[pd.Series, pd.DataFrame]): - Input Data - dataset_name str - The name of the ticker to be predicted - n_predict (int, optional): - Days to predict. Defaults to 5. - target_column (str, optional): - Target column to forecast. Defaults to "close". - train_split (float, optional): - Train/val split. Defaults to 0.85. - forecast_horizon (int, optional): - Forecast horizon when performing historical forecasting. Defaults to 5. - model_type (str, optional): - Either a string specifying the RNN module type ("RNN", "LSTM" or "GRU"). Defaults to "LSTM". - hidden_dim (int, optional): - Size for feature maps for each hidden RNN layer.. Defaults to 20. - dropout (float, optional): - Fraction of neurons afected by Dropout. Defaults to 0.0. - batch_size (int, optional): - Number of time series (input and output sequences) used in each training pass. Defaults to 32. - n_epochs (int, optional): - Number of epochs over which to train the model. Defaults to 100. - learning_rate (float, optional): - Defaults to 1e-3. - model_save_name (str, optional): - Name for model. Defaults to "brnn_model". - force_reset (bool, optional): - If set to True, any previously-existing model with the same name will be reset - (all checkpoints will be discarded). Defaults to True. - save_checkpoints (bool, optional): - Whether or not to automatically save the untrained model and checkpoints from training. Defaults to True. - forecast_only: bool - Whether to only show dates in the forecasting range. Defaults to False. - export: str - Format to export data - residuals: bool - Whether to show residuals for the model. Defaults to False. - start_date: Optional[datetime] - The starting date to perform analysis, data before this is trimmed. Defaults to None. - end_date: Optional[datetime] - The ending date to perform analysis, data after this is trimmed. Defaults to None. - naive: bool - Whether to show the naive baseline. This just assumes the closing price will be the same - as the previous day's closing price. Defaults to False. - external_axes:Optional[List[plt.axes]] - External axes to plot on diff --git a/website/content/SDK/forecast/rnn/_index.rst b/website/content/SDK/forecast/rnn/_index.rst new file mode 100644 index 00000000000..5c539a6d9c2 --- /dev/null +++ b/website/content/SDK/forecast/rnn/_index.rst @@ -0,0 +1,187 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forecast.rnn( + data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], + target_column: str = 'close', + n_predict: int = 5, + train_split: float = 0.85, + forecast_horizon: int = 5, + model_type: str = 'LSTM', + hidden_dim: int = 20, + dropout: float = 0.0, + batch_size: int = 16, + n_epochs: int = 100, + learning_rate: float = 0.001, + model_save_name: str = 'rnn_model', + training_length: int = 20, + input_chunk_size: int = 14, + force_reset: bool = True, + save_checkpoints: bool = True, + chart: bool = False, +) -> Tuple[List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], Optional[float], Any] +{{< /highlight >}} + +.. raw:: html + +

+ Perform RNN forecasting +

+ +* **Parameters** + + data: Union[pd.Series, pd.DataFrame] + Input Data + n_predict: int + Days to predict. Defaults to 5. + target_column: str + Target column to forecast. Defaults to "close". + train_split: float + Train/val split. Defaults to 0.85. + forecast_horizon: int + Forecast horizon when performing historical forecasting. Defaults to 5. + model_type: str + Either a string specifying the RNN module type ("RNN", "LSTM" or "GRU"). Defaults to "LSTM". + hidden_dim: int + Size for feature maps for each hidden RNN layer.. Defaults to 20. + dropout: float + Fraction of neurons affected by Dropout. Defaults to 0.0. + batch_size: int + Number of time series (input and output sequences) used in each training pass. Defaults to 32. + n_epochs: int + Number of epochs over which to train the model. Defaults to 100. + learning_rate: float + Defaults to 1e-3. + model_save_name: str + Name for model. Defaults to "brnn_model". + force_reset: bool + If set to True, any previously-existing model with the same name will be reset + (all checkpoints will be discarded). Defaults to True. + save_checkpoints: bool + Whether or not to automatically save the untrained model and checkpoints from training. + Defaults to True. + chart: *bool* + Flag to display chart + + +* **Returns** + + List[TimeSeries] + Adjusted Data series + List[TimeSeries] + Historical forecast by best RNN model + List[TimeSeries] + list of Predictions + float + Mean average precision error + Any + Best RNN Model + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +forecast.rnn( + data: Union[pandas.core.frame.DataFrame, pandas.core.series.Series], + target_column: str = 'close', + dataset_name: str = '', + n_predict: int = 5, + train_split: float = 0.85, + forecast_horizon: int = 5, + model_type: str = 'LSTM', + hidden_dim: int = 20, + dropout: float = 0.0, + batch_size: int = 16, + n_epochs: int = 100, + learning_rate: float = 0.001, + model_save_name: str = 'rnn_model', + training_length: int = 20, + input_chunk_size: int = 14, + force_reset: bool = True, + save_checkpoints: bool = True, + export: str = '', + residuals: bool = False, + forecast_only: bool = False, + start_date: Optional[datetime.datetime] = None, + end_date: Optional[datetime.datetime] = None, + naive: bool = False, + export_pred_raw: bool = False, + external_axes: Optional[List[axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display RNN forecast +

+ +* **Parameters** + + data: Union[pd.Series, pd.DataFrame] + Input Data + dataset_name: str + The name of the ticker to be predicted + n_predict: int + Days to predict. Defaults to 5. + target_column: str + Target column to forecast. Defaults to "close". + train_split: float + Train/val split. Defaults to 0.85. + forecast_horizon: int + Forecast horizon when performing historical forecasting. Defaults to 5. + model_type: str + Either a string specifying the RNN module type ("RNN", "LSTM" or "GRU"). Defaults to "LSTM". + hidden_dim: int + Size for feature maps for each hidden RNN layer.. Defaults to 20. + dropout: float + Fraction of neurons affected by Dropout. Defaults to 0.0. + batch_size: int + Number of time series (input and output sequences) used in each training pass. Defaults to 32. + n_epochs: int + Number of epochs over which to train the model. Defaults to 100. + learning_rate: float + Defaults to 1e-3. + model_save_name: str + Name for model. Defaults to "brnn_model". + force_reset: bool + If set to True, any previously-existing model with the same name will be reset + (all checkpoints will be discarded). Defaults to True. + save_checkpoints: bool + Whether or not to automatically save the untrained model and checkpoints from training. Defaults to True. + forecast_only: bool + Whether to only show dates in the forecasting range. Defaults to False. + export: str + Format to export data + residuals: bool + Whether to show residuals for the model. Defaults to False. + start_date: Optional[datetime] + The starting date to perform analysis, data before this is trimmed. Defaults to None. + end_date: Optional[datetime] + The ending date to perform analysis, data after this is trimmed. Defaults to None. + naive: bool + Whether to show the naive baseline. This just assumes the closing price will be the same + as the previous day's closing price. Defaults to False. + external_axes: Optional[List[plt.axes]] + External axes to plot on + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/forecast/roc/_index.md b/website/content/SDK/forecast/roc/_index.md deleted file mode 100644 index 9a8f16d8538..00000000000 --- a/website/content/SDK/forecast/roc/_index.md +++ /dev/null @@ -1,19 +0,0 @@ -## Get underlying data -### forecast.roc(dataset: pandas.core.frame.DataFrame, target_column: str = 'close', period: int = 10) -> pandas.core.frame.DataFrame - -A momentum oscillator, which measures the percentage change between the current - value and the n period past value. - - Parameters - ---------- - dataset : pd.DataFrame - The dataset you wish to calculate with - target_column : str - The column you wish to add the ROC to - period : int - Time Span - - Returns - ------- - pd.DataFrame: - Dataframe with added ROC column diff --git a/website/content/SDK/forecast/roc/_index.rst b/website/content/SDK/forecast/roc/_index.rst new file mode 100644 index 00000000000..d56237ee92e --- /dev/null +++ b/website/content/SDK/forecast/roc/_index.rst @@ -0,0 +1,41 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forecast.roc( + dataset: pandas.core.frame.DataFrame, + target_column: str = 'close', + period: int = 10, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ A momentum oscillator, which measures the percentage change between the current + value and the n period past value. +

+ +* **Parameters** + + dataset : pd.DataFrame + The dataset you wish to calculate with + target_column : str + The column you wish to add the ROC to + period : int + Time Span + +* **Returns** + + pd.DataFrame: + Dataframe with added ROC column diff --git a/website/content/SDK/forecast/rsi/_index.md b/website/content/SDK/forecast/rsi/_index.md deleted file mode 100644 index 337c5a31120..00000000000 --- a/website/content/SDK/forecast/rsi/_index.md +++ /dev/null @@ -1,19 +0,0 @@ -## Get underlying data -### forecast.rsi(dataset: pandas.core.frame.DataFrame, target_column: str = 'close', period: int = 10) -> pandas.core.frame.DataFrame - -A momentum indicator that measures the magnitude of recent price changes to evaluate - overbought or oversold conditions in the price of a stock or other asset. - - Parameters - ---------- - dataset : pd.DataFrame - The dataset you wish to calculate for - target_column : str - The column you wish to add the RSI to - period : int - Time Span - - Returns - ------- - pd.DataFrame: - Dataframe with added RSI column diff --git a/website/content/SDK/forecast/rsi/_index.rst b/website/content/SDK/forecast/rsi/_index.rst new file mode 100644 index 00000000000..1c43d82ea38 --- /dev/null +++ b/website/content/SDK/forecast/rsi/_index.rst @@ -0,0 +1,41 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forecast.rsi( + dataset: pandas.core.frame.DataFrame, + target_column: str = 'close', + period: int = 10, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ A momentum indicator that measures the magnitude of recent price changes to evaluate + overbought or oversold conditions in the price of a stock or other asset. +

+ +* **Parameters** + + dataset : pd.DataFrame + The dataset you wish to calculate for + target_column : str + The column you wish to add the RSI to + period : int + Time Span + +* **Returns** + + pd.DataFrame: + Dataframe with added RSI column diff --git a/website/content/SDK/forecast/season/_index.md b/website/content/SDK/forecast/season/_index.md deleted file mode 100644 index 82317177557..00000000000 --- a/website/content/SDK/forecast/season/_index.md +++ /dev/null @@ -1,21 +0,0 @@ -## Get underlying data -### forecast.season(data: pandas.core.frame.DataFrame, column: str = 'close', export: str = '', m: Optional[int] = None, max_lag: int = 24, alpha: float = 0.05, external_axes: Optional[List[axes]] = None) - -Plot seasonality from a dataset - - Parameters - ---------- - data: pd.DataFrame - The dataframe to plot - column: str - The column of the dataframe to analyze - export: str - Format to export image - m: Optional[int] - Optionally, a time lag to highlight on the plot. Default is none. - max_lag: int - The maximal lag order to consider. Default is 24. - alpha: float - The confidence interval to display. Default is 0.05. - external_axes:Optional[List[plt.axes]] - External axes to plot on diff --git a/website/content/SDK/forecast/season/_index.rst b/website/content/SDK/forecast/season/_index.rst new file mode 100644 index 00000000000..642a85c89ae --- /dev/null +++ b/website/content/SDK/forecast/season/_index.rst @@ -0,0 +1,47 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forecast.season( + data: pandas.core.frame.DataFrame, + column: str = 'close', + export: str = '', + m: Optional[int] = None, + max_lag: int = 24, + alpha: float = 0.05, + external_axes: Optional[List[axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Plot seasonality from a dataset +

+ +* **Parameters** + + data: pd.DataFrame + The dataframe to plot + column: str + The column of the dataframe to analyze + export: str + Format to export image + m: Optional[int] + Optionally, a time lag to highlight on the plot. Default is none. + max_lag: int + The maximal lag order to consider. Default is 24. + alpha: float + The confidence interval to display. Default is 0.05. + external_axes:Optional[List[plt.axes]] + External axes to plot on diff --git a/website/content/SDK/forecast/show/_index.md b/website/content/SDK/forecast/show/_index.md deleted file mode 100644 index 2cd21a38a19..00000000000 --- a/website/content/SDK/forecast/show/_index.md +++ /dev/null @@ -1,11 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### forecast.show(data: pandas.core.frame.DataFrame, limit: int = 15, limit_col: int = 10, name: str = '', export: str = '') - - - -## Getting charts -### forecast.show(data: pandas.core.frame.DataFrame, limit: int = 15, limit_col: int = 10, name: str = '', export: str = '', chart=True) - - diff --git a/website/content/SDK/forecast/show/_index.rst b/website/content/SDK/forecast/show/_index.rst new file mode 100644 index 00000000000..6dab6568fcb --- /dev/null +++ b/website/content/SDK/forecast/show/_index.rst @@ -0,0 +1,23 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ + +| + +.. raw:: html + +

+ > Getting charts +

+ diff --git a/website/content/SDK/forecast/signal/_index.md b/website/content/SDK/forecast/signal/_index.md deleted file mode 100644 index 9ee1553b493..00000000000 --- a/website/content/SDK/forecast/signal/_index.md +++ /dev/null @@ -1,17 +0,0 @@ -## Get underlying data -### forecast.signal(dataset: pandas.core.frame.DataFrame, target_column: str = 'close') -> pandas.core.frame.DataFrame - -A price signal based on short/long term price. - - 1 if the signal is that short term price will go up as compared to the long term. - 0 if the signal is that short term price will go down as compared to the long term. - - Parameters - ---------- - dataset : pd.DataFrame - The dataset you wish to calculate with - - Returns - ------- - pd.DataFrame: - Dataframe with added signal column diff --git a/website/content/SDK/forecast/signal/_index.rst b/website/content/SDK/forecast/signal/_index.rst new file mode 100644 index 00000000000..5b665469714 --- /dev/null +++ b/website/content/SDK/forecast/signal/_index.rst @@ -0,0 +1,38 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forecast.signal( + dataset: pandas.core.frame.DataFrame, + target_column: str = 'close', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ A price signal based on short/long term price. + + 1 if the signal is that short term price will go up as compared to the long term. + 0 if the signal is that short term price will go down as compared to the long term. +

+ +* **Parameters** + + dataset : pd.DataFrame + The dataset you wish to calculate with + +* **Returns** + + pd.DataFrame: + Dataframe with added signal column diff --git a/website/content/SDK/forecast/sto/_index.md b/website/content/SDK/forecast/sto/_index.md deleted file mode 100644 index 2c004bb477f..00000000000 --- a/website/content/SDK/forecast/sto/_index.md +++ /dev/null @@ -1,20 +0,0 @@ -## Get underlying data -### forecast.sto(dataset: pandas.core.frame.DataFrame, close_column: str = 'close', high_column: str = 'high', low_column: str = 'low', period: int = 10) -> pandas.core.frame.DataFrame - -Stochastic Oscillator %K and %D : A stochastic oscillator is a momentum indicator comparing a particular closing - price of a security to a range of its prices over a certain period of time. %K and %D are slow and fast indicators. - - Requires Low/High/Close columns. - Note: This will drop first rows equal to period due to how this metric is calculated. - - Parameters - ---------- - dataset : pd.DataFrame - The dataset you wish to calculate for - period : int - Span - - Returns - ------- - pd.DataFrame: - Dataframe with added STO K & D columns diff --git a/website/content/SDK/forecast/sto/_index.rst b/website/content/SDK/forecast/sto/_index.rst new file mode 100644 index 00000000000..36bf3d1bcb0 --- /dev/null +++ b/website/content/SDK/forecast/sto/_index.rst @@ -0,0 +1,44 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forecast.sto( + dataset: pandas.core.frame.DataFrame, + close_column: str = 'close', + high_column: str = 'high', + low_column: str = 'low', + period: int = 10, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Stochastic Oscillator %K and %D : A stochastic oscillator is a momentum indicator comparing a particular closing + price of a security to a range of its prices over a certain period of time. %K and %D are slow and fast indicators. + + Requires Low/High/Close columns. + Note: This will drop first rows equal to period due to how this metric is calculated. +

+ +* **Parameters** + + dataset : pd.DataFrame + The dataset you wish to calculate for + period : int + Span + +* **Returns** + + pd.DataFrame: + Dataframe with added STO K & D columns diff --git a/website/content/SDK/forecast/tcn/_index.md b/website/content/SDK/forecast/tcn/_index.md deleted file mode 100644 index a9b637f41af..00000000000 --- a/website/content/SDK/forecast/tcn/_index.md +++ /dev/null @@ -1,120 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### forecast.tcn(data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], target_column: str = 'close', n_predict: int = 5, past_covariates: str = None, train_split: float = 0.85, forecast_horizon: int = 5, input_chunk_length: int = 14, output_chunk_length: int = 5, dropout: float = 0.1, num_filters: int = 6, weight_norm: bool = True, dilation_base: int = 2, n_epochs: int = 100, learning_rate: float = 0.001, batch_size: int = 800, model_save_name: str = 'tcn_model', force_reset: bool = True, save_checkpoints: bool = True) -> Tuple[List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], Optional[float], Any] - -Perform TCN forecasting - - Args: - data (Union[pd.Series, pd.DataFrame]): - Input Data - target_column (str, optional): - Target column to forecast. Defaults to "close". - n_predict (int, optional): - Days to predict. Defaults to 5. - train_split (float, optional): - Train/val split. Defaults to 0.85. - past_covariates (str, optional): - Multiple secondary columns to factor in when forecasting. Defaults to None. - forecast_horizon (int, optional): - Forecast horizon when performing historical forecasting. Defaults to 5. - input_chunk_length (int, optional): - Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. - output_chunk_length (int, optional): - The length of the forecast of the model. Defaults to 5. - dropout (float, optional): - Fraction of neurons afected by Dropout. Defaults to 0.1. - num_filters (int, optional): - The number of filters in a convolutional layer of the TCN. Defaults to 6. - weight_norm (bool, optional): - Boolean value indicating whether to use weight normalization. Defaults to True. - dilation_base (int, optional): - The base of the exponent that will determine the dilation on every level. Defaults to 2. - batch_size (int, optional): - Number of time series (input and output sequences) used in each training pass. Defaults to 32. - n_epochs (int, optional): - Number of epochs over which to train the model. Defaults to 100. - learning_rate (float, optional): - Defaults to 1e-3. - model_save_name (str, optional): - Name for model. Defaults to "brnn_model". - force_reset (bool, optional): - If set to True, any previously-existing model with the same name will be reset - (all checkpoints will be discarded). Defaults to True. - save_checkpoints (bool, optional): - Whether or not to automatically save the untrained model and checkpoints from training. - Defaults to True. - - Returns: - List[TimeSeries] - Adjusted Data series - List[TimeSeries] - Historical forecast by best RNN model - List[TimeSeries] - list of Predictions - Optional[float] - Mean average precision error - Any - Best TCN Model - -## Getting charts -### forecast.tcn(data: Union[pandas.core.frame.DataFrame, pandas.core.series.Series], target_column: str = 'close', dataset_name: str = '', n_predict: int = 5, past_covariates: str = None, train_split: float = 0.85, forecast_horizon: int = 5, input_chunk_length: int = 14, output_chunk_length: int = 5, dropout: float = 0.1, num_filters: int = 6, weight_norm: bool = True, dilation_base: int = 2, n_epochs: int = 100, learning_rate: float = 0.001, batch_size: int = 800, model_save_name: str = 'tcn_model', force_reset: bool = True, save_checkpoints: bool = True, export: str = '', residuals: bool = False, forecast_only: bool = False, start_date: Optional[datetime.datetime] = None, end_date: Optional[datetime.datetime] = None, naive: bool = False, export_pred_raw: bool = False, external_axes: Optional[List[axes]] = None, chart=True) - -Display TCN forecast - - Parameters - ---------- - data (Union[pd.Series, pd.DataFrame]): - Input Data - target_column (str, optional): - Target column to forecast. Defaults to "close". - dataset_name str - The name of the ticker to be predicted - n_predict (int, optional): - Days to predict. Defaults to 5. - train_split (float, optional): - Train/val split. Defaults to 0.85. - past_covariates (str, optional): - Multiple secondary columns to factor in when forecasting. Defaults to None. - forecast_horizon (int, optional): - Forecast horizon when performing historical forecasting. Defaults to 5. - input_chunk_length (int, optional): - Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. - output_chunk_length (int, optional): - The length of the forecast of the model. Defaults to 5. - dropout (float, optional): - Fraction of neurons afected by Dropout. Defaults to 0.1. - num_filters (int, optional): - The number of filters in a convolutional layer of the TCN. Defaults to 6. - weight_norm (bool, optional): - Boolean value indicating whether to use weight normalization. Defaults to True. - dilation_base (int, optional): - The base of the exponent that will determine the dilation on every level. Defaults to 2. - batch_size (int, optional): - Number of time series (input and output sequences) used in each training pass. Defaults to 32. - n_epochs (int, optional): - Number of epochs over which to train the model. Defaults to 100. - learning_rate (float, optional): - Defaults to 1e-3. - model_save_name (str, optional): - Name for model. Defaults to "brnn_model". - force_reset (bool, optional): - If set to True, any previously-existing model with the same name will be reset - (all checkpoints will be discarded). Defaults to True. - save_checkpoints (bool, optional): - Whether or not to automatically save the untrained model and checkpoints from training. Defaults to True. - export: str - Format to export data - residuals: bool - Whether to show residuals for the model. Defaults to False. - forecast_only: bool - Whether to only show dates in the forecasting range. Defaults to False. - start_date: Optional[datetime] - The starting date to perform analysis, data before this is trimmed. Defaults to None. - end_date: Optional[datetime] - The ending date to perform analysis, data after this is trimmed. Defaults to None. - naive: bool - Whether to show the naive baseline. This just assumes the closing price will be the same - as the previous day's closing price. Defaults to False. - external_axes:Optional[List[plt.axes]] - External axes to plot on diff --git a/website/content/SDK/forecast/tcn/_index.rst b/website/content/SDK/forecast/tcn/_index.rst new file mode 100644 index 00000000000..e5f3944dbf3 --- /dev/null +++ b/website/content/SDK/forecast/tcn/_index.rst @@ -0,0 +1,207 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forecast.tcn( + data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], + target_column: str = 'close', + n_predict: int = 5, + past_covariates: str = None, + train_split: float = 0.85, + forecast_horizon: int = 5, + input_chunk_length: int = 14, + output_chunk_length: int = 5, + dropout: float = 0.1, + num_filters: int = 6, + weight_norm: bool = True, + dilation_base: int = 2, + n_epochs: int = 100, + learning_rate: float = 0.001, + batch_size: int = 800, + model_save_name: str = 'tcn_model', + force_reset: bool = True, + save_checkpoints: bool = True, + chart: bool = False, +) -> Tuple[List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], Optional[float], Any] +{{< /highlight >}} + +.. raw:: html + +

+ Perform TCN forecasting +

+ +* **Parameters** + + data: Union[pd.Series, pd.DataFrame] + Input Data + target_column: str + Target column to forecast. Defaults to "close". + n_predict: int + Days to predict. Defaults to 5. + train_split: float + Train/val split. Defaults to 0.85. + past_covariates: str + Multiple secondary columns to factor in when forecasting. Defaults to None. + forecast_horizon: int + Forecast horizon when performing historical forecasting. Defaults to 5. + input_chunk_length: int + Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. + output_chunk_length: int + The length of the forecast of the model. Defaults to 5. + dropout: float + Fraction of neurons affected by Dropout. Defaults to 0.1. + num_filters: int + The number of filters in a convolutional layer of the TCN. Defaults to 6. + weight_norm: bool + Boolean value indicating whether to use weight normalization. Defaults to True. + dilation_base: int + The base of the exponent that will determine the dilation on every level. Defaults to 2. + batch_size: int + Number of time series (input and output sequences) used in each training pass. Defaults to 32. + n_epochs: int + Number of epochs over which to train the model. Defaults to 100. + learning_rate: float + Defaults to 1e-3. + model_save_name: str + Name for model. Defaults to "brnn_model". + force_reset: bool + If set to True, any previously-existing model with the same name will be reset + (all checkpoints will be discarded). Defaults to True. + save_checkpoints: bool + Whether or not to automatically save the untrained model and checkpoints from training. + Defaults to True. + chart: *bool* + Flag to display chart + + +* **Returns** + + List[TimeSeries] + Adjusted Data series + List[TimeSeries] + Historical forecast by best RNN model + List[TimeSeries] + list of Predictions + Optional[float] + Mean average precision error + Any + Best TCN Model + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +forecast.tcn( + data: Union[pandas.core.frame.DataFrame, pandas.core.series.Series], + target_column: str = 'close', + dataset_name: str = '', + n_predict: int = 5, + past_covariates: str = None, + train_split: float = 0.85, + forecast_horizon: int = 5, + input_chunk_length: int = 14, + output_chunk_length: int = 5, + dropout: float = 0.1, + num_filters: int = 6, + weight_norm: bool = True, + dilation_base: int = 2, + n_epochs: int = 100, + learning_rate: float = 0.001, + batch_size: int = 800, + model_save_name: str = 'tcn_model', + force_reset: bool = True, + save_checkpoints: bool = True, + export: str = '', + residuals: bool = False, + forecast_only: bool = False, + start_date: Optional[datetime.datetime] = None, + end_date: Optional[datetime.datetime] = None, + naive: bool = False, + export_pred_raw: bool = False, + external_axes: Optional[List[axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display TCN forecast +

+ +* **Parameters** + + data: Union[pd.Series, pd.DataFrame] + Input Data + target_column: str + Target column to forecast. Defaults to "close". + dataset_name: str + The name of the ticker to be predicted + n_predict: int + Days to predict. Defaults to 5. + train_split: float + Train/val split. Defaults to 0.85. + past_covariates: str + Multiple secondary columns to factor in when forecasting. Defaults to None. + forecast_horizon: int + Forecast horizon when performing historical forecasting. Defaults to 5. + input_chunk_length: int + Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. + output_chunk_length: int + The length of the forecast of the model. Defaults to 5. + dropout: float + Fraction of neurons affected by Dropout. Defaults to 0.1. + num_filters: int + The number of filters in a convolutional layer of the TCN. Defaults to 6. + weight_norm: bool + Boolean value indicating whether to use weight normalization. Defaults to True. + dilation_base: int + The base of the exponent that will determine the dilation on every level. Defaults to 2. + batch_size: int + Number of time series (input and output sequences) used in each training pass. Defaults to 32. + n_epochs: int + Number of epochs over which to train the model. Defaults to 100. + learning_rate: float + Defaults to 1e-3. + model_save_name: str + Name for model. Defaults to "brnn_model". + force_reset: bool + If set to True, any previously-existing model with the same name will be reset + (all checkpoints will be discarded). Defaults to True. + save_checkpoints: bool + Whether or not to automatically save the untrained model and checkpoints from training. Defaults to True. + export: str + Format to export data + residuals: bool + Whether to show residuals for the model. Defaults to False. + forecast_only: bool + Whether to only show dates in the forecasting range. Defaults to False. + start_date: Optional[datetime] + The starting date to perform analysis, data before this is trimmed. Defaults to None. + end_date: Optional[datetime] + The ending date to perform analysis, data after this is trimmed. Defaults to None. + naive: bool + Whether to show the naive baseline. This just assumes the closing price will be the same + as the previous day's closing price. Defaults to False. + external_axes: Optional[List[plt.axes]] + External axes to plot on + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/forecast/tft/_index.md b/website/content/SDK/forecast/tft/_index.rst similarity index 69% rename from website/content/SDK/forecast/tft/_index.md rename to website/content/SDK/forecast/tft/_index.rst index a7b42c7caa4..c4a6648305b 100644 --- a/website/content/SDK/forecast/tft/_index.md +++ b/website/content/SDK/forecast/tft/_index.rst @@ -1,18 +1,56 @@ -To obtain charts, make sure to add `chart=True` as the last parameter +.. role:: python(code) + :language: python + :class: highlight -## Get underlying data -### forecast.tft(data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], target_column: str = 'close', n_predict: int = 5, past_covariates: str = None, train_split: float = 0.85, forecast_horizon: int = 5, input_chunk_length: int = 14, output_chunk_length: int = 5, hidden_size: int = 16, lstm_layers: int = 1, num_attention_heads: int = 4, full_attention: bool = False, dropout: float = 0.1, hidden_continuous_size: int = 8, n_epochs: int = 200, batch_size: int = 32, model_save_name: str = 'tft_model', force_reset: bool = True, save_checkpoints: bool = True) -> Tuple[List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], Optional[float], Any] +| -Performs Temporal Fusion Transformer forecasting +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forecast.tft( + data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], + target_column: str = 'close', + n_predict: int = 5, + past_covariates: str = None, + train_split: float = 0.85, + forecast_horizon: int = 5, + input_chunk_length: int = 14, + output_chunk_length: int = 5, + hidden_size: int = 16, + lstm_layers: int = 1, + num_attention_heads: int = 4, + full_attention: bool = False, + dropout: float = 0.1, + hidden_continuous_size: int = 8, + n_epochs: int = 200, + batch_size: int = 32, + model_save_name: str = 'tft_model', + force_reset: bool = True, + save_checkpoints: bool = True, + chart: bool = False, +) -> Tuple[List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], Optional[float], Any] +{{< /highlight >}} + +.. raw:: html + +

+ Performs Temporal Fusion Transformer forecasting The TFT applies multi-head attention queries on future inputs from mandatory future_covariates. Specifying future encoders with add_encoders (read below) can automatically generate future covariates and allows to use the model without having to pass any future_covariates to fit() and predict(). https://unit8co.github.io/darts/generated_api/darts.models.forecasting.tft_model.html +

+ +* **Parameters** - Parameters - ---------- data (Union[pd.Series, pd.DataFrame]): Input Data target_column (str, optional): @@ -54,11 +92,12 @@ Performs Temporal Fusion Transformer forecasting save_checkpoints (bool, optional): Whether or not to automatically save the untrained model and checkpoints from training. Defaults to True. + chart: *bool* + Flag to display chart +* **Returns** - Returns - ------- List[float] Adjusted Data series List[float] @@ -70,13 +109,56 @@ Performs Temporal Fusion Transformer forecasting Any Fit Prob. TFT model object. -## Getting charts -### forecast.tft(data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], target_column: str = 'close', dataset_name: str = '', n_predict: int = 5, past_covariates: str = None, train_split: float = 0.85, forecast_horizon: int = 5, input_chunk_length: int = 14, output_chunk_length: int = 5, hidden_size: int = 16, lstm_layers: int = 1, num_attention_heads: int = 4, full_attention: bool = False, dropout: float = 0.1, hidden_continuous_size: int = 8, n_epochs: int = 200, batch_size: int = 32, model_save_name: str = 'tft_model', force_reset: bool = True, save_checkpoints: bool = True, export: str = '', residuals: bool = False, forecast_only: bool = False, start_date: Optional[datetime.datetime] = None, end_date: Optional[datetime.datetime] = None, naive: bool = False, export_pred_raw: bool = False, external_axes: Optional[List[axes]] = None, chart=True) +| -Display Temporal Fusion Transformer forecast +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +forecast.tft( + data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], + target_column: str = 'close', + dataset_name: str = '', + n_predict: int = 5, + past_covariates: str = None, + train_split: float = 0.85, + forecast_horizon: int = 5, + input_chunk_length: int = 14, + output_chunk_length: int = 5, + hidden_size: int = 16, + lstm_layers: int = 1, + num_attention_heads: int = 4, + full_attention: bool = False, + dropout: float = 0.1, + hidden_continuous_size: int = 8, + n_epochs: int = 200, + batch_size: int = 32, + model_save_name: str = 'tft_model', + force_reset: bool = True, + save_checkpoints: bool = True, + export: str = '', + residuals: bool = False, + forecast_only: bool = False, + start_date: Optional[datetime.datetime] = None, + end_date: Optional[datetime.datetime] = None, + naive: bool = False, + export_pred_raw: bool = False, + external_axes: Optional[List[axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display Temporal Fusion Transformer forecast +

+ +* **Parameters** - Parameters - ---------- data (Union[pd.Series, pd.DataFrame]): Input Data target_column (str, optional): @@ -133,3 +215,6 @@ Display Temporal Fusion Transformer forecast as the previous day's closing price. Defaults to False. external_axes:Optional[List[plt.axes]] External axes to plot on + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/forecast/theta/_index.md b/website/content/SDK/forecast/theta/_index.rst similarity index 60% rename from website/content/SDK/forecast/theta/_index.md rename to website/content/SDK/forecast/theta/_index.rst index 9d26dc0d593..d2dd5f80de2 100644 --- a/website/content/SDK/forecast/theta/_index.md +++ b/website/content/SDK/forecast/theta/_index.rst @@ -1,15 +1,41 @@ -To obtain charts, make sure to add `chart=True` as the last parameter +.. role:: python(code) + :language: python + :class: highlight -## Get underlying data -### forecast.theta(data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], target_column: str = 'close', seasonal: str = 'M', seasonal_periods: int = 7, n_predict: int = 5, start_window: float = 0.85, forecast_horizon: int = 5) -> Tuple[List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], float, float, Any] +| -Performs Theta forecasting +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forecast.theta( + data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], + target_column: str = 'close', + seasonal: str = 'M', + seasonal_periods: int = 7, + n_predict: int = 5, + start_window: float = 0.85, + forecast_horizon: int = 5, + chart: bool = False, +) -> Tuple[List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], float, float, Any] +{{< /highlight >}} + +.. raw:: html + +

+ Performs Theta forecasting An implementation of the 4Theta method with configurable theta parameter. https://unit8co.github.io/darts/generated_api/darts.models.forecasting.theta.html +

+ +* **Parameters** - Parameters - ---------- data : Union[pd.Series, np.ndarray] Input data. target_column (str, optional): @@ -26,9 +52,12 @@ Performs Theta forecasting Size of sliding window from start of timeseries and onwards forecast_horizon: int Number of days to forecast when backtesting and retraining historical + chart: *bool* + Flag to display chart + + +* **Returns** - Returns - ------- List[TimeSeries] Adjusted Data series List[TimeSeries] @@ -42,13 +71,44 @@ Performs Theta forecasting Any Theta Model -## Getting charts -### forecast.theta(data: Union[pandas.core.frame.DataFrame, pandas.core.series.Series], target_column: str = 'close', dataset_name: str = '', seasonal: str = 'M', seasonal_periods: int = 7, n_predict: int = 5, start_window: float = 0.85, forecast_horizon: int = 5, export: str = '', residuals: bool = False, forecast_only: bool = False, start_date: Optional[datetime.datetime] = None, end_date: Optional[datetime.datetime] = None, naive: bool = False, export_pred_raw: bool = False, external_axes: Optional[List[axes]] = None, chart=True) +| -Display Theta forecast +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +forecast.theta( + data: Union[pandas.core.frame.DataFrame, pandas.core.series.Series], + target_column: str = 'close', + dataset_name: str = '', + seasonal: str = 'M', + seasonal_periods: int = 7, + n_predict: int = 5, + start_window: float = 0.85, + forecast_horizon: int = 5, + export: str = '', + residuals: bool = False, + forecast_only: bool = False, + start_date: Optional[datetime.datetime] = None, + end_date: Optional[datetime.datetime] = None, + naive: bool = False, + export_pred_raw: bool = False, + external_axes: Optional[List[axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display Theta forecast +

+ +* **Parameters** - Parameters - ---------- data : Union[pd.Series, np.array] Data to forecast target_column (str, optional): @@ -82,3 +142,6 @@ Display Theta forecast as the previous day's closing price. Defaults to False. external_axes:Optional[List[plt.axes]] External axes to plot on + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/forecast/trans/_index.md b/website/content/SDK/forecast/trans/_index.md deleted file mode 100644 index 08a14fc1a0a..00000000000 --- a/website/content/SDK/forecast/trans/_index.md +++ /dev/null @@ -1,130 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### forecast.trans(data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], target_column: str = 'close', n_predict: int = 5, train_split: float = 0.85, past_covariates: str = None, forecast_horizon: int = 5, input_chunk_length: int = 14, output_chunk_length: int = 5, d_model: int = 64, nhead: int = 4, num_encoder_layers: int = 3, num_decoder_layers: int = 3, dim_feedforward: int = 512, activation: str = 'relu', dropout: float = 0.0, batch_size: int = 32, n_epochs: int = 100, learning_rate: float = 0.001, model_save_name: str = 'trans_model', force_reset: bool = True, save_checkpoints: bool = True) -> Tuple[List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], Optional[float], Any] - -Performs Transformer forecasting - - Args: - data (Union[pd.Series, pd.DataFrame]): - Input Data - n_predict (int, optional): - Days to predict. Defaults to 5. - target_column (str, optional): - Target column to forecast. Defaults to "close". - train_split (float, optional): - Train/val split. Defaults to 0.85. - past_covariates (str, optional): - Multiple secondary columns to factor in when forecasting. Defaults to None. - forecast_horizon (int, optional): - Forecast horizon when performing historical forecasting. Defaults to 5. - input_chunk_length (int, optional): - Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. - output_chunk_length (int, optional): - The length of the forecast of the model. Defaults to 5. - d_model (int): - The number of expected features in the encoder/decoder inputs. Defaults to 64. - nhead (int): - The number of heads in the multi-head attention mechanism. Defaults to 4. - num_encoder_layers (int): - The number of encoder layers in the encoder. Defaults to 3. - num_decoder_layers (int): - The number of decoder layers in the encoder. Defaults to 3. - dim_feedforward (int): - The dimension of the feedforward network model. Defaults to 512. - activation (str): - The activation function of encoder/decoder intermediate layer, ‘relu’ or ‘gelu’. Defaults to 'relu'. - dropout (float, optional): - Fraction of neurons afected by Dropout. Defaults to 0.0. - batch_size (int, optional): - Number of time series (input and output sequences) used in each training pass. Defaults to 32. - n_epochs (int, optional): - Number of epochs over which to train the model. Defaults to 100. - learning_rate (float, optional): - Defaults to 1e-3. - model_save_name (str, optional): - Name for model. Defaults to "brnn_model". - force_reset (bool, optional): - If set to True, any previously-existing model with the same name will be reset (all checkpoints will be - discarded). Defaults to True. - save_checkpoints (bool, optional): - Whether or not to automatically save the untrained model and checkpoints from training. Defaults to True. - - Returns: - List[TimeSeries] - Adjusted Data series - List[TimeSeries] - Historical forecast by best RNN model - List[TimeSeries] - list of Predictions - Optional[float] - Mean average precision error - Any - Best transformer Model - -## Getting charts -### forecast.trans(data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], target_column: str = 'close', dataset_name: str = '', n_predict: int = 5, past_covariates: str = None, train_split: float = 0.85, forecast_horizon: int = 5, input_chunk_length: int = 14, output_chunk_length: int = 5, d_model: int = 64, nhead: int = 4, num_encoder_layers: int = 3, num_decoder_layers: int = 3, dim_feedforward: int = 512, activation: str = 'relu', dropout: float = 0.1, batch_size: int = 16, n_epochs: int = 100, learning_rate: float = 0.001, model_save_name: str = 'trans_model', force_reset: bool = True, save_checkpoints: bool = True, export: str = '', residuals: bool = False, forecast_only: bool = False, start_date: Optional[datetime.datetime] = None, end_date: Optional[datetime.datetime] = None, naive: bool = False, export_pred_raw: bool = False, external_axes: Optional[List[axes]] = None, chart=True) - -Display Transformer forecast - - Parameters - ---------- - data (Union[pd.Series, pd.DataFrame]): - Input Data - dataset_name str - The name of the ticker to be predicted - n_predict (int, optional): - Days to predict. Defaults to 5. - target_column (str, optional): - Target column to forecast. Defaults to "close". - train_split (float, optional): - Train/val split. Defaults to 0.85. - past_covariates (str, optional): - Multiple secondary columns to factor in when forecasting. Defaults to None. - forecast_horizon (int, optional): - Forecast horizon when performing historical forecasting. Defaults to 5. - input_chunk_length (int, optional): - Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. - output_chunk_length (int, optional): - The length of the forecast of the model. Defaults to 5. - d_model (int): - The number of expected features in the encoder/decoder inputs. Defaults to 64. - nhead (int): - The number of heads in the multi-head attention mechanism. Defaults to 4. - num_encoder_layers (int): - The number of encoder layers in the encoder. Defaults to 3. - num_decoder_layers (int): - The number of decoder layers in the encoder. Defaults to 3. - dim_feedforward (int): - The dimension of the feedforward network model. Defaults to 512. - activation (str): - The activation function of encoder/decoder intermediate layer, ‘relu’ or ‘gelu’. Defaults to 'relu'. - dropout (float, optional): - Fraction of neurons afected by Dropout. Defaults to 0.1. - batch_size (int, optional): - Number of time series (input and output sequences) used in each training pass. Defaults to 32. - n_epochs (int, optional): - Number of epochs over which to train the model. Defaults to 100. - model_save_name (str, optional): - Name for model. Defaults to "brnn_model". - force_reset (bool, optional): - If set to True, any previously-existing model with the same name will be reset - (all checkpoints will be discarded). Defaults to True. - save_checkpoints (bool, optional): - Whether or not to automatically save the untrained model and checkpoints from training. - Defaults to True. - export: str - Format to export data - residuals: bool - Whether to show residuals for the model. Defaults to False. - forecast_only: bool - Whether to only show dates in the forecasting range. Defaults to False. - start_date: Optional[datetime] - The starting date to perform analysis, data before this is trimmed. Defaults to None. - end_date: Optional[datetime] - The ending date to perform analysis, data after this is trimmed. Defaults to None. - naive: bool - Whether to show the naive baseline. This just assumes the closing price will be the same - as the previous day's closing price. Defaults to False. - external_axes:Optional[List[plt.axes]] - External axes to plot on diff --git a/website/content/SDK/forecast/trans/_index.rst b/website/content/SDK/forecast/trans/_index.rst new file mode 100644 index 00000000000..5002f1043d7 --- /dev/null +++ b/website/content/SDK/forecast/trans/_index.rst @@ -0,0 +1,223 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forecast.trans( + data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], + target_column: str = 'close', + n_predict: int = 5, + train_split: float = 0.85, + past_covariates: str = None, + forecast_horizon: int = 5, + input_chunk_length: int = 14, + output_chunk_length: int = 5, + d_model: int = 64, + nhead: int = 4, + num_encoder_layers: int = 3, + num_decoder_layers: int = 3, + dim_feedforward: int = 512, + activation: str = 'relu', + dropout: float = 0.0, + batch_size: int = 32, + n_epochs: int = 100, + learning_rate: float = 0.001, + model_save_name: str = 'trans_model', + force_reset: bool = True, + save_checkpoints: bool = True, + chart: bool = False, +) -> Tuple[List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], Optional[float], Any] +{{< /highlight >}} + +.. raw:: html + +

+ Performs Transformer forecasting +

+ +* **Parameters** + + data: Union[pd.Series, pd.DataFrame] + Input Data + n_predict: int + Days to predict. Defaults to 5. + target_column: str + Target column to forecast. Defaults to "close". + train_split: float + Train/val split. Defaults to 0.85. + past_covariates: str + Multiple secondary columns to factor in when forecasting. Defaults to None. + forecast_horizon: int + Forecast horizon when performing historical forecasting. Defaults to 5. + input_chunk_length: int + Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. + output_chunk_length: int + The length of the forecast of the model. Defaults to 5. + d_model: int + The number of expected features in the encoder/decoder inputs. Defaults to 64. + nhead: int + The number of heads in the multi-head attention mechanism. Defaults to 4. + num_encoder_layers: int + The number of encoder layers in the encoder. Defaults to 3. + num_decoder_layers: int + The number of decoder layers in the encoder. Defaults to 3. + dim_feedforward: int + The dimension of the feedforward network model. Defaults to 512. + activation: str + The activation function of encoder/decoder intermediate layer, ‘relu’ or ‘gelu’. Defaults to 'relu'. + dropout: float + Fraction of neurons afected by Dropout. Defaults to 0.0. + batch_size: int + Number of time series (input and output sequences) used in each training pass. Defaults to 32. + n_epochs: int + Number of epochs over which to train the model. Defaults to 100. + learning_rate: float + Defaults to 1e-3. + model_save_name: str + Name for model. Defaults to "brnn_model". + force_reset: bool + If set to True, any previously-existing model with the same name will be reset (all checkpoints will be + discarded). Defaults to True. + save_checkpoints: bool + Whether or not to automatically save the untrained model and checkpoints from training. Defaults to True. + chart: *bool* + Flag to display chart + + +* **Returns** + + List[TimeSeries] + Adjusted Data series + List[TimeSeries] + Historical forecast by best RNN model + List[TimeSeries] + list of Predictions + Optional[float] + Mean average precision error + Any + Best transformer Model + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +forecast.trans( + data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], + target_column: str = 'close', + dataset_name: str = '', + n_predict: int = 5, + past_covariates: str = None, + train_split: float = 0.85, + forecast_horizon: int = 5, + input_chunk_length: int = 14, + output_chunk_length: int = 5, + d_model: int = 64, + nhead: int = 4, + num_encoder_layers: int = 3, + num_decoder_layers: int = 3, + dim_feedforward: int = 512, + activation: str = 'relu', + dropout: float = 0.1, + batch_size: int = 16, + n_epochs: int = 100, + learning_rate: float = 0.001, + model_save_name: str = 'trans_model', + force_reset: bool = True, + save_checkpoints: bool = True, + export: str = '', + residuals: bool = False, + forecast_only: bool = False, + start_date: Optional[datetime.datetime] = None, + end_date: Optional[datetime.datetime] = None, + naive: bool = False, + export_pred_raw: bool = False, + external_axes: Optional[List[axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display Transformer forecast +

+ +* **Parameters** + + data: Union[pd.Series, pd.DataFrame] + Input Data + dataset_name: str + The name of the ticker to be predicted + n_predict: int + Days to predict. Defaults to 5. + target_column: str + Target column to forecast. Defaults to "close". + train_split: float + Train/val split. Defaults to 0.85. + past_covariates: str + Multiple secondary columns to factor in when forecasting. Defaults to None. + forecast_horizon: int + Forecast horizon when performing historical forecasting. Defaults to 5. + input_chunk_length: int + Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. + output_chunk_length: int + The length of the forecast of the model. Defaults to 5. + d_model: int + The number of expected features in the encoder/decoder inputs. Defaults to 64. + nhead: int + The number of heads in the multi-head attention mechanism. Defaults to 4. + num_encoder_layers: int + The number of encoder layers in the encoder. Defaults to 3. + num_decoder_layers: int + The number of decoder layers in the encoder. Defaults to 3. + dim_feedforward: int + The dimension of the feedforward network model. Defaults to 512. + activation: str + The activation function of encoder/decoder intermediate layer, ‘relu’ or ‘gelu’. Defaults to 'relu'. + dropout: float + Fraction of neurons affected by Dropout. Defaults to 0.1. + batch_size\_: int + Number of time series (input and output sequences) used in each training pass. Defaults to 32. + n_epochs: int + Number of epochs over which to train the model. Defaults to 100. + model_save_name: str + Name for model. Defaults to "brnn_model". + force_reset: bool + If set to True, any previously-existing model with the same name will be reset + (all checkpoints will be discarded). Defaults to True. + save_checkpoints: bool + Whether or not to automatically save the untrained model and checkpoints from training. + Defaults to True. + export: str + Format to export data + residuals: bool + Whether to show residuals for the model. Defaults to False. + forecast_only: bool + Whether to only show dates in the forecasting range. Defaults to False. + start_date: Optional[datetime] + The starting date to perform analysis, data before this is trimmed. Defaults to None. + end_date: Optional[datetime] + The ending date to perform analysis, data after this is trimmed. Defaults to None. + naive: bool + Whether to show the naive baseline. This just assumes the closing price will be the same + as the previous day's closing price. Defaults to False. + external_axes: Optional[List[plt.axes]] + External axes to plot on + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/forex/candle/_index.md b/website/content/SDK/forex/candle/_index.md deleted file mode 100644 index 86c7a8955a9..00000000000 --- a/website/content/SDK/forex/candle/_index.md +++ /dev/null @@ -1,17 +0,0 @@ -## Get underlying data -### forex.candle(data: pandas.core.frame.DataFrame, to_symbol: str = '', from_symbol: str = '', ma: Optional[Iterable[int]] = None, external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None) - -Show candle plot for fx data. - - Parameters - ---------- - data : pd.DataFrame - Loaded fx historical data - to_symbol : str - To forex symbol - from_symbol : str - From forex symbol - ma : Optional[Iterable[int]] - Moving averages - external_axes: Optional[List[plt.Axes]] - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/forex/candle/_index.rst b/website/content/SDK/forex/candle/_index.rst new file mode 100644 index 00000000000..0d23a925b82 --- /dev/null +++ b/website/content/SDK/forex/candle/_index.rst @@ -0,0 +1,41 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forex.candle( + data: pandas.core.frame.DataFrame, + to_symbol: str = '', + from_symbol: str = '', + ma: Optional[Iterable[int]] = None, + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Show candle plot for fx data. +

+ +* **Parameters** + + data : pd.DataFrame + Loaded fx historical data + to_symbol : str + To forex symbol + from_symbol : str + From forex symbol + ma : Optional[Iterable[int]] + Moving averages + external_axes: Optional[List[plt.Axes]] + External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/forex/get_currency_list/_index.md b/website/content/SDK/forex/get_currency_list/_index.md deleted file mode 100644 index 7728835bc06..00000000000 --- a/website/content/SDK/forex/get_currency_list/_index.md +++ /dev/null @@ -1,4 +0,0 @@ -## Get underlying data -### forex.get_currency_list() -> List - -Load AV currency codes from a local diff --git a/website/content/SDK/forex/get_currency_list/_index.rst b/website/content/SDK/forex/get_currency_list/_index.rst new file mode 100644 index 00000000000..d3900f6c25f --- /dev/null +++ b/website/content/SDK/forex/get_currency_list/_index.rst @@ -0,0 +1,21 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forex.get_currency_list() -> List +{{< /highlight >}} + +.. raw:: html + +

+ Load AV currency codes from a local file +

diff --git a/website/content/SDK/forex/hist/_index.md b/website/content/SDK/forex/hist/_index.md deleted file mode 100644 index debd71ea746..00000000000 --- a/website/content/SDK/forex/hist/_index.md +++ /dev/null @@ -1,22 +0,0 @@ -## Get underlying data -### forex.hist(to_symbol: str = 'USD', from_symbol: str = 'EUR', resolution: str = 'd', interval: int = 5, start_date: str = '') -> pandas.core.frame.DataFrame - -Get historical forex data. - - Parameters - ---------- - to_symbol : str - To forex symbol - from_symbol : str - From forex symbol - resolution : str, optional - Resolution of data. Can be "i", "d", "w", "m" for intraday, daily, weekly or monthly - interval : int, optional - Interval for intraday data - start_date : str, optional - Start date for data. - - Returns - ------- - pd.DataFrame - Historical data for forex pair diff --git a/website/content/SDK/forex/hist/_index.rst b/website/content/SDK/forex/hist/_index.rst new file mode 100644 index 00000000000..0a6571a5ad0 --- /dev/null +++ b/website/content/SDK/forex/hist/_index.rst @@ -0,0 +1,46 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forex.hist( + to_symbol: str = 'USD', + from_symbol: str = 'EUR', + resolution: str = 'd', + interval: int = 5, + start_date: str = '', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get historical forex data. +

+ +* **Parameters** + + to_symbol : str + To forex symbol + from_symbol : str + From forex symbol + resolution : str, optional + Resolution of data. Can be "i", "d", "w", "m" for intraday, daily, weekly or monthly + interval : int, optional + Interval for intraday data + start_date : str, optional + Start date for data. + +* **Returns** + + pd.DataFrame + Historical data for forex pair diff --git a/website/content/SDK/forex/load/_index.md b/website/content/SDK/forex/load/_index.rst similarity index 56% rename from website/content/SDK/forex/load/_index.md rename to website/content/SDK/forex/load/_index.rst index 45bfb03a4cb..299a52b07d5 100644 --- a/website/content/SDK/forex/load/_index.md +++ b/website/content/SDK/forex/load/_index.rst @@ -1,10 +1,36 @@ -## Get underlying data -### forex.load(to_symbol: str, from_symbol: str, resolution: str = 'd', interval: str = '1day', start_date: str = '2021-11-03', source: str = 'YahooFinance', verbose: bool = True) -> pandas.core.frame.DataFrame +.. role:: python(code) + :language: python + :class: highlight -Load forex for two given symbols. +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forex.load( + to_symbol: str, + from_symbol: str, + resolution: str = 'd', + interval: str = '1day', + start_date: str = '2021-11-08', + source: str = 'YahooFinance', + verbose: bool = True, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Load forex for two given symbols. +

+ +* **Parameters** - Parameters - ---------- to_symbol : str The from currency symbol. Ex: USD, EUR, GBP, YEN from_symbol : str @@ -20,7 +46,7 @@ Load forex for two given symbols. verbose : bool, optional Display verbose information on what was the pair that was loaded, by default True - Returns - ------- +* **Returns** + pd.DataFrame The loaded data diff --git a/website/content/SDK/forex/oanda/calendar/_index.md b/website/content/SDK/forex/oanda/calendar/_index.md deleted file mode 100644 index 552c02e0b5f..00000000000 --- a/website/content/SDK/forex/oanda/calendar/_index.md +++ /dev/null @@ -1,30 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### forex.oanda.calendar(days: int = 14, instrument: Optional[str] = None) -> Union[pandas.core.frame.DataFrame, bool] - -Request data of significant events calendar. - - Parameters - ---------- - instrument : Union[str, None] - The loaded currency pair, by default None - days : int - Number of days in advance - - Returns - ------- - Union[pd.DataFrame, bool] - Calendar events data or False - -## Getting charts -### forex.oanda.calendar(instrument: str, days: int = 7, chart=True) - -View calendar of significant events. - - Parameters - ---------- - instrument : str - The loaded currency pair - days : int - Number of days in advance diff --git a/website/content/SDK/forex/oanda/calendar/_index.rst b/website/content/SDK/forex/oanda/calendar/_index.rst new file mode 100644 index 00000000000..42927117944 --- /dev/null +++ b/website/content/SDK/forex/oanda/calendar/_index.rst @@ -0,0 +1,74 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forex.oanda.calendar( + days: int = 14, + instrument: Optional[str] = None, + chart: bool = False, +) -> Union[pandas.core.frame.DataFrame, bool] +{{< /highlight >}} + +.. raw:: html + +

+ Request data of significant events calendar. +

+ +* **Parameters** + + instrument : Union[str, None] + The loaded currency pair, by default None + days : int + Number of days in advance + chart: *bool* + Flag to display chart + + +* **Returns** + + Union[pd.DataFrame, bool] + Calendar events data or False + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +forex.oanda.calendar( + instrument: str, + days: int = 7, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ View calendar of significant events. +

+ +* **Parameters** + + instrument : str + The loaded currency pair + days : int + Number of days in advance + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/forex/oanda/cancel/_index.md b/website/content/SDK/forex/oanda/cancel/_index.md deleted file mode 100644 index 4edcb797c2d..00000000000 --- a/website/content/SDK/forex/oanda/cancel/_index.md +++ /dev/null @@ -1,25 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### forex.oanda.cancel(orderID: str, accountID: str = 'REPLACE_ME') -> Union[str, bool] - -Request cancellation of a pending order. - - Parameters - ---------- - orderID : str - The pending order ID to cancel. - accountID : str, optional - Oanda account ID, by default cfg.OANDA_ACCOUNT - -## Getting charts -### forex.oanda.cancel(accountID: str, orderID: str = '', chart=True) - -Cancel a Pending Order. - - Parameters - ---------- - accountID : str - Oanda user account ID - orderID : str - The pending order ID to cancel. diff --git a/website/content/SDK/forex/oanda/cancel/_index.rst b/website/content/SDK/forex/oanda/cancel/_index.rst new file mode 100644 index 00000000000..2d19b0d9329 --- /dev/null +++ b/website/content/SDK/forex/oanda/cancel/_index.rst @@ -0,0 +1,69 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forex.oanda.cancel( + orderID: str, + accountID: str = 'REPLACE_ME', + chart: bool = False, +) -> Union[str, bool] +{{< /highlight >}} + +.. raw:: html + +

+ Request cancellation of a pending order. +

+ +* **Parameters** + + orderID : str + The pending order ID to cancel. + accountID : str, optional + Oanda account ID, by default cfg.OANDA_ACCOUNT + chart: *bool* + Flag to display chart + + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +forex.oanda.cancel( + accountID: str, + orderID: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Cancel a Pending Order. +

+ +* **Parameters** + + accountID : str + Oanda user account ID + orderID : str + The pending order ID to cancel. + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/forex/oanda/candles/_index.md b/website/content/SDK/forex/oanda/candles/_index.md deleted file mode 100644 index fe08b507f5a..00000000000 --- a/website/content/SDK/forex/oanda/candles/_index.md +++ /dev/null @@ -1,42 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### forex.oanda.candles(instrument: Optional[str] = None, granularity: str = 'D', candlecount: int = 180) -> Union[pandas.core.frame.DataFrame, bool] - -Request data for candle chart. - - Parameters - ---------- - instrument : str - Loaded currency pair code - granularity : str, optional - Data granularity, by default "D" - candlecount : int, optional - Limit for the number of data points, by default 180 - - Returns - ------- - Union[pd.DataFrame, bool] - Candle chart data or False - -## Getting charts -### forex.oanda.candles(instrument: str = '', granularity: str = 'D', candlecount: int = 180, additional_charts: Optional[Dict[str, bool]] = None, external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Show candle chart. - - Note that additional plots (ta indicators) not supported in external axis mode. - - Parameters - ---------- - instrument : str - The loaded currency pair - granularity : str, optional - The timeframe to get for the candle chart. Seconds: S5, S10, S15, S30 - Minutes: M1, M2, M4, M5, M10, M15, M30 Hours: H1, H2, H3, H4, H6, H8, H12 - Day (default): D, Week: W Month: M, - candlecount : int, optional - Limit for the number of data points - additional_charts : Dict[str, bool] - A dictionary of flags to include additional charts - external_axes : Optional[List[plt.Axes]], optional - External axes (2 axes are expected in the list), by default None diff --git a/website/content/SDK/forex/oanda/candles/_index.rst b/website/content/SDK/forex/oanda/candles/_index.rst new file mode 100644 index 00000000000..0ab4d686b20 --- /dev/null +++ b/website/content/SDK/forex/oanda/candles/_index.rst @@ -0,0 +1,90 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forex.oanda.candles( + instrument: Optional[str] = None, + granularity: str = 'D', + candlecount: int = 180, + chart: bool = False, +) -> Union[pandas.core.frame.DataFrame, bool] +{{< /highlight >}} + +.. raw:: html + +

+ Request data for candle chart. +

+ +* **Parameters** + + instrument : str + Loaded currency pair code + granularity : str, optional + Data granularity, by default "D" + candlecount : int, optional + Limit for the number of data points, by default 180 + chart: *bool* + Flag to display chart + + +* **Returns** + + Union[pd.DataFrame, bool] + Candle chart data or False + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +forex.oanda.candles( + instrument: str = '', + granularity: str = 'D', + candlecount: int = 180, + additional_charts: Optional[Dict[str, bool]] = None, + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Show candle chart. + + Note that additional plots (ta indicators) not supported in external axis mode. +

+ +* **Parameters** + + instrument : str + The loaded currency pair + granularity : str, optional + The timeframe to get for the candle chart. Seconds: S5, S10, S15, S30 + Minutes: M1, M2, M4, M5, M10, M15, M30 Hours: H1, H2, H3, H4, H6, H8, H12 + Day (default): D, Week: W Month: M, + candlecount : int, optional + Limit for the number of data points + additional_charts : Dict[str, bool] + A dictionary of flags to include additional charts + external_axes : Optional[List[plt.Axes]], optional + External axes (2 axes are expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/forex/oanda/close/_index.md b/website/content/SDK/forex/oanda/close/_index.md deleted file mode 100644 index fc4996f0044..00000000000 --- a/website/content/SDK/forex/oanda/close/_index.md +++ /dev/null @@ -1,34 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### forex.oanda.close(orderID: str, units: Optional[int] = 0, accountID: str = 'REPLACE_ME') -> Union[pandas.core.frame.DataFrame, bool] - -Close a trade. - - Parameters - ---------- - orderID : str - ID of the order to close - units : Union[int, None] - Number of units to close. If empty default to all. - accountID : str, optional - Oanda account ID, by default cfg.OANDA_ACCOUNT - - Returns - ------- - Union[pd.DataFrame, bool] - Close trades data or False - -## Getting charts -### forex.oanda.close(accountID: str, orderID: str = '', units: Optional[int] = None, chart=True) - -Close a trade. - - Parameters - ---------- - accountID : str - Oanda user account ID - orderID : str - ID of the order to close - units : Union[int, None] - Number of units to close. If empty default to all. diff --git a/website/content/SDK/forex/oanda/close/_index.rst b/website/content/SDK/forex/oanda/close/_index.rst new file mode 100644 index 00000000000..4e3b9109011 --- /dev/null +++ b/website/content/SDK/forex/oanda/close/_index.rst @@ -0,0 +1,80 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forex.oanda.close( + orderID: str, + units: Optional[int] = 0, + accountID: str = 'REPLACE_ME', + chart: bool = False, +) -> Union[pandas.core.frame.DataFrame, bool] +{{< /highlight >}} + +.. raw:: html + +

+ Close a trade. +

+ +* **Parameters** + + orderID : str + ID of the order to close + units : Union[int, None] + Number of units to close. If empty default to all. + accountID : str, optional + Oanda account ID, by default cfg.OANDA_ACCOUNT + chart: *bool* + Flag to display chart + + +* **Returns** + + Union[pd.DataFrame, bool] + Close trades data or False + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +forex.oanda.close( + accountID: str, + orderID: str = '', + units: Optional[int] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Close a trade. +

+ +* **Parameters** + + accountID : str + Oanda user account ID + orderID : str + ID of the order to close + units : Union[int, None] + Number of units to close. If empty default to all. + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/forex/oanda/fwd/_index.md b/website/content/SDK/forex/oanda/fwd/_index.md deleted file mode 100644 index aa127083643..00000000000 --- a/website/content/SDK/forex/oanda/fwd/_index.md +++ /dev/null @@ -1,32 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### forex.oanda.fwd(to_symbol: str = 'USD', from_symbol: str = 'EUR') - -Gets forward rates from fxempire - - Parameters - ---------- - to_symbol: str - To currency - from_symbol: str - From currency - - Returns - ------- - df: pd.DataFrame - - -## Getting charts -### forex.oanda.fwd(to_symbol: str = 'USD', from_symbol: str = 'EUR', export: str = '', chart=True) - -Display forward rates for currency pairs - - Parameters - ---------- - to_symbol: str - To currency - from_symbol: str - From currency - export: str - Format to export data diff --git a/website/content/SDK/forex/oanda/fwd/_index.rst b/website/content/SDK/forex/oanda/fwd/_index.rst new file mode 100644 index 00000000000..b801c36d567 --- /dev/null +++ b/website/content/SDK/forex/oanda/fwd/_index.rst @@ -0,0 +1,76 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forex.oanda.fwd( + to_symbol: str = 'USD', + from_symbol: str = 'EUR', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Gets forward rates from fxempire +

+ +* **Parameters** + + to_symbol: str + To currency + from_symbol: str + From currency + chart: *bool* + Flag to display chart + + +* **Returns** + + df: pd.DataFrame + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +forex.oanda.fwd( + to_symbol: str = 'USD', + from_symbol: str = 'EUR', + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display forward rates for currency pairs +

+ +* **Parameters** + + to_symbol: str + To currency + from_symbol: str + From currency + export: str + Format to export data + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/forex/oanda/listorders/_index.md b/website/content/SDK/forex/oanda/listorders/_index.md deleted file mode 100644 index 1e949e6d8f6..00000000000 --- a/website/content/SDK/forex/oanda/listorders/_index.md +++ /dev/null @@ -1,29 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### forex.oanda.listorders(order_state: str = 'PENDING', order_count: int = 0, accountID: str = 'REPLACE_ME') -> Union[pandas.core.frame.DataFrame, bool] - -Request the orders list from Oanda. - - Parameters - ---------- - order_state : str - Filter orders by a specific state ("PENDING", "CANCELLED", etc.) - order_count : int - Limit the number of orders to retrieve - accountID : str, optional - Oanda account ID, by default cfg.OANDA_ACCOUNT - -## Getting charts -### forex.oanda.listorders(accountID: str, order_state: str = 'PENDING', order_count: int = 0, chart=True) - -List order history. - - Parameters - ---------- - accountID : str - Oanda user account ID - order_state : str - Filter orders by a specific state ("PENDING", "CANCELLED", etc.) - order_count : int - Limit the number of orders to retrieve diff --git a/website/content/SDK/forex/oanda/listorders/_index.rst b/website/content/SDK/forex/oanda/listorders/_index.rst new file mode 100644 index 00000000000..46fe3ae17e4 --- /dev/null +++ b/website/content/SDK/forex/oanda/listorders/_index.rst @@ -0,0 +1,75 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forex.oanda.listorders( + order_state: str = 'PENDING', + order_count: int = 0, + accountID: str = 'REPLACE_ME', + chart: bool = False, +) -> Union[pandas.core.frame.DataFrame, bool] +{{< /highlight >}} + +.. raw:: html + +

+ Request the orders list from Oanda. +

+ +* **Parameters** + + order_state : str + Filter orders by a specific state ("PENDING", "CANCELLED", etc.) + order_count : int + Limit the number of orders to retrieve + accountID : str, optional + Oanda account ID, by default cfg.OANDA_ACCOUNT + chart: *bool* + Flag to display chart + + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +forex.oanda.listorders( + accountID: str, + order_state: str = 'PENDING', + order_count: int = 0, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ List order history. +

+ +* **Parameters** + + accountID : str + Oanda user account ID + order_state : str + Filter orders by a specific state ("PENDING", "CANCELLED", etc.) + order_count : int + Limit the number of orders to retrieve + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/forex/oanda/openpositions/_index.md b/website/content/SDK/forex/oanda/openpositions/_index.md deleted file mode 100644 index 85b7808c44c..00000000000 --- a/website/content/SDK/forex/oanda/openpositions/_index.md +++ /dev/null @@ -1,21 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### forex.oanda.openpositions(accountID: str = 'REPLACE_ME') -> Union[pandas.core.frame.DataFrame, bool] - -Request information on open positions. - - Parameters - ---------- - accountID : str, optional - Oanda account ID, by default cfg.OANDA_ACCOUNT - -## Getting charts -### forex.oanda.openpositions(accountID: str, chart=True) - -Get information about open positions. - - Parameters - ---------- - accountID : str - Oanda user account ID diff --git a/website/content/SDK/forex/oanda/openpositions/_index.rst b/website/content/SDK/forex/oanda/openpositions/_index.rst new file mode 100644 index 00000000000..3725f8b8dc4 --- /dev/null +++ b/website/content/SDK/forex/oanda/openpositions/_index.rst @@ -0,0 +1,63 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forex.oanda.openpositions( + accountID: str = 'REPLACE_ME', + chart: bool = False, +) -> Union[pandas.core.frame.DataFrame, bool] +{{< /highlight >}} + +.. raw:: html + +

+ Request information on open positions. +

+ +* **Parameters** + + accountID : str, optional + Oanda account ID, by default cfg.OANDA_ACCOUNT + chart: *bool* + Flag to display chart + + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +forex.oanda.openpositions( + accountID: str, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Get information about open positions. +

+ +* **Parameters** + + accountID : str + Oanda user account ID + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/forex/oanda/opentrades/_index.md b/website/content/SDK/forex/oanda/opentrades/_index.md deleted file mode 100644 index a46b46ac058..00000000000 --- a/website/content/SDK/forex/oanda/opentrades/_index.md +++ /dev/null @@ -1,26 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### forex.oanda.opentrades(accountID: str = 'REPLACE_ME') -> Union[pandas.core.frame.DataFrame, bool] - -Request open trades data. - - Parameters - ---------- - accountID : str, optional - Oanda account ID, by default cfg.OANDA_ACCOUNT - - Returns - ------- - Union[pd.DataFrame, bool] - Open trades data or False - -## Getting charts -### forex.oanda.opentrades(accountID: str, chart=True) - -View open trades. - - Parameters - ---------- - accountID : str - Oanda user account ID diff --git a/website/content/SDK/forex/oanda/opentrades/_index.rst b/website/content/SDK/forex/oanda/opentrades/_index.rst new file mode 100644 index 00000000000..32a825918cf --- /dev/null +++ b/website/content/SDK/forex/oanda/opentrades/_index.rst @@ -0,0 +1,68 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forex.oanda.opentrades( + accountID: str = 'REPLACE_ME', + chart: bool = False, +) -> Union[pandas.core.frame.DataFrame, bool] +{{< /highlight >}} + +.. raw:: html + +

+ Request open trades data. +

+ +* **Parameters** + + accountID : str, optional + Oanda account ID, by default cfg.OANDA_ACCOUNT + chart: *bool* + Flag to display chart + + +* **Returns** + + Union[pd.DataFrame, bool] + Open trades data or False + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +forex.oanda.opentrades( + accountID: str, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ View open trades. +

+ +* **Parameters** + + accountID : str + Oanda user account ID + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/forex/oanda/order/_index.md b/website/content/SDK/forex/oanda/order/_index.md deleted file mode 100644 index fe6cdfb9dbd..00000000000 --- a/website/content/SDK/forex/oanda/order/_index.md +++ /dev/null @@ -1,38 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### forex.oanda.order(price: int = 0, units: int = 0, instrument: Optional[str] = None, accountID: str = 'REPLACE_ME') -> Union[pandas.core.frame.DataFrame, bool] - -Request creation of buy/sell trade order. - - Parameters - ---------- - instrument : Union[str, None] - The loaded currency pair, by default None - price : int - The price to set for the limit order. - units : int - The number of units to place in the order request. - accountID : str, optional - Oanda account ID, by default cfg.OANDA_ACCOUNT - - Returns - ------- - Union[pd.DataFrame, bool] - Orders data or False - -## Getting charts -### forex.oanda.order(accountID: str, instrument: str = '', price: int = 0, units: int = 0, chart=True) - -Create a buy/sell order. - - Parameters - ---------- - accountID : str - Oanda user account ID - instrument : str - The loaded currency pair - price : int - The price to set for the limit order. - units : int - The number of units to place in the order request. diff --git a/website/content/SDK/forex/oanda/order/_index.rst b/website/content/SDK/forex/oanda/order/_index.rst new file mode 100644 index 00000000000..164c400cb9e --- /dev/null +++ b/website/content/SDK/forex/oanda/order/_index.rst @@ -0,0 +1,86 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forex.oanda.order( + price: int = 0, + units: int = 0, + instrument: Optional[str] = None, + accountID: str = 'REPLACE_ME', + chart: bool = False, +) -> Union[pandas.core.frame.DataFrame, bool] +{{< /highlight >}} + +.. raw:: html + +

+ Request creation of buy/sell trade order. +

+ +* **Parameters** + + instrument : Union[str, None] + The loaded currency pair, by default None + price : int + The price to set for the limit order. + units : int + The number of units to place in the order request. + accountID : str, optional + Oanda account ID, by default cfg.OANDA_ACCOUNT + chart: *bool* + Flag to display chart + + +* **Returns** + + Union[pd.DataFrame, bool] + Orders data or False + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +forex.oanda.order( + accountID: str, + instrument: str = '', + price: int = 0, + units: int = 0, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Create a buy/sell order. +

+ +* **Parameters** + + accountID : str + Oanda user account ID + instrument : str + The loaded currency pair + price : int + The price to set for the limit order. + units : int + The number of units to place in the order request. + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/forex/oanda/orderbook/_index.md b/website/content/SDK/forex/oanda/orderbook/_index.md deleted file mode 100644 index 261a1324a08..00000000000 --- a/website/content/SDK/forex/oanda/orderbook/_index.md +++ /dev/null @@ -1,33 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### forex.oanda.orderbook(instrument: Optional[str] = None, accountID: str = 'REPLACE_ME') -> Union[pandas.core.frame.DataFrame, bool] - -Request order book data for plotting. - - Parameters - ---------- - instrument : Union[str, None] - The loaded currency pair, by default None - accountID : str, optional - Oanda account ID, by default cfg.OANDA_ACCOUNT - - Returns - ------- - Union[pd.DataFrame, bool] - Order book data or False - -## Getting charts -### forex.oanda.orderbook(accountID: str, instrument: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - - - Plot the orderbook for the instrument if Oanda provides one. - - Parameters - ---------- - accountID : str - Oanda user account ID - instrument : str - The loaded currency pair - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/forex/oanda/orderbook/_index.rst b/website/content/SDK/forex/oanda/orderbook/_index.rst new file mode 100644 index 00000000000..00fde07e863 --- /dev/null +++ b/website/content/SDK/forex/oanda/orderbook/_index.rst @@ -0,0 +1,77 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forex.oanda.orderbook( + instrument: Optional[str] = None, + accountID: str = 'REPLACE_ME', + chart: bool = False, +) -> Union[pandas.core.frame.DataFrame, bool] +{{< /highlight >}} + +.. raw:: html + +

+ Request order book data for plotting. +

+ +* **Parameters** + + instrument : Union[str, None] + The loaded currency pair, by default None + accountID : str, optional + Oanda account ID, by default cfg.OANDA_ACCOUNT + chart: *bool* + Flag to display chart + + +* **Returns** + + Union[pd.DataFrame, bool] + Order book data or False + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +forex.oanda.orderbook( + accountID: str, + instrument: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Plot the orderbook for the instrument if Oanda provides one. +

+ +* **Parameters** + + accountID : str + Oanda user account ID + instrument : str + The loaded currency pair + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/forex/oanda/pending/_index.md b/website/content/SDK/forex/oanda/pending/_index.md deleted file mode 100644 index edf5e9c98c3..00000000000 --- a/website/content/SDK/forex/oanda/pending/_index.md +++ /dev/null @@ -1,26 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### forex.oanda.pending(accountID: str = 'REPLACE_ME') -> Union[pandas.core.frame.DataFrame, bool] - -Request information on pending orders. - - Parameters - ---------- - accountID : str, optional - Oanda account ID, by default cfg.OANDA_ACCOUNT - - Returns - ------- - Union[pd.DataFrame, bool] - Pending orders data or False - -## Getting charts -### forex.oanda.pending(accountID: str, chart=True) - -Get information about pending orders. - - Parameters - ---------- - accountID : str - Oanda user account ID diff --git a/website/content/SDK/forex/oanda/pending/_index.rst b/website/content/SDK/forex/oanda/pending/_index.rst new file mode 100644 index 00000000000..a4932027d7d --- /dev/null +++ b/website/content/SDK/forex/oanda/pending/_index.rst @@ -0,0 +1,68 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forex.oanda.pending( + accountID: str = 'REPLACE_ME', + chart: bool = False, +) -> Union[pandas.core.frame.DataFrame, bool] +{{< /highlight >}} + +.. raw:: html + +

+ Request information on pending orders. +

+ +* **Parameters** + + accountID : str, optional + Oanda account ID, by default cfg.OANDA_ACCOUNT + chart: *bool* + Flag to display chart + + +* **Returns** + + Union[pd.DataFrame, bool] + Pending orders data or False + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +forex.oanda.pending( + accountID: str, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Get information about pending orders. +

+ +* **Parameters** + + accountID : str + Oanda user account ID + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/forex/oanda/positionbook/_index.md b/website/content/SDK/forex/oanda/positionbook/_index.md deleted file mode 100644 index 17a0bbfcdfb..00000000000 --- a/website/content/SDK/forex/oanda/positionbook/_index.md +++ /dev/null @@ -1,32 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### forex.oanda.positionbook(instrument: Optional[str] = None, accountID: str = 'REPLACE_ME') -> Union[pandas.core.frame.DataFrame, bool] - -Request position book data for plotting. - - Parameters - ---------- - instrument : Union[str, None] - The loaded currency pair, by default None - accountID : str, optional - Oanda account ID, by default cfg.OANDA_ACCOUNT - - Returns - ------- - Union[pd.DataFrame, bool] - Position book data or False - -## Getting charts -### forex.oanda.positionbook(accountID: str, instrument: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Plot a position book for an instrument if Oanda provides one. - - Parameters - ---------- - accountID : str - Oanda user account ID - instrument : str - The loaded currency pair - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/forex/oanda/positionbook/_index.rst b/website/content/SDK/forex/oanda/positionbook/_index.rst new file mode 100644 index 00000000000..da55ce99fab --- /dev/null +++ b/website/content/SDK/forex/oanda/positionbook/_index.rst @@ -0,0 +1,77 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forex.oanda.positionbook( + instrument: Optional[str] = None, + accountID: str = 'REPLACE_ME', + chart: bool = False, +) -> Union[pandas.core.frame.DataFrame, bool] +{{< /highlight >}} + +.. raw:: html + +

+ Request position book data for plotting. +

+ +* **Parameters** + + instrument : Union[str, None] + The loaded currency pair, by default None + accountID : str, optional + Oanda account ID, by default cfg.OANDA_ACCOUNT + chart: *bool* + Flag to display chart + + +* **Returns** + + Union[pd.DataFrame, bool] + Position book data or False + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +forex.oanda.positionbook( + accountID: str, + instrument: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Plot a position book for an instrument if Oanda provides one. +

+ +* **Parameters** + + accountID : str + Oanda user account ID + instrument : str + The loaded currency pair + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/forex/oanda/price/_index.md b/website/content/SDK/forex/oanda/price/_index.md deleted file mode 100644 index 95e78eec531..00000000000 --- a/website/content/SDK/forex/oanda/price/_index.md +++ /dev/null @@ -1,30 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### forex.oanda.price(accountID: str = 'REPLACE_ME', instrument: Optional[str] = None) -> Union[Dict[str, str], bool] - -Request price for a forex pair. - - Parameters - ---------- - accountID : str, optional - Oanda account ID, by default cfg.OANDA_ACCOUNT - instrument : Union[str, None] - The loaded currency pair, by default None - - Returns - ------- - Union[Dict[str, str], bool] - The currency pair price or False - -## Getting charts -### forex.oanda.price(account: str, instrument: Optional[str] = '', chart=True) - -View price for loaded currency pair. - - Parameters - ---------- - accountID : str - Oanda account ID - instrument : Union[str, None] - Instrument code or None diff --git a/website/content/SDK/forex/oanda/price/_index.rst b/website/content/SDK/forex/oanda/price/_index.rst new file mode 100644 index 00000000000..be0b1b37f33 --- /dev/null +++ b/website/content/SDK/forex/oanda/price/_index.rst @@ -0,0 +1,74 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forex.oanda.price( + accountID: str = 'REPLACE_ME', + instrument: Optional[str] = None, + chart: bool = False, +) -> Union[Dict[str, str], bool] +{{< /highlight >}} + +.. raw:: html + +

+ Request price for a forex pair. +

+ +* **Parameters** + + accountID : str, optional + Oanda account ID, by default cfg.OANDA_ACCOUNT + instrument : Union[str, None] + The loaded currency pair, by default None + chart: *bool* + Flag to display chart + + +* **Returns** + + Union[Dict[str, str], bool] + The currency pair price or False + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +forex.oanda.price( + account: str, + instrument: Optional[str] = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ View price for loaded currency pair. +

+ +* **Parameters** + + accountID : str + Oanda account ID + instrument : Union[str, None] + Instrument code or None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/forex/oanda/summary/_index.md b/website/content/SDK/forex/oanda/summary/_index.md deleted file mode 100644 index 47f899ecdaf..00000000000 --- a/website/content/SDK/forex/oanda/summary/_index.md +++ /dev/null @@ -1,26 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### forex.oanda.summary(accountID: str = 'REPLACE_ME') -> Union[pandas.core.frame.DataFrame, bool] - -Request Oanda account summary. - - Parameters - ---------- - accountID : str, optional - Oanda account ID, by default cfg.OANDA_ACCOUNT - - Returns - ------- - Union[pd.DataFrame, bool] - Account summary data or False - -## Getting charts -### forex.oanda.summary(accountID: str, chart=True) - -Print Oanda account summary. - - Parameters - ---------- - accountID : str - Oanda user account ID diff --git a/website/content/SDK/forex/oanda/summary/_index.rst b/website/content/SDK/forex/oanda/summary/_index.rst new file mode 100644 index 00000000000..4652d29dbf2 --- /dev/null +++ b/website/content/SDK/forex/oanda/summary/_index.rst @@ -0,0 +1,68 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forex.oanda.summary( + accountID: str = 'REPLACE_ME', + chart: bool = False, +) -> Union[pandas.core.frame.DataFrame, bool] +{{< /highlight >}} + +.. raw:: html + +

+ Request Oanda account summary. +

+ +* **Parameters** + + accountID : str, optional + Oanda account ID, by default cfg.OANDA_ACCOUNT + chart: *bool* + Flag to display chart + + +* **Returns** + + Union[pd.DataFrame, bool] + Account summary data or False + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +forex.oanda.summary( + accountID: str, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Print Oanda account summary. +

+ +* **Parameters** + + accountID : str + Oanda user account ID + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/forex/quote/_index.md b/website/content/SDK/forex/quote/_index.md deleted file mode 100644 index b29a60327dc..00000000000 --- a/website/content/SDK/forex/quote/_index.md +++ /dev/null @@ -1,30 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### forex.quote(to_symbol: str = 'USD', from_symbol: str = 'EUR') -> Dict - -Get current exchange rate quote from alpha vantage. - - Parameters - ---------- - to_symbol : str - To forex symbol - from_symbol : str - From forex symbol - - Returns - ------- - Dict - Dictionary of exchange rate - -## Getting charts -### forex.quote(to_symbol: str = 'USD', from_symbol: str = 'EUR', chart=True) - -Display current forex pair exchange rate. - - Parameters - ---------- - to_symbol : str - To symbol - from_symbol : str - From forex symbol diff --git a/website/content/SDK/forex/quote/_index.rst b/website/content/SDK/forex/quote/_index.rst new file mode 100644 index 00000000000..86c0475b1d6 --- /dev/null +++ b/website/content/SDK/forex/quote/_index.rst @@ -0,0 +1,74 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +forex.quote( + to_symbol: str = 'USD', + from_symbol: str = 'EUR', + chart: bool = False, +) -> Dict +{{< /highlight >}} + +.. raw:: html + +

+ Get current exchange rate quote from alpha vantage. +

+ +* **Parameters** + + to_symbol : str + To forex symbol + from_symbol : str + From forex symbol + chart: *bool* + Flag to display chart + + +* **Returns** + + Dict + Dictionary of exchange rate + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +forex.quote( + to_symbol: str = 'USD', + from_symbol: str = 'EUR', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display current forex pair exchange rate. +

+ +* **Parameters** + + to_symbol : str + To symbol + from_symbol : str + From forex symbol + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/funds/_index.md b/website/content/SDK/funds/_index.md new file mode 100644 index 00000000000..143fbd627d5 --- /dev/null +++ b/website/content/SDK/funds/_index.md @@ -0,0 +1,6 @@ +--- +title: funds +keywords: "" +excerpt: "" +geekdocCollapseSection: true +--- diff --git a/website/content/SDK/funds/info/_index.rst b/website/content/SDK/funds/info/_index.rst new file mode 100644 index 00000000000..00336719c30 --- /dev/null +++ b/website/content/SDK/funds/info/_index.rst @@ -0,0 +1,74 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +funds.info( + name: str, + country: str = 'united states', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ +

+ +* **Parameters** + + name: *str* + Name of fund (not symbol) to get information + country: *str* + Country of fund + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Dataframe of fund information + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +funds.info( + name: str, + country: str = 'united states', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display fund information. Finds name from symbol first if name is false +

+ +* **Parameters** + + name: *str* + Fund name to get info for + country : *str* + Country of fund + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/funds/overview/_index.rst b/website/content/SDK/funds/overview/_index.rst new file mode 100644 index 00000000000..91a937f3c76 --- /dev/null +++ b/website/content/SDK/funds/overview/_index.rst @@ -0,0 +1,77 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +funds.overview( + country: str = 'united states', + limit: int = 20, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ +

+ +* **Parameters** + + country: *str* + Country to get overview for + limit: *int* + Number of results to get + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Dataframe containing overview + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +funds.overview( + country: str = 'united states', + limit: int = 10, + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Displays an overview of the main funds from a country. +

+ +* **Parameters** + + country: *str* + Country to get overview for + limit: *int* + Number to show + export : *str* + Format to export data + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/funds/search/_index.rst b/website/content/SDK/funds/search/_index.rst new file mode 100644 index 00000000000..dabde517377 --- /dev/null +++ b/website/content/SDK/funds/search/_index.rst @@ -0,0 +1,86 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +funds.search( + by: str = 'name', + value: str = '', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Search investpy for matching funds +

+ +* **Parameters** + + by : *str* + Field to match on. Can be name, issuer, isin or symbol + value : *str* + String that will be searched for + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Dataframe containing matches + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +funds.search( + by: str = 'name', + value: str = '', + country: str = 'united states', + limit: int = 10, + sortby: str = '', + ascend: bool = False, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display results of searching for Mutual Funds +

+ +* **Parameters** + + by : *str* + Field to match on. Can be name, issuer, isin or symbol + value : *str* + String that will be searched for + country: *str* + Country to filter on + limit: *int* + Number to show + sortby: *str* + Column to sort by + ascend: *bool* + Flag to sort in ascending order + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/futures/curve/_index.md b/website/content/SDK/futures/curve/_index.md deleted file mode 100644 index 708a94d0375..00000000000 --- a/website/content/SDK/futures/curve/_index.md +++ /dev/null @@ -1,27 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### futures.curve(ticker: str = '') - -Get curve futures [Source: Yahoo Finance] - - Parameters - ---------- - ticker: str - Ticker to get forward curve - -## Getting charts -### futures.curve(ticker: str, raw: bool = False, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display curve futures [Source: Yahoo Finance] - - Parameters - ---------- - ticker: str - Curve future ticker to display - raw: bool - Display futures timeseries in raw format - export: str - Type of format to export data - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/futures/curve/_index.rst b/website/content/SDK/futures/curve/_index.rst new file mode 100644 index 00000000000..fd5cbb4bdd0 --- /dev/null +++ b/website/content/SDK/futures/curve/_index.rst @@ -0,0 +1,72 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +futures.curve( + ticker: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Get curve futures [Source: Yahoo Finance] +

+ +* **Parameters** + + ticker: str + Ticker to get forward curve + chart: *bool* + Flag to display chart + + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +futures.curve( + ticker: str, + raw: bool = False, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display curve futures [Source: Yahoo Finance] +

+ +* **Parameters** + + ticker: str + Curve future ticker to display + raw: bool + Display futures timeseries in raw format + export: str + Type of format to export data + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/futures/historical/_index.md b/website/content/SDK/futures/historical/_index.md deleted file mode 100644 index f1f068a2d2b..00000000000 --- a/website/content/SDK/futures/historical/_index.md +++ /dev/null @@ -1,38 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### futures.historical(tickers: List[str], expiry: str = '') -> Dict - -Get historical futures [Source: Yahoo Finance] - - Parameters - ---------- - tickers: List[str] - List of future timeseries tickers to display - expiry: str - Future expiry date with format YYYY-MM - - Returns - ---------- - Dict - Dictionary with sector weightings allocation - -## Getting charts -### futures.historical(tickers: List[str], expiry: str = '', start_date: str = '2019-11-04', raw: bool = False, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display historical futures [Source: Yahoo Finance] - - Parameters - ---------- - tickers: List[str] - List of future timeseries tickers to display - expiry: str - Future expiry date with format YYYY-MM - start_date : str - Initial date like string (e.g., 2021-10-01) - raw: bool - Display futures timeseries in raw format - export: str - Type of format to export data - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/futures/historical/_index.rst b/website/content/SDK/futures/historical/_index.rst new file mode 100644 index 00000000000..c2e3af4f318 --- /dev/null +++ b/website/content/SDK/futures/historical/_index.rst @@ -0,0 +1,86 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +futures.historical( + tickers: List[str], + expiry: str = '', + chart: bool = False, +) -> Dict +{{< /highlight >}} + +.. raw:: html + +

+ Get historical futures [Source: Yahoo Finance] +

+ +* **Parameters** + + tickers: List[str] + List of future timeseries tickers to display + expiry: str + Future expiry date with format YYYY-MM + chart: *bool* + Flag to display chart + + +* **Returns** + + Dict + Dictionary with sector weightings allocation + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +futures.historical( + tickers: List[str], + expiry: str = '', + start_date: str = '2019-11-09', + raw: bool = False, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display historical futures [Source: Yahoo Finance] +

+ +* **Parameters** + + tickers: List[str] + List of future timeseries tickers to display + expiry: str + Future expiry date with format YYYY-MM + start_date : str + Initial date like string (e.g., 2021-10-01) + raw: bool + Display futures timeseries in raw format + export: str + Type of format to export data + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/futures/search/_index.md b/website/content/SDK/futures/search/_index.md deleted file mode 100644 index 023d95e56d0..00000000000 --- a/website/content/SDK/futures/search/_index.md +++ /dev/null @@ -1,31 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### futures.search(category: str = '', exchange: str = '', description: str = '') - -Get search futures [Source: Yahoo Finance] - - Parameters - ---------- - category: str - Select the category where the future exists - exchange: str - Select the exchange where the future exists - description: str - Select the description where the future exists - -## Getting charts -### futures.search(category: str = '', exchange: str = '', description: str = '', export: str = '', chart=True) - -Display search futures [Source: Yahoo Finance] - - Parameters - ---------- - category: str - Select the category where the future exists - exchange: str - Select the exchange where the future exists - description: str - Select the description of the future - export: str - Type of format to export data diff --git a/website/content/SDK/futures/search/_index.rst b/website/content/SDK/futures/search/_index.rst new file mode 100644 index 00000000000..5d258e1b276 --- /dev/null +++ b/website/content/SDK/futures/search/_index.rst @@ -0,0 +1,78 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +futures.search( + category: str = '', + exchange: str = '', + description: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Get search futures [Source: Yahoo Finance] +

+ +* **Parameters** + + category: str + Select the category where the future exists + exchange: str + Select the exchange where the future exists + description: str + Select the description where the future exists + chart: *bool* + Flag to display chart + + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +futures.search( + category: str = '', + exchange: str = '', + description: str = '', + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display search futures [Source: Yahoo Finance] +

+ +* **Parameters** + + category: str + Select the category where the future exists + exchange: str + Select the exchange where the future exists + description: str + Select the description of the future + export: str + Type of format to export data + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/keys/av/_index.md b/website/content/SDK/keys/av/_index.md deleted file mode 100644 index c93b648241a..00000000000 --- a/website/content/SDK/keys/av/_index.md +++ /dev/null @@ -1,17 +0,0 @@ -## Get underlying data -### keys.av(key: str, persist: bool = False, show_output: bool = False) -> str - -Set Alpha Vantage key - Parameters - ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. - Returns - ------- - status: str diff --git a/website/content/SDK/keys/av/_index.rst b/website/content/SDK/keys/av/_index.rst new file mode 100644 index 00000000000..96e98c19007 --- /dev/null +++ b/website/content/SDK/keys/av/_index.rst @@ -0,0 +1,41 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +keys.av( + key: str, + persist: bool = False, + show_output: bool = False, + chart: bool = False, +) -> str +{{< /highlight >}} + +.. raw:: html + +

+ Set Alpha Vantage key +

+ +* **Parameters** + + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + +* **Returns** + + status: str diff --git a/website/content/SDK/keys/binance/_index.md b/website/content/SDK/keys/binance/_index.md deleted file mode 100644 index c1885708f2a..00000000000 --- a/website/content/SDK/keys/binance/_index.md +++ /dev/null @@ -1,17 +0,0 @@ -## Get underlying data -### keys.binance(key: str, secret: str, persist: bool = False, show_output: bool = False) -> str - -Set Binance key - Parameters - ---------- - key: str - secret: str - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. - Returns - ------- - status: str diff --git a/website/content/SDK/keys/binance/_index.rst b/website/content/SDK/keys/binance/_index.rst new file mode 100644 index 00000000000..9a3ab3a10a6 --- /dev/null +++ b/website/content/SDK/keys/binance/_index.rst @@ -0,0 +1,44 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +keys.binance( + key: str, + secret: str, + persist: bool = False, + show_output: bool = False, + chart: bool = False, +) -> str +{{< /highlight >}} + +.. raw:: html + +

+ Set Binance key +

+ +* **Parameters** + + key: str + API key + secret: str + API secret + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + +* **Returns** + + status: str diff --git a/website/content/SDK/keys/bitquery/_index.md b/website/content/SDK/keys/bitquery/_index.md deleted file mode 100644 index 965acb40ca3..00000000000 --- a/website/content/SDK/keys/bitquery/_index.md +++ /dev/null @@ -1,17 +0,0 @@ -## Get underlying data -### keys.bitquery(key: str, persist: bool = False, show_output: bool = False) -> str - -Set Bitquery key - Parameters - ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. - Returns - ------- - status: str diff --git a/website/content/SDK/keys/bitquery/_index.rst b/website/content/SDK/keys/bitquery/_index.rst new file mode 100644 index 00000000000..c37c1d9faa2 --- /dev/null +++ b/website/content/SDK/keys/bitquery/_index.rst @@ -0,0 +1,41 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +keys.bitquery( + key: str, + persist: bool = False, + show_output: bool = False, + chart: bool = False, +) -> str +{{< /highlight >}} + +.. raw:: html + +

+ Set Bitquery key +

+ +* **Parameters** + + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + +* **Returns** + + status: str diff --git a/website/content/SDK/keys/cmc/_index.md b/website/content/SDK/keys/cmc/_index.md deleted file mode 100644 index a7166ba1fe7..00000000000 --- a/website/content/SDK/keys/cmc/_index.md +++ /dev/null @@ -1,17 +0,0 @@ -## Get underlying data -### keys.cmc(key: str, persist: bool = False, show_output: bool = False) -> str - -Set Coinmarketcap key - Parameters - ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. - Returns - ------- - status: str diff --git a/website/content/SDK/keys/cmc/_index.rst b/website/content/SDK/keys/cmc/_index.rst new file mode 100644 index 00000000000..b7216f776d6 --- /dev/null +++ b/website/content/SDK/keys/cmc/_index.rst @@ -0,0 +1,41 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +keys.cmc( + key: str, + persist: bool = False, + show_output: bool = False, + chart: bool = False, +) -> str +{{< /highlight >}} + +.. raw:: html + +

+ Set Coinmarketcap key +

+ +* **Parameters** + + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + +* **Returns** + + status: str diff --git a/website/content/SDK/keys/coinbase/_index.md b/website/content/SDK/keys/coinbase/_index.md deleted file mode 100644 index 45fac168c57..00000000000 --- a/website/content/SDK/keys/coinbase/_index.md +++ /dev/null @@ -1,18 +0,0 @@ -## Get underlying data -### keys.coinbase(key: str, secret: str, passphrase: str, persist: bool = False, show_output: bool = False) -> str - -Set Coinbase key - Parameters - ---------- - key: str - secret: str - passphrase: str - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. - Returns - ------- - status: str diff --git a/website/content/SDK/keys/coinbase/_index.rst b/website/content/SDK/keys/coinbase/_index.rst new file mode 100644 index 00000000000..a0f83b75453 --- /dev/null +++ b/website/content/SDK/keys/coinbase/_index.rst @@ -0,0 +1,47 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +keys.coinbase( + key: str, + secret: str, + passphrase: str, + persist: bool = False, + show_output: bool = False, + chart: bool = False, +) -> str +{{< /highlight >}} + +.. raw:: html + +

+ Set Coinbase key +

+ +* **Parameters** + + key: str + API key + secret: str + API secret + passphrase: str + Account passphrase + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + +* **Returns** + + status: str diff --git a/website/content/SDK/keys/coinglass/_index.md b/website/content/SDK/keys/coinglass/_index.md deleted file mode 100644 index d203b113e14..00000000000 --- a/website/content/SDK/keys/coinglass/_index.md +++ /dev/null @@ -1,17 +0,0 @@ -## Get underlying data -### keys.coinglass(key: str, persist: bool = False, show_output: bool = False) -> str - -Set Coinglass key. - Parameters - ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. - Returns - ------- - status: str diff --git a/website/content/SDK/keys/coinglass/_index.rst b/website/content/SDK/keys/coinglass/_index.rst new file mode 100644 index 00000000000..9a5a7699608 --- /dev/null +++ b/website/content/SDK/keys/coinglass/_index.rst @@ -0,0 +1,41 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +keys.coinglass( + key: str, + persist: bool = False, + show_output: bool = False, + chart: bool = False, +) -> str +{{< /highlight >}} + +.. raw:: html + +

+ Set Coinglass key. +

+ +* **Parameters** + + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + +* **Returns** + + status: str diff --git a/website/content/SDK/keys/cpanic/_index.md b/website/content/SDK/keys/cpanic/_index.md deleted file mode 100644 index 7711e635fbc..00000000000 --- a/website/content/SDK/keys/cpanic/_index.md +++ /dev/null @@ -1,17 +0,0 @@ -## Get underlying data -### keys.cpanic(key: str, persist: bool = False, show_output: bool = False) -> str - -Set Cpanic key. - Parameters - ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. - Returns - ------- - status: str diff --git a/website/content/SDK/keys/cpanic/_index.rst b/website/content/SDK/keys/cpanic/_index.rst new file mode 100644 index 00000000000..03f3c5b96cd --- /dev/null +++ b/website/content/SDK/keys/cpanic/_index.rst @@ -0,0 +1,41 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +keys.cpanic( + key: str, + persist: bool = False, + show_output: bool = False, + chart: bool = False, +) -> str +{{< /highlight >}} + +.. raw:: html + +

+ Set Cpanic key. +

+ +* **Parameters** + + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + +* **Returns** + + status: str diff --git a/website/content/SDK/keys/degiro/_index.md b/website/content/SDK/keys/degiro/_index.md deleted file mode 100644 index 11e198b8870..00000000000 --- a/website/content/SDK/keys/degiro/_index.md +++ /dev/null @@ -1,18 +0,0 @@ -## Get underlying data -### keys.degiro(username: str, password: str, secret: str = '', persist: bool = False, show_output: bool = False) -> str - -Set Degiro key - Parameters - ---------- - username: str - password: str - secret: str - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. - Returns - ------- - status: str diff --git a/website/content/SDK/keys/degiro/_index.rst b/website/content/SDK/keys/degiro/_index.rst new file mode 100644 index 00000000000..7cd6b4ebef7 --- /dev/null +++ b/website/content/SDK/keys/degiro/_index.rst @@ -0,0 +1,47 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +keys.degiro( + username: str, + password: str, + secret: str = '', + persist: bool = False, + show_output: bool = False, + chart: bool = False, +) -> str +{{< /highlight >}} + +.. raw:: html + +

+ Set Degiro key +

+ +* **Parameters** + + username: str + User username + password: str + User password + secret: str + User secret + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + +* **Returns** + + status: str diff --git a/website/content/SDK/keys/eodhd/_index.md b/website/content/SDK/keys/eodhd/_index.md deleted file mode 100644 index ae5065270b7..00000000000 --- a/website/content/SDK/keys/eodhd/_index.md +++ /dev/null @@ -1,17 +0,0 @@ -## Get underlying data -### keys.eodhd(key: str, persist: bool = False, show_output: bool = False) -> str - -Set Eodhd key. - Parameters - ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. - Returns - ------- - status: str diff --git a/website/content/SDK/keys/eodhd/_index.rst b/website/content/SDK/keys/eodhd/_index.rst new file mode 100644 index 00000000000..7233a531a13 --- /dev/null +++ b/website/content/SDK/keys/eodhd/_index.rst @@ -0,0 +1,41 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +keys.eodhd( + key: str, + persist: bool = False, + show_output: bool = False, + chart: bool = False, +) -> str +{{< /highlight >}} + +.. raw:: html + +

+ Set Eodhd key. +

+ +* **Parameters** + + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + +* **Returns** + + status: str diff --git a/website/content/SDK/keys/ethplorer/_index.md b/website/content/SDK/keys/ethplorer/_index.md deleted file mode 100644 index b080bb1b4b0..00000000000 --- a/website/content/SDK/keys/ethplorer/_index.md +++ /dev/null @@ -1,17 +0,0 @@ -## Get underlying data -### keys.ethplorer(key: str, persist: bool = False, show_output: bool = False) -> str - -Set Ethplorer key. - Parameters - ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. - Returns - ------- - status: str diff --git a/website/content/SDK/keys/ethplorer/_index.rst b/website/content/SDK/keys/ethplorer/_index.rst new file mode 100644 index 00000000000..7e82e99362c --- /dev/null +++ b/website/content/SDK/keys/ethplorer/_index.rst @@ -0,0 +1,41 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +keys.ethplorer( + key: str, + persist: bool = False, + show_output: bool = False, + chart: bool = False, +) -> str +{{< /highlight >}} + +.. raw:: html + +

+ Set Ethplorer key. +

+ +* **Parameters** + + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + +* **Returns** + + status: str diff --git a/website/content/SDK/keys/finnhub/_index.md b/website/content/SDK/keys/finnhub/_index.md deleted file mode 100644 index 37330c8ad9d..00000000000 --- a/website/content/SDK/keys/finnhub/_index.md +++ /dev/null @@ -1,17 +0,0 @@ -## Get underlying data -### keys.finnhub(key: str, persist: bool = False, show_output: bool = False) -> str - -Set Finnhub key - Parameters - ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. - Returns - ------- - status: str diff --git a/website/content/SDK/keys/finnhub/_index.rst b/website/content/SDK/keys/finnhub/_index.rst new file mode 100644 index 00000000000..a1f3a581541 --- /dev/null +++ b/website/content/SDK/keys/finnhub/_index.rst @@ -0,0 +1,41 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +keys.finnhub( + key: str, + persist: bool = False, + show_output: bool = False, + chart: bool = False, +) -> str +{{< /highlight >}} + +.. raw:: html + +

+ Set Finnhub key +

+ +* **Parameters** + + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + +* **Returns** + + status: str diff --git a/website/content/SDK/keys/fmp/_index.md b/website/content/SDK/keys/fmp/_index.md deleted file mode 100644 index 2b9ac60efb7..00000000000 --- a/website/content/SDK/keys/fmp/_index.md +++ /dev/null @@ -1,17 +0,0 @@ -## Get underlying data -### keys.fmp(key: str, persist: bool = False, show_output: bool = False) -> str - -Set Financial Modeling Prep key - Parameters - ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. - Returns - ------- - status: str diff --git a/website/content/SDK/keys/fmp/_index.rst b/website/content/SDK/keys/fmp/_index.rst new file mode 100644 index 00000000000..16c8d61059b --- /dev/null +++ b/website/content/SDK/keys/fmp/_index.rst @@ -0,0 +1,41 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +keys.fmp( + key: str, + persist: bool = False, + show_output: bool = False, + chart: bool = False, +) -> str +{{< /highlight >}} + +.. raw:: html + +

+ Set Financial Modeling Prep key +

+ +* **Parameters** + + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + +* **Returns** + + status: str diff --git a/website/content/SDK/keys/fred/_index.md b/website/content/SDK/keys/fred/_index.md deleted file mode 100644 index dfa9b62cd2e..00000000000 --- a/website/content/SDK/keys/fred/_index.md +++ /dev/null @@ -1,17 +0,0 @@ -## Get underlying data -### keys.fred(key: str, persist: bool = False, show_output: bool = False) -> str - -Set FRED key - Parameters - ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. - Returns - ------- - status: str diff --git a/website/content/SDK/keys/fred/_index.rst b/website/content/SDK/keys/fred/_index.rst new file mode 100644 index 00000000000..b1d9b5a0113 --- /dev/null +++ b/website/content/SDK/keys/fred/_index.rst @@ -0,0 +1,41 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +keys.fred( + key: str, + persist: bool = False, + show_output: bool = False, + chart: bool = False, +) -> str +{{< /highlight >}} + +.. raw:: html + +

+ Set FRED key +

+ +* **Parameters** + + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + +* **Returns** + + status: str diff --git a/website/content/SDK/keys/get_keys_info/_index.md b/website/content/SDK/keys/get_keys_info/_index.md deleted file mode 100644 index 9c607b50063..00000000000 --- a/website/content/SDK/keys/get_keys_info/_index.md +++ /dev/null @@ -1,9 +0,0 @@ -## Get underlying data -### keys.get_keys_info() -> Dict[str, List[str]] - -Get info on available APIs to use in set_keys. - - Returns - ------- - Dictionary of expected API keys and arguments: Dict[str, List[str]] - diff --git a/website/content/SDK/keys/get_keys_info/_index.rst b/website/content/SDK/keys/get_keys_info/_index.rst new file mode 100644 index 00000000000..9d3060f27b8 --- /dev/null +++ b/website/content/SDK/keys/get_keys_info/_index.rst @@ -0,0 +1,25 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +keys.get_keys_info() -> Dict[str, List[str]] +{{< /highlight >}} + +.. raw:: html + +

+ Get info on available APIs to use in set_keys. +

+ +* **Returns** + + Dictionary of expected API keys and arguments: Dict[str, List[str]] diff --git a/website/content/SDK/keys/github/_index.md b/website/content/SDK/keys/github/_index.md deleted file mode 100644 index a0eb9df92a9..00000000000 --- a/website/content/SDK/keys/github/_index.md +++ /dev/null @@ -1,17 +0,0 @@ -## Get underlying data -### keys.github(key: str, persist: bool = False, show_output: bool = False) -> str - -Set GitHub key. - Parameters - ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. - Returns - ------- - status: str diff --git a/website/content/SDK/keys/github/_index.rst b/website/content/SDK/keys/github/_index.rst new file mode 100644 index 00000000000..84311ea7f66 --- /dev/null +++ b/website/content/SDK/keys/github/_index.rst @@ -0,0 +1,41 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +keys.github( + key: str, + persist: bool = False, + show_output: bool = False, + chart: bool = False, +) -> str +{{< /highlight >}} + +.. raw:: html + +

+ Set GitHub key. +

+ +* **Parameters** + + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + +* **Returns** + + status: str diff --git a/website/content/SDK/keys/glassnode/_index.md b/website/content/SDK/keys/glassnode/_index.md deleted file mode 100644 index a8bc90477a4..00000000000 --- a/website/content/SDK/keys/glassnode/_index.md +++ /dev/null @@ -1,17 +0,0 @@ -## Get underlying data -### keys.glassnode(key: str, persist: bool = False, show_output: bool = False) -> str - -Set Glassnode key. - Parameters - ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. - Returns - ------- - status: str diff --git a/website/content/SDK/keys/glassnode/_index.rst b/website/content/SDK/keys/glassnode/_index.rst new file mode 100644 index 00000000000..1f30ca760b0 --- /dev/null +++ b/website/content/SDK/keys/glassnode/_index.rst @@ -0,0 +1,41 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +keys.glassnode( + key: str, + persist: bool = False, + show_output: bool = False, + chart: bool = False, +) -> str +{{< /highlight >}} + +.. raw:: html + +

+ Set Glassnode key. +

+ +* **Parameters** + + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + +* **Returns** + + status: str diff --git a/website/content/SDK/keys/iex/_index.md b/website/content/SDK/keys/iex/_index.md deleted file mode 100644 index fc15ce4e456..00000000000 --- a/website/content/SDK/keys/iex/_index.md +++ /dev/null @@ -1,17 +0,0 @@ -## Get underlying data -### keys.iex(key: str, persist: bool = False, show_output: bool = False) -> str - -Set IEX Cloud key - Parameters - ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. - Returns - ------- - status: str diff --git a/website/content/SDK/keys/iex/_index.rst b/website/content/SDK/keys/iex/_index.rst new file mode 100644 index 00000000000..18de73fad7a --- /dev/null +++ b/website/content/SDK/keys/iex/_index.rst @@ -0,0 +1,41 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +keys.iex( + key: str, + persist: bool = False, + show_output: bool = False, + chart: bool = False, +) -> str +{{< /highlight >}} + +.. raw:: html + +

+ Set IEX Cloud key +

+ +* **Parameters** + + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + +* **Returns** + + status: str diff --git a/website/content/SDK/keys/messari/_index.md b/website/content/SDK/keys/messari/_index.md deleted file mode 100644 index 946b66fcd60..00000000000 --- a/website/content/SDK/keys/messari/_index.md +++ /dev/null @@ -1,17 +0,0 @@ -## Get underlying data -### keys.messari(key: str, persist: bool = False, show_output: bool = False) -> str - -Set Messari key. - Parameters - ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. - Returns - ------- - status: str diff --git a/website/content/SDK/keys/messari/_index.rst b/website/content/SDK/keys/messari/_index.rst new file mode 100644 index 00000000000..17504dfd50a --- /dev/null +++ b/website/content/SDK/keys/messari/_index.rst @@ -0,0 +1,41 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +keys.messari( + key: str, + persist: bool = False, + show_output: bool = False, + chart: bool = False, +) -> str +{{< /highlight >}} + +.. raw:: html + +

+ Set Messari key. +

+ +* **Parameters** + + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + +* **Returns** + + status: str diff --git a/website/content/SDK/keys/mykeys/_index.md b/website/content/SDK/keys/mykeys/_index.md deleted file mode 100644 index b0dc4697430..00000000000 --- a/website/content/SDK/keys/mykeys/_index.md +++ /dev/null @@ -1,11 +0,0 @@ -## Get underlying data -### keys.mykeys(show: bool = False) -> pandas.core.frame.DataFrame - -Get currently set API keys. - Parameters - ---------- - show: bool - Flag to choose whether to show actual keys or not. - By default, False. - Returns: - pd.DataFrame: currents keys diff --git a/website/content/SDK/keys/mykeys/_index.rst b/website/content/SDK/keys/mykeys/_index.rst new file mode 100644 index 00000000000..e8975f30c59 --- /dev/null +++ b/website/content/SDK/keys/mykeys/_index.rst @@ -0,0 +1,35 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +keys.mykeys( + show: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get currently set API keys. +

+ +* **Parameters** + + show: bool + Flag to choose whether to show actual keys or not. + By default, False. + +* **Returns** + + pd.DataFrame + Currents keys diff --git a/website/content/SDK/keys/news/_index.md b/website/content/SDK/keys/news/_index.md deleted file mode 100644 index 1b866a82626..00000000000 --- a/website/content/SDK/keys/news/_index.md +++ /dev/null @@ -1,17 +0,0 @@ -## Get underlying data -### keys.news(key: str, persist: bool = False, show_output: bool = False) -> str - -Set News key - Parameters - ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. - Returns - ------- - status: str diff --git a/website/content/SDK/keys/news/_index.rst b/website/content/SDK/keys/news/_index.rst new file mode 100644 index 00000000000..95895fd5b96 --- /dev/null +++ b/website/content/SDK/keys/news/_index.rst @@ -0,0 +1,41 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +keys.news( + key: str, + persist: bool = False, + show_output: bool = False, + chart: bool = False, +) -> str +{{< /highlight >}} + +.. raw:: html + +

+ Set News key +

+ +* **Parameters** + + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + +* **Returns** + + status: str diff --git a/website/content/SDK/keys/oanda/_index.md b/website/content/SDK/keys/oanda/_index.md deleted file mode 100644 index 61481e115bc..00000000000 --- a/website/content/SDK/keys/oanda/_index.md +++ /dev/null @@ -1,18 +0,0 @@ -## Get underlying data -### keys.oanda(account: str, access_token: str, account_type: str = '', persist: bool = False, show_output: bool = False) -> str - -Set Oanda key - Parameters - ---------- - account: str - access_token: str - account_type: str - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. - Returns - ------- - status: str diff --git a/website/content/SDK/keys/oanda/_index.rst b/website/content/SDK/keys/oanda/_index.rst new file mode 100644 index 00000000000..36a436830e5 --- /dev/null +++ b/website/content/SDK/keys/oanda/_index.rst @@ -0,0 +1,47 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +keys.oanda( + account: str, + access_token: str, + account_type: str = '', + persist: bool = False, + show_output: bool = False, + chart: bool = False, +) -> str +{{< /highlight >}} + +.. raw:: html + +

+ Set Oanda key +

+ +* **Parameters** + + account: str + User account + access_token: str + User token + account_type: str + User account type + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + +* **Returns** + + status: str diff --git a/website/content/SDK/keys/polygon/_index.md b/website/content/SDK/keys/polygon/_index.md deleted file mode 100644 index 60af92ebd33..00000000000 --- a/website/content/SDK/keys/polygon/_index.md +++ /dev/null @@ -1,17 +0,0 @@ -## Get underlying data -### keys.polygon(key: str, persist: bool = False, show_output: bool = False) -> str - -Set Polygon key - Parameters - ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. - Returns - ------- - status: str diff --git a/website/content/SDK/keys/polygon/_index.rst b/website/content/SDK/keys/polygon/_index.rst new file mode 100644 index 00000000000..336642c5bde --- /dev/null +++ b/website/content/SDK/keys/polygon/_index.rst @@ -0,0 +1,41 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +keys.polygon( + key: str, + persist: bool = False, + show_output: bool = False, + chart: bool = False, +) -> str +{{< /highlight >}} + +.. raw:: html + +

+ Set Polygon key +

+ +* **Parameters** + + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + +* **Returns** + + status: str diff --git a/website/content/SDK/keys/quandl/_index.md b/website/content/SDK/keys/quandl/_index.md deleted file mode 100644 index b86b3428be7..00000000000 --- a/website/content/SDK/keys/quandl/_index.md +++ /dev/null @@ -1,17 +0,0 @@ -## Get underlying data -### keys.quandl(key: str, persist: bool = False, show_output: bool = False) -> str - -Set Quandl key - Parameters - ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. - Returns - ------- - status: str diff --git a/website/content/SDK/keys/quandl/_index.rst b/website/content/SDK/keys/quandl/_index.rst new file mode 100644 index 00000000000..08150bb4980 --- /dev/null +++ b/website/content/SDK/keys/quandl/_index.rst @@ -0,0 +1,41 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +keys.quandl( + key: str, + persist: bool = False, + show_output: bool = False, + chart: bool = False, +) -> str +{{< /highlight >}} + +.. raw:: html + +

+ Set Quandl key +

+ +* **Parameters** + + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + +* **Returns** + + status: str diff --git a/website/content/SDK/keys/reddit/_index.md b/website/content/SDK/keys/reddit/_index.md deleted file mode 100644 index 6efb575a354..00000000000 --- a/website/content/SDK/keys/reddit/_index.md +++ /dev/null @@ -1,20 +0,0 @@ -## Get underlying data -### keys.reddit(client_id: str, client_secret: str, password: str, username: str, useragent: str, persist: bool = False, show_output: bool = False) -> str - -Set Reddit key - Parameters - ---------- - client_id: str - client_secret: str - password: str - username: str - useragent: str - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. - Returns - ------- - status: str diff --git a/website/content/SDK/keys/reddit/_index.rst b/website/content/SDK/keys/reddit/_index.rst new file mode 100644 index 00000000000..e1599ddfbef --- /dev/null +++ b/website/content/SDK/keys/reddit/_index.rst @@ -0,0 +1,53 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +keys.reddit( + client_id: str, + client_secret: str, + password: str, + username: str, + useragent: str, + persist: bool = False, + show_output: bool = False, + chart: bool = False, +) -> str +{{< /highlight >}} + +.. raw:: html + +

+ Set Reddit key +

+ +* **Parameters** + + client_id: str + Client ID + client_secret: str + Client secret + password: str + User assword + username: str + User username + useragent: str + User useragent + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + +* **Returns** + + status: str diff --git a/website/content/SDK/keys/rh/_index.md b/website/content/SDK/keys/rh/_index.md deleted file mode 100644 index 3161528fe8d..00000000000 --- a/website/content/SDK/keys/rh/_index.md +++ /dev/null @@ -1,17 +0,0 @@ -## Get underlying data -### keys.rh(username: str, password: str, persist: bool = False, show_output: bool = False) -> str - -Set Robinhood key - Parameters - ---------- - username: str - password: str - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. - Returns - ------- - status: str diff --git a/website/content/SDK/keys/rh/_index.rst b/website/content/SDK/keys/rh/_index.rst new file mode 100644 index 00000000000..3f938f856a0 --- /dev/null +++ b/website/content/SDK/keys/rh/_index.rst @@ -0,0 +1,44 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +keys.rh( + username: str, + password: str, + persist: bool = False, + show_output: bool = False, + chart: bool = False, +) -> str +{{< /highlight >}} + +.. raw:: html + +

+ Set Robinhood key +

+ +* **Parameters** + + username: str + User username + password: str + User password + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + +* **Returns** + + status: str diff --git a/website/content/SDK/keys/santiment/_index.md b/website/content/SDK/keys/santiment/_index.md deleted file mode 100644 index b5a2399b3e4..00000000000 --- a/website/content/SDK/keys/santiment/_index.md +++ /dev/null @@ -1,17 +0,0 @@ -## Get underlying data -### keys.santiment(key: str, persist: bool = False, show_output: bool = False) -> str - -Set Santiment key. - Parameters - ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. - Returns - ------- - status: str diff --git a/website/content/SDK/keys/santiment/_index.rst b/website/content/SDK/keys/santiment/_index.rst new file mode 100644 index 00000000000..69e38f97cb9 --- /dev/null +++ b/website/content/SDK/keys/santiment/_index.rst @@ -0,0 +1,41 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +keys.santiment( + key: str, + persist: bool = False, + show_output: bool = False, + chart: bool = False, +) -> str +{{< /highlight >}} + +.. raw:: html + +

+ Set Santiment key. +

+ +* **Parameters** + + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + +* **Returns** + + status: str diff --git a/website/content/SDK/keys/set_keys/_index.md b/website/content/SDK/keys/set_keys/_index.md deleted file mode 100644 index c90c1c2a48a..00000000000 --- a/website/content/SDK/keys/set_keys/_index.md +++ /dev/null @@ -1,21 +0,0 @@ -## Get underlying data -### keys.set_keys(keys_dict: Dict[str, Dict[str, Union[str, bool]]], persist: bool = False, show_output: bool = False) -> Dict - -Set API keys in bundle. - - Parameters - ---------- - keys_dict: Dict[str, Dict[str, Union[str, bool]]] - E.g. {"fred": {"key":"XXXXX"}, "binance": {"key":"YYYYY", "secret":"ZZZZZ"}} - More info on APIs can be found through get_keys_info(). - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. - - Returns - ------- - status_dict: Dict - diff --git a/website/content/SDK/keys/set_keys/_index.rst b/website/content/SDK/keys/set_keys/_index.rst new file mode 100644 index 00000000000..6aa10d1c66d --- /dev/null +++ b/website/content/SDK/keys/set_keys/_index.rst @@ -0,0 +1,42 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +keys.set_keys( + keys_dict: Dict[str, Dict[str, Union[str, bool]]], + persist: bool = False, + show_output: bool = False, + chart: bool = False, +) -> Dict +{{< /highlight >}} + +.. raw:: html + +

+ Set API keys in bundle. +

+ +* **Parameters** + + keys_dict: Dict[str, Dict[str, Union[str, bool]]] + E.g. {"fred": {"key":"XXXXX"}, "binance": {"key":"YYYYY", "secret":"ZZZZZ"}} + More info on APIs can be found through get_keys_info(). + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + +* **Returns** + + status_dict: Dict diff --git a/website/content/SDK/keys/shroom/_index.md b/website/content/SDK/keys/shroom/_index.md deleted file mode 100644 index 31804261a1c..00000000000 --- a/website/content/SDK/keys/shroom/_index.md +++ /dev/null @@ -1,17 +0,0 @@ -## Get underlying data -### keys.shroom(key: str, persist: bool = False, show_output: bool = False) -> str - -Set Shroom key - Parameters - ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. - Returns - ------- - status: str diff --git a/website/content/SDK/keys/shroom/_index.rst b/website/content/SDK/keys/shroom/_index.rst new file mode 100644 index 00000000000..ae4212c0224 --- /dev/null +++ b/website/content/SDK/keys/shroom/_index.rst @@ -0,0 +1,41 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +keys.shroom( + key: str, + persist: bool = False, + show_output: bool = False, + chart: bool = False, +) -> str +{{< /highlight >}} + +.. raw:: html + +

+ Set Shroom key +

+ +* **Parameters** + + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + +* **Returns** + + status: str diff --git a/website/content/SDK/keys/si/_index.md b/website/content/SDK/keys/si/_index.md deleted file mode 100644 index ff0d2b775de..00000000000 --- a/website/content/SDK/keys/si/_index.md +++ /dev/null @@ -1,16 +0,0 @@ -## Get underlying data -### keys.si(key: str, persist: bool = False, show_output: bool = False) -> str - -Set Sentimentinvestor key. - Parameters - ---------- - key: str - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. - Returns - ------- - status: str diff --git a/website/content/SDK/keys/si/_index.rst b/website/content/SDK/keys/si/_index.rst new file mode 100644 index 00000000000..33c76244b79 --- /dev/null +++ b/website/content/SDK/keys/si/_index.rst @@ -0,0 +1,41 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +keys.si( + key: str, + persist: bool = False, + show_output: bool = False, + chart: bool = False, +) -> str +{{< /highlight >}} + +.. raw:: html + +

+ Set Sentimentinvestor key. +

+ +* **Parameters** + + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + +* **Returns** + + status: str diff --git a/website/content/SDK/keys/smartstake/_index.md b/website/content/SDK/keys/smartstake/_index.md deleted file mode 100644 index bdbc0db1823..00000000000 --- a/website/content/SDK/keys/smartstake/_index.md +++ /dev/null @@ -1,19 +0,0 @@ -## Get underlying data -### keys.smartstake(key: str, access_token: str, persist: bool = False, show_output: bool = False) - -Set Smartstake key. - Parameters - ---------- - key: str - API key - access_token: str - API token - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. - Returns - ------- - status: str diff --git a/website/content/SDK/keys/smartstake/_index.rst b/website/content/SDK/keys/smartstake/_index.rst new file mode 100644 index 00000000000..c9672cd9c16 --- /dev/null +++ b/website/content/SDK/keys/smartstake/_index.rst @@ -0,0 +1,44 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +keys.smartstake( + key: str, + access_token: str, + persist: bool = False, + show_output: bool = False, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Set Smartstake key. +

+ +* **Parameters** + + key: str + API key + access_token: str + API token + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + +* **Returns** + + status: str diff --git a/website/content/SDK/keys/tokenterminal/_index.md b/website/content/SDK/keys/tokenterminal/_index.md deleted file mode 100644 index 831386bec7b..00000000000 --- a/website/content/SDK/keys/tokenterminal/_index.md +++ /dev/null @@ -1,20 +0,0 @@ -## Get underlying data -### keys.tokenterminal(key: str, persist: bool = False, show_output: bool = False) -> str - -Set Token Terminal key. - - Parameters - ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. - - Returns - ------- - status: str - diff --git a/website/content/SDK/keys/tokenterminal/_index.rst b/website/content/SDK/keys/tokenterminal/_index.rst new file mode 100644 index 00000000000..263717cb1e7 --- /dev/null +++ b/website/content/SDK/keys/tokenterminal/_index.rst @@ -0,0 +1,41 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +keys.tokenterminal( + key: str, + persist: bool = False, + show_output: bool = False, + chart: bool = False, +) -> str +{{< /highlight >}} + +.. raw:: html + +

+ Set Token Terminal key. +

+ +* **Parameters** + + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + +* **Returns** + + status: str diff --git a/website/content/SDK/keys/tradier/_index.md b/website/content/SDK/keys/tradier/_index.md deleted file mode 100644 index b55460139d7..00000000000 --- a/website/content/SDK/keys/tradier/_index.md +++ /dev/null @@ -1,17 +0,0 @@ -## Get underlying data -### keys.tradier(key: str, persist: bool = False, show_output: bool = False) -> str - -Set Tradier key - Parameters - ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. - Returns - ------- - status: str diff --git a/website/content/SDK/keys/tradier/_index.rst b/website/content/SDK/keys/tradier/_index.rst new file mode 100644 index 00000000000..5aa49f3c9db --- /dev/null +++ b/website/content/SDK/keys/tradier/_index.rst @@ -0,0 +1,41 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +keys.tradier( + key: str, + persist: bool = False, + show_output: bool = False, + chart: bool = False, +) -> str +{{< /highlight >}} + +.. raw:: html + +

+ Set Tradier key +

+ +* **Parameters** + + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + +* **Returns** + + status: str diff --git a/website/content/SDK/keys/twitter/_index.md b/website/content/SDK/keys/twitter/_index.md deleted file mode 100644 index 5215b81f67e..00000000000 --- a/website/content/SDK/keys/twitter/_index.md +++ /dev/null @@ -1,18 +0,0 @@ -## Get underlying data -### keys.twitter(key: str, secret: str, access_token: str, persist: bool = False, show_output: bool = False) -> str - -Set Twitter key - Parameters - ---------- - key: str - secret: str - access_token: str - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. - Returns - ------- - status: str diff --git a/website/content/SDK/keys/twitter/_index.rst b/website/content/SDK/keys/twitter/_index.rst new file mode 100644 index 00000000000..09470d12ad9 --- /dev/null +++ b/website/content/SDK/keys/twitter/_index.rst @@ -0,0 +1,47 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +keys.twitter( + key: str, + secret: str, + access_token: str, + persist: bool = False, + show_output: bool = False, + chart: bool = False, +) -> str +{{< /highlight >}} + +.. raw:: html + +

+ Set Twitter key +

+ +* **Parameters** + + key: str + API key + secret: str + API secret + access_token: str + API token + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + +* **Returns** + + status: str diff --git a/website/content/SDK/keys/walert/_index.md b/website/content/SDK/keys/walert/_index.md deleted file mode 100644 index 7f267b56f35..00000000000 --- a/website/content/SDK/keys/walert/_index.md +++ /dev/null @@ -1,17 +0,0 @@ -## Get underlying data -### keys.walert(key: str, persist: bool = False, show_output: bool = False) -> str - -Set Walert key - Parameters - ---------- - key: str - API key - persist: bool - If False, api key change will be contained to where it was changed. For example, Jupyter notebook. - If True, api key change will be global, i.e. it will affect terminal environment variables. - By default, False. - show_output: bool - Display status string or not. By default, False. - Returns - ------- - status: str diff --git a/website/content/SDK/keys/walert/_index.rst b/website/content/SDK/keys/walert/_index.rst new file mode 100644 index 00000000000..c59082ae404 --- /dev/null +++ b/website/content/SDK/keys/walert/_index.rst @@ -0,0 +1,41 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +keys.walert( + key: str, + persist: bool = False, + show_output: bool = False, + chart: bool = False, +) -> str +{{< /highlight >}} + +.. raw:: html + +

+ Set Walert key +

+ +* **Parameters** + + key: str + API key + persist: bool + If False, api key change will be contained to where it was changed. For example, Jupyter notebook. + If True, api key change will be global, i.e. it will affect terminal environment variables. + By default, False. + show_output: bool + Display status string or not. By default, False. + +* **Returns** + + status: str diff --git a/website/content/SDK/portfolio/calmar/_index.md b/website/content/SDK/portfolio/calmar/_index.md deleted file mode 100644 index 504e16c959d..00000000000 --- a/website/content/SDK/portfolio/calmar/_index.md +++ /dev/null @@ -1,18 +0,0 @@ -## Get underlying data -### portfolio.calmar(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, window: int = 756) - -Get calmar ratio - - Parameters - ---------- - portfolio: Portfolio - Portfolio object with trades loaded - window: int - Interval used for rolling values - - Returns - ------- - pd.DataFrame - DataFrame of calmar ratio of the benchmark and portfolio during different time periods - pd.Series - Series of calmar ratio data diff --git a/website/content/SDK/portfolio/calmar/_index.rst b/website/content/SDK/portfolio/calmar/_index.rst new file mode 100644 index 00000000000..10e515f4da7 --- /dev/null +++ b/website/content/SDK/portfolio/calmar/_index.rst @@ -0,0 +1,39 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.calmar( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + window: int = 756, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Get calmar ratio +

+ +* **Parameters** + + portfolio: Portfolio + Portfolio object with trades loaded + window: int + Interval used for rolling values + +* **Returns** + + pd.DataFrame + DataFrame of calmar ratio of the benchmark and portfolio during different time periods + pd.Series + Series of calmar ratio data diff --git a/website/content/SDK/portfolio/commonsense/_index.md b/website/content/SDK/portfolio/commonsense/_index.md deleted file mode 100644 index 8725d0cf8e5..00000000000 --- a/website/content/SDK/portfolio/commonsense/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### portfolio.commonsense(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel) - -Get common sense ratio - - Parameters - ---------- - portfolio: Portfolio - Portfolio object with trades loaded - - Returns - ------- - pd.DataFrame - DataFrame of the portfolios and the benchmarks common sense ratio during different time periods diff --git a/website/content/SDK/portfolio/commonsense/_index.rst b/website/content/SDK/portfolio/commonsense/_index.rst new file mode 100644 index 00000000000..74808b8e8a5 --- /dev/null +++ b/website/content/SDK/portfolio/commonsense/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.commonsense( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Get common sense ratio +

+ +* **Parameters** + + portfolio: Portfolio + Portfolio object with trades loaded + +* **Returns** + + pd.DataFrame + DataFrame of the portfolios and the benchmarks common sense ratio during different time periods diff --git a/website/content/SDK/portfolio/distr/_index.md b/website/content/SDK/portfolio/distr/_index.md deleted file mode 100644 index 66752ca9a96..00000000000 --- a/website/content/SDK/portfolio/distr/_index.md +++ /dev/null @@ -1,33 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### portfolio.distr(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, window: str = 'all') - -Display daily returns - - Parameters - ---------- - portfolio: Portfolio - Portfolio object with trades loaded - window : str - interval to compare cumulative returns and benchmark - -## Getting charts -### portfolio.distr(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, window: str = 'all', raw: bool = False, export: str = '', external_axes: Optional[matplotlib.axes._axes.Axes] = None, chart=True) - -Display daily returns - - Parameters - ---------- - portfolio_returns : pd.Series - Returns of the portfolio - benchmark_returns : pd.Series - Returns of the benchmark - interval : str - interval to compare cumulative returns and benchmark - raw : False - Display raw data from cumulative return - export : str - Export certain type of data - external_axes: plt.Axes - Optional axes to display plot on diff --git a/website/content/SDK/portfolio/distr/_index.rst b/website/content/SDK/portfolio/distr/_index.rst new file mode 100644 index 00000000000..df55105cfe9 --- /dev/null +++ b/website/content/SDK/portfolio/distr/_index.rst @@ -0,0 +1,80 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.distr( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + window: str = 'all', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display daily returns +

+ +* **Parameters** + + portfolio: Portfolio + Portfolio object with trades loaded + window : str + interval to compare cumulative returns and benchmark + chart: *bool* + Flag to display chart + + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +portfolio.distr( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + window: str = 'all', + raw: bool = False, + export: str = '', + external_axes: Optional[matplotlib.axes._axes.Axes] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display daily returns +

+ +* **Parameters** + + portfolio_returns : pd.Series + Returns of the portfolio + benchmark_returns : pd.Series + Returns of the benchmark + interval : str + interval to compare cumulative returns and benchmark + raw : False + Display raw data from cumulative return + export : str + Export certain type of data + external_axes: plt.Axes + Optional axes to display plot on + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/portfolio/dret/_index.md b/website/content/SDK/portfolio/dret/_index.md deleted file mode 100644 index 76a4b5859be..00000000000 --- a/website/content/SDK/portfolio/dret/_index.md +++ /dev/null @@ -1,37 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### portfolio.dret(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, window: str = 'all') -> pandas.core.frame.DataFrame - -Get daily returns - - Parameters - ---------- - portfolio: Portfolio - Portfolio object with trades loaded - window : str - interval to compare cumulative returns and benchmark - Returns - ------- - pd.DataFrame - - -## Getting charts -### portfolio.dret(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, window: str = 'all', raw: bool = False, limit: int = 10, export: str = '', external_axes: Optional[matplotlib.axes._axes.Axes] = None, chart=True) - -Display daily returns - - Parameters - ---------- - portfolio: Portfolio - Portfolio object with trades loaded - window : str - interval to compare cumulative returns and benchmark - raw : False - Display raw data from cumulative return - limit : int - Last daily returns to display - export : str - Export certain type of data - external_axes: plt.Axes - Optional axes to display plot on diff --git a/website/content/SDK/portfolio/dret/_index.rst b/website/content/SDK/portfolio/dret/_index.rst new file mode 100644 index 00000000000..419d709acb2 --- /dev/null +++ b/website/content/SDK/portfolio/dret/_index.rst @@ -0,0 +1,85 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.dret( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + window: str = 'all', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get daily returns +

+ +* **Parameters** + + portfolio: Portfolio + Portfolio object with trades loaded + window : str + interval to compare cumulative returns and benchmark + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +portfolio.dret( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + window: str = 'all', + raw: bool = False, + limit: int = 10, + export: str = '', + external_axes: Optional[matplotlib.axes._axes.Axes] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display daily returns +

+ +* **Parameters** + + portfolio: Portfolio + Portfolio object with trades loaded + window : str + interval to compare cumulative returns and benchmark + raw : False + Display raw data from cumulative return + limit : int + Last daily returns to display + export : str + Export certain type of data + external_axes: plt.Axes + Optional axes to display plot on + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/portfolio/es/_index.md b/website/content/SDK/portfolio/es/_index.md deleted file mode 100644 index c0aaa277348..00000000000 --- a/website/content/SDK/portfolio/es/_index.md +++ /dev/null @@ -1,19 +0,0 @@ -## Get underlying data -### portfolio.es(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, use_mean: bool = False, distribution: str = 'normal', percentile: float = 99.9) -> pandas.core.frame.DataFrame - -Get portfolio expected shortfall - - Parameters - ---------- - portfolio: Portfolio - Portfolio object with trades loaded - use_mean: - if one should use the data mean return - distribution: str - choose distribution to use: logistic, laplace, normal - percentile: float - es percentile (%) - Returns - ------- - pd.DataFrame - diff --git a/website/content/SDK/portfolio/es/_index.rst b/website/content/SDK/portfolio/es/_index.rst new file mode 100644 index 00000000000..53341a81d3a --- /dev/null +++ b/website/content/SDK/portfolio/es/_index.rst @@ -0,0 +1,42 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.es( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + use_mean: bool = False, + distribution: str = 'normal', + percentile: float = 99.9, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get portfolio expected shortfall +

+ +* **Parameters** + + portfolio: Portfolio + Portfolio object with trades loaded + use_mean: + if one should use the data mean return + distribution: str + choose distribution to use: logistic, laplace, normal + percentile: float + es percentile (%) + +* **Returns** + + pd.DataFrame diff --git a/website/content/SDK/portfolio/gaintopain/_index.md b/website/content/SDK/portfolio/gaintopain/_index.md deleted file mode 100644 index 1b408f4154a..00000000000 --- a/website/content/SDK/portfolio/gaintopain/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### portfolio.gaintopain(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel) - -Get Pain-to-Gain ratio based on historical data - - Parameters - ---------- - portfolio: Portfolio - Portfolio object with trades loaded - - Returns - ------- - pd.DataFrame - DataFrame of the portfolio's gain-to-pain ratio diff --git a/website/content/SDK/portfolio/gaintopain/_index.rst b/website/content/SDK/portfolio/gaintopain/_index.rst new file mode 100644 index 00000000000..1b1445675ef --- /dev/null +++ b/website/content/SDK/portfolio/gaintopain/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.gaintopain( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Get Pain-to-Gain ratio based on historical data +

+ +* **Parameters** + + portfolio: Portfolio + Portfolio object with trades loaded + +* **Returns** + + pd.DataFrame + DataFrame of the portfolio's gain-to-pain ratio diff --git a/website/content/SDK/portfolio/holdp/_index.md b/website/content/SDK/portfolio/holdp/_index.md deleted file mode 100644 index e29068540d6..00000000000 --- a/website/content/SDK/portfolio/holdp/_index.md +++ /dev/null @@ -1,31 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### portfolio.holdp(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel) - -Get holdings of assets (in percentage) - - Parameters - ---------- - portfolio: Portfolio - Portfolio object with trades loaded - -## Getting charts -### portfolio.holdp(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, sum_assets: bool = False, raw: bool = False, limit: int = 10, export: str = '', external_axes: Optional[matplotlib.axes._axes.Axes] = None, chart=True) - -Display holdings of assets (in percentage) - - Parameters - ---------- - portfolio: Portfolio - Portfolio object with trades loaded - sum_assets: bool - Sum assets over time - raw : bool - To display raw data - limit : int - Number of past market days to display holdings - export: str - Format to export plot - external_axes: plt.Axes - Optional axes to display plot on diff --git a/website/content/SDK/portfolio/holdp/_index.rst b/website/content/SDK/portfolio/holdp/_index.rst new file mode 100644 index 00000000000..76045c86c3c --- /dev/null +++ b/website/content/SDK/portfolio/holdp/_index.rst @@ -0,0 +1,78 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.holdp( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Get holdings of assets (in percentage) +

+ +* **Parameters** + + portfolio: Portfolio + Portfolio object with trades loaded + chart: *bool* + Flag to display chart + + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +portfolio.holdp( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + sum_assets: bool = False, + raw: bool = False, + limit: int = 10, + export: str = '', + external_axes: Optional[matplotlib.axes._axes.Axes] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display holdings of assets (in percentage) +

+ +* **Parameters** + + portfolio: Portfolio + Portfolio object with trades loaded + sum_assets: bool + Sum assets over time + raw : bool + To display raw data + limit : int + Number of past market days to display holdings + export: str + Format to export plot + external_axes: plt.Axes + Optional axes to display plot on + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/portfolio/holdv/_index.md b/website/content/SDK/portfolio/holdv/_index.md deleted file mode 100644 index e7c896c8b5a..00000000000 --- a/website/content/SDK/portfolio/holdv/_index.md +++ /dev/null @@ -1,36 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### portfolio.holdv(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel) -> pandas.core.frame.DataFrame - -Get holdings of assets (absolute value) - - Parameters - ---------- - portfolio: Portfolio - Portfolio object with trades loaded - - Returns - ------- - pd.DataFrame - DataFrame of holdings - -## Getting charts -### portfolio.holdv(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, sum_assets: bool = False, raw: bool = False, limit: int = 10, export: str = '', external_axes: Optional[matplotlib.axes._axes.Axes] = None, chart=True) - -Display holdings of assets (absolute value) - - Parameters - ---------- - portfolio: Portfolio - Portfolio object with trades loaded - sum_assets: bool - Sum assets over time - raw : bool - To display raw data - limit : int - Number of past market days to display holdings - export: str - Format to export plot - external_axes: plt.Axes - Optional axes to display plot on diff --git a/website/content/SDK/portfolio/holdv/_index.rst b/website/content/SDK/portfolio/holdv/_index.rst new file mode 100644 index 00000000000..c4d2b965237 --- /dev/null +++ b/website/content/SDK/portfolio/holdv/_index.rst @@ -0,0 +1,83 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.holdv( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get holdings of assets (absolute value) +

+ +* **Parameters** + + portfolio: Portfolio + Portfolio object with trades loaded + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + DataFrame of holdings + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +portfolio.holdv( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + sum_assets: bool = False, + raw: bool = False, + limit: int = 10, + export: str = '', + external_axes: Optional[matplotlib.axes._axes.Axes] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display holdings of assets (absolute value) +

+ +* **Parameters** + + portfolio: Portfolio + Portfolio object with trades loaded + sum_assets: bool + Sum assets over time + raw : bool + To display raw data + limit : int + Number of past market days to display holdings + export: str + Format to export plot + external_axes: plt.Axes + Optional axes to display plot on + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/portfolio/information/_index.md b/website/content/SDK/portfolio/information/_index.md deleted file mode 100644 index 8c05f98ea77..00000000000 --- a/website/content/SDK/portfolio/information/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### portfolio.information(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel) - -Get information ratio - - Parameters - ---------- - portfolio: Portfolio - Portfolio object with trades loaded - - Returns - ------- - pd.DataFrame - DataFrame of the information ratio during different time periods diff --git a/website/content/SDK/portfolio/information/_index.rst b/website/content/SDK/portfolio/information/_index.rst new file mode 100644 index 00000000000..c5bb7347dd5 --- /dev/null +++ b/website/content/SDK/portfolio/information/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.information( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Get information ratio +

+ +* **Parameters** + + portfolio: Portfolio + Portfolio object with trades loaded + +* **Returns** + + pd.DataFrame + DataFrame of the information ratio during different time periods diff --git a/website/content/SDK/portfolio/jensens/_index.md b/website/content/SDK/portfolio/jensens/_index.md deleted file mode 100644 index 68883b22e7e..00000000000 --- a/website/content/SDK/portfolio/jensens/_index.md +++ /dev/null @@ -1,20 +0,0 @@ -## Get underlying data -### portfolio.jensens(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, risk_free_rate: float = 0, window: str = '1y') - -Get jensen's alpha - - Parameters - ---------- - portfolio: Portfolio - Portfolio object with trades loaded - window: str - Interval used for rolling values - risk_free_rate: float - Risk free rate - - Returns - ------- - pd.DataFrame - DataFrame of jensens's alpha during different time windows - pd.Series - Series of jensens's alpha data diff --git a/website/content/SDK/portfolio/jensens/_index.rst b/website/content/SDK/portfolio/jensens/_index.rst new file mode 100644 index 00000000000..7b86a21cf62 --- /dev/null +++ b/website/content/SDK/portfolio/jensens/_index.rst @@ -0,0 +1,42 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.jensens( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + risk_free_rate: float = 0, + window: str = '1y', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Get jensen's alpha +

+ +* **Parameters** + + portfolio: Portfolio + Portfolio object with trades loaded + window: str + Interval used for rolling values + risk_free_rate: float + Risk free rate + +* **Returns** + + pd.DataFrame + DataFrame of jensens's alpha during different time windows + pd.Series + Series of jensens's alpha data diff --git a/website/content/SDK/portfolio/kelly/_index.md b/website/content/SDK/portfolio/kelly/_index.md deleted file mode 100644 index 335e1c46d85..00000000000 --- a/website/content/SDK/portfolio/kelly/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### portfolio.kelly(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel) - -Gets kelly criterion - - Parameters - ---------- - portfolio: Portfolio - Portfolio object with trades loaded - - Returns - ------- - pd.DataFrame - DataFrame of kelly criterion of the portfolio during different time periods diff --git a/website/content/SDK/portfolio/kelly/_index.rst b/website/content/SDK/portfolio/kelly/_index.rst new file mode 100644 index 00000000000..ea7fab686cd --- /dev/null +++ b/website/content/SDK/portfolio/kelly/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.kelly( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Gets kelly criterion +

+ +* **Parameters** + + portfolio: Portfolio + Portfolio object with trades loaded + +* **Returns** + + pd.DataFrame + DataFrame of kelly criterion of the portfolio during different time periods diff --git a/website/content/SDK/portfolio/kurtosis/_index.md b/website/content/SDK/portfolio/kurtosis/_index.md deleted file mode 100644 index c44ba158563..00000000000 --- a/website/content/SDK/portfolio/kurtosis/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### portfolio.kurtosis(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel) -> pandas.core.frame.DataFrame - -Class method that retrieves kurtosis for portfolio and benchmark selected - - Parameters - ---------- - portfolio: Portfolio - Portfolio object with trades loaded - - Returns - ------- - pd.DataFrame - DataFrame with kurtosis for portfolio and benchmark for different periods diff --git a/website/content/SDK/portfolio/kurtosis/_index.rst b/website/content/SDK/portfolio/kurtosis/_index.rst new file mode 100644 index 00000000000..41efd5a4546 --- /dev/null +++ b/website/content/SDK/portfolio/kurtosis/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.kurtosis( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Class method that retrieves kurtosis for portfolio and benchmark selected +

+ +* **Parameters** + + portfolio: Portfolio + Portfolio object with trades loaded + +* **Returns** + + pd.DataFrame + DataFrame with kurtosis for portfolio and benchmark for different periods diff --git a/website/content/SDK/portfolio/max_drawdown_ratio/_index.md b/website/content/SDK/portfolio/max_drawdown_ratio/_index.md deleted file mode 100644 index 7f0486d9b09..00000000000 --- a/website/content/SDK/portfolio/max_drawdown_ratio/_index.md +++ /dev/null @@ -1,36 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### portfolio.max_drawdown_ratio(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, is_returns: bool = False) -> pandas.core.series.Series - -Calculate the drawdown (MDD) of historical series. Note that the calculation is done - on cumulative returns (or prices). The definition of drawdown is - - DD = (current value - rolling maximum) / rolling maximum - - Parameters - ---------- - data: pd.Series - Series of input values - is_returns: bool - Flag to indicate inputs are returns - - Returns - ---------- - pd.Series - Holdings series - pd.Series - Drawdown series - ------- - -## Getting charts -### portfolio.max_drawdown_ratio(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, export: str = '', chart=True) - -Display maximum drawdown for multiple intervals - - Parameters - ---------- - portfolio: Portfolio - Portfolio object with trades loaded - export : str - Export data format diff --git a/website/content/SDK/portfolio/max_drawdown_ratio/_index.rst b/website/content/SDK/portfolio/max_drawdown_ratio/_index.rst new file mode 100644 index 00000000000..7b6925f5c37 --- /dev/null +++ b/website/content/SDK/portfolio/max_drawdown_ratio/_index.rst @@ -0,0 +1,79 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.max_drawdown_ratio( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + is_returns: bool = False, + chart: bool = False, +) -> pandas.core.series.Series +{{< /highlight >}} + +.. raw:: html + +

+ Calculate the drawdown (MDD) of historical series. Note that the calculation is done + on cumulative returns (or prices). The definition of drawdown is + + DD = (current value - rolling maximum) / rolling maximum +

+ +* **Parameters** + + data: pd.Series + Series of input values + is_returns: bool + Flag to indicate inputs are returns + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.Series + Holdings series + pd.Series + Drawdown series + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +portfolio.max_drawdown_ratio( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display maximum drawdown for multiple intervals +

+ +* **Parameters** + + portfolio: Portfolio + Portfolio object with trades loaded + export : str + Export data format + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/portfolio/maxdd/_index.md b/website/content/SDK/portfolio/maxdd/_index.md deleted file mode 100644 index 86e252c1390..00000000000 --- a/website/content/SDK/portfolio/maxdd/_index.md +++ /dev/null @@ -1,38 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### portfolio.maxdd(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, is_returns: bool = False) -> pandas.core.series.Series - -Calculate the drawdown (MDD) of historical series. Note that the calculation is done - on cumulative returns (or prices). The definition of drawdown is - - DD = (current value - rolling maximum) / rolling maximum - - Parameters - ---------- - data: pd.Series - Series of input values - is_returns: bool - Flag to indicate inputs are returns - - Returns - ---------- - pd.Series - Holdings series - pd.Series - Drawdown series - ------- - -## Getting charts -### portfolio.maxdd(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display maximum drawdown curve - - Parameters - ---------- - portfolio : PortfolioModel - Portfolio object - export: str - Format to export data - external_axes: plt.Axes - Optional axes to display plot on diff --git a/website/content/SDK/portfolio/maxdd/_index.rst b/website/content/SDK/portfolio/maxdd/_index.rst new file mode 100644 index 00000000000..ef3b1776da6 --- /dev/null +++ b/website/content/SDK/portfolio/maxdd/_index.rst @@ -0,0 +1,82 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.maxdd( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + is_returns: bool = False, + chart: bool = False, +) -> pandas.core.series.Series +{{< /highlight >}} + +.. raw:: html + +

+ Calculate the drawdown (MDD) of historical series. Note that the calculation is done + on cumulative returns (or prices). The definition of drawdown is + + DD = (current value - rolling maximum) / rolling maximum +

+ +* **Parameters** + + data: pd.Series + Series of input values + is_returns: bool + Flag to indicate inputs are returns + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.Series + Holdings series + pd.Series + Drawdown series + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +portfolio.maxdd( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display maximum drawdown curve +

+ +* **Parameters** + + portfolio : PortfolioModel + Portfolio object + export: str + Format to export data + external_axes: plt.Axes + Optional axes to display plot on + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/portfolio/maxdrawdown/_index.md b/website/content/SDK/portfolio/maxdrawdown/_index.md deleted file mode 100644 index b02e79cb04c..00000000000 --- a/website/content/SDK/portfolio/maxdrawdown/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### portfolio.maxdrawdown(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel) -> pandas.core.frame.DataFrame - -Class method that retrieves maximum drawdown ratio for portfolio and benchmark selected - - Parameters - ---------- - portfolio: Portfolio - Portfolio object with trades loaded - - Returns - ------- - pd.DataFrame - DataFrame with maximum drawdown for portfolio and benchmark for different periods diff --git a/website/content/SDK/portfolio/maxdrawdown/_index.rst b/website/content/SDK/portfolio/maxdrawdown/_index.rst new file mode 100644 index 00000000000..bb6c5e2e4b4 --- /dev/null +++ b/website/content/SDK/portfolio/maxdrawdown/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.maxdrawdown( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Class method that retrieves maximum drawdown ratio for portfolio and benchmark selected +

+ +* **Parameters** + + portfolio: Portfolio + Portfolio object with trades loaded + +* **Returns** + + pd.DataFrame + DataFrame with maximum drawdown for portfolio and benchmark for different periods diff --git a/website/content/SDK/portfolio/mret/_index.md b/website/content/SDK/portfolio/mret/_index.md deleted file mode 100644 index 87d00dc5591..00000000000 --- a/website/content/SDK/portfolio/mret/_index.md +++ /dev/null @@ -1,37 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### portfolio.mret(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, window: str = 'all') -> pandas.core.frame.DataFrame - -Get monthly returns - - Parameters - ---------- - portfolio: Portfolio - Portfolio object with trades loaded - window : str - interval to compare cumulative returns and benchmark - Returns - ------- - pd.DataFrame - - -## Getting charts -### portfolio.mret(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, window: str = 'all', raw: bool = False, show_vals: bool = False, export: str = '', external_axes: Optional[matplotlib.axes._axes.Axes] = None, chart=True) - -Display monthly returns - - Parameters - ---------- - portfolio: Portfolio - Portfolio object with trades loaded - window : str - interval to compare cumulative returns and benchmark - raw : False - Display raw data from cumulative return - show_vals : False - Show values on heatmap - export : str - Export certain type of data - external_axes: plt.Axes - Optional axes to display plot on diff --git a/website/content/SDK/portfolio/mret/_index.rst b/website/content/SDK/portfolio/mret/_index.rst new file mode 100644 index 00000000000..3687faf5a17 --- /dev/null +++ b/website/content/SDK/portfolio/mret/_index.rst @@ -0,0 +1,85 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.mret( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + window: str = 'all', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get monthly returns +

+ +* **Parameters** + + portfolio: Portfolio + Portfolio object with trades loaded + window : str + interval to compare cumulative returns and benchmark + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +portfolio.mret( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + window: str = 'all', + raw: bool = False, + show_vals: bool = False, + export: str = '', + external_axes: Optional[matplotlib.axes._axes.Axes] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display monthly returns +

+ +* **Parameters** + + portfolio: Portfolio + Portfolio object with trades loaded + window : str + interval to compare cumulative returns and benchmark + raw : False + Display raw data from cumulative return + show_vals : False + Show values on heatmap + export : str + Export certain type of data + external_axes: plt.Axes + Optional axes to display plot on + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/portfolio/om/_index.md b/website/content/SDK/portfolio/om/_index.md deleted file mode 100644 index 08eb1ce394f..00000000000 --- a/website/content/SDK/portfolio/om/_index.md +++ /dev/null @@ -1,33 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### portfolio.om(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, threshold_start: float = 0, threshold_end: float = 1.5) -> pandas.core.frame.DataFrame - -Get omega ratio - - Parameters - ---------- - portfolio: Portfolio - Portfolio object with trades loaded - threshold_start: float - annualized target return threshold start of plotted threshold range - threshold_end: float - annualized target return threshold end of plotted threshold range - Returns - ------- - pd.DataFrame - - -## Getting charts -### portfolio.om(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, threshold_start: float = 0, threshold_end: float = 1.5, chart=True) - -Display omega ratio - - Parameters - ---------- - portfolio: Portfolio - Portfolio object with trades loaded - threshold_start: float - annualized target return threshold start of plotted threshold range - threshold_end: float - annualized target return threshold end of plotted threshold range diff --git a/website/content/SDK/portfolio/om/_index.rst b/website/content/SDK/portfolio/om/_index.rst new file mode 100644 index 00000000000..61f4aacfa5b --- /dev/null +++ b/website/content/SDK/portfolio/om/_index.rst @@ -0,0 +1,79 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.om( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + threshold_start: float = 0, + threshold_end: float = 1.5, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get omega ratio +

+ +* **Parameters** + + portfolio: Portfolio + Portfolio object with trades loaded + threshold_start: float + annualized target return threshold start of plotted threshold range + threshold_end: float + annualized target return threshold end of plotted threshold range + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +portfolio.om( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + threshold_start: float = 0, + threshold_end: float = 1.5, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display omega ratio +

+ +* **Parameters** + + portfolio: Portfolio + Portfolio object with trades loaded + threshold_start: float + annualized target return threshold start of plotted threshold range + threshold_end: float + annualized target return threshold end of plotted threshold range + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/portfolio/payoff/_index.md b/website/content/SDK/portfolio/payoff/_index.md deleted file mode 100644 index 8fec70c3962..00000000000 --- a/website/content/SDK/portfolio/payoff/_index.md +++ /dev/null @@ -1,9 +0,0 @@ -## Get underlying data -### portfolio.payoff(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel) - -Gets payoff ratio - - Returns - ------- - pd.DataFrame - DataFrame of payoff ratio of the portfolio during different time periods diff --git a/website/content/SDK/portfolio/payoff/_index.rst b/website/content/SDK/portfolio/payoff/_index.rst new file mode 100644 index 00000000000..1772a328f5f --- /dev/null +++ b/website/content/SDK/portfolio/payoff/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.payoff( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Gets payoff ratio + + Returns + ------- + pd.DataFrame + DataFrame of payoff ratio of the portfolio during different time periods +

+ +* **Returns** + + pd.DataFrame + DataFrame of payoff ratio of the portfolio during different time periods diff --git a/website/content/SDK/portfolio/perf/_index.md b/website/content/SDK/portfolio/perf/_index.md deleted file mode 100644 index 5f640208d59..00000000000 --- a/website/content/SDK/portfolio/perf/_index.md +++ /dev/null @@ -1,17 +0,0 @@ -## Get underlying data -### portfolio.perf(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, interval: str = 'all', show_all_trades: bool = False) -> pandas.core.frame.DataFrame - -Get portfolio performance vs the benchmark - - Parameters - ---------- - portfolio: Portfolio - Portfolio object with trades loaded - interval : str - interval to consider performance. From: mtd, qtd, ytd, 3m, 6m, 1y, 3y, 5y, 10y, all - show_all_trades: bool - Whether to also show all trades made and their performance (default is False) - Returns - ------- - pd.DataFrame - diff --git a/website/content/SDK/portfolio/perf/_index.rst b/website/content/SDK/portfolio/perf/_index.rst new file mode 100644 index 00000000000..5be690ba593 --- /dev/null +++ b/website/content/SDK/portfolio/perf/_index.rst @@ -0,0 +1,39 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.perf( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + interval: str = 'all', + show_all_trades: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get portfolio performance vs the benchmark +

+ +* **Parameters** + + portfolio: Portfolio + Portfolio object with trades loaded + interval : str + interval to consider performance. From: mtd, qtd, ytd, 3m, 6m, 1y, 3y, 5y, 10y, all + show_all_trades: bool + Whether to also show all trades made and their performance (default is False) + +* **Returns** + + pd.DataFrame diff --git a/website/content/SDK/portfolio/po/blacklitterman/_index.md b/website/content/SDK/portfolio/po/blacklitterman/_index.rst similarity index 70% rename from website/content/SDK/portfolio/po/blacklitterman/_index.md rename to website/content/SDK/portfolio/po/blacklitterman/_index.rst index 0ee8b42a546..77b8d8a8878 100644 --- a/website/content/SDK/portfolio/po/blacklitterman/_index.md +++ b/website/content/SDK/portfolio/po/blacklitterman/_index.rst @@ -1,12 +1,51 @@ -To obtain charts, make sure to add `chart=True` as the last parameter +.. role:: python(code) + :language: python + :class: highlight -## Get underlying data -### portfolio.po.blacklitterman(symbols: List[str], benchmark: Dict, p_views: List, q_views: List, interval: str = '3y', start_date: str = '', end_date: str = '', log_returns: bool = False, freq: str = 'D', maxnan: float = 0.05, threshold: float = 0, method: str = 'time', objective: str = 'Sharpe', risk_free_rate: float = 0, risk_aversion: float = 1, delta: float = None, equilibrium: bool = True, optimize: bool = True, value: float = 1.0, value_short: float = 0) -> Tuple +| -Builds a maximal diversification portfolio +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.po.blacklitterman( + symbols: List[str], + benchmark: Dict, + p_views: List, + q_views: List, + interval: str = '3y', + start_date: str = '', + end_date: str = '', + log_returns: bool = False, + freq: str = 'D', + maxnan: float = 0.05, + threshold: float = 0, + method: str = 'time', + objective: str = 'Sharpe', + risk_free_rate: float = 0, + risk_aversion: float = 1, + delta: float = None, + equilibrium: bool = True, + optimize: bool = True, + value: float = 1.0, + value_short: float = 0, + chart: bool = False, +) -> Tuple +{{< /highlight >}} + +.. raw:: html + +

+ Builds a maximal diversification portfolio +

+ +* **Parameters** - Parameters - ---------- symbols : List[str] List of portfolio stocks benchmark : Dict @@ -29,9 +68,10 @@ Builds a maximal diversification portfolio freq: str The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float Max percentage of nan values accepted per asset to be included in @@ -39,8 +79,7 @@ Builds a maximal diversification portfolio threshold: float Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. objective: str Objective function of the optimization model. The default is 'Sharpe'. Possible values are: @@ -69,20 +108,58 @@ Builds a maximal diversification portfolio Amount of money to allocate. The default is 1. value_short : float, optional Amount to allocate to portfolio in short positions. The default is 0. + chart: *bool* + Flag to display chart + + +* **Returns** - Returns - ------- Tuple Dictionary of portfolio weights and DataFrame of stock returns -## Getting charts -### portfolio.po.blacklitterman(symbols: List[str], p_views: List, q_views: List, interval: str = '3y', start_date: str = '', end_date: str = '', log_returns: bool = False, freq: str = 'D', maxnan: float = 0.05, threshold: float = 0, method: str = 'time', benchmark: Dict = None, objective: str = 'Sharpe', risk_free_rate: float = 0, risk_aversion: float = 1, delta: float = None, equilibrium: bool = True, optimize: bool = True, value: float = 1.0, value_short: float = 0, table: bool = False, chart=True) -> Dict +| +.. raw:: html +

+ > Getting charts +

+ +{{< highlight python >}} +portfolio.po.blacklitterman( + symbols: List[str], + p_views: List, + q_views: List, + interval: str = '3y', + start_date: str = '', + end_date: str = '', + log_returns: bool = False, + freq: str = 'D', + maxnan: float = 0.05, + threshold: float = 0, + method: str = 'time', + benchmark: Dict = None, + objective: str = 'Sharpe', + risk_free_rate: float = 0, + risk_aversion: float = 1, + delta: float = None, + equilibrium: bool = True, + optimize: bool = True, + value: float = 1.0, + value_short: float = 0, + table: bool = False, + chart: bool = False, +) -> Dict +{{< /highlight >}} + +.. raw:: html + +

Builds a black litterman portfolio +

+ +* **Parameters** - Parameters - ---------- symbols : List[str] List of portfolio tickers p_views: List @@ -103,9 +180,9 @@ Builds a maximal diversification portfolio freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -113,8 +190,7 @@ Builds a maximal diversification portfolio threshold: float, optional Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. benchmark : Dict Dict of portfolio weights objective: str @@ -147,3 +223,6 @@ Builds a maximal diversification portfolio Amount to allocate to portfolio in short positions. The default is 0. table: bool, optional True if plot table weights, by default False + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/portfolio/po/ef/_index.md b/website/content/SDK/portfolio/po/ef/_index.rst similarity index 72% rename from website/content/SDK/portfolio/po/ef/_index.md rename to website/content/SDK/portfolio/po/ef/_index.rst index dcdea54f48b..f134d1fd78a 100644 --- a/website/content/SDK/portfolio/po/ef/_index.md +++ b/website/content/SDK/portfolio/po/ef/_index.rst @@ -1,13 +1,47 @@ -To obtain charts, make sure to add `chart=True` as the last parameter +.. role:: python(code) + :language: python + :class: highlight -## Get underlying data -### portfolio.po.ef(symbols: List[str], interval: str = '3y', start_date: str = '', end_date: str = '', log_returns: bool = False, freq: str = 'D', maxnan: float = 0.05, threshold: float = 0, method: str = 'time', risk_measure: str = 'MV', risk_free_rate: float = 0, alpha: float = 0.05, value: float = 1.0, value_short: float = 0.0, n_portfolios: int = 100, seed: int = 123) -> Tuple +| +To obtain charts, make sure to add :python:`chart = True` as the last parameter. +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.po.ef( + symbols: List[str], + interval: str = '3y', + start_date: str = '', + end_date: str = '', + log_returns: bool = False, + freq: str = 'D', + maxnan: float = 0.05, + threshold: float = 0, + method: str = 'time', + risk_measure: str = 'MV', + risk_free_rate: float = 0, + alpha: float = 0.05, + value: float = 1.0, + value_short: float = 0.0, + n_portfolios: int = 100, + seed: int = 123, + chart: bool = False, +) -> Tuple +{{< /highlight >}} + +.. raw:: html + +

Get efficient frontier +

+ +* **Parameters** - Parameters - ---------- symbols : List[str] List of portfolio tickers interval : str, optional @@ -23,9 +57,10 @@ To obtain charts, make sure to add `chart=True` as the last parameter freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -33,8 +68,7 @@ To obtain charts, make sure to add `chart=True` as the last parameter threshold: float, optional Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. risk_measure: str, optional The risk measure used to optimize the portfolio. The default is 'MV'. Possible values are: @@ -67,20 +101,56 @@ To obtain charts, make sure to add `chart=True` as the last parameter "Number of portfolios to simulate. The default value is 100. seed: int, optional Seed used to generate random portfolios. The default value is 123. + chart: *bool* + Flag to display chart + + +* **Returns** - Returns - ------- Tuple Parameters to create efficient frontier: frontier, mu, cov, stock_returns, weights, X1, Y1, port -## Getting charts -### portfolio.po.ef(symbols: List[str], interval: str = '3y', start_date: str = '', end_date: str = '', log_returns: bool = False, freq: str = 'D', maxnan: float = 0.05, threshold: float = 0, method: str = 'time', risk_measure: str = 'MV', risk_free_rate: float = 0, alpha: float = 0.05, value: float = 1.0, value_short: float = 0.0, n_portfolios: int = 100, seed: int = 123, tangency: bool = False, plot_tickers: bool = True, external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) +| +.. raw:: html +

+ > Getting charts +

+ +{{< highlight python >}} +portfolio.po.ef( + symbols: List[str], + interval: str = '3y', + start_date: str = '', + end_date: str = '', + log_returns: bool = False, + freq: str = 'D', + maxnan: float = 0.05, + threshold: float = 0, + method: str = 'time', + risk_measure: str = 'MV', + risk_free_rate: float = 0, + alpha: float = 0.05, + value: float = 1.0, + value_short: float = 0.0, + n_portfolios: int = 100, + seed: int = 123, + tangency: bool = False, + plot_tickers: bool = True, + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

Display efficient frontier +

+ +* **Parameters** - Parameters - ---------- symbols : List[str] List of portfolio tickers interval : str, optional @@ -96,9 +166,9 @@ To obtain charts, make sure to add `chart=True` as the last parameter freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -106,8 +176,7 @@ To obtain charts, make sure to add `chart=True` as the last parameter threshold: float, optional Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. risk_measure: str, optional The risk measure used to optimize the portfolio. The default is 'MV'. Possible values are: @@ -146,3 +215,6 @@ To obtain charts, make sure to add `chart=True` as the last parameter Optional axes to plot data on plot_tickers: bool Whether to plot the tickers for the assets + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/portfolio/po/equal/_index.md b/website/content/SDK/portfolio/po/equal/_index.rst similarity index 55% rename from website/content/SDK/portfolio/po/equal/_index.md rename to website/content/SDK/portfolio/po/equal/_index.rst index 4dfb150f86d..1e808160825 100644 --- a/website/content/SDK/portfolio/po/equal/_index.md +++ b/website/content/SDK/portfolio/po/equal/_index.rst @@ -1,10 +1,39 @@ -## Get underlying data -### portfolio.po.equal(symbols: List[str], interval: str = '3y', start_date: str = '', end_date: str = '', log_returns: bool = False, freq: str = 'D', maxnan: float = 0.05, threshold: float = 0, method: str = 'time', value: float = 1.0) -> Tuple +.. role:: python(code) + :language: python + :class: highlight -Equally weighted portfolio, where weight = 1/# of symbols +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.po.equal( + symbols: List[str], + interval: str = '3y', + start_date: str = '', + end_date: str = '', + log_returns: bool = False, + freq: str = 'D', + maxnan: float = 0.05, + threshold: float = 0, + method: str = 'time', + value: float = 1.0, + chart: bool = False, +) -> Tuple +{{< /highlight >}} + +.. raw:: html + +

+ Equally weighted portfolio, where weight = 1/# of symbols +

+ +* **Parameters** - Parameters - ---------- symbols : List[str] List of portfolio stocks interval : str, optional @@ -20,9 +49,10 @@ Equally weighted portfolio, where weight = 1/# of symbols freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for m' for monthly returns. maxnan: float Max percentage of nan values accepted per asset to be included in @@ -30,12 +60,11 @@ Equally weighted portfolio, where weight = 1/# of symbols threshold: float Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. value : float, optional Amount to allocate. Returns percentages if set to 1. - Returns - ------- +* **Returns** + dict Dictionary of weights where keys are the tickers diff --git a/website/content/SDK/portfolio/po/get_properties/_index.md b/website/content/SDK/portfolio/po/get_properties/_index.md deleted file mode 100644 index 703baf5cb6a..00000000000 --- a/website/content/SDK/portfolio/po/get_properties/_index.md +++ /dev/null @@ -1,8 +0,0 @@ -## Get underlying data -### portfolio.po.get_properties() -> List[str] - -Get properties to use on property optimization. - Returns - ------- - List[str]: - List of available properties to use on property optimization. diff --git a/website/content/SDK/portfolio/po/get_properties/_index.rst b/website/content/SDK/portfolio/po/get_properties/_index.rst new file mode 100644 index 00000000000..93d98d07cc5 --- /dev/null +++ b/website/content/SDK/portfolio/po/get_properties/_index.rst @@ -0,0 +1,26 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.po.get_properties() -> List[str] +{{< /highlight >}} + +.. raw:: html + +

+ Get properties to use on property optimization. +

+ +* **Returns** + + List[str]: + List of available properties to use on property optimization. diff --git a/website/content/SDK/portfolio/po/hcp/_index.md b/website/content/SDK/portfolio/po/hcp/_index.rst similarity index 73% rename from website/content/SDK/portfolio/po/hcp/_index.md rename to website/content/SDK/portfolio/po/hcp/_index.rst index 13b95d3dcf4..4650be196ed 100644 --- a/website/content/SDK/portfolio/po/hcp/_index.md +++ b/website/content/SDK/portfolio/po/hcp/_index.rst @@ -1,12 +1,59 @@ -To obtain charts, make sure to add `chart=True` as the last parameter +.. role:: python(code) + :language: python + :class: highlight -## Get underlying data -### portfolio.po.hcp(symbols: List[str], interval: str = '3y', start_date: str = '', end_date: str = '', log_returns: bool = False, freq: str = 'D', maxnan: float = 0.05, threshold: float = 0, method: str = 'time', model: str = 'HRP', codependence: str = 'pearson', covariance: str = 'hist', objective: str = 'MinRisk', risk_measure: str = 'MV', risk_free_rate: float = 0, risk_aversion: float = 1, alpha: float = 0.05, a_sim: int = 100, beta: float = None, b_sim: int = None, linkage: str = 'single', k: int = 0, max_k: int = 10, bins_info: str = 'KN', alpha_tail: float = 0.05, leaf_order: bool = True, d_ewma: float = 0.94, value: float = 1.0) -> Tuple +| -Builds hierarchical clustering based portfolios +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.po.hcp( + symbols: List[str], + interval: str = '3y', + start_date: str = '', + end_date: str = '', + log_returns: bool = False, + freq: str = 'D', + maxnan: float = 0.05, + threshold: float = 0, + method: str = 'time', + model: str = 'HRP', + codependence: str = 'pearson', + covariance: str = 'hist', + objective: str = 'MinRisk', + risk_measure: str = 'MV', + risk_free_rate: float = 0, + risk_aversion: float = 1, + alpha: float = 0.05, + a_sim: int = 100, + beta: float = None, + b_sim: int = None, + linkage: str = 'single', + k: int = 0, + max_k: int = 10, + bins_info: str = 'KN', + alpha_tail: float = 0.05, + leaf_order: bool = True, + d_ewma: float = 0.94, + value: float = 1.0, + chart: bool = False, +) -> Tuple +{{< /highlight >}} + +.. raw:: html + +

+ Builds hierarchical clustering based portfolios +

+ +* **Parameters** - Parameters - ---------- symbols : List[str] List of portfolio stocks interval : str, optional @@ -22,9 +69,10 @@ Builds hierarchical clustering based portfolios freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -32,8 +80,7 @@ Builds hierarchical clustering based portfolios threshold: float, optional Value used to replace outliers that are higher to threshold. method: str, optional - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. model: str, optional The hierarchical cluster portfolio model used for optimize the portfolio. The default is 'HRP'. Possible values are: @@ -47,36 +94,34 @@ Builds hierarchical clustering based portfolios metric and clusters. The default is 'pearson'. Possible values are: - 'pearson': pearson correlation matrix. Distance formula: - :math:`D_{i,j} = \sqrt{0.5(1- ho^{pearson}_{i,j})}`. + .. math:: D_{i,j} = \sqrt{0.5(1-\rho^{pearson}_{i,j})} - 'spearman': spearman correlation matrix. Distance formula: - :math:`D_{i,j} = \sqrt{0.5(1- ho^{spearman}_{i,j})}`. + .. math:: D_{i,j} = \sqrt{0.5(1-\rho^{spearman}_{i,j})} - 'abs_pearson': absolute value pearson correlation matrix. Distance formula: - :math:`D_{i,j} = \sqrt{(1-| ho^{pearson}_{i,j}|)}`. + .. math:: D_{i,j} = \sqrt{(1-|\rho^{pearson}_{i,j}|)} - 'abs_spearman': absolute value spearman correlation matrix. Distance formula: - :math:`D_{i,j} = \sqrt{(1-| ho^{spearman}_{i,j}|)}`. + .. math:: D_{i,j} = \sqrt{(1-|\rho^{spearman}_{i,j}|)} - 'distance': distance correlation matrix. Distance formula: - :math:`D_{i,j} = \sqrt{(1- ho^{distance}_{i,j})}`. + .. math:: D_{i,j} = \sqrt{(1-\rho^{distance}_{i,j})} - 'mutual_info': mutual information matrix. Distance used is variation information matrix. - 'tail': lower tail dependence index matrix. Dissimilarity formula: - :math:`D_{i,j} = -\log{\lambda_{i,j}}`. + .. math:: D_{i,j} = -\log{\lambda_{i,j}}. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`c-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`c-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`c-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`c-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `c-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `c-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `c-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `c-MLforAM`. objective: str, optional Objective function used by the NCO model. @@ -136,9 +181,8 @@ Builds hierarchical clustering based portfolios Number of CVaRs used to approximate Tail Gini of gains. If None it duplicates a_sim value. The default is None. linkage: str, optional - Linkage method of hierarchical clustering. For more information see - `linkage `_. + Linkage method of hierarchical clustering. For more information see `linkage `__. The default is 'single'. Possible values are: - 'single'. @@ -161,12 +205,9 @@ Builds hierarchical clustering based portfolios Number of bins used to calculate variation of information. The default value is 'KN'. Possible values are: - - 'KN': Knuth's choice method. For more information see - `knuth_bin_width `_. - - 'FD': Freedman–Diaconis' choice method. For more information see - `freedman_bin_width `_. - - 'SC': Scotts' choice method. For more information see - `scott_bin_width `_. + - 'KN': Knuth's choice method. For more information see `knuth_bin_width `__. + - 'FD': Freedman–Diaconis' choice method. For more information see `freedman_bin_width `__. + - 'SC': Scotts' choice method. For more information see `scott_bin_width `__. - 'HGR': Hacine-Gharbi and Ravier' choice method. alpha_tail: float, optional @@ -179,20 +220,66 @@ Builds hierarchical clustering based portfolios The default is 0.94. value : float, optional Amount of money to allocate. The default is 1. + chart: *bool* + Flag to display chart + + +* **Returns** - Returns - ------- Tuple Dictionary of portfolio weights and DataFrame of stock returns -## Getting charts -### portfolio.po.hcp(symbols: List[str], interval: str = '3y', start_date: str = '', end_date: str = '', log_returns: bool = False, freq: str = 'D', maxnan: float = 0.05, threshold: float = 0, method: str = 'time', model: str = 'HRP', codependence: str = 'pearson', covariance: str = 'hist', objective: str = 'minrisk', risk_measure: str = 'mv', risk_free_rate: float = 0.0, risk_aversion: float = 1.0, alpha: float = 0.05, a_sim: int = 100, beta: float = None, b_sim: int = None, linkage: str = 'ward', k: int = None, max_k: int = 10, bins_info: str = 'KN', alpha_tail: float = 0.05, leaf_order: bool = True, d_ewma: float = 0.94, value: float = 1.0, table: bool = False, chart=True) -> Dict +| +.. raw:: html +

+ > Getting charts +

+ +{{< highlight python >}} +portfolio.po.hcp( + symbols: List[str], + interval: str = '3y', + start_date: str = '', + end_date: str = '', + log_returns: bool = False, + freq: str = 'D', + maxnan: float = 0.05, + threshold: float = 0, + method: str = 'time', + model: str = 'HRP', + codependence: str = 'pearson', + covariance: str = 'hist', + objective: str = 'minrisk', + risk_measure: str = 'mv', + risk_free_rate: float = 0.0, + risk_aversion: float = 1.0, + alpha: float = 0.05, + a_sim: int = 100, + beta: float = None, + b_sim: int = None, + linkage: str = 'ward', + k: int = None, + max_k: int = 10, + bins_info: str = 'KN', + alpha_tail: float = 0.05, + leaf_order: bool = True, + d_ewma: float = 0.94, + value: float = 1.0, + table: bool = False, + chart: bool = False, +) -> Dict +{{< /highlight >}} + +.. raw:: html + +

Builds a hierarchical clustering portfolio +

+ +* **Parameters** - Parameters - ---------- symbols : List[str] List of portfolio tickers interval : str @@ -208,9 +295,9 @@ Builds hierarchical clustering based portfolios freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -218,8 +305,7 @@ Builds hierarchical clustering based portfolios threshold: float, optional Value used to replace outliers that are higher to threshold. method: str, optional - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. model: str, optional The hierarchical cluster portfolio model used for optimize the portfolio. The default is 'HRP'. Possible values are: @@ -233,36 +319,34 @@ Builds hierarchical clustering based portfolios metric and clusters. The default is 'pearson'. Possible values are: - 'pearson': pearson correlation matrix. Distance formula: - :math:`D_{i,j} = \sqrt{0.5(1- ho^{pearson}_{i,j})}`. + .. math:: D_{i,j} = \sqrt{0.5(1-\rho^{pearson}_{i,j})}. - 'spearman': spearman correlation matrix. Distance formula: - :math:`D_{i,j} = \sqrt{0.5(1- ho^{spearman}_{i,j})}`. + .. math:: D_{i,j} = \sqrt{0.5(1-\rho^{spearman}_{i,j})}. - 'abs_pearson': absolute value pearson correlation matrix. Distance formula: - :math:`D_{i,j} = \sqrt{(1-| ho^{pearson}_{i,j}|)}`. + .. math:: D_{i,j} = \sqrt{(1-|\rho^{pearson}_{i,j}|)}. - 'abs_spearman': absolute value spearman correlation matrix. Distance formula: - :math:`D_{i,j} = \sqrt{(1-| ho^{spearman}_{i,j}|)}`. + .. math:: D_{i,j} = \sqrt{(1-|\rho^{spearman}_{i,j}|)}. - 'distance': distance correlation matrix. Distance formula: - :math:`D_{i,j} = \sqrt{(1- ho^{distance}_{i,j})}`. + .. math:: D_{i,j} = \sqrt{(1-\rho^{distance}_{i,j})}. - 'mutual_info': mutual information matrix. Distance used is variation information matrix. - 'tail': lower tail dependence index matrix. Dissimilarity formula: - :math:`D_{i,j} = -\log{\lambda_{i,j}}`. + .. math:: D_{i,j} = -\log{\lambda_{i,j}}. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`c-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`c-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`c-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`c-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `c-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `c-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `c-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `c-MLforAM`. objective: str, optional Objective function used by the NCO model. @@ -322,8 +406,7 @@ Builds hierarchical clustering based portfolios Number of CVaRs used to approximate Tail Gini of gains. If None it duplicates a_sim value. The default is None. linkage: str, optional - Linkage method of hierarchical clustering. For more information see - `linkage `_. + Linkage method of hierarchical clustering. For more information see `linkage `__. The default is 'single'. Possible values are: - 'single'. @@ -346,12 +429,9 @@ Builds hierarchical clustering based portfolios Number of bins used to calculate variation of information. The default value is 'KN'. Possible values are: - - 'KN': Knuth's choice method. For more information see - `knuth_bin_width `_. - - 'FD': Freedman–Diaconis' choice method. For more information see - `freedman_bin_width `_. - - 'SC': Scotts' choice method. For more information see - `scott_bin_width `_. + - 'KN': Knuth's choice method. For more information see `knuth_bin_width `__. + - 'FD': Freedman–Diaconis' choice method. For more information see `freedman_bin_width `__. + - 'SC': Scotts' choice method. For more information see `scott_bin_width `__. - 'HGR': Hacine-Gharbi and Ravier' choice method. alpha_tail: float, optional @@ -366,3 +446,6 @@ Builds hierarchical clustering based portfolios Amount to allocate to portfolio, by default 1.0 table: bool, optional True if plot table weights, by default False + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/portfolio/po/herc/_index.md b/website/content/SDK/portfolio/po/herc/_index.rst similarity index 73% rename from website/content/SDK/portfolio/po/herc/_index.md rename to website/content/SDK/portfolio/po/herc/_index.rst index b9ae9da0900..8a25d0ed937 100644 --- a/website/content/SDK/portfolio/po/herc/_index.md +++ b/website/content/SDK/portfolio/po/herc/_index.rst @@ -1,13 +1,58 @@ -To obtain charts, make sure to add `chart=True` as the last parameter +.. role:: python(code) + :language: python + :class: highlight -## Get underlying data -### portfolio.po.herc(symbols: List[str], interval: str = '3y', start_date: str = '', end_date: str = '', log_returns: bool = False, freq: str = 'D', maxnan: float = 0.05, threshold: float = 0, method: str = 'time', codependence: str = 'pearson', covariance: str = 'hist', objective: str = 'minrisk', risk_measure: str = 'mv', risk_free_rate: float = 0.0, risk_aversion: float = 1.0, alpha: float = 0.05, a_sim: int = 100, beta: float = None, b_sim: int = None, linkage: str = 'single', k: int = 0, max_k: int = 10, bins_info: str = 'KN', alpha_tail: float = 0.05, leaf_order: bool = True, d_ewma: float = 0.94, value: float = 1.0) -> Tuple +| +To obtain charts, make sure to add :python:`chart = True` as the last parameter. +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.po.herc( + symbols: List[str], + interval: str = '3y', + start_date: str = '', + end_date: str = '', + log_returns: bool = False, + freq: str = 'D', + maxnan: float = 0.05, + threshold: float = 0, + method: str = 'time', + codependence: str = 'pearson', + covariance: str = 'hist', + objective: str = 'minrisk', + risk_measure: str = 'mv', + risk_free_rate: float = 0.0, + risk_aversion: float = 1.0, + alpha: float = 0.05, + a_sim: int = 100, + beta: float = None, + b_sim: int = None, + linkage: str = 'single', + k: int = 0, + max_k: int = 10, + bins_info: str = 'KN', + alpha_tail: float = 0.05, + leaf_order: bool = True, + d_ewma: float = 0.94, + value: float = 1.0, + chart: bool = False, +) -> Tuple +{{< /highlight >}} + +.. raw:: html + +

Builds a hierarchical risk parity portfolio +

+ +* **Parameters** - Parameters - ---------- symbols : List[str] List of portfolio tickers interval : str @@ -23,9 +68,10 @@ To obtain charts, make sure to add `chart=True` as the last parameter freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -33,43 +79,40 @@ To obtain charts, make sure to add `chart=True` as the last parameter threshold: float, optional Value used to replace outliers that are higher to threshold. method: str, optional - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. codependence: str, optional The codependence or similarity matrix used to build the distance metric and clusters. The default is 'pearson'. Possible values are: - 'pearson': pearson correlation matrix. Distance formula: - :math:`D_{i,j} = \sqrt{0.5(1- ho^{pearson}_{i,j})}`. + .. math:: D_{i,j} = \sqrt{0.5(1-\rho^{pearson}_{i,j})} - 'spearman': spearman correlation matrix. Distance formula: - :math:`D_{i,j} = \sqrt{0.5(1- ho^{spearman}_{i,j})}`. + .. math:: D_{i,j} = \sqrt{0.5(1-\rho^{spearman}_{i,j})} - 'abs_pearson': absolute value pearson correlation matrix. Distance formula: - :math:`D_{i,j} = \sqrt{(1-| ho^{pearson}_{i,j}|)}`. + .. math:: D_{i,j} = \sqrt{(1-|\rho^{pearson}_{i,j}|)} - 'abs_spearman': absolute value spearman correlation matrix. Distance formula: - :math:`D_{i,j} = \sqrt{(1-| ho^{spearman}_{i,j}|)}`. + .. math:: D_{i,j} = \sqrt{(1-|\rho^{spearman}_{i,j}|)} - 'distance': distance correlation matrix. Distance formula: - :math:`D_{i,j} = \sqrt{(1- ho^{distance}_{i,j})}`. + .. math:: D_{i,j} = \sqrt{(1-\rho^{distance}_{i,j})} - 'mutual_info': mutual information matrix. Distance used is variation information matrix. - 'tail': lower tail dependence index matrix. Dissimilarity formula: - :math:`D_{i,j} = -\log{\lambda_{i,j}}`. + .. math:: D_{i,j} = -\log{\lambda_{i,j}}. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`c-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`c-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`c-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`c-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `c-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `c-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `c-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `c-MLforAM`. objective: str, optional Objective function used by the NCO model. @@ -129,8 +172,7 @@ To obtain charts, make sure to add `chart=True` as the last parameter Number of CVaRs used to approximate Tail Gini of gains. If None it duplicates a_sim value. The default is None. linkage: str, optional - Linkage method of hierarchical clustering. For more information see - `linkage `_. + Linkage method of hierarchical clustering. For more information see `linkage `__. The default is 'single'. Possible values are: - 'single'. @@ -153,12 +195,9 @@ To obtain charts, make sure to add `chart=True` as the last parameter Number of bins used to calculate variation of information. The default value is 'KN'. Possible values are: - - 'KN': Knuth's choice method. For more information see - `knuth_bin_width `_. - - 'FD': Freedman–Diaconis' choice method. For more information see - `freedman_bin_width `_. - - 'SC': Scotts' choice method. For more information see - `scott_bin_width `_. + - 'KN': Knuth's choice method. For more information see `knuth_bin_width `__. + - 'FD': Freedman–Diaconis' choice method. For more information see `freedman_bin_width `__. + - 'SC': Scotts' choice method. For more information see `scott_bin_width `__. - 'HGR': Hacine-Gharbi and Ravier' choice method. alpha_tail: float, optional @@ -175,15 +214,59 @@ To obtain charts, make sure to add `chart=True` as the last parameter Amount to allocate to portfolio in short positions, by default 0.0 table: bool, optional True if plot table weights, by default False - -## Getting charts -### portfolio.po.herc(symbols: List[str], interval: str = '3y', start_date: str = '', end_date: str = '', log_returns: bool = False, freq: str = 'D', maxnan: float = 0.05, threshold: float = 0, method: str = 'time', codependence: str = 'pearson', covariance: str = 'hist', risk_measure: str = 'mv', risk_free_rate: float = 0.0, risk_aversion: float = 1.0, alpha: float = 0.05, a_sim: int = 100, beta: float = None, b_sim: int = None, linkage: str = 'ward', k: int = 0, max_k: int = 10, bins_info: str = 'KN', alpha_tail: float = 0.05, leaf_order: bool = True, d_ewma: float = 0.94, value: float = 1.0, table: bool = False, chart=True) -> Dict + chart: *bool* + Flag to display chart +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +portfolio.po.herc( + symbols: List[str], + interval: str = '3y', + start_date: str = '', + end_date: str = '', + log_returns: bool = False, + freq: str = 'D', + maxnan: float = 0.05, + threshold: float = 0, + method: str = 'time', + codependence: str = 'pearson', + covariance: str = 'hist', + risk_measure: str = 'mv', + risk_free_rate: float = 0.0, + risk_aversion: float = 1.0, + alpha: float = 0.05, + a_sim: int = 100, + beta: float = None, + b_sim: int = None, + linkage: str = 'ward', + k: int = 0, + max_k: int = 10, + bins_info: str = 'KN', + alpha_tail: float = 0.05, + leaf_order: bool = True, + d_ewma: float = 0.94, + value: float = 1.0, + table: bool = False, + chart: bool = False, +) -> Dict +{{< /highlight >}} + +.. raw:: html + +

Builds a hierarchical equal risk contribution portfolio +

+ +* **Parameters** - Parameters - ---------- symbols : List[str] List of portfolio tickers interval : str @@ -199,9 +282,9 @@ To obtain charts, make sure to add `chart=True` as the last parameter freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -209,8 +292,7 @@ To obtain charts, make sure to add `chart=True` as the last parameter threshold: float, optional Value used to replace outliers that are higher to threshold. method: str, optional - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. model: str, optional The hierarchical cluster portfolio model used for optimize the portfolio. The default is 'HRP'. Possible values are: @@ -224,36 +306,34 @@ To obtain charts, make sure to add `chart=True` as the last parameter metric and clusters. The default is 'pearson'. Possible values are: - 'pearson': pearson correlation matrix. Distance formula: - :math:`D_{i,j} = \sqrt{0.5(1- ho^{pearson}_{i,j})}`. + .. math:: D_{i,j} = \sqrt{0.5(1-\rho^{pearson}_{i,j})}. - 'spearman': spearman correlation matrix. Distance formula: - :math:`D_{i,j} = \sqrt{0.5(1- ho^{spearman}_{i,j})}`. + .. math:: D_{i,j} = \sqrt{0.5(1-\rho^{spearman}_{i,j})}. - 'abs_pearson': absolute value pearson correlation matrix. Distance formula: - :math:`D_{i,j} = \sqrt{(1-| ho^{pearson}_{i,j}|)}`. + .. math:: D_{i,j} = \sqrt{(1-|\rho^{pearson}_{i,j}|)}. - 'abs_spearman': absolute value spearman correlation matrix. Distance formula: - :math:`D_{i,j} = \sqrt{(1-| ho^{spearman}_{i,j}|)}`. + .. math:: D_{i,j} = \sqrt{(1-|\rho^{spearman}_{i,j}|)}. - 'distance': distance correlation matrix. Distance formula: - :math:`D_{i,j} = \sqrt{(1- ho^{distance}_{i,j})}`. + .. math:: D_{i,j} = \sqrt{(1-\rho^{distance}_{i,j})}. - 'mutual_info': mutual information matrix. Distance used is variation information matrix. - 'tail': lower tail dependence index matrix. Dissimilarity formula: - :math:`D_{i,j} = -\log{\lambda_{i,j}}`. + .. math:: D_{i,j} = -\log{\lambda_{i,j}}. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`c-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`c-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`c-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`c-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `c-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `c-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `c-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `c-MLforAM`. risk_measure: str, optional The risk measure used to optimize the portfolio. If model is 'NCO', @@ -304,8 +384,7 @@ To obtain charts, make sure to add `chart=True` as the last parameter Number of CVaRs used to approximate Tail Gini of gains. If None it duplicates a_sim value. The default is None. linkage: str, optional - Linkage method of hierarchical clustering. For more information see - `linkage `_. + Linkage method of hierarchical clustering. For more information see `linkage `__. The default is 'single'. Possible values are: - 'single'. @@ -328,12 +407,9 @@ To obtain charts, make sure to add `chart=True` as the last parameter Number of bins used to calculate variation of information. The default value is 'KN'. Possible values are: - - 'KN': Knuth's choice method. For more information see - `knuth_bin_width `_. - - 'FD': Freedman–Diaconis' choice method. For more information see - `freedman_bin_width `_. - - 'SC': Scotts' choice method. For more information see - `scott_bin_width `_. + - 'KN': Knuth's choice method. For more information see `knuth_bin_width `__. + - 'FD': Freedman–Diaconis' choice method. For more information see `freedman_bin_width `__. + - 'SC': Scotts' choice method. For more information see `scott_bin_width `__. - 'HGR': Hacine-Gharbi and Ravier' choice method. alpha_tail: float, optional @@ -350,3 +426,6 @@ To obtain charts, make sure to add `chart=True` as the last parameter Amount to allocate to portfolio in short positions, by default 0.0 table: bool, optional True if plot table weights, by default False + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/portfolio/po/hrp/_index.md b/website/content/SDK/portfolio/po/hrp/_index.rst similarity index 72% rename from website/content/SDK/portfolio/po/hrp/_index.md rename to website/content/SDK/portfolio/po/hrp/_index.rst index a47c7c377c4..c8d8e137424 100644 --- a/website/content/SDK/portfolio/po/hrp/_index.md +++ b/website/content/SDK/portfolio/po/hrp/_index.rst @@ -1,13 +1,58 @@ -To obtain charts, make sure to add `chart=True` as the last parameter +.. role:: python(code) + :language: python + :class: highlight -## Get underlying data -### portfolio.po.hrp(symbols: List[str], interval: str = '3y', start_date: str = '', end_date: str = '', log_returns: bool = False, freq: str = 'D', maxnan: float = 0.05, threshold: float = 0, method: str = 'time', codependence: str = 'pearson', covariance: str = 'hist', objective: str = 'minrisk', risk_measure: str = 'mv', risk_free_rate: float = 0.0, risk_aversion: float = 1.0, alpha: float = 0.05, a_sim: int = 100, beta: float = None, b_sim: int = None, linkage: str = 'single', k: int = 0, max_k: int = 10, bins_info: str = 'KN', alpha_tail: float = 0.05, leaf_order: bool = True, d_ewma: float = 0.94, value: float = 1.0) -> Tuple +| +To obtain charts, make sure to add :python:`chart = True` as the last parameter. +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.po.hrp( + symbols: List[str], + interval: str = '3y', + start_date: str = '', + end_date: str = '', + log_returns: bool = False, + freq: str = 'D', + maxnan: float = 0.05, + threshold: float = 0, + method: str = 'time', + codependence: str = 'pearson', + covariance: str = 'hist', + objective: str = 'minrisk', + risk_measure: str = 'mv', + risk_free_rate: float = 0.0, + risk_aversion: float = 1.0, + alpha: float = 0.05, + a_sim: int = 100, + beta: float = None, + b_sim: int = None, + linkage: str = 'single', + k: int = 0, + max_k: int = 10, + bins_info: str = 'KN', + alpha_tail: float = 0.05, + leaf_order: bool = True, + d_ewma: float = 0.94, + value: float = 1.0, + chart: bool = False, +) -> Tuple +{{< /highlight >}} + +.. raw:: html + +

Builds a hierarchical risk parity portfolio +

+ +* **Parameters** - Parameters - ---------- symbols : List[str] List of portfolio tickers interval : str @@ -23,9 +68,10 @@ To obtain charts, make sure to add `chart=True` as the last parameter freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -33,43 +79,40 @@ To obtain charts, make sure to add `chart=True` as the last parameter threshold: float, optional Value used to replace outliers that are higher to threshold. method: str, optional - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. codependence: str, optional The codependence or similarity matrix used to build the distance metric and clusters. The default is 'pearson'. Possible values are: - 'pearson': pearson correlation matrix. Distance formula: - :math:`D_{i,j} = \sqrt{0.5(1- ho^{pearson}_{i,j})}`. + .. math:: D_{i,j} = \sqrt{0.5(1-\rho^{pearson}_{i,j})} - 'spearman': spearman correlation matrix. Distance formula: - :math:`D_{i,j} = \sqrt{0.5(1- ho^{spearman}_{i,j})}`. + .. math:: D_{i,j} = \sqrt{0.5(1-\rho^{spearman}_{i,j})} - 'abs_pearson': absolute value pearson correlation matrix. Distance formula: - :math:`D_{i,j} = \sqrt{(1-| ho^{pearson}_{i,j}|)}`. + .. math:: D_{i,j} = \sqrt{(1-|\rho^{pearson}_{i,j}|)} - 'abs_spearman': absolute value spearman correlation matrix. Distance formula: - :math:`D_{i,j} = \sqrt{(1-| ho^{spearman}_{i,j}|)}`. + .. math:: D_{i,j} = \sqrt{(1-|\rho^{spearman}_{i,j}|)} - 'distance': distance correlation matrix. Distance formula: - :math:`D_{i,j} = \sqrt{(1- ho^{distance}_{i,j})}`. + .. math:: D_{i,j} = \sqrt{(1-\rho^{distance}_{i,j})} - 'mutual_info': mutual information matrix. Distance used is variation information matrix. - 'tail': lower tail dependence index matrix. Dissimilarity formula: - :math:`D_{i,j} = -\log{\lambda_{i,j}}`. + .. math:: D_{i,j} = -\log{\lambda_{i,j}}. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`c-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`c-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`c-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`c-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `c-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `c-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `c-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `c-MLforAM`. objective: str, optional Objective function used by the NCO model. @@ -129,8 +172,7 @@ To obtain charts, make sure to add `chart=True` as the last parameter Number of CVaRs used to approximate Tail Gini of gains. If None it duplicates a_sim value. The default is None. linkage: str, optional - Linkage method of hierarchical clustering. For more information see - `linkage `_. + Linkage method of hierarchical clustering. For more information see `linkage `__. The default is 'single'. Possible values are: - 'single'. @@ -153,12 +195,9 @@ To obtain charts, make sure to add `chart=True` as the last parameter Number of bins used to calculate variation of information. The default value is 'KN'. Possible values are: - - 'KN': Knuth's choice method. For more information see - `knuth_bin_width `_. - - 'FD': Freedman–Diaconis' choice method. For more information see - `freedman_bin_width `_. - - 'SC': Scotts' choice method. For more information see - `scott_bin_width `_. + - 'KN': Knuth's choice method. For more information see `knuth_bin_width `__. + - 'FD': Freedman–Diaconis' choice method. For more information see `freedman_bin_width `__. + - 'SC': Scotts' choice method. For more information see `scott_bin_width `__. - 'HGR': Hacine-Gharbi and Ravier' choice method. alpha_tail: float, optional @@ -175,15 +214,59 @@ To obtain charts, make sure to add `chart=True` as the last parameter Amount to allocate to portfolio in short positions, by default 0.0 table: bool, optional True if plot table weights, by default False - -## Getting charts -### portfolio.po.hrp(symbols: List[str], interval: str = '3y', start_date: str = '', end_date: str = '', log_returns: bool = False, freq: str = 'D', maxnan: float = 0.05, threshold: float = 0, method: str = 'time', codependence: str = 'pearson', covariance: str = 'hist', risk_measure: str = 'mv', risk_free_rate: float = 0.0, risk_aversion: float = 1.0, alpha: float = 0.05, a_sim: int = 100, beta: float = None, b_sim: int = None, linkage: str = 'single', k: int = 0, max_k: int = 10, bins_info: str = 'KN', alpha_tail: float = 0.05, leaf_order: bool = True, d_ewma: float = 0.94, value: float = 1.0, table: bool = False, chart=True) -> Dict + chart: *bool* + Flag to display chart +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +portfolio.po.hrp( + symbols: List[str], + interval: str = '3y', + start_date: str = '', + end_date: str = '', + log_returns: bool = False, + freq: str = 'D', + maxnan: float = 0.05, + threshold: float = 0, + method: str = 'time', + codependence: str = 'pearson', + covariance: str = 'hist', + risk_measure: str = 'mv', + risk_free_rate: float = 0.0, + risk_aversion: float = 1.0, + alpha: float = 0.05, + a_sim: int = 100, + beta: float = None, + b_sim: int = None, + linkage: str = 'single', + k: int = 0, + max_k: int = 10, + bins_info: str = 'KN', + alpha_tail: float = 0.05, + leaf_order: bool = True, + d_ewma: float = 0.94, + value: float = 1.0, + table: bool = False, + chart: bool = False, +) -> Dict +{{< /highlight >}} + +.. raw:: html + +

Builds a hierarchical risk parity portfolio +

+ +* **Parameters** - Parameters - ---------- symbols : List[str] List of portfolio tickers interval : str @@ -199,9 +282,9 @@ To obtain charts, make sure to add `chart=True` as the last parameter freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -209,43 +292,40 @@ To obtain charts, make sure to add `chart=True` as the last parameter threshold: float, optional Value used to replace outliers that are higher to threshold. method: str, optional - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. codependence: str, optional The codependence or similarity matrix used to build the distance metric and clusters. The default is 'pearson'. Possible values are: - 'pearson': pearson correlation matrix. Distance formula: - :math:`D_{i,j} = \sqrt{0.5(1- ho^{pearson}_{i,j})}`. + .. math:: D_{i,j} = \sqrt{0.5(1-\rho^{pearson}_{i,j})}. - 'spearman': spearman correlation matrix. Distance formula: - :math:`D_{i,j} = \sqrt{0.5(1- ho^{spearman}_{i,j})}`. + .. math:: D_{i,j} = \sqrt{0.5(1-\rho^{spearman}_{i,j})}. - 'abs_pearson': absolute value pearson correlation matrix. Distance formula: - :math:`D_{i,j} = \sqrt{(1-| ho^{pearson}_{i,j}|)}`. + .. math:: D_{i,j} = \sqrt{(1-|\rho^{pearson}_{i,j}|)}. - 'abs_spearman': absolute value spearman correlation matrix. Distance formula: - :math:`D_{i,j} = \sqrt{(1-| ho^{spearman}_{i,j}|)}`. + .. math:: D_{i,j} = \sqrt{(1-|\rho^{spearman}_{i,j}|)}. - 'distance': distance correlation matrix. Distance formula: - :math:`D_{i,j} = \sqrt{(1- ho^{distance}_{i,j})}`. + .. math:: D_{i,j} = \sqrt{(1-\rho^{distance}_{i,j})}. - 'mutual_info': mutual information matrix. Distance used is variation information matrix. - 'tail': lower tail dependence index matrix. Dissimilarity formula: - :math:`D_{i,j} = -\log{\lambda_{i,j}}`. + .. math:: D_{i,j} = -\log{\lambda_{i,j}}. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`c-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`c-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`c-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`c-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `c-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `c-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `c-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `c-MLforAM`. risk_measure: str, optional The risk measure used to optimize the portfolio. If model is 'NCO', @@ -296,8 +376,7 @@ To obtain charts, make sure to add `chart=True` as the last parameter Number of CVaRs used to approximate Tail Gini of gains. If None it duplicates a_sim value. The default is None. linkage: str, optional - Linkage method of hierarchical clustering. For more information see - `linkage `_. + Linkage method of hierarchical clustering. For more information see `linkage `__. The default is 'single'. Possible values are: - 'single'. @@ -320,12 +399,9 @@ To obtain charts, make sure to add `chart=True` as the last parameter Number of bins used to calculate variation of information. The default value is 'KN'. Possible values are: - - 'KN': Knuth's choice method. For more information see - `knuth_bin_width `_. - - 'FD': Freedman–Diaconis' choice method. For more information see - `freedman_bin_width `_. - - 'SC': Scotts' choice method. For more information see - `scott_bin_width `_. + - 'KN': Knuth's choice method. For more information see `knuth_bin_width `__. + - 'FD': Freedman–Diaconis' choice method. For more information see `freedman_bin_width `__. + - 'SC': Scotts' choice method. For more information see `scott_bin_width `__. - 'HGR': Hacine-Gharbi and Ravier' choice method. alpha_tail: float, optional @@ -342,3 +418,6 @@ To obtain charts, make sure to add `chart=True` as the last parameter Amount to allocate to portfolio in short positions, by default 0.0 table: bool, optional True if plot table weights, by default False + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/portfolio/po/load/_index.md b/website/content/SDK/portfolio/po/load/_index.rst similarity index 50% rename from website/content/SDK/portfolio/po/load/_index.md rename to website/content/SDK/portfolio/po/load/_index.rst index 26bcf112c5b..11519ab6488 100644 --- a/website/content/SDK/portfolio/po/load/_index.md +++ b/website/content/SDK/portfolio/po/load/_index.rst @@ -1,16 +1,35 @@ -## Get underlying data -### portfolio.po.load(excel_file: str = '') +.. role:: python(code) + :language: python + :class: highlight +| +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.po.load( + excel_file: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

Load in the Excel file to determine the allocation that needs to be set. +

+ +* **Parameters** - Parameters - ---------- excel_file: str The location of the Excel file that needs to be loaded. - Returns - ------- +* **Returns** + tickers: list Returns a list with ticker symbols categories: dictionary diff --git a/website/content/SDK/portfolio/po/load_bl_views/_index.md b/website/content/SDK/portfolio/po/load_bl_views/_index.md deleted file mode 100644 index d0572e01184..00000000000 --- a/website/content/SDK/portfolio/po/load_bl_views/_index.md +++ /dev/null @@ -1,17 +0,0 @@ -## Get underlying data -### portfolio.po.load_bl_views(excel_file: str = '') - - - Load a Excel file with views for Black Litterman model. - - Parameters - ---------- - excel_file: str - The location of the Excel file that needs to be loaded. - - Returns - ------- - p_views: list - Returns a list with p_views matrix - q_views: list - Returns a list with q_views matrix diff --git a/website/content/SDK/portfolio/po/load_bl_views/_index.rst b/website/content/SDK/portfolio/po/load_bl_views/_index.rst new file mode 100644 index 00000000000..6b032f52340 --- /dev/null +++ b/website/content/SDK/portfolio/po/load_bl_views/_index.rst @@ -0,0 +1,36 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.po.load_bl_views( + excel_file: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Load a Excel file with views for Black Litterman model. +

+ +* **Parameters** + + excel_file: str + The location of the Excel file that needs to be loaded. + +* **Returns** + + p_views: list + Returns a list with p_views matrix + q_views: list + Returns a list with q_views matrix diff --git a/website/content/SDK/portfolio/po/maxdecorr/_index.md b/website/content/SDK/portfolio/po/maxdecorr/_index.rst similarity index 61% rename from website/content/SDK/portfolio/po/maxdecorr/_index.md rename to website/content/SDK/portfolio/po/maxdecorr/_index.rst index def296bf1ba..6c289b1acbc 100644 --- a/website/content/SDK/portfolio/po/maxdecorr/_index.md +++ b/website/content/SDK/portfolio/po/maxdecorr/_index.rst @@ -1,12 +1,44 @@ -To obtain charts, make sure to add `chart=True` as the last parameter +.. role:: python(code) + :language: python + :class: highlight -## Get underlying data -### portfolio.po.maxdecorr(symbols: List[str], interval: str = '3y', start_date: str = '', end_date: str = '', log_returns: bool = False, freq: str = 'D', maxnan: float = 0.05, threshold: float = 0, method: str = 'time', covariance: str = 'hist', d_ewma: float = 0.94, value: float = 1.0, value_short: float = 0) -> Tuple +| -Builds a maximal decorrelation portfolio +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.po.maxdecorr( + symbols: List[str], + interval: str = '3y', + start_date: str = '', + end_date: str = '', + log_returns: bool = False, + freq: str = 'D', + maxnan: float = 0.05, + threshold: float = 0, + method: str = 'time', + covariance: str = 'hist', + d_ewma: float = 0.94, + value: float = 1.0, + value_short: float = 0, + chart: bool = False, +) -> Tuple +{{< /highlight >}} + +.. raw:: html + +

+ Builds a maximal decorrelation portfolio +

+ +* **Parameters** - Parameters - ---------- symbols : List[str] List of portfolio stocks interval : str, optional @@ -22,9 +54,10 @@ Builds a maximal decorrelation portfolio freq: str The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float Max percentage of nan values accepted per asset to be included in @@ -32,25 +65,22 @@ Builds a maximal decorrelation portfolio threshold: float Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - s`interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see s`interpolate `__. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`a-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`a-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `a-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `a-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `a-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `a-MLforAM`. d_ewma: float, optional The smoothing factor of ewma methods. @@ -59,20 +89,51 @@ Builds a maximal decorrelation portfolio Amount of money to allocate. The default is 1. value_short : float, optional Amount to allocate to portfolio in short positions. The default is 0. + chart: *bool* + Flag to display chart + + +* **Returns** - Returns - ------- Tuple Dictionary of portfolio weights and DataFrame of stock returns -## Getting charts -### portfolio.po.maxdecorr(symbols: List[str], interval: str = '3y', start_date: str = '', end_date: str = '', log_returns: bool = False, freq: str = 'D', maxnan: float = 0.05, threshold: float = 0, method: str = 'time', covariance: str = 'hist', d_ewma: float = 0.94, value: float = 1.0, value_short: float = 0.0, table: bool = False, chart=True) -> Dict +| +.. raw:: html +

+ > Getting charts +

+ +{{< highlight python >}} +portfolio.po.maxdecorr( + symbols: List[str], + interval: str = '3y', + start_date: str = '', + end_date: str = '', + log_returns: bool = False, + freq: str = 'D', + maxnan: float = 0.05, + threshold: float = 0, + method: str = 'time', + covariance: str = 'hist', + d_ewma: float = 0.94, + value: float = 1.0, + value_short: float = 0.0, + table: bool = False, + chart: bool = False, +) -> Dict +{{< /highlight >}} + +.. raw:: html + +

Builds a maximal decorrelation portfolio +

+ +* **Parameters** - Parameters - ---------- symbols : List[str] List of portfolio tickers interval : str, optional @@ -88,9 +149,9 @@ Builds a maximal decorrelation portfolio freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -98,25 +159,22 @@ Builds a maximal decorrelation portfolio threshold: float, optional Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`a-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`a-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `a-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `a-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `a-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `a-MLforAM`. d_ewma: float, optional The smoothing factor of ewma methods. @@ -127,3 +185,6 @@ Builds a maximal decorrelation portfolio Amount to allocate to portfolio in short positions, by default 0.0 table: bool, optional True if plot table weights, by default False + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/portfolio/po/maxdiv/_index.md b/website/content/SDK/portfolio/po/maxdiv/_index.rst similarity index 61% rename from website/content/SDK/portfolio/po/maxdiv/_index.md rename to website/content/SDK/portfolio/po/maxdiv/_index.rst index 3967f508e9f..ce3b5586a8b 100644 --- a/website/content/SDK/portfolio/po/maxdiv/_index.md +++ b/website/content/SDK/portfolio/po/maxdiv/_index.rst @@ -1,12 +1,44 @@ -To obtain charts, make sure to add `chart=True` as the last parameter +.. role:: python(code) + :language: python + :class: highlight -## Get underlying data -### portfolio.po.maxdiv(symbols: List[str], interval: str = '3y', start_date: str = '', end_date: str = '', log_returns: bool = False, freq: str = 'D', maxnan: float = 0.05, threshold: float = 0, method: str = 'time', covariance: str = 'hist', d_ewma: float = 0.94, value: float = 1.0, value_short: float = 0) -> Tuple +| -Builds a maximal diversification portfolio +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.po.maxdiv( + symbols: List[str], + interval: str = '3y', + start_date: str = '', + end_date: str = '', + log_returns: bool = False, + freq: str = 'D', + maxnan: float = 0.05, + threshold: float = 0, + method: str = 'time', + covariance: str = 'hist', + d_ewma: float = 0.94, + value: float = 1.0, + value_short: float = 0, + chart: bool = False, +) -> Tuple +{{< /highlight >}} + +.. raw:: html + +

+ Builds a maximal diversification portfolio +

+ +* **Parameters** - Parameters - ---------- symbols : List[str] List of portfolio stocks interval : str, optional @@ -22,9 +54,10 @@ Builds a maximal diversification portfolio freq: str The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float Max percentage of nan values accepted per asset to be included in @@ -32,25 +65,22 @@ Builds a maximal diversification portfolio threshold: float Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`a-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`a-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `a-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `a-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `a-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `a-MLforAM`. d_ewma: float, optional The smoothing factor of ewma methods. @@ -59,20 +89,51 @@ Builds a maximal diversification portfolio Amount of money to allocate. The default is 1. value_short : float, optional Amount to allocate to portfolio in short positions. The default is 0. + chart: *bool* + Flag to display chart + + +* **Returns** - Returns - ------- Tuple Dictionary of portfolio weights and DataFrame of stock returns -## Getting charts -### portfolio.po.maxdiv(symbols: List[str], interval: str = '3y', start_date: str = '', end_date: str = '', log_returns: bool = False, freq: str = 'D', maxnan: float = 0.05, threshold: float = 0, method: str = 'time', covariance: str = 'hist', d_ewma: float = 0.94, value: float = 1.0, value_short: float = 0.0, table: bool = False, chart=True) -> Dict +| +.. raw:: html +

+ > Getting charts +

+ +{{< highlight python >}} +portfolio.po.maxdiv( + symbols: List[str], + interval: str = '3y', + start_date: str = '', + end_date: str = '', + log_returns: bool = False, + freq: str = 'D', + maxnan: float = 0.05, + threshold: float = 0, + method: str = 'time', + covariance: str = 'hist', + d_ewma: float = 0.94, + value: float = 1.0, + value_short: float = 0.0, + table: bool = False, + chart: bool = False, +) -> Dict +{{< /highlight >}} + +.. raw:: html + +

Builds a maximal diversification portfolio +

+ +* **Parameters** - Parameters - ---------- symbols : List[str] List of portfolio tickers interval : str, optional @@ -88,9 +149,9 @@ Builds a maximal diversification portfolio freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -98,25 +159,22 @@ Builds a maximal diversification portfolio threshold: float, optional Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`a-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`a-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `a-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `a-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `a-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `a-MLforAM`. d_ewma: float, optional The smoothing factor of ewma methods. @@ -127,3 +185,6 @@ Builds a maximal diversification portfolio Amount to allocate to portfolio in short positions, by default 0.0 table: bool, optional True if plot table weights, by default False + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/portfolio/po/maxret/_index.md b/website/content/SDK/portfolio/po/maxret/_index.rst similarity index 69% rename from website/content/SDK/portfolio/po/maxret/_index.md rename to website/content/SDK/portfolio/po/maxret/_index.rst index abb43064107..d6789399b56 100644 --- a/website/content/SDK/portfolio/po/maxret/_index.md +++ b/website/content/SDK/portfolio/po/maxret/_index.rst @@ -1,13 +1,51 @@ -To obtain charts, make sure to add `chart=True` as the last parameter +.. role:: python(code) + :language: python + :class: highlight -## Get underlying data -### portfolio.po.maxret(symbols: List[str], interval: str = '3y', start_date: str = '', end_date: str = '', log_returns: bool = False, freq: str = 'D', maxnan: float = 0.05, threshold: float = 0, method: str = 'time', risk_measure: str = 'MV', risk_free_rate: float = 0, risk_aversion: float = 1, alpha: float = 0.05, target_return: float = -1, target_risk: float = -1, mean: str = 'hist', covariance: str = 'hist', d_ewma: float = 0.94, value: float = 1.0, value_short: float = 0.0) -> Tuple +| +To obtain charts, make sure to add :python:`chart = True` as the last parameter. +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.po.maxret( + symbols: List[str], + interval: str = '3y', + start_date: str = '', + end_date: str = '', + log_returns: bool = False, + freq: str = 'D', + maxnan: float = 0.05, + threshold: float = 0, + method: str = 'time', + risk_measure: str = 'MV', + risk_free_rate: float = 0, + risk_aversion: float = 1, + alpha: float = 0.05, + target_return: float = -1, + target_risk: float = -1, + mean: str = 'hist', + covariance: str = 'hist', + d_ewma: float = 0.94, + value: float = 1.0, + value_short: float = 0.0, + chart: bool = False, +) -> Tuple +{{< /highlight >}} + +.. raw:: html + +

Builds a maximal return/risk ratio portfolio +

+ +* **Parameters** - Parameters - ---------- symbols : List[str] List of portfolio tickers interval : str, optional @@ -23,9 +61,10 @@ To obtain charts, make sure to add `chart=True` as the last parameter freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -33,8 +72,7 @@ To obtain charts, make sure to add `chart=True` as the last parameter threshold: float, optional Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. risk_measure: str, optional The risk measure used to optimize the portfolio. The default is 'MV'. Possible values are: @@ -67,28 +105,24 @@ To obtain charts, make sure to add `chart=True` as the last parameter The default value is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`a-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`a-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `a-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `a-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `a-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `a-MLforAM`. d_ewma: float, optional The smoothing factor of ewma methods. @@ -97,20 +131,58 @@ To obtain charts, make sure to add `chart=True` as the last parameter Amount to allocate to portfolio in long positions, by default 1.0 value_short : float, optional Amount to allocate to portfolio in short positions, by default 0.0 + chart: *bool* + Flag to display chart + + +* **Returns** - Returns - ------- Tuple Dictionary of portfolio weights and DataFrame of stock returns -## Getting charts -### portfolio.po.maxret(symbols: List[str], interval: str = '3y', start_date: str = '', end_date: str = '', log_returns: bool = False, freq: str = 'D', maxnan: float = 0.05, threshold: float = 0, method: str = 'time', risk_measure: str = 'MV', risk_free_rate: float = 0, risk_aversion: float = 1, alpha: float = 0.05, target_return: float = -1, target_risk: float = -1, mean: str = 'hist', covariance: str = 'hist', d_ewma: float = 0.94, value: float = 1.0, value_short: float = 0.0, table: bool = False, chart=True) -> Dict +| +.. raw:: html +

+ > Getting charts +

+ +{{< highlight python >}} +portfolio.po.maxret( + symbols: List[str], + interval: str = '3y', + start_date: str = '', + end_date: str = '', + log_returns: bool = False, + freq: str = 'D', + maxnan: float = 0.05, + threshold: float = 0, + method: str = 'time', + risk_measure: str = 'MV', + risk_free_rate: float = 0, + risk_aversion: float = 1, + alpha: float = 0.05, + target_return: float = -1, + target_risk: float = -1, + mean: str = 'hist', + covariance: str = 'hist', + d_ewma: float = 0.94, + value: float = 1.0, + value_short: float = 0.0, + table: bool = False, + chart: bool = False, +) -> Dict +{{< /highlight >}} + +.. raw:: html + +

Builds a maximal return portfolio +

+ +* **Parameters** - Parameters - ---------- symbols : List[str] List of portfolio tickers interval : str, optional @@ -126,9 +198,9 @@ To obtain charts, make sure to add `chart=True` as the last parameter freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -136,8 +208,7 @@ To obtain charts, make sure to add `chart=True` as the last parameter threshold: float, optional Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. risk_measure: str, optional The risk measure used to optimize the portfolio. The default is 'MV'. Possible values are: @@ -173,28 +244,24 @@ To obtain charts, make sure to add `chart=True` as the last parameter The default value is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`a-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`a-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `a-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `a-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `a-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `a-MLforAM`. d_ewma: float, optional The smoothing factor of ewma methods. @@ -205,3 +272,6 @@ To obtain charts, make sure to add `chart=True` as the last parameter Amount to allocate to portfolio in short positions, by default 0.0 table: bool, optional True if plot table weights, by default False + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/portfolio/po/maxsharpe/_index.md b/website/content/SDK/portfolio/po/maxsharpe/_index.rst similarity index 69% rename from website/content/SDK/portfolio/po/maxsharpe/_index.md rename to website/content/SDK/portfolio/po/maxsharpe/_index.rst index a5e211e261e..6cd43e02b21 100644 --- a/website/content/SDK/portfolio/po/maxsharpe/_index.md +++ b/website/content/SDK/portfolio/po/maxsharpe/_index.rst @@ -1,13 +1,51 @@ -To obtain charts, make sure to add `chart=True` as the last parameter +.. role:: python(code) + :language: python + :class: highlight -## Get underlying data -### portfolio.po.maxsharpe(symbols: List[str], interval: str = '3y', start_date: str = '', end_date: str = '', log_returns: bool = False, freq: str = 'D', maxnan: float = 0.05, threshold: float = 0, method: str = 'time', risk_measure: str = 'MV', risk_free_rate: float = 0, risk_aversion: float = 1, alpha: float = 0.05, target_return: float = -1, target_risk: float = -1, mean: str = 'hist', covariance: str = 'hist', d_ewma: float = 0.94, value: float = 1.0, value_short: float = 0.0) -> Tuple +| +To obtain charts, make sure to add :python:`chart = True` as the last parameter. +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.po.maxsharpe( + symbols: List[str], + interval: str = '3y', + start_date: str = '', + end_date: str = '', + log_returns: bool = False, + freq: str = 'D', + maxnan: float = 0.05, + threshold: float = 0, + method: str = 'time', + risk_measure: str = 'MV', + risk_free_rate: float = 0, + risk_aversion: float = 1, + alpha: float = 0.05, + target_return: float = -1, + target_risk: float = -1, + mean: str = 'hist', + covariance: str = 'hist', + d_ewma: float = 0.94, + value: float = 1.0, + value_short: float = 0.0, + chart: bool = False, +) -> Tuple +{{< /highlight >}} + +.. raw:: html + +

Builds a maximal return/risk ratio portfolio +

+ +* **Parameters** - Parameters - ---------- symbols : List[str] List of portfolio tickers interval : str, optional @@ -23,9 +61,10 @@ To obtain charts, make sure to add `chart=True` as the last parameter freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -33,8 +72,7 @@ To obtain charts, make sure to add `chart=True` as the last parameter threshold: float, optional Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. risk_measure: str, optional The risk measure used to optimize the portfolio. The default is 'MV'. Possible values are: @@ -67,28 +105,24 @@ To obtain charts, make sure to add `chart=True` as the last parameter The default value is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`a-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`a-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `a-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `a-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `a-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `a-MLforAM`. d_ewma: float, optional The smoothing factor of ewma methods. @@ -97,20 +131,58 @@ To obtain charts, make sure to add `chart=True` as the last parameter Amount to allocate to portfolio in long positions, by default 1.0 value_short : float, optional Amount to allocate to portfolio in short positions, by default 0.0 + chart: *bool* + Flag to display chart + + +* **Returns** - Returns - ------- Tuple Dictionary of portfolio weights and DataFrame of stock returns -## Getting charts -### portfolio.po.maxsharpe(symbols: List[str], interval: str = '3y', start_date: str = '', end_date: str = '', log_returns: bool = False, freq: str = 'D', maxnan: float = 0.05, threshold: float = 0, method: str = 'time', risk_measure: str = 'MV', risk_free_rate: float = 0, risk_aversion: float = 1, alpha: float = 0.05, target_return: float = -1, target_risk: float = -1, mean: str = 'hist', covariance: str = 'hist', d_ewma: float = 0.94, value: float = 1.0, value_short: float = 0.0, table: bool = False, chart=True) -> Dict +| +.. raw:: html +

+ > Getting charts +

+ +{{< highlight python >}} +portfolio.po.maxsharpe( + symbols: List[str], + interval: str = '3y', + start_date: str = '', + end_date: str = '', + log_returns: bool = False, + freq: str = 'D', + maxnan: float = 0.05, + threshold: float = 0, + method: str = 'time', + risk_measure: str = 'MV', + risk_free_rate: float = 0, + risk_aversion: float = 1, + alpha: float = 0.05, + target_return: float = -1, + target_risk: float = -1, + mean: str = 'hist', + covariance: str = 'hist', + d_ewma: float = 0.94, + value: float = 1.0, + value_short: float = 0.0, + table: bool = False, + chart: bool = False, +) -> Dict +{{< /highlight >}} + +.. raw:: html + +

Builds a maximal return/risk ratio portfolio +

+ +* **Parameters** - Parameters - ---------- symbols : List[str] List of portfolio tickers interval : str, optional @@ -126,9 +198,9 @@ To obtain charts, make sure to add `chart=True` as the last parameter freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -136,8 +208,7 @@ To obtain charts, make sure to add `chart=True` as the last parameter threshold: float, optional Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. risk_measure: str, optional The risk measure used to optimize the portfolio. The default is 'MV'. Possible values are: @@ -173,28 +244,24 @@ To obtain charts, make sure to add `chart=True` as the last parameter The default value is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`a-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`a-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `a-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `a-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `a-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `a-MLforAM`. d_ewma: float, optional The smoothing factor of ewma methods. @@ -205,3 +272,6 @@ To obtain charts, make sure to add `chart=True` as the last parameter Amount to allocate to portfolio in short positions, by default 0.0 table: bool, optional True if plot table weights, by default False + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/portfolio/po/maxutil/_index.md b/website/content/SDK/portfolio/po/maxutil/_index.rst similarity index 69% rename from website/content/SDK/portfolio/po/maxutil/_index.md rename to website/content/SDK/portfolio/po/maxutil/_index.rst index d573ffb3e1a..c0de0dc1bae 100644 --- a/website/content/SDK/portfolio/po/maxutil/_index.md +++ b/website/content/SDK/portfolio/po/maxutil/_index.rst @@ -1,13 +1,51 @@ -To obtain charts, make sure to add `chart=True` as the last parameter +.. role:: python(code) + :language: python + :class: highlight -## Get underlying data -### portfolio.po.maxutil(symbols: List[str], interval: str = '3y', start_date: str = '', end_date: str = '', log_returns: bool = False, freq: str = 'D', maxnan: float = 0.05, threshold: float = 0, method: str = 'time', risk_measure: str = 'MV', risk_free_rate: float = 0, risk_aversion: float = 1, alpha: float = 0.05, target_return: float = -1, target_risk: float = -1, mean: str = 'hist', covariance: str = 'hist', d_ewma: float = 0.94, value: float = 1.0, value_short: float = 0.0) -> Tuple +| +To obtain charts, make sure to add :python:`chart = True` as the last parameter. +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.po.maxutil( + symbols: List[str], + interval: str = '3y', + start_date: str = '', + end_date: str = '', + log_returns: bool = False, + freq: str = 'D', + maxnan: float = 0.05, + threshold: float = 0, + method: str = 'time', + risk_measure: str = 'MV', + risk_free_rate: float = 0, + risk_aversion: float = 1, + alpha: float = 0.05, + target_return: float = -1, + target_risk: float = -1, + mean: str = 'hist', + covariance: str = 'hist', + d_ewma: float = 0.94, + value: float = 1.0, + value_short: float = 0.0, + chart: bool = False, +) -> Tuple +{{< /highlight >}} + +.. raw:: html + +

Builds a maximal return/risk ratio portfolio +

+ +* **Parameters** - Parameters - ---------- symbols : List[str] List of portfolio tickers interval : str, optional @@ -23,9 +61,10 @@ To obtain charts, make sure to add `chart=True` as the last parameter freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -33,8 +72,7 @@ To obtain charts, make sure to add `chart=True` as the last parameter threshold: float, optional Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. risk_measure: str, optional The risk measure used to optimize the portfolio. The default is 'MV'. Possible values are: @@ -67,28 +105,24 @@ To obtain charts, make sure to add `chart=True` as the last parameter The default value is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`a-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`a-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `a-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `a-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `a-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `a-MLforAM`. d_ewma: float, optional The smoothing factor of ewma methods. @@ -97,20 +131,58 @@ To obtain charts, make sure to add `chart=True` as the last parameter Amount to allocate to portfolio in long positions, by default 1.0 value_short : float, optional Amount to allocate to portfolio in short positions, by default 0.0 + chart: *bool* + Flag to display chart + + +* **Returns** - Returns - ------- Tuple Dictionary of portfolio weights and DataFrame of stock returns -## Getting charts -### portfolio.po.maxutil(symbols: List[str], interval: str = '3y', start_date: str = '', end_date: str = '', log_returns: bool = False, freq: str = 'D', maxnan: float = 0.05, threshold: float = 0, method: str = 'time', risk_measure: str = 'MV', risk_free_rate: float = 0, risk_aversion: float = 1, alpha: float = 0.05, target_return: float = -1, target_risk: float = -1, mean: str = 'hist', covariance: str = 'hist', d_ewma: float = 0.94, value: float = 1.0, value_short: float = 0.0, table: bool = False, chart=True) -> Dict +| +.. raw:: html +

+ > Getting charts +

+ +{{< highlight python >}} +portfolio.po.maxutil( + symbols: List[str], + interval: str = '3y', + start_date: str = '', + end_date: str = '', + log_returns: bool = False, + freq: str = 'D', + maxnan: float = 0.05, + threshold: float = 0, + method: str = 'time', + risk_measure: str = 'MV', + risk_free_rate: float = 0, + risk_aversion: float = 1, + alpha: float = 0.05, + target_return: float = -1, + target_risk: float = -1, + mean: str = 'hist', + covariance: str = 'hist', + d_ewma: float = 0.94, + value: float = 1.0, + value_short: float = 0.0, + table: bool = False, + chart: bool = False, +) -> Dict +{{< /highlight >}} + +.. raw:: html + +

Builds a maximal risk averse utility portfolio +

+ +* **Parameters** - Parameters - ---------- symbols : List[str] List of portfolio tickers interval : str, optional @@ -126,9 +198,9 @@ To obtain charts, make sure to add `chart=True` as the last parameter freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -136,8 +208,7 @@ To obtain charts, make sure to add `chart=True` as the last parameter threshold: float, optional Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. risk_measure: str, optional The risk measure used to optimize the portfolio. The default is 'MV'. Possible values are: @@ -173,28 +244,24 @@ To obtain charts, make sure to add `chart=True` as the last parameter The default value is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`a-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`a-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `a-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `a-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `a-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `a-MLforAM`. d_ewma: float, optional The smoothing factor of ewma methods. @@ -205,3 +272,6 @@ To obtain charts, make sure to add `chart=True` as the last parameter Amount to allocate to portfolio in short positions, by default 0.0 table: bool, optional True if plot table weights, by default False + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/portfolio/po/meanrisk/_index.md b/website/content/SDK/portfolio/po/meanrisk/_index.rst similarity index 70% rename from website/content/SDK/portfolio/po/meanrisk/_index.md rename to website/content/SDK/portfolio/po/meanrisk/_index.rst index a05f5333082..dca4ebbef04 100644 --- a/website/content/SDK/portfolio/po/meanrisk/_index.md +++ b/website/content/SDK/portfolio/po/meanrisk/_index.rst @@ -1,12 +1,52 @@ -To obtain charts, make sure to add `chart=True` as the last parameter +.. role:: python(code) + :language: python + :class: highlight -## Get underlying data -### portfolio.po.meanrisk(symbols: List[str], interval: str = '3y', start_date: str = '', end_date: str = '', log_returns: bool = False, freq: str = 'D', maxnan: float = 0.05, threshold: float = 0, method: str = 'time', risk_measure: str = 'MV', objective: str = 'Sharpe', risk_free_rate: float = 0, risk_aversion: float = 1, alpha: float = 0.05, target_return: float = -1, target_risk: float = -1, mean: str = 'hist', covariance: str = 'hist', d_ewma: float = 0.94, value: float = 1.0, value_short: float = 0.0) -> Tuple +| -Builds a mean risk optimal portfolio +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.po.meanrisk( + symbols: List[str], + interval: str = '3y', + start_date: str = '', + end_date: str = '', + log_returns: bool = False, + freq: str = 'D', + maxnan: float = 0.05, + threshold: float = 0, + method: str = 'time', + risk_measure: str = 'MV', + objective: str = 'Sharpe', + risk_free_rate: float = 0, + risk_aversion: float = 1, + alpha: float = 0.05, + target_return: float = -1, + target_risk: float = -1, + mean: str = 'hist', + covariance: str = 'hist', + d_ewma: float = 0.94, + value: float = 1.0, + value_short: float = 0.0, + chart: bool = False, +) -> Tuple +{{< /highlight >}} + +.. raw:: html + +

+ Builds a mean risk optimal portfolio +

+ +* **Parameters** - Parameters - ---------- symbols : List[str] List of portfolio stocks interval : str, optional @@ -22,9 +62,10 @@ Builds a mean risk optimal portfolio freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float Max percentage of nan values accepted per asset to be included in @@ -32,8 +73,7 @@ Builds a mean risk optimal portfolio threshold: float Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. objective: str Objective function of the optimization model. The default is 'Sharpe'. Possible values are: @@ -78,28 +118,24 @@ Builds a mean risk optimal portfolio The default value is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`a-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`a-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `a-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `a-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `a-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `a-MLforAM`. d_ewma: float, optional The smoothing factor of ewma methods. @@ -108,20 +144,59 @@ Builds a mean risk optimal portfolio Amount of money to allocate. The default is 1. value_short : float, optional Amount to allocate to portfolio in short positions. The default is 0. + chart: *bool* + Flag to display chart + + +* **Returns** - Returns - ------- Tuple Dictionary of portfolio weights and DataFrame of stock returns -## Getting charts -### portfolio.po.meanrisk(symbols: List[str], interval: str = '3y', start_date: str = '', end_date: str = '', log_returns: bool = False, freq: str = 'D', maxnan: float = 0.05, threshold: float = 0, method: str = 'time', risk_measure: str = 'mv', objective: str = 'sharpe', risk_free_rate: float = 0, risk_aversion: float = 1, alpha: float = 0.05, target_return: float = -1, target_risk: float = -1, mean: str = 'hist', covariance: str = 'hist', d_ewma: float = 0.94, value: float = 1.0, value_short: float = 0.0, table: bool = False, chart=True) -> Dict +| +.. raw:: html +

+ > Getting charts +

+ +{{< highlight python >}} +portfolio.po.meanrisk( + symbols: List[str], + interval: str = '3y', + start_date: str = '', + end_date: str = '', + log_returns: bool = False, + freq: str = 'D', + maxnan: float = 0.05, + threshold: float = 0, + method: str = 'time', + risk_measure: str = 'mv', + objective: str = 'sharpe', + risk_free_rate: float = 0, + risk_aversion: float = 1, + alpha: float = 0.05, + target_return: float = -1, + target_risk: float = -1, + mean: str = 'hist', + covariance: str = 'hist', + d_ewma: float = 0.94, + value: float = 1.0, + value_short: float = 0.0, + table: bool = False, + chart: bool = False, +) -> Dict +{{< /highlight >}} + +.. raw:: html + +

Builds a mean risk optimal portfolio +

+ +* **Parameters** - Parameters - ---------- symbols : List[str] List of portfolio tickers interval : str, optional @@ -137,9 +212,9 @@ Builds a mean risk optimal portfolio freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -147,8 +222,7 @@ Builds a mean risk optimal portfolio threshold: float, optional Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. risk_measure: str, optional The risk measure used to optimize the portfolio. The default is 'MV'. Possible values are: @@ -193,28 +267,24 @@ Builds a mean risk optimal portfolio The default value is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`a-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`a-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `a-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `a-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `a-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `a-MLforAM`. d_ewma: float, optional The smoothing factor of ewma methods. @@ -225,3 +295,6 @@ Builds a mean risk optimal portfolio Amount to allocate to portfolio in short positions, by default 0.0 table: bool, optional True if plot table weights, by default False + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/portfolio/po/minrisk/_index.md b/website/content/SDK/portfolio/po/minrisk/_index.rst similarity index 69% rename from website/content/SDK/portfolio/po/minrisk/_index.md rename to website/content/SDK/portfolio/po/minrisk/_index.rst index 1e704a2093c..9a5b220e76f 100644 --- a/website/content/SDK/portfolio/po/minrisk/_index.md +++ b/website/content/SDK/portfolio/po/minrisk/_index.rst @@ -1,13 +1,51 @@ -To obtain charts, make sure to add `chart=True` as the last parameter +.. role:: python(code) + :language: python + :class: highlight -## Get underlying data -### portfolio.po.minrisk(symbols: List[str], interval: str = '3y', start_date: str = '', end_date: str = '', log_returns: bool = False, freq: str = 'D', maxnan: float = 0.05, threshold: float = 0, method: str = 'time', risk_measure: str = 'MV', risk_free_rate: float = 0, risk_aversion: float = 1, alpha: float = 0.05, target_return: float = -1, target_risk: float = -1, mean: str = 'hist', covariance: str = 'hist', d_ewma: float = 0.94, value: float = 1.0, value_short: float = 0.0) -> Tuple +| +To obtain charts, make sure to add :python:`chart = True` as the last parameter. +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.po.minrisk( + symbols: List[str], + interval: str = '3y', + start_date: str = '', + end_date: str = '', + log_returns: bool = False, + freq: str = 'D', + maxnan: float = 0.05, + threshold: float = 0, + method: str = 'time', + risk_measure: str = 'MV', + risk_free_rate: float = 0, + risk_aversion: float = 1, + alpha: float = 0.05, + target_return: float = -1, + target_risk: float = -1, + mean: str = 'hist', + covariance: str = 'hist', + d_ewma: float = 0.94, + value: float = 1.0, + value_short: float = 0.0, + chart: bool = False, +) -> Tuple +{{< /highlight >}} + +.. raw:: html + +

Builds a maximal return/risk ratio portfolio +

+ +* **Parameters** - Parameters - ---------- symbols : List[str] List of portfolio tickers interval : str, optional @@ -23,9 +61,10 @@ To obtain charts, make sure to add `chart=True` as the last parameter freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -33,8 +72,7 @@ To obtain charts, make sure to add `chart=True` as the last parameter threshold: float, optional Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. risk_measure: str, optional The risk measure used to optimize the portfolio. The default is 'MV'. Possible values are: @@ -67,28 +105,24 @@ To obtain charts, make sure to add `chart=True` as the last parameter The default value is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`a-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`a-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `a-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `a-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `a-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `a-MLforAM`. d_ewma: float, optional The smoothing factor of ewma methods. @@ -97,20 +131,58 @@ To obtain charts, make sure to add `chart=True` as the last parameter Amount to allocate to portfolio in long positions, by default 1.0 value_short : float, optional Amount to allocate to portfolio in short positions, by default 0.0 + chart: *bool* + Flag to display chart + + +* **Returns** - Returns - ------- Tuple Dictionary of portfolio weights and DataFrame of stock returns -## Getting charts -### portfolio.po.minrisk(symbols: List[str], interval: str = '3y', start_date: str = '', end_date: str = '', log_returns: bool = False, freq: str = 'D', maxnan: float = 0.05, threshold: float = 0, method: str = 'time', risk_measure: str = 'MV', risk_free_rate: float = 0, risk_aversion: float = 1, alpha: float = 0.05, target_return: float = -1, target_risk: float = -1, mean: str = 'hist', covariance: str = 'hist', d_ewma: float = 0.94, value: float = 1.0, value_short: float = 0.0, table: bool = False, chart=True) -> Dict +| +.. raw:: html +

+ > Getting charts +

+ +{{< highlight python >}} +portfolio.po.minrisk( + symbols: List[str], + interval: str = '3y', + start_date: str = '', + end_date: str = '', + log_returns: bool = False, + freq: str = 'D', + maxnan: float = 0.05, + threshold: float = 0, + method: str = 'time', + risk_measure: str = 'MV', + risk_free_rate: float = 0, + risk_aversion: float = 1, + alpha: float = 0.05, + target_return: float = -1, + target_risk: float = -1, + mean: str = 'hist', + covariance: str = 'hist', + d_ewma: float = 0.94, + value: float = 1.0, + value_short: float = 0.0, + table: bool = False, + chart: bool = False, +) -> Dict +{{< /highlight >}} + +.. raw:: html + +

Builds a minimum risk portfolio +

+ +* **Parameters** - Parameters - ---------- symbols : List[str] List of portfolio tickers interval : str, optional @@ -126,9 +198,9 @@ To obtain charts, make sure to add `chart=True` as the last parameter freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -136,8 +208,7 @@ To obtain charts, make sure to add `chart=True` as the last parameter threshold: float, optional Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. risk_measure: str, optional The risk measure used to optimize the portfolio. The default is 'MV'. Possible values are: @@ -173,28 +244,24 @@ To obtain charts, make sure to add `chart=True` as the last parameter The default value is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`a-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`a-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `a-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `a-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `a-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `a-MLforAM`. d_ewma: float, optional The smoothing factor of ewma methods. @@ -205,3 +272,6 @@ To obtain charts, make sure to add `chart=True` as the last parameter Amount to allocate to portfolio in short positions, by default 0.0 table: bool, optional True if plot table weights, by default False + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/portfolio/po/nco/_index.md b/website/content/SDK/portfolio/po/nco/_index.rst similarity index 73% rename from website/content/SDK/portfolio/po/nco/_index.md rename to website/content/SDK/portfolio/po/nco/_index.rst index 4bb42057dee..7e5ee9da936 100644 --- a/website/content/SDK/portfolio/po/nco/_index.md +++ b/website/content/SDK/portfolio/po/nco/_index.rst @@ -1,13 +1,58 @@ -To obtain charts, make sure to add `chart=True` as the last parameter +.. role:: python(code) + :language: python + :class: highlight -## Get underlying data -### portfolio.po.nco(symbols: List[str], interval: str = '3y', start_date: str = '', end_date: str = '', log_returns: bool = False, freq: str = 'D', maxnan: float = 0.05, threshold: float = 0, method: str = 'time', codependence: str = 'pearson', covariance: str = 'hist', objective: str = 'minrisk', risk_measure: str = 'mv', risk_free_rate: float = 0.0, risk_aversion: float = 1.0, alpha: float = 0.05, a_sim: int = 100, beta: float = None, b_sim: int = None, linkage: str = 'single', k: int = None, max_k: int = 10, bins_info: str = 'KN', alpha_tail: float = 0.05, leaf_order: bool = True, d_ewma: float = 0.94, value: float = 1.0) -> Tuple +| +To obtain charts, make sure to add :python:`chart = True` as the last parameter. +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.po.nco( + symbols: List[str], + interval: str = '3y', + start_date: str = '', + end_date: str = '', + log_returns: bool = False, + freq: str = 'D', + maxnan: float = 0.05, + threshold: float = 0, + method: str = 'time', + codependence: str = 'pearson', + covariance: str = 'hist', + objective: str = 'minrisk', + risk_measure: str = 'mv', + risk_free_rate: float = 0.0, + risk_aversion: float = 1.0, + alpha: float = 0.05, + a_sim: int = 100, + beta: float = None, + b_sim: int = None, + linkage: str = 'single', + k: int = None, + max_k: int = 10, + bins_info: str = 'KN', + alpha_tail: float = 0.05, + leaf_order: bool = True, + d_ewma: float = 0.94, + value: float = 1.0, + chart: bool = False, +) -> Tuple +{{< /highlight >}} + +.. raw:: html + +

Builds a hierarchical risk parity portfolio +

+ +* **Parameters** - Parameters - ---------- symbols : List[str] List of portfolio tickers interval : str @@ -23,9 +68,10 @@ To obtain charts, make sure to add `chart=True` as the last parameter freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -33,43 +79,40 @@ To obtain charts, make sure to add `chart=True` as the last parameter threshold: float, optional Value used to replace outliers that are higher to threshold. method: str, optional - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. codependence: str, optional The codependence or similarity matrix used to build the distance metric and clusters. The default is 'pearson'. Possible values are: - 'pearson': pearson correlation matrix. Distance formula: - :math:`D_{i,j} = \sqrt{0.5(1- ho^{pearson}_{i,j})}`. + .. math:: D_{i,j} = \sqrt{0.5(1-\rho^{pearson}_{i,j})} - 'spearman': spearman correlation matrix. Distance formula: - :math:`D_{i,j} = \sqrt{0.5(1- ho^{spearman}_{i,j})}`. + .. math:: D_{i,j} = \sqrt{0.5(1-\rho^{spearman}_{i,j})} - 'abs_pearson': absolute value pearson correlation matrix. Distance formula: - :math:`D_{i,j} = \sqrt{(1-| ho^{pearson}_{i,j}|)}`. + .. math:: D_{i,j} = \sqrt{(1-|\rho^{pearson}_{i,j}|)} - 'abs_spearman': absolute value spearman correlation matrix. Distance formula: - :math:`D_{i,j} = \sqrt{(1-| ho^{spearman}_{i,j}|)}`. + .. math:: D_{i,j} = \sqrt{(1-|\rho^{spearman}_{i,j}|)} - 'distance': distance correlation matrix. Distance formula: - :math:`D_{i,j} = \sqrt{(1- ho^{distance}_{i,j})}`. + .. math:: D_{i,j} = \sqrt{(1-\rho^{distance}_{i,j})} - 'mutual_info': mutual information matrix. Distance used is variation information matrix. - 'tail': lower tail dependence index matrix. Dissimilarity formula: - :math:`D_{i,j} = -\log{\lambda_{i,j}}`. + .. math:: D_{i,j} = -\log{\lambda_{i,j}}. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`c-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`c-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`c-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`c-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `c-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `c-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `c-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `c-MLforAM`. objective: str, optional Objective function used by the NCO model. @@ -129,8 +172,7 @@ To obtain charts, make sure to add `chart=True` as the last parameter Number of CVaRs used to approximate Tail Gini of gains. If None it duplicates a_sim value. The default is None. linkage: str, optional - Linkage method of hierarchical clustering. For more information see - `linkage `_. + Linkage method of hierarchical clustering. For more information see `linkage `__. The default is 'single'. Possible values are: - 'single'. @@ -153,12 +195,9 @@ To obtain charts, make sure to add `chart=True` as the last parameter Number of bins used to calculate variation of information. The default value is 'KN'. Possible values are: - - 'KN': Knuth's choice method. For more information see - `knuth_bin_width `_. - - 'FD': Freedman–Diaconis' choice method. For more information see - `freedman_bin_width `_. - - 'SC': Scotts' choice method. For more information see - `scott_bin_width `_. + - 'KN': Knuth's choice method. For more information see `knuth_bin_width `__. + - 'FD': Freedman–Diaconis' choice method. For more information see `freedman_bin_width `__. + - 'SC': Scotts' choice method. For more information see `scott_bin_width `__. - 'HGR': Hacine-Gharbi and Ravier' choice method. alpha_tail: float, optional @@ -175,15 +214,60 @@ To obtain charts, make sure to add `chart=True` as the last parameter Amount to allocate to portfolio in short positions, by default 0.0 table: bool, optional True if plot table weights, by default False - -## Getting charts -### portfolio.po.nco(symbols: List[str], interval: str = '3y', start_date: str = '', end_date: str = '', log_returns: bool = False, freq: str = 'D', maxnan: float = 0.05, threshold: float = 0, method: str = 'time', codependence: str = 'pearson', covariance: str = 'hist', objective: str = 'MinRisk', risk_measure: str = 'mv', risk_free_rate: float = 0.0, risk_aversion: float = 1.0, alpha: float = 0.05, a_sim: int = 100, beta: float = None, b_sim: int = None, linkage: str = 'ward', k: int = None, max_k: int = 10, bins_info: str = 'KN', alpha_tail: float = 0.05, leaf_order: bool = True, d_ewma: float = 0.94, value: float = 1.0, table: bool = False, chart=True) -> Dict + chart: *bool* + Flag to display chart +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +portfolio.po.nco( + symbols: List[str], + interval: str = '3y', + start_date: str = '', + end_date: str = '', + log_returns: bool = False, + freq: str = 'D', + maxnan: float = 0.05, + threshold: float = 0, + method: str = 'time', + codependence: str = 'pearson', + covariance: str = 'hist', + objective: str = 'MinRisk', + risk_measure: str = 'mv', + risk_free_rate: float = 0.0, + risk_aversion: float = 1.0, + alpha: float = 0.05, + a_sim: int = 100, + beta: float = None, + b_sim: int = None, + linkage: str = 'ward', + k: int = None, + max_k: int = 10, + bins_info: str = 'KN', + alpha_tail: float = 0.05, + leaf_order: bool = True, + d_ewma: float = 0.94, + value: float = 1.0, + table: bool = False, + chart: bool = False, +) -> Dict +{{< /highlight >}} + +.. raw:: html + +

Builds a hierarchical equal risk contribution portfolio +

+ +* **Parameters** - Parameters - ---------- symbols : List[str] List of portfolio tickers interval : str @@ -199,9 +283,9 @@ To obtain charts, make sure to add `chart=True` as the last parameter freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -209,8 +293,7 @@ To obtain charts, make sure to add `chart=True` as the last parameter threshold: float, optional Value used to replace outliers that are higher to threshold. method: str, optional - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. model: str, optional The hierarchical cluster portfolio model used for optimize the portfolio. The default is 'HRP'. Possible values are: @@ -224,36 +307,34 @@ To obtain charts, make sure to add `chart=True` as the last parameter metric and clusters. The default is 'pearson'. Possible values are: - 'pearson': pearson correlation matrix. Distance formula: - :math:`D_{i,j} = \sqrt{0.5(1- ho^{pearson}_{i,j})}`. + .. math:: D_{i,j} = \sqrt{0.5(1-\rho^{pearson}_{i,j})}. - 'spearman': spearman correlation matrix. Distance formula: - :math:`D_{i,j} = \sqrt{0.5(1- ho^{spearman}_{i,j})}`. + .. math:: D_{i,j} = \sqrt{0.5(1-\rho^{spearman}_{i,j})}. - 'abs_pearson': absolute value pearson correlation matrix. Distance formula: - :math:`D_{i,j} = \sqrt{(1-| ho^{pearson}_{i,j}|)}`. + .. math:: D_{i,j} = \sqrt{(1-|\rho^{pearson}_{i,j}|)}. - 'abs_spearman': absolute value spearman correlation matrix. Distance formula: - :math:`D_{i,j} = \sqrt{(1-| ho^{spearman}_{i,j}|)}`. + .. math:: D_{i,j} = \sqrt{(1-|\rho^{spearman}_{i,j}|)}. - 'distance': distance correlation matrix. Distance formula: - :math:`D_{i,j} = \sqrt{(1- ho^{distance}_{i,j})}`. + .. math:: D_{i,j} = \sqrt{(1-\rho^{distance}_{i,j})}. - 'mutual_info': mutual information matrix. Distance used is variation information matrix. - 'tail': lower tail dependence index matrix. Dissimilarity formula: - :math:`D_{i,j} = -\log{\lambda_{i,j}}`. + .. math:: D_{i,j} = -\log{\lambda_{i,j}}. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`c-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`c-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`c-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`c-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `c-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `c-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `c-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `c-MLforAM`. objective: str, optional Objective function used by the NCO model. @@ -313,8 +394,7 @@ To obtain charts, make sure to add `chart=True` as the last parameter Number of CVaRs used to approximate Tail Gini of gains. If None it duplicates a_sim value. The default is None. linkage: str, optional - Linkage method of hierarchical clustering. For more information see - `linkage `_. + Linkage method of hierarchical clustering. For more information see `linkage `__. The default is 'single'. Possible values are: - 'single'. @@ -337,12 +417,9 @@ To obtain charts, make sure to add `chart=True` as the last parameter Number of bins used to calculate variation of information. The default value is 'KN'. Possible values are: - - 'KN': Knuth's choice method. For more information see - `knuth_bin_width `_. - - 'FD': Freedman–Diaconis' choice method. For more information see - `freedman_bin_width `_. - - 'SC': Scotts' choice method. For more information see - `scott_bin_width `_. + - 'KN': Knuth's choice method. For more information see `knuth_bin_width `__. + - 'FD': Freedman–Diaconis' choice method. For more information see `freedman_bin_width `__. + - 'SC': Scotts' choice method. For more information see `scott_bin_width `__. - 'HGR': Hacine-Gharbi and Ravier' choice method. alpha_tail: float, optional @@ -359,3 +436,6 @@ To obtain charts, make sure to add `chart=True` as the last parameter Amount to allocate to portfolio in short positions, by default 0.0 table: bool, optional True if plot table weights, by default False + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/portfolio/po/plot/_index.md b/website/content/SDK/portfolio/po/plot/_index.rst similarity index 78% rename from website/content/SDK/portfolio/po/plot/_index.md rename to website/content/SDK/portfolio/po/plot/_index.rst index a6233a8292f..c45a6404513 100644 --- a/website/content/SDK/portfolio/po/plot/_index.md +++ b/website/content/SDK/portfolio/po/plot/_index.rst @@ -1,13 +1,47 @@ -To obtain charts, make sure to add `chart=True` as the last parameter +.. role:: python(code) + :language: python + :class: highlight -## Get underlying data -### portfolio.po.plot(weights, data: pandas.core.frame.DataFrame, category: Dict = None, title_opt: str = '', freq: str = 'D', risk_measure: str = 'MV', risk_free_rate: float = 0, alpha: float = 0.05, a_sim: float = 100, beta: float = None, b_sim: float = None, pie: bool = False, hist: bool = False, dd: bool = False, rc_chart: bool = False, heat: bool = False, external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None) +| +To obtain charts, make sure to add :python:`chart = True` as the last parameter. +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.po.plot( + weights, data: pandas.core.frame.DataFrame, + category: Dict = None, + title_opt: str = '', + freq: str = 'D', + risk_measure: str = 'MV', + risk_free_rate: float = 0, + alpha: float = 0.05, + a_sim: float = 100, + beta: float = None, + b_sim: float = None, + pie: bool = False, + hist: bool = False, + dd: bool = False, + rc_chart: bool = False, + heat: bool = False, + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

Plot additional charts +

+ +* **Parameters** - Parameters - ---------- weights: Dict Dict of portfolio weights data: pd.DataFrame @@ -17,9 +51,9 @@ To obtain charts, make sure to add `chart=True` as the last parameter freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. risk_measure: str, optional The risk measure used to optimize the portfolio. If model is 'NCO', @@ -78,15 +112,48 @@ To obtain charts, make sure to add `chart=True` as the last parameter Display a heatmap of correlation matrix with dendrogram, by default False external_axes: Optional[List[plt.Axes]] Optional axes to plot data on - -## Getting charts -### portfolio.po.plot(weights, data: pandas.core.frame.DataFrame, category: Dict = None, title_opt: str = '', freq: str = 'D', risk_measure: str = 'MV', risk_free_rate: float = 0, alpha: float = 0.05, a_sim: float = 100, beta: float = None, b_sim: float = None, pie: bool = False, hist: bool = False, dd: bool = False, rc_chart: bool = False, heat: bool = False, external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) + chart: *bool* + Flag to display chart +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +portfolio.po.plot( + weights, data: pandas.core.frame.DataFrame, + category: Dict = None, + title_opt: str = '', + freq: str = 'D', + risk_measure: str = 'MV', + risk_free_rate: float = 0, + alpha: float = 0.05, + a_sim: float = 100, + beta: float = None, + b_sim: float = None, + pie: bool = False, + hist: bool = False, + dd: bool = False, + rc_chart: bool = False, + heat: bool = False, + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

Plot additional charts +

+ +* **Parameters** - Parameters - ---------- weights: Dict Dict of portfolio weights data: pd.DataFrame @@ -96,9 +163,9 @@ To obtain charts, make sure to add `chart=True` as the last parameter freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. risk_measure: str, optional The risk measure used to optimize the portfolio. If model is 'NCO', @@ -157,3 +224,6 @@ To obtain charts, make sure to add `chart=True` as the last parameter Display a heatmap of correlation matrix with dendrogram, by default False external_axes: Optional[List[plt.Axes]] Optional axes to plot data on + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/portfolio/po/property/_index.md b/website/content/SDK/portfolio/po/property/_index.rst similarity index 64% rename from website/content/SDK/portfolio/po/property/_index.md rename to website/content/SDK/portfolio/po/property/_index.rst index 6f23eb6848f..700ffb95ec3 100644 --- a/website/content/SDK/portfolio/po/property/_index.md +++ b/website/content/SDK/portfolio/po/property/_index.rst @@ -1,12 +1,42 @@ -To obtain charts, make sure to add `chart=True` as the last parameter +.. role:: python(code) + :language: python + :class: highlight -## Get underlying data -### portfolio.po.property(symbols: List[str], interval: str = '3y', start_date: str = '', end_date: str = '', log_returns: bool = False, freq: str = 'D', maxnan: float = 0.05, threshold: float = 0, method: str = 'time', s_property: str = 'marketCap', value: float = 1.0) -> Tuple +| -Calculate portfolio weights based on selected property +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.po.property( + symbols: List[str], + interval: str = '3y', + start_date: str = '', + end_date: str = '', + log_returns: bool = False, + freq: str = 'D', + maxnan: float = 0.05, + threshold: float = 0, + method: str = 'time', + s_property: str = 'marketCap', + value: float = 1.0, + chart: bool = False, +) -> Tuple +{{< /highlight >}} + +.. raw:: html + +

+ Calculate portfolio weights based on selected property +

+ +* **Parameters** - Parameters - ---------- symbols : List[str] List of portfolio stocks interval : str, optional @@ -22,9 +52,10 @@ Calculate portfolio weights based on selected property freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float Max percentage of nan values accepted per asset to be included in @@ -32,26 +63,55 @@ Calculate portfolio weights based on selected property threshold: float Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. s_property : str Property to weight portfolio by value : float, optional Amount of money to allocate + chart: *bool* + Flag to display chart + + +* **Returns** - Returns - ------- Dict Dictionary of portfolio weights or allocations -## Getting charts -### portfolio.po.property(symbols: List[str], interval: str = '3y', start_date: str = '', end_date: str = '', log_returns: bool = False, freq: str = 'D', maxnan: float = 0.05, threshold: float = 0, method: str = 'time', s_property: str = 'marketCap', risk_measure='mv', risk_free_rate: float = 0, alpha=0.05, value: float = 1, table: bool = False, chart=True) -> Dict +| +.. raw:: html +

+ > Getting charts +

+ +{{< highlight python >}} +portfolio.po.property( + symbols: List[str], + interval: str = '3y', + start_date: str = '', + end_date: str = '', + log_returns: bool = False, + freq: str = 'D', + maxnan: float = 0.05, + threshold: float = 0, + method: str = 'time', + s_property: str = 'marketCap', risk_measure='mv', + risk_free_rate: float = 0, alpha=0.05, + value: float = 1, + table: bool = False, + chart: bool = False, +) -> Dict +{{< /highlight >}} + +.. raw:: html + +

Builds a portfolio weighted by selected property +

+ +* **Parameters** - Parameters - ---------- symbols : List[str] List of portfolio tickers interval : str, optional @@ -67,9 +127,9 @@ Calculate portfolio weights based on selected property freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -77,8 +137,7 @@ Calculate portfolio weights based on selected property threshold: float, optional Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. s_property : str Property to get weighted portfolio of risk_measure: str, optional @@ -108,3 +167,6 @@ Calculate portfolio weights based on selected property Amount to allocate to portfolio, by default 1.0 table: bool, optional True if plot table weights, by default False + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/portfolio/po/relriskparity/_index.md b/website/content/SDK/portfolio/po/relriskparity/_index.rst similarity index 64% rename from website/content/SDK/portfolio/po/relriskparity/_index.md rename to website/content/SDK/portfolio/po/relriskparity/_index.rst index 37e83d41fd4..2da9caa730f 100644 --- a/website/content/SDK/portfolio/po/relriskparity/_index.md +++ b/website/content/SDK/portfolio/po/relriskparity/_index.rst @@ -1,12 +1,48 @@ -To obtain charts, make sure to add `chart=True` as the last parameter +.. role:: python(code) + :language: python + :class: highlight -## Get underlying data -### portfolio.po.relriskparity(symbols: List[str], interval: str = '3y', start_date: str = '', end_date: str = '', log_returns: bool = False, freq: str = 'D', maxnan: float = 0.05, threshold: float = 0, method: str = 'time', version: str = 'A', risk_cont: List[str] = None, penal_factor: float = 1, target_return: float = -1, mean: str = 'hist', covariance: str = 'hist', d_ewma: float = 0.94, value: float = 1.0) -> Tuple +| -Builds a relaxed risk parity portfolio using the least squares approach +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.po.relriskparity( + symbols: List[str], + interval: str = '3y', + start_date: str = '', + end_date: str = '', + log_returns: bool = False, + freq: str = 'D', + maxnan: float = 0.05, + threshold: float = 0, + method: str = 'time', + version: str = 'A', + risk_cont: List[str] = None, + penal_factor: float = 1, + target_return: float = -1, + mean: str = 'hist', + covariance: str = 'hist', + d_ewma: float = 0.94, + value: float = 1.0, + chart: bool = False, +) -> Tuple +{{< /highlight >}} + +.. raw:: html + +

+ Builds a relaxed risk parity portfolio using the least squares approach +

+ +* **Parameters** - Parameters - ---------- symbols : List[str] List of portfolio stocks interval : str, optional @@ -22,9 +58,10 @@ Builds a relaxed risk parity portfolio using the least squares approach freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -32,8 +69,7 @@ Builds a relaxed risk parity portfolio using the least squares approach threshold: float, optional Value used to replace outliers that are higher to threshold. method: str, optional - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. version : str, optional Relaxed risk parity model version. The default is 'A'. Possible values are: @@ -55,48 +91,79 @@ Builds a relaxed risk parity portfolio using the least squares approach The default value is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`a-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`a-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `a-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `a-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `a-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `a-MLforAM`. d_ewma: float, optional The smoothing factor of ewma methods. The default is 0.94. value : float, optional Amount of money to allocate. The default is 1. + chart: *bool* + Flag to display chart + + +* **Returns** - Returns - ------- Tuple Dictionary of portfolio weights and DataFrame of stock returns -## Getting charts -### portfolio.po.relriskparity(symbols: List[str], interval: str = '3y', start_date: str = '', end_date: str = '', log_returns: bool = False, freq: str = 'D', maxnan: float = 0.05, threshold: float = 0, method: str = 'time', version: str = 'A', risk_cont: List[str] = None, penal_factor: float = 1, target_return: float = -1, mean: str = 'hist', covariance: str = 'hist', d_ewma: float = 0.94, value: float = 1.0, table: bool = False, chart=True) -> Dict +| +.. raw:: html +

+ > Getting charts +

+ +{{< highlight python >}} +portfolio.po.relriskparity( + symbols: List[str], + interval: str = '3y', + start_date: str = '', + end_date: str = '', + log_returns: bool = False, + freq: str = 'D', + maxnan: float = 0.05, + threshold: float = 0, + method: str = 'time', + version: str = 'A', + risk_cont: List[str] = None, + penal_factor: float = 1, + target_return: float = -1, + mean: str = 'hist', + covariance: str = 'hist', + d_ewma: float = 0.94, + value: float = 1.0, + table: bool = False, + chart: bool = False, +) -> Dict +{{< /highlight >}} + +.. raw:: html + +

Builds a relaxed risk parity portfolio using the least squares approach +

+ +* **Parameters** - Parameters - ---------- symbols : List[str] List of portfolio tickers interval : str, optional @@ -112,10 +179,10 @@ Builds a relaxed risk parity portfolio using the least squares approach freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. - - X (integer days) for returns calculated every X days. + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. + - X (integer days) for returns calculated every X days. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -123,8 +190,7 @@ Builds a relaxed risk parity portfolio using the least squares approach threshold: float, optional Value used to replace outliers that are higher to threshold. method: str, optional - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. version : str, optional Relaxed risk parity model version. The default is 'A'. Possible values are: @@ -146,28 +212,24 @@ Builds a relaxed risk parity portfolio using the least squares approach The default value is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`a-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`a-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `a-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `a-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `a-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `a-MLforAM`. d_ewma: float, optional The smoothing factor of ewma methods. @@ -176,3 +238,6 @@ Builds a relaxed risk parity portfolio using the least squares approach Amount to allocate to portfolio, by default 1.0 table: bool, optional True if plot table weights, by default False + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/portfolio/po/riskparity/_index.md b/website/content/SDK/portfolio/po/riskparity/_index.rst similarity index 66% rename from website/content/SDK/portfolio/po/riskparity/_index.md rename to website/content/SDK/portfolio/po/riskparity/_index.rst index 0e4ee549c81..114b8eb05eb 100644 --- a/website/content/SDK/portfolio/po/riskparity/_index.md +++ b/website/content/SDK/portfolio/po/riskparity/_index.rst @@ -1,12 +1,49 @@ -To obtain charts, make sure to add `chart=True` as the last parameter +.. role:: python(code) + :language: python + :class: highlight -## Get underlying data -### portfolio.po.riskparity(symbols: List[str], interval: str = '3y', start_date: str = '', end_date: str = '', log_returns: bool = False, freq: str = 'D', maxnan: float = 0.05, threshold: float = 0, method: str = 'time', risk_measure: str = 'MV', risk_cont: List[str] = None, risk_free_rate: float = 0, alpha: float = 0.05, target_return: float = -1, mean: str = 'hist', covariance: str = 'hist', d_ewma: float = 0.94, value: float = 1.0) -> Tuple +| -Builds a risk parity portfolio using the risk budgeting approach +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.po.riskparity( + symbols: List[str], + interval: str = '3y', + start_date: str = '', + end_date: str = '', + log_returns: bool = False, + freq: str = 'D', + maxnan: float = 0.05, + threshold: float = 0, + method: str = 'time', + risk_measure: str = 'MV', + risk_cont: List[str] = None, + risk_free_rate: float = 0, + alpha: float = 0.05, + target_return: float = -1, + mean: str = 'hist', + covariance: str = 'hist', + d_ewma: float = 0.94, + value: float = 1.0, + chart: bool = False, +) -> Tuple +{{< /highlight >}} + +.. raw:: html + +

+ Builds a risk parity portfolio using the risk budgeting approach +

+ +* **Parameters** - Parameters - ---------- symbols : List[str] List of portfolio stocks interval : str, optional @@ -22,9 +59,10 @@ Builds a risk parity portfolio using the risk budgeting approach freq: str, optional The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. + + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. maxnan: float, optional Max percentage of nan values accepted per asset to be included in @@ -32,8 +70,7 @@ Builds a risk parity portfolio using the risk budgeting approach threshold: float, optional Value used to replace outliers that are higher to threshold. method: str, optional - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. risk_measure: str, optional The risk measure used to optimize the portfolio. The default is 'MV'. Possible values are: @@ -64,48 +101,80 @@ Builds a risk parity portfolio using the risk budgeting approach The default value is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`a-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`a-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `a-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `a-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `a-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `a-MLforAM`. d_ewma: float, optional The smoothing factor of ewma methods. The default is 0.94. value : float, optional Amount of money to allocate. The default is 1. + chart: *bool* + Flag to display chart + + +* **Returns** - Returns - ------- Tuple Dictionary of portfolio weights and DataFrame of stock returns -## Getting charts -### portfolio.po.riskparity(symbols: List[str], interval: str = '3y', start_date: str = '', end_date: str = '', log_returns: bool = False, freq: str = 'D', maxnan: float = 0.05, threshold: float = 0, method: str = 'time', risk_measure: str = 'mv', risk_cont: List[str] = None, risk_free_rate: float = 0, alpha: float = 0.05, target_return: float = -1, mean: str = 'hist', covariance: str = 'hist', d_ewma: float = 0.94, value: float = 1.0, table: bool = False, chart=True) -> Dict +| +.. raw:: html +

+ > Getting charts +

+ +{{< highlight python >}} +portfolio.po.riskparity( + symbols: List[str], + interval: str = '3y', + start_date: str = '', + end_date: str = '', + log_returns: bool = False, + freq: str = 'D', + maxnan: float = 0.05, + threshold: float = 0, + method: str = 'time', + risk_measure: str = 'mv', + risk_cont: List[str] = None, + risk_free_rate: float = 0, + alpha: float = 0.05, + target_return: float = -1, + mean: str = 'hist', + covariance: str = 'hist', + d_ewma: float = 0.94, + value: float = 1.0, + table: bool = False, + chart: bool = False, +) -> Dict +{{< /highlight >}} + +.. raw:: html + +

Builds a risk parity portfolio using the risk budgeting approach +

+ +* **Parameters** - Parameters - ---------- symbols : List[str] List of portfolio tickers interval : str @@ -121,10 +190,10 @@ Builds a risk parity portfolio using the risk budgeting approach freq: str The frequency used to calculate returns. Default value is 'D'. Possible values are: - - 'D' for daily returns. - - 'W' for weekly returns. - - 'M' for monthly returns. - - X (integer days) for returns calculated every X days. + - 'D' for daily returns. + - 'W' for weekly returns. + - 'M' for monthly returns. + - X (integer days) for returns calculated every X days. maxnan: float Max percentage of nan values accepted per asset to be included in @@ -132,8 +201,7 @@ Builds a risk parity portfolio using the risk budgeting approach threshold: float Value used to replace outliers that are higher to threshold. method: str - Method used to fill nan values. Default value is 'time'. For more information see - `interpolate `_. + Method used to fill nan values. Default value is 'time'. For more information see `interpolate `__. risk_measure: str The risk measure used to optimize the portfolio. The default is 'MV'. Possible values are: @@ -164,28 +232,24 @@ Builds a risk parity portfolio using the risk budgeting approach The default value is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. covariance: str, optional The method used to estimate the covariance matrix: The default is 'hist'. Possible values are: - 'hist': use historical estimates. - - 'ewma1': use ewma with adjust=True. For more information see - `EWM `_. - - 'ewma2': use ewma with adjust=False. For more information see - `EWM `_. + - 'ewma1': use ewma with adjust=True. For more information see `EWM `__. + - 'ewma2': use ewma with adjust=False. For more information see `EWM `__. - 'ledoit': use the Ledoit and Wolf Shrinkage method. - 'oas': use the Oracle Approximation Shrinkage method. - 'shrunk': use the basic Shrunk Covariance method. - 'gl': use the basic Graphical Lasso Covariance method. - - 'jlogo': use the j-LoGo Covariance method. For more information see: :cite:`a-jLogo`. - - 'fixed': denoise using fixed method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'spectral': denoise using spectral method. For more information see chapter 2 of :cite:`a-MLforAM`. - - 'shrink': denoise using shrink method. For more information see chapter 2 of :cite:`a-MLforAM`. + - 'jlogo': use the j-LoGo Covariance method. For more information see: `a-jLogo`. + - 'fixed': denoise using fixed method. For more information see chapter 2 of `a-MLforAM`. + - 'spectral': denoise using spectral method. For more information see chapter 2 of `a-MLforAM`. + - 'shrink': denoise using shrink method. For more information see chapter 2 of `a-MLforAM`. d_ewma: float, optional The smoothing factor of ewma methods. @@ -194,3 +258,6 @@ Builds a risk parity portfolio using the risk budgeting approach Amount to allocate to portfolio, by default 1.0 table: bool, optional True if plot table weights, by default False + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/portfolio/profitfactor/_index.md b/website/content/SDK/portfolio/profitfactor/_index.md deleted file mode 100644 index 5aa3451ebd5..00000000000 --- a/website/content/SDK/portfolio/profitfactor/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### portfolio.profitfactor(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel) - -Gets profit factor - - Parameters - ---------- - portfolio: Portfolio - Portfolio object with trades loaded - - Returns - ------- - pd.DataFrame - DataFrame of profit factor of the portfolio during different time periods diff --git a/website/content/SDK/portfolio/profitfactor/_index.rst b/website/content/SDK/portfolio/profitfactor/_index.rst new file mode 100644 index 00000000000..b41440df5eb --- /dev/null +++ b/website/content/SDK/portfolio/profitfactor/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.profitfactor( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Gets profit factor +

+ +* **Parameters** + + portfolio: Portfolio + Portfolio object with trades loaded + +* **Returns** + + pd.DataFrame + DataFrame of profit factor of the portfolio during different time periods diff --git a/website/content/SDK/portfolio/rbeta/_index.md b/website/content/SDK/portfolio/rbeta/_index.md deleted file mode 100644 index b468b957fde..00000000000 --- a/website/content/SDK/portfolio/rbeta/_index.md +++ /dev/null @@ -1,36 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### portfolio.rbeta(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, window: str = '1y') -> pandas.core.frame.DataFrame - -Get rolling beta using portfolio and benchmark returns - - Parameters - ---------- - portfolio : PortfolioModel - Portfolio object - window: string - Interval used for rolling values. - Possible options: mtd, qtd, ytd, 1d, 5d, 10d, 1m, 3m, 6m, 1y, 3y, 5y, 10y. - - Returns - ------- - pd.DataFrame - DataFrame of the portfolio's rolling beta - -## Getting charts -### portfolio.rbeta(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, window: str = '1y', export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display rolling beta - - Parameters - ---------- - portfolio : PortfolioModel - Portfolio object - window: str - interval for window to consider - Possible options: mtd, qtd, ytd, 1d, 5d, 10d, 1m, 3m, 6m, 1y, 3y, 5y, 10y. - export: str - Export to file - external_axes: Optional[List[plt.Axes]] - Optional axes to display plot on diff --git a/website/content/SDK/portfolio/rbeta/_index.rst b/website/content/SDK/portfolio/rbeta/_index.rst new file mode 100644 index 00000000000..f17b937405d --- /dev/null +++ b/website/content/SDK/portfolio/rbeta/_index.rst @@ -0,0 +1,82 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.rbeta( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + window: str = '1y', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get rolling beta using portfolio and benchmark returns +

+ +* **Parameters** + + portfolio : PortfolioModel + Portfolio object + window: string + Interval used for rolling values. + Possible options: mtd, qtd, ytd, 1d, 5d, 10d, 1m, 3m, 6m, 1y, 3y, 5y, 10y. + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + DataFrame of the portfolio's rolling beta + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +portfolio.rbeta( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + window: str = '1y', + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display rolling beta +

+ +* **Parameters** + + portfolio : PortfolioModel + Portfolio object + window: str + interval for window to consider + Possible options: mtd, qtd, ytd, 1d, 5d, 10d, 1m, 3m, 6m, 1y, 3y, 5y, 10y. + export: str + Export to file + external_axes: Optional[List[plt.Axes]] + Optional axes to display plot on + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/portfolio/rsharpe/_index.md b/website/content/SDK/portfolio/rsharpe/_index.md deleted file mode 100644 index d5b963cd0d1..00000000000 --- a/website/content/SDK/portfolio/rsharpe/_index.md +++ /dev/null @@ -1,39 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### portfolio.rsharpe(portfolio: pandas.core.frame.DataFrame, risk_free_rate: float = 0, window: str = '1y') -> pandas.core.frame.DataFrame - -Get rolling sharpe ratio - - Parameters - ---------- - portfolio_returns : pd.Series - Series of portfolio returns - risk_free_rate : float - Risk free rate - window : str - Rolling window to use - Possible options: mtd, qtd, ytd, 1d, 5d, 10d, 1m, 3m, 6m, 1y, 3y, 5y, 10y - - Returns - ------- - pd.DataFrame - Rolling sharpe ratio DataFrame - -## Getting charts -### portfolio.rsharpe(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, risk_free_rate: float = 0, window: str = '1y', export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display rolling sharpe - - Parameters - ---------- - portfolio : PortfolioModel - Portfolio object - risk_free_rate: float - Value to use for risk free rate in sharpe/other calculations - window: str - interval for window to consider - export: str - Export to file - external_axes: Optional[List[plt.Axes]] - Optional axes to display plot on diff --git a/website/content/SDK/portfolio/rsharpe/_index.rst b/website/content/SDK/portfolio/rsharpe/_index.rst new file mode 100644 index 00000000000..bc9aff1d8dc --- /dev/null +++ b/website/content/SDK/portfolio/rsharpe/_index.rst @@ -0,0 +1,87 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.rsharpe( + portfolio: pandas.core.frame.DataFrame, + risk_free_rate: float = 0, + window: str = '1y', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get rolling sharpe ratio +

+ +* **Parameters** + + portfolio_returns : pd.Series + Series of portfolio returns + risk_free_rate : float + Risk free rate + window : str + Rolling window to use + Possible options: mtd, qtd, ytd, 1d, 5d, 10d, 1m, 3m, 6m, 1y, 3y, 5y, 10y + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Rolling sharpe ratio DataFrame + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +portfolio.rsharpe( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + risk_free_rate: float = 0, + window: str = '1y', + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display rolling sharpe +

+ +* **Parameters** + + portfolio : PortfolioModel + Portfolio object + risk_free_rate: float + Value to use for risk free rate in sharpe/other calculations + window: str + interval for window to consider + export: str + Export to file + external_axes: Optional[List[plt.Axes]] + Optional axes to display plot on + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/portfolio/rsortino/_index.md b/website/content/SDK/portfolio/rsortino/_index.md deleted file mode 100644 index 0e5cfd6fe02..00000000000 --- a/website/content/SDK/portfolio/rsortino/_index.md +++ /dev/null @@ -1,38 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### portfolio.rsortino(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, risk_free_rate: float = 0, window: str = '1y') -> pandas.core.frame.DataFrame - -Get rolling sortino - - Parameters - ---------- - portfolio : PortfolioModel - Portfolio object - window: str - interval for window to consider - Possible options: mtd, qtd, ytd, 1d, 5d, 10d, 1m, 3m, 6m, 1y, 3y, 5y, 10y - risk_free_rate: float - Value to use for risk free rate in sharpe/other calculations - Returns - ------- - pd.DataFrame - Rolling sortino ratio DataFrame - -## Getting charts -### portfolio.rsortino(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, risk_free_rate: float = 0, window: str = '1y', export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display rolling sortino - - Parameters - ---------- - portfolio : PortfolioModel - Portfolio object - risk_free_rate: float - Value to use for risk free rate in sharpe/other calculations - window: str - interval for window to consider - export: str - Export to file - external_axes: Optional[List[plt.Axes]] - Optional axes to display plot on diff --git a/website/content/SDK/portfolio/rsortino/_index.rst b/website/content/SDK/portfolio/rsortino/_index.rst new file mode 100644 index 00000000000..32c1a0c6dbc --- /dev/null +++ b/website/content/SDK/portfolio/rsortino/_index.rst @@ -0,0 +1,87 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.rsortino( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + risk_free_rate: float = 0, + window: str = '1y', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get rolling sortino +

+ +* **Parameters** + + portfolio : PortfolioModel + Portfolio object + window: str + interval for window to consider + Possible options: mtd, qtd, ytd, 1d, 5d, 10d, 1m, 3m, 6m, 1y, 3y, 5y, 10y + risk_free_rate: float + Value to use for risk free rate in sharpe/other calculations + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Rolling sortino ratio DataFrame + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +portfolio.rsortino( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + risk_free_rate: float = 0, + window: str = '1y', + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display rolling sortino +

+ +* **Parameters** + + portfolio : PortfolioModel + Portfolio object + risk_free_rate: float + Value to use for risk free rate in sharpe/other calculations + window: str + interval for window to consider + export: str + Export to file + external_axes: Optional[List[plt.Axes]] + Optional axes to display plot on + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/portfolio/rsquare/_index.md b/website/content/SDK/portfolio/rsquare/_index.md deleted file mode 100644 index bd6c56b6430..00000000000 --- a/website/content/SDK/portfolio/rsquare/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### portfolio.rsquare(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel) -> pandas.core.frame.DataFrame - -Class method that retrieves R2 Score for portfolio and benchmark selected - - Parameters - ---------- - portfolio: Portfolio - Portfolio object with trades loaded - - Returns - ------- - pd.DataFrame - DataFrame with R2 Score between portfolio and benchmark for different periods diff --git a/website/content/SDK/portfolio/rsquare/_index.rst b/website/content/SDK/portfolio/rsquare/_index.rst new file mode 100644 index 00000000000..728f36754f9 --- /dev/null +++ b/website/content/SDK/portfolio/rsquare/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.rsquare( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Class method that retrieves R2 Score for portfolio and benchmark selected +

+ +* **Parameters** + + portfolio: Portfolio + Portfolio object with trades loaded + +* **Returns** + + pd.DataFrame + DataFrame with R2 Score between portfolio and benchmark for different periods diff --git a/website/content/SDK/portfolio/rvol/_index.md b/website/content/SDK/portfolio/rvol/_index.md deleted file mode 100644 index 948326a1495..00000000000 --- a/website/content/SDK/portfolio/rvol/_index.md +++ /dev/null @@ -1,30 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### portfolio.rvol(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, window: str = '1y') -> pandas.core.frame.DataFrame - -Get rolling volatility - - Parameters - ---------- - portfolio: Portfolio - Portfolio object with trades loaded - window : str - Rolling window size to use - Possible options: mtd, qtd, ytd, 1d, 5d, 10d, 1m, 3m, 6m, 1y, 3y, 5y, 10y - -## Getting charts -### portfolio.rvol(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, window: str = '1y', export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display rolling volatility - - Parameters - ---------- - portfolio : PortfolioModel - Portfolio object - interval: str - interval for window to consider - export: str - Export to file - external_axes: Optional[List[plt.Axes]] - Optional axes to display plot on diff --git a/website/content/SDK/portfolio/rvol/_index.rst b/website/content/SDK/portfolio/rvol/_index.rst new file mode 100644 index 00000000000..5bacb357df1 --- /dev/null +++ b/website/content/SDK/portfolio/rvol/_index.rst @@ -0,0 +1,76 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.rvol( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + window: str = '1y', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get rolling volatility +

+ +* **Parameters** + + portfolio: Portfolio + Portfolio object with trades loaded + window : str + Rolling window size to use + Possible options: mtd, qtd, ytd, 1d, 5d, 10d, 1m, 3m, 6m, 1y, 3y, 5y, 10y + chart: *bool* + Flag to display chart + + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +portfolio.rvol( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + window: str = '1y', + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display rolling volatility +

+ +* **Parameters** + + portfolio : PortfolioModel + Portfolio object + interval: str + interval for window to consider + export: str + Export to file + external_axes: Optional[List[plt.Axes]] + Optional axes to display plot on + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/portfolio/sharpe/_index.md b/website/content/SDK/portfolio/sharpe/_index.md deleted file mode 100644 index 0e3e86815d1..00000000000 --- a/website/content/SDK/portfolio/sharpe/_index.md +++ /dev/null @@ -1,16 +0,0 @@ -## Get underlying data -### portfolio.sharpe(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, risk_free_rate: float = 0) -> pandas.core.frame.DataFrame - -Class method that retrieves sharpe ratio for portfolio and benchmark selected - - Parameters - ---------- - portfolio: Portfolio - Portfolio object with trades loaded - risk_free_rate: float - Risk free rate value - - Returns - ------- - pd.DataFrame - DataFrame with sharpe ratio for portfolio and benchmark for different periods diff --git a/website/content/SDK/portfolio/sharpe/_index.rst b/website/content/SDK/portfolio/sharpe/_index.rst new file mode 100644 index 00000000000..f54860ab8b2 --- /dev/null +++ b/website/content/SDK/portfolio/sharpe/_index.rst @@ -0,0 +1,37 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.sharpe( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + risk_free_rate: float = 0, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Class method that retrieves sharpe ratio for portfolio and benchmark selected +

+ +* **Parameters** + + portfolio: Portfolio + Portfolio object with trades loaded + risk_free_rate: float + Risk free rate value + +* **Returns** + + pd.DataFrame + DataFrame with sharpe ratio for portfolio and benchmark for different periods diff --git a/website/content/SDK/portfolio/skew/_index.md b/website/content/SDK/portfolio/skew/_index.md deleted file mode 100644 index 8d041802035..00000000000 --- a/website/content/SDK/portfolio/skew/_index.md +++ /dev/null @@ -1,12 +0,0 @@ -## Get underlying data -### portfolio.skew(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel) -> pandas.core.frame.DataFrame - -Class method that retrieves skewness for portfolio and benchmark selected - - portfolio: Portfolio - Portfolio object with trades loaded - - Returns - ------- - pd.DataFrame - DataFrame with skewness for portfolio and benchmark for different periods diff --git a/website/content/SDK/portfolio/skew/_index.rst b/website/content/SDK/portfolio/skew/_index.rst new file mode 100644 index 00000000000..63010b46fe5 --- /dev/null +++ b/website/content/SDK/portfolio/skew/_index.rst @@ -0,0 +1,37 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.skew( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Class method that retrieves skewness for portfolio and benchmark selected + + portfolio: Portfolio + Portfolio object with trades loaded + + Returns + ------- + pd.DataFrame + DataFrame with skewness for portfolio and benchmark for different periods +

+ +* **Returns** + + pd.DataFrame + DataFrame with skewness for portfolio and benchmark for different periods diff --git a/website/content/SDK/portfolio/sortino/_index.md b/website/content/SDK/portfolio/sortino/_index.md deleted file mode 100644 index 0d3c728fd96..00000000000 --- a/website/content/SDK/portfolio/sortino/_index.md +++ /dev/null @@ -1,16 +0,0 @@ -## Get underlying data -### portfolio.sortino(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, risk_free_rate: float = 0) -> pandas.core.frame.DataFrame - -Class method that retrieves sortino ratio for portfolio and benchmark selected - - Parameters - ---------- - portfolio: Portfolio - Portfolio object with trades loaded - risk_free_rate: float - Risk free rate value - - Returns - ------- - pd.DataFrame - DataFrame with sortino ratio for portfolio and benchmark for different periods diff --git a/website/content/SDK/portfolio/sortino/_index.rst b/website/content/SDK/portfolio/sortino/_index.rst new file mode 100644 index 00000000000..3ce251e66d1 --- /dev/null +++ b/website/content/SDK/portfolio/sortino/_index.rst @@ -0,0 +1,37 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.sortino( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + risk_free_rate: float = 0, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Class method that retrieves sortino ratio for portfolio and benchmark selected +

+ +* **Parameters** + + portfolio: Portfolio + Portfolio object with trades loaded + risk_free_rate: float + Risk free rate value + +* **Returns** + + pd.DataFrame + DataFrame with sortino ratio for portfolio and benchmark for different periods diff --git a/website/content/SDK/portfolio/summary/_index.md b/website/content/SDK/portfolio/summary/_index.md deleted file mode 100644 index 5597d5e0857..00000000000 --- a/website/content/SDK/portfolio/summary/_index.md +++ /dev/null @@ -1,17 +0,0 @@ -## Get underlying data -### portfolio.summary(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, window: str = 'all', risk_free_rate: float = 0) -> pandas.core.frame.DataFrame - -Get summary portfolio and benchmark returns - - Parameters - ---------- - portfolio: Portfolio - Portfolio object with trades loaded - window : str - interval to compare cumulative returns and benchmark - risk_free_rate : float - Risk free rate for calculations - Returns - ------- - pd.DataFrame - diff --git a/website/content/SDK/portfolio/summary/_index.rst b/website/content/SDK/portfolio/summary/_index.rst new file mode 100644 index 00000000000..fad9c2b5582 --- /dev/null +++ b/website/content/SDK/portfolio/summary/_index.rst @@ -0,0 +1,39 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.summary( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + window: str = 'all', + risk_free_rate: float = 0, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get summary portfolio and benchmark returns +

+ +* **Parameters** + + portfolio: Portfolio + Portfolio object with trades loaded + window : str + interval to compare cumulative returns and benchmark + risk_free_rate : float + Risk free rate for calculations + +* **Returns** + + pd.DataFrame diff --git a/website/content/SDK/portfolio/tail/_index.md b/website/content/SDK/portfolio/tail/_index.md deleted file mode 100644 index ec893886a8d..00000000000 --- a/website/content/SDK/portfolio/tail/_index.md +++ /dev/null @@ -1,21 +0,0 @@ -## Get underlying data -### portfolio.tail(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, window: int = 252) - -Get tail ratio - - Parameters - ---------- - portfolio: Portfolio - Portfolio object with trades loaded - - window: int - Interval used for rolling values - - Returns - ------- - pd.DataFrame - DataFrame of the portfolios and the benchmarks tail ratio during different time windows - pd.Series - Series of the portfolios rolling tail ratio - pd.Series - Series of the benchmarks rolling tail ratio diff --git a/website/content/SDK/portfolio/tail/_index.rst b/website/content/SDK/portfolio/tail/_index.rst new file mode 100644 index 00000000000..bfc405e20d3 --- /dev/null +++ b/website/content/SDK/portfolio/tail/_index.rst @@ -0,0 +1,42 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.tail( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + window: int = 252, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Get tail ratio +

+ +* **Parameters** + + portfolio: Portfolio + Portfolio object with trades loaded + + window: int + Interval used for rolling values + +* **Returns** + + pd.DataFrame + DataFrame of the portfolios and the benchmarks tail ratio during different time windows + pd.Series + Series of the portfolios rolling tail ratio + pd.Series + Series of the benchmarks rolling tail ratio diff --git a/website/content/SDK/portfolio/trackerr/_index.md b/website/content/SDK/portfolio/trackerr/_index.md deleted file mode 100644 index 244f887f023..00000000000 --- a/website/content/SDK/portfolio/trackerr/_index.md +++ /dev/null @@ -1,18 +0,0 @@ -## Get underlying data -### portfolio.trackerr(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, window: int = 252) - -Get tracking error - - Parameters - ---------- - portfolio: Portfolio - Portfolio object with trades loaded - window: int - Interval used for rolling values - - Returns - ------- - pd.DataFrame - DataFrame of tracking errors during different time windows - pd.Series - Series of rolling tracking error diff --git a/website/content/SDK/portfolio/trackerr/_index.rst b/website/content/SDK/portfolio/trackerr/_index.rst new file mode 100644 index 00000000000..76263117277 --- /dev/null +++ b/website/content/SDK/portfolio/trackerr/_index.rst @@ -0,0 +1,39 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.trackerr( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + window: int = 252, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Get tracking error +

+ +* **Parameters** + + portfolio: Portfolio + Portfolio object with trades loaded + window: int + Interval used for rolling values + +* **Returns** + + pd.DataFrame + DataFrame of tracking errors during different time windows + pd.Series + Series of rolling tracking error diff --git a/website/content/SDK/portfolio/var/_index.md b/website/content/SDK/portfolio/var/_index.md deleted file mode 100644 index db87675ad81..00000000000 --- a/website/content/SDK/portfolio/var/_index.md +++ /dev/null @@ -1,21 +0,0 @@ -## Get underlying data -### portfolio.var(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, use_mean: bool = False, adjusted_var: bool = False, student_t: bool = False, percentile: float = 99.9) -> pandas.core.frame.DataFrame - -Get portfolio VaR - - Parameters - ---------- - portfolio: Portfolio - Portfolio object with trades loaded - use_mean: bool - if one should use the data mean return - adjusted_var: bool - if one should have VaR adjusted for skew and kurtosis (Cornish-Fisher-Expansion) - student_t: bool - If one should use the student-t distribution - percentile: float - var percentile (%) - Returns - ------- - pd.DataFrame - diff --git a/website/content/SDK/portfolio/var/_index.rst b/website/content/SDK/portfolio/var/_index.rst new file mode 100644 index 00000000000..fb91b8ab21d --- /dev/null +++ b/website/content/SDK/portfolio/var/_index.rst @@ -0,0 +1,45 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.var( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + use_mean: bool = False, + adjusted_var: bool = False, + student_t: bool = False, + percentile: float = 99.9, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get portfolio VaR +

+ +* **Parameters** + + portfolio: Portfolio + Portfolio object with trades loaded + use_mean: bool + if one should use the data mean return + adjusted_var: bool + if one should have VaR adjusted for skew and kurtosis (Cornish-Fisher-Expansion) + student_t: bool + If one should use the student-t distribution + percentile: float + var percentile (%) + +* **Returns** + + pd.DataFrame diff --git a/website/content/SDK/portfolio/volatility/_index.md b/website/content/SDK/portfolio/volatility/_index.md deleted file mode 100644 index 3b7fe2b4112..00000000000 --- a/website/content/SDK/portfolio/volatility/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### portfolio.volatility(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel) -> pandas.core.frame.DataFrame - -Class method that retrieves volatility for portfolio and benchmark selected - - Parameters - ---------- - portfolio: Portfolio - Portfolio object with trades loaded - - Returns - ------- - pd.DataFrame - DataFrame with volatility for portfolio and benchmark for different periods diff --git a/website/content/SDK/portfolio/volatility/_index.rst b/website/content/SDK/portfolio/volatility/_index.rst new file mode 100644 index 00000000000..8b369c64f1c --- /dev/null +++ b/website/content/SDK/portfolio/volatility/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.volatility( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Class method that retrieves volatility for portfolio and benchmark selected +

+ +* **Parameters** + + portfolio: Portfolio + Portfolio object with trades loaded + +* **Returns** + + pd.DataFrame + DataFrame with volatility for portfolio and benchmark for different periods diff --git a/website/content/SDK/portfolio/yret/_index.md b/website/content/SDK/portfolio/yret/_index.md deleted file mode 100644 index 950c7e72a5b..00000000000 --- a/website/content/SDK/portfolio/yret/_index.md +++ /dev/null @@ -1,31 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### portfolio.yret(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, window: str = 'all') - -Get yearly returns - - Parameters - ---------- - portfolio: Portfolio - Portfolio object with trades loaded - window : str - interval to compare cumulative returns and benchmark - -## Getting charts -### portfolio.yret(portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, window: str = 'all', raw: bool = False, export: str = '', external_axes: Optional[matplotlib.axes._axes.Axes] = None, chart=True) - -Display yearly returns - - Parameters - ---------- - portfolio: Portfolio - Portfolio object with trades loaded - window : str - interval to compare cumulative returns and benchmark - raw : False - Display raw data from cumulative return - export : str - Export certain type of data - external_axes: plt.Axes - Optional axes to display plot on diff --git a/website/content/SDK/portfolio/yret/_index.rst b/website/content/SDK/portfolio/yret/_index.rst new file mode 100644 index 00000000000..02dcf3aa0ec --- /dev/null +++ b/website/content/SDK/portfolio/yret/_index.rst @@ -0,0 +1,78 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +portfolio.yret( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + window: str = 'all', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Get yearly returns +

+ +* **Parameters** + + portfolio: Portfolio + Portfolio object with trades loaded + window : str + interval to compare cumulative returns and benchmark + chart: *bool* + Flag to display chart + + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +portfolio.yret( + portfolio: openbb_terminal.portfolio.portfolio_model.PortfolioModel, + window: str = 'all', + raw: bool = False, + export: str = '', + external_axes: Optional[matplotlib.axes._axes.Axes] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display yearly returns +

+ +* **Parameters** + + portfolio: Portfolio + Portfolio object with trades loaded + window : str + interval to compare cumulative returns and benchmark + raw : False + Display raw data from cumulative return + export : str + Export certain type of data + external_axes: plt.Axes + Optional axes to display plot on + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/ba/bullbear/_index.md b/website/content/SDK/stocks/ba/bullbear/_index.md deleted file mode 100644 index 54dd5682f8a..00000000000 --- a/website/content/SDK/stocks/ba/bullbear/_index.md +++ /dev/null @@ -1,34 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.ba.bullbear(symbol: str) -> Tuple[int, int, int, int] - -Gets bullbear sentiment for ticker [Source: stocktwits] - - Parameters - ---------- - symbol : str - Ticker symbol to look at - - Returns - ------- - int - Watchlist count - int - Number of cases found for ticker - int - Number of bullish statements - int - Number of bearish statements - -## Getting charts -### stocks.ba.bullbear(symbol: str, chart=True) - - - Print bullbear sentiment based on last 30 messages on the board. - Also prints the watchlist_count. [Source: Stocktwits] - - Parameters - ---------- - symbol: str - Stock ticker symbol diff --git a/website/content/SDK/stocks/ba/bullbear/_index.rst b/website/content/SDK/stocks/ba/bullbear/_index.rst new file mode 100644 index 00000000000..b0bbf9e4371 --- /dev/null +++ b/website/content/SDK/stocks/ba/bullbear/_index.rst @@ -0,0 +1,75 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ba.bullbear( + symbol: str, + chart: bool = False, +) -> Tuple[int, int, int, int] +{{< /highlight >}} + +.. raw:: html + +

+ Gets bullbear sentiment for ticker [Source: stocktwits] +

+ +* **Parameters** + + symbol : str + Ticker symbol to look at + chart: *bool* + Flag to display chart + + +* **Returns** + + int + Watchlist count + int + Number of cases found for ticker + int + Number of bullish statements + int + Number of bearish statements + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.ba.bullbear( + symbol: str, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Print bullbear sentiment based on last 30 messages on the board. + Also prints the watchlist_count. [Source: Stocktwits] +

+ +* **Parameters** + + symbol: str + Stock ticker symbol + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/ba/cnews/_index.md b/website/content/SDK/stocks/ba/cnews/_index.md deleted file mode 100644 index 74866233dfc..00000000000 --- a/website/content/SDK/stocks/ba/cnews/_index.md +++ /dev/null @@ -1,18 +0,0 @@ -## Get underlying data -### stocks.ba.cnews(symbol: str, start_date: str = '2022-10-04', end_date: str = '2022-11-03') -> List[Dict] - -Get news from a company. [Source: Finnhub] - - Parameters - ---------- - symbol : str - company ticker to look for news articles - start_date: str - date to start searching articles, with format YYYY-MM-DD - end_date: str - date to end searching articles, with format YYYY-MM-DD - - Returns - ---------- - articles : List - term to search on the news articles diff --git a/website/content/SDK/stocks/ba/cnews/_index.rst b/website/content/SDK/stocks/ba/cnews/_index.rst new file mode 100644 index 00000000000..441888b3c3b --- /dev/null +++ b/website/content/SDK/stocks/ba/cnews/_index.rst @@ -0,0 +1,40 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ba.cnews( + symbol: str, + start_date: str = '2022-10-09', + end_date: str = '2022-11-08', + chart: bool = False, +) -> List[Dict] +{{< /highlight >}} + +.. raw:: html + +

+ Get news from a company. [Source: Finnhub] +

+ +* **Parameters** + + symbol : str + company ticker to look for news articles + start_date: str + date to start searching articles, with format YYYY-MM-DD + end_date: str + date to end searching articles, with format YYYY-MM-DD + +* **Returns** + + articles : List + term to search on the news articles diff --git a/website/content/SDK/stocks/ba/getdd/_index.md b/website/content/SDK/stocks/ba/getdd/_index.md deleted file mode 100644 index 9a4fa4053f0..00000000000 --- a/website/content/SDK/stocks/ba/getdd/_index.md +++ /dev/null @@ -1,20 +0,0 @@ -## Get underlying data -### stocks.ba.getdd(symbol: str, limit: int = 5, n_days: int = 3, show_all_flairs: bool = False) -> pandas.core.frame.DataFrame - -Gets due diligence posts from list of subreddits [Source: reddit] - - Parameters - ---------- - symbol: str - Stock ticker - limit: int - Number of posts to get - n_days: int - Number of days back to get posts - show_all_flairs: bool - Search through all flairs (apart from Yolo and Meme) - - Returns - ------- - pd.DataFrame - Dataframe of submissions diff --git a/website/content/SDK/stocks/ba/getdd/_index.rst b/website/content/SDK/stocks/ba/getdd/_index.rst new file mode 100644 index 00000000000..71455a8443b --- /dev/null +++ b/website/content/SDK/stocks/ba/getdd/_index.rst @@ -0,0 +1,43 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ba.getdd( + symbol: str, + limit: int = 5, + n_days: int = 3, + show_all_flairs: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Gets due diligence posts from list of subreddits [Source: reddit] +

+ +* **Parameters** + + symbol: str + Stock ticker + limit: int + Number of posts to get + n_days: int + Number of days back to get posts + show_all_flairs: bool + Search through all flairs (apart from Yolo and Meme) + +* **Returns** + + pd.DataFrame + Dataframe of submissions diff --git a/website/content/SDK/stocks/ba/headlines/_index.md b/website/content/SDK/stocks/ba/headlines/_index.md deleted file mode 100644 index 70995407655..00000000000 --- a/website/content/SDK/stocks/ba/headlines/_index.md +++ /dev/null @@ -1,32 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.ba.headlines(symbol: str) -> pandas.core.frame.DataFrame - -Gets Sentiment analysis provided by FinBrain's API [Source: finbrain] - - Parameters - ---------- - symbol : str - Ticker symbol to get the sentiment analysis from - - Returns - ------- - DataFrame() - Empty if there was an issue with data retrieval - -## Getting charts -### stocks.ba.headlines(symbol: str, raw: bool = False, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Sentiment analysis from FinBrain - - Parameters - ---------- - symbol: str - Ticker symbol to get the sentiment analysis from - raw: False - Display raw table data - export: str - Format to export data - external_axes: Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/stocks/ba/headlines/_index.rst b/website/content/SDK/stocks/ba/headlines/_index.rst new file mode 100644 index 00000000000..26d80eb10a1 --- /dev/null +++ b/website/content/SDK/stocks/ba/headlines/_index.rst @@ -0,0 +1,77 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ba.headlines( + symbol: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Gets Sentiment analysis provided by FinBrain's API [Source: finbrain] +

+ +* **Parameters** + + symbol : str + Ticker symbol to get the sentiment analysis from + chart: *bool* + Flag to display chart + + +* **Returns** + + DataFrame() + Empty if there was an issue with data retrieval + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.ba.headlines( + symbol: str, + raw: bool = False, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Sentiment analysis from FinBrain +

+ +* **Parameters** + + symbol: str + Ticker symbol to get the sentiment analysis from + raw: False + Display raw table data + export: str + Format to export data + external_axes: Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/ba/hist/_index.md b/website/content/SDK/stocks/ba/hist/_index.md deleted file mode 100644 index 99c0b5bc5d8..00000000000 --- a/website/content/SDK/stocks/ba/hist/_index.md +++ /dev/null @@ -1,54 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.ba.hist(symbol: str, start_date: str = '2022-10-27', end_date: str = '2022-11-03', number: int = 100) -> pandas.core.frame.DataFrame - -Get hour-level sentiment data for the chosen symbol - - Source: [Sentiment Investor] - - Parameters - ---------- - symbol: str - Ticker to view sentiment data - start_date: str - Initial date like string or unix timestamp (e.g. 12-21-2021) - end_date: str - End date like string or unix timestamp (e.g. 12-21-2021) - number : int - Number of results returned by API call - Maximum 250 per api call - - Returns - ------- - pd.DataFrame - Dataframe of historical sentiment - -## Getting charts -### stocks.ba.hist(symbol: str, start_date: str = '2022-10-27', end_date: str = '2022-11-03', number: int = 100, raw: bool = False, limit: int = 10, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display historical sentiment data of a ticker, - and plot a chart with RHI and AHI. - - Parameters - ---------- - symbol: str - Ticker symbol to view sentiment data - start_date: str - Initial date like string or unix timestamp (e.g. 2021-12-21) - end_date: str - End date like string or unix timestamp (e.g. 2022-01-15) - number: int - Number of results returned by API call - Maximum 250 per api call - raw: boolean - Whether to display raw data, by default False - limit: int - Number of results display on the terminal - Default: 10 - export: str - Format to export data - external_axes: Optional[List[plt.Axes]], optional - External axes (2 axes are expected in the list), by default None - Returns - ------- diff --git a/website/content/SDK/stocks/ba/hist/_index.rst b/website/content/SDK/stocks/ba/hist/_index.rst new file mode 100644 index 00000000000..9bf4be75b20 --- /dev/null +++ b/website/content/SDK/stocks/ba/hist/_index.rst @@ -0,0 +1,108 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ba.hist( + symbol: str, + start_date: str = '2022-11-01', + end_date: str = '2022-11-08', + number: int = 100, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get hour-level sentiment data for the chosen symbol + + Source: [Sentiment Investor] +

+ +* **Parameters** + + symbol: str + Ticker to view sentiment data + start_date: str + Initial date like string or unix timestamp (e.g. 12-21-2021) + end_date: str + End date like string or unix timestamp (e.g. 12-21-2021) + number : int + Number of results returned by API call + Maximum 250 per api call + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Dataframe of historical sentiment + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.ba.hist( + symbol: str, + start_date: str = '2022-11-01', + end_date: str = '2022-11-08', + number: int = 100, + raw: bool = False, + limit: int = 10, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display historical sentiment data of a ticker, + and plot a chart with RHI and AHI. +

+ +* **Parameters** + + symbol: str + Ticker symbol to view sentiment data + start_date: str + Initial date like string or unix timestamp (e.g. 2021-12-21) + end_date: str + End date like string or unix timestamp (e.g. 2022-01-15) + number: int + Number of results returned by API call + Maximum 250 per api call + raw: boolean + Whether to display raw data, by default False + limit: int + Number of results display on the terminal + Default: 10 + export: str + Format to export data + external_axes: Optional[List[plt.Axes]], optional + External axes (2 axes are expected in the list), by default None + chart: *bool* + Flag to display chart + + +* **Returns** + + diff --git a/website/content/SDK/stocks/ba/infer/_index.md b/website/content/SDK/stocks/ba/infer/_index.md deleted file mode 100644 index de799b23722..00000000000 --- a/website/content/SDK/stocks/ba/infer/_index.md +++ /dev/null @@ -1,36 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.ba.infer(symbol: str, limit: int = 100, start_date: Optional[str] = '', end_date: Optional[str] = '') -> pandas.core.frame.DataFrame - -Load tweets from twitter API and analyzes using VADER - - Parameters - ---------- - symbol: str - Ticker symbol to search twitter for - limit: int - Number of tweets to analyze - start_date: Optional[str] - If given, the start time to get tweets from - end_date: Optional[str] - If given, the end time to get tweets from - - Returns - ------- - df_tweet: pd.DataFrame - Dataframe of tweets and sentiment - -## Getting charts -### stocks.ba.infer(symbol: str, limit: int = 100, export: str = '', chart=True) - -Infer sentiment from past n tweets - - Parameters - ---------- - symbol: str - Stock ticker symbol - limit: int - Number of tweets to analyze - export: str - Format to export tweet dataframe diff --git a/website/content/SDK/stocks/ba/infer/_index.rst b/website/content/SDK/stocks/ba/infer/_index.rst new file mode 100644 index 00000000000..70cea2876b0 --- /dev/null +++ b/website/content/SDK/stocks/ba/infer/_index.rst @@ -0,0 +1,83 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ba.infer( + symbol: str, + limit: int = 100, + start_date: Optional[str] = '', + end_date: Optional[str] = '', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Load tweets from twitter API and analyzes using VADER +

+ +* **Parameters** + + symbol: str + Ticker symbol to search twitter for + limit: int + Number of tweets to analyze + start_date: Optional[str] + If given, the start time to get tweets from + end_date: Optional[str] + If given, the end time to get tweets from + chart: *bool* + Flag to display chart + + +* **Returns** + + df_tweet: pd.DataFrame + Dataframe of tweets and sentiment + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.ba.infer( + symbol: str, + limit: int = 100, + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Infer sentiment from past n tweets +

+ +* **Parameters** + + symbol: str + Stock ticker symbol + limit: int + Number of tweets to analyze + export: str + Format to export tweet dataframe + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/ba/mentions/_index.md b/website/content/SDK/stocks/ba/mentions/_index.md deleted file mode 100644 index c96a190405c..00000000000 --- a/website/content/SDK/stocks/ba/mentions/_index.md +++ /dev/null @@ -1,32 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.ba.mentions(symbol: str) -> pandas.core.frame.DataFrame - -Get interest over time from google api [Source: google] - - Parameters - ---------- - symbol: str - Stock ticker symbol - - Returns - ------- - pd.DataFrame - Dataframe of interest over time - -## Getting charts -### stocks.ba.mentions(symbol: str, start_date: str = '', export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Plot weekly bars of stock's interest over time. other users watchlist. [Source: Google] - - Parameters - ---------- - symbol : str - Ticker symbol - start_date : str - Start date as YYYY-MM-DD string - export: str - Format to export data - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/stocks/ba/mentions/_index.rst b/website/content/SDK/stocks/ba/mentions/_index.rst new file mode 100644 index 00000000000..b02b81a08dd --- /dev/null +++ b/website/content/SDK/stocks/ba/mentions/_index.rst @@ -0,0 +1,77 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ba.mentions( + symbol: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get interest over time from google api [Source: google] +

+ +* **Parameters** + + symbol: str + Stock ticker symbol + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Dataframe of interest over time + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.ba.mentions( + symbol: str, + start_date: str = '', + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Plot weekly bars of stock's interest over time. other users watchlist. [Source: Google] +

+ +* **Parameters** + + symbol : str + Ticker symbol + start_date : str + Start date as YYYY-MM-DD string + export: str + Format to export data + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/ba/messages/_index.md b/website/content/SDK/stocks/ba/messages/_index.md deleted file mode 100644 index e589e2132af..00000000000 --- a/website/content/SDK/stocks/ba/messages/_index.md +++ /dev/null @@ -1,30 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.ba.messages(symbol: str, limit: int = 30) -> pandas.core.frame.DataFrame - -Get last messages for a given ticker [Source: stocktwits] - - Parameters - ---------- - symbol : str - Stock ticker symbol - limit : int - Number of messages to get - - Returns - ------- - pd.DataFrame - Dataframe of messages - -## Getting charts -### stocks.ba.messages(symbol: str, limit: int = 30, chart=True) - -Print up to 30 of the last messages on the board. [Source: Stocktwits] - - Parameters - ---------- - symbol: str - Stock ticker symbol - limit: int - Number of messages to get diff --git a/website/content/SDK/stocks/ba/messages/_index.rst b/website/content/SDK/stocks/ba/messages/_index.rst new file mode 100644 index 00000000000..627c9045ef4 --- /dev/null +++ b/website/content/SDK/stocks/ba/messages/_index.rst @@ -0,0 +1,74 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ba.messages( + symbol: str, + limit: int = 30, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get last messages for a given ticker [Source: stocktwits] +

+ +* **Parameters** + + symbol : str + Stock ticker symbol + limit : int + Number of messages to get + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Dataframe of messages + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.ba.messages( + symbol: str, + limit: int = 30, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Print up to 30 of the last messages on the board. [Source: Stocktwits] +

+ +* **Parameters** + + symbol: str + Stock ticker symbol + limit: int + Number of messages to get + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/ba/popular/_index.md b/website/content/SDK/stocks/ba/popular/_index.md deleted file mode 100644 index 891b91c2187..00000000000 --- a/website/content/SDK/stocks/ba/popular/_index.md +++ /dev/null @@ -1,36 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.ba.popular(limit: int = 10, post_limit: int = 50, subreddits: str = '') -> pandas.core.frame.DataFrame - -Get popular tickers from list of subreddits [Source: reddit] - - Parameters - ---------- - limit : int - Number of top tickers to get - post_limit : int - How many posts to analyze in each subreddit - subreddits : str, optional - String of comma separated subreddits. - - Returns - ------- - pd.DataFrame - DataFrame of top tickers from supplied subreddits - -## Getting charts -### stocks.ba.popular(limit: int = 10, post_limit: int = 50, subreddits: str = '', export: str = '', chart=True) - -Print latest popular tickers. [Source: Reddit] - - Parameters - ---------- - limit : int - Number of top tickers to get - post_limit : int - How many posts to analyze in each subreddit - subreddits : str, optional - String of comma separated subreddits. - export : str - Format to export dataframe diff --git a/website/content/SDK/stocks/ba/popular/_index.rst b/website/content/SDK/stocks/ba/popular/_index.rst new file mode 100644 index 00000000000..6fd6bdcf889 --- /dev/null +++ b/website/content/SDK/stocks/ba/popular/_index.rst @@ -0,0 +1,83 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ba.popular( + limit: int = 10, + post_limit: int = 50, + subreddits: str = '', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get popular tickers from list of subreddits [Source: reddit] +

+ +* **Parameters** + + limit : int + Number of top tickers to get + post_limit : int + How many posts to analyze in each subreddit + subreddits : str, optional + String of comma separated subreddits. + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + DataFrame of top tickers from supplied subreddits + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.ba.popular( + limit: int = 10, + post_limit: int = 50, + subreddits: str = '', + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Print latest popular tickers. [Source: Reddit] +

+ +* **Parameters** + + limit : int + Number of top tickers to get + post_limit : int + How many posts to analyze in each subreddit + subreddits : str, optional + String of comma separated subreddits. + export : str + Format to export dataframe + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/ba/queries/_index.md b/website/content/SDK/stocks/ba/queries/_index.md deleted file mode 100644 index 3c2dfa202f9..00000000000 --- a/website/content/SDK/stocks/ba/queries/_index.md +++ /dev/null @@ -1,16 +0,0 @@ -## Get underlying data -### stocks.ba.queries(symbol: str, limit: int = 10) -> pandas.core.frame.DataFrame - -Get related queries from google api [Source: google] - - Parameters - ---------- - symbol: str - Stock ticker symbol to compare - limit: int - Number of queries to show - - Returns - ------- - dict : {'top': pd.DataFrame or None, 'rising': pd.DataFrame or None} - diff --git a/website/content/SDK/stocks/ba/queries/_index.rst b/website/content/SDK/stocks/ba/queries/_index.rst new file mode 100644 index 00000000000..595d673d540 --- /dev/null +++ b/website/content/SDK/stocks/ba/queries/_index.rst @@ -0,0 +1,36 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ba.queries( + symbol: str, + limit: int = 10, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get related queries from google api [Source: google] +

+ +* **Parameters** + + symbol: str + Stock ticker symbol to compare + limit: int + Number of queries to show + +* **Returns** + + dict : {'top': pd.DataFrame or None, 'rising': pd.DataFrame or None} diff --git a/website/content/SDK/stocks/ba/redditsent/_index.md b/website/content/SDK/stocks/ba/redditsent/_index.md deleted file mode 100644 index 38ebfe51bc3..00000000000 --- a/website/content/SDK/stocks/ba/redditsent/_index.md +++ /dev/null @@ -1,57 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.ba.redditsent(symbol: str, limit: int = 100, sortby: str = 'relevance', time_frame: str = 'week', full_search: bool = True, subreddits: str = 'all') -> Tuple[pandas.core.frame.DataFrame, list, float] - -Finds posts related to a specific search term in Reddit - - Parameters - ---------- - symbol: str - Ticker symbol to search for - limit: int - Number of posts to get per subreddit - sortby: str - Search type - Possibilities: "relevance", "hot", "top", "new", or "comments" - time_frame: str - Relative time of post - Possibilities: "hour", "day", "week", "month", "year", "all" - full_search: bool - Enable comprehensive search for ticker - subreddits: str - Comma-separated list of subreddits - - Returns - ------- - tuple[pd.DataFrame, list, float]: - Dataframe of submissions related to the search term, - List of polarity scores, - Average polarity score - -## Getting charts -### stocks.ba.redditsent(symbol: str, sortby: str = 'relevance', limit: int = 100, graphic: bool = False, time_frame: str = 'week', full_search: bool = True, subreddits: str = 'all', display: bool = False, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Determine Reddit sentiment about a search term - Parameters - ---------- - symbol: str - The ticker symbol being search for in Reddit - sortby: str - Type of search - limit: str - Number of posts to get at most - graphic: bool - Displays box and whisker plot - time_frame: str - Time frame for search - full_search: bool - Enable comprehensive search for ticker - subreddits: str - Comma-separated list of subreddits - display: bool - Enable printing of raw sentiment values for each post - export: str - Format to export data - external_axes: Optional[List[plt.Axes]] - If supplied, expect 1 external axis diff --git a/website/content/SDK/stocks/ba/redditsent/_index.rst b/website/content/SDK/stocks/ba/redditsent/_index.rst new file mode 100644 index 00000000000..7ff5ac11c35 --- /dev/null +++ b/website/content/SDK/stocks/ba/redditsent/_index.rst @@ -0,0 +1,114 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ba.redditsent( + symbol: str, + limit: int = 100, + sortby: str = 'relevance', + time_frame: str = 'week', + full_search: bool = True, + subreddits: str = 'all', + chart: bool = False, +) -> Tuple[pandas.core.frame.DataFrame, list, float] +{{< /highlight >}} + +.. raw:: html + +

+ Finds posts related to a specific search term in Reddit +

+ +* **Parameters** + + symbol: str + Ticker symbol to search for + limit: int + Number of posts to get per subreddit + sortby: str + Search type + Possibilities: "relevance", "hot", "top", "new", or "comments" + time_frame: str + Relative time of post + Possibilities: "hour", "day", "week", "month", "year", "all" + full_search: bool + Enable comprehensive search for ticker + subreddits: str + Comma-separated list of subreddits + chart: *bool* + Flag to display chart + + +* **Returns** + + tuple[pd.DataFrame, list, float]: + Dataframe of submissions related to the search term, + List of polarity scores, + Average polarity score + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.ba.redditsent( + symbol: str, + sortby: str = 'relevance', + limit: int = 100, + graphic: bool = False, + time_frame: str = 'week', + full_search: bool = True, + subreddits: str = 'all', + display: bool = False, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Determine Reddit sentiment about a search term +

+ +* **Parameters** + + symbol: str + The ticker symbol being search for in Reddit + sortby: str + Type of search + limit: str + Number of posts to get at most + graphic: bool + Displays box and whisker plot + time_frame: str + Time frame for search + full_search: bool + Enable comprehensive search for ticker + subreddits: str + Comma-separated list of subreddits + display: bool + Enable printing of raw sentiment values for each post + export: str + Format to export data + external_axes: Optional[List[plt.Axes]] + If supplied, expect 1 external axis + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/ba/regions/_index.md b/website/content/SDK/stocks/ba/regions/_index.md deleted file mode 100644 index d2be0011521..00000000000 --- a/website/content/SDK/stocks/ba/regions/_index.md +++ /dev/null @@ -1,32 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.ba.regions(symbol: str) -> pandas.core.frame.DataFrame - -Get interest by region from google api [Source: google] - - Parameters - ---------- - symbol: str - Ticker symbol to look at - - Returns - ------- - pd.DataFrame - Dataframe of interest by region - -## Getting charts -### stocks.ba.regions(symbol: str, limit: int = 5, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Plot bars of regions based on stock's interest. [Source: Google] - - Parameters - ---------- - symbol : str - Ticker symbol - limit: int - Number of regions to show - export: str - Format to export data - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/stocks/ba/regions/_index.rst b/website/content/SDK/stocks/ba/regions/_index.rst new file mode 100644 index 00000000000..944c022eba8 --- /dev/null +++ b/website/content/SDK/stocks/ba/regions/_index.rst @@ -0,0 +1,77 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ba.regions( + symbol: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get interest by region from google api [Source: google] +

+ +* **Parameters** + + symbol: str + Ticker symbol to look at + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Dataframe of interest by region + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.ba.regions( + symbol: str, + limit: int = 5, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Plot bars of regions based on stock's interest. [Source: Google] +

+ +* **Parameters** + + symbol : str + Ticker symbol + limit: int + Number of regions to show + export: str + Format to export data + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/ba/rise/_index.md b/website/content/SDK/stocks/ba/rise/_index.md deleted file mode 100644 index 5c4874d233b..00000000000 --- a/website/content/SDK/stocks/ba/rise/_index.md +++ /dev/null @@ -1,16 +0,0 @@ -## Get underlying data -### stocks.ba.rise(symbol: str, limit: int = 10) -> pandas.core.frame.DataFrame - -Get top rising related queries with this stock's query [Source: google] - - Parameters - ---------- - symbol: str - Stock ticker symbol - limit: int - Number of queries to show - - Returns - ------- - pd.DataFrame - Dataframe containing rising related queries diff --git a/website/content/SDK/stocks/ba/rise/_index.rst b/website/content/SDK/stocks/ba/rise/_index.rst new file mode 100644 index 00000000000..4a7cb51e6ca --- /dev/null +++ b/website/content/SDK/stocks/ba/rise/_index.rst @@ -0,0 +1,37 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ba.rise( + symbol: str, + limit: int = 10, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get top rising related queries with this stock's query [Source: google] +

+ +* **Parameters** + + symbol: str + Stock ticker symbol + limit: int + Number of queries to show + +* **Returns** + + pd.DataFrame + Dataframe containing rising related queries diff --git a/website/content/SDK/stocks/ba/sentiment/_index.md b/website/content/SDK/stocks/ba/sentiment/_index.md deleted file mode 100644 index 77531731ae5..00000000000 --- a/website/content/SDK/stocks/ba/sentiment/_index.md +++ /dev/null @@ -1,35 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.ba.sentiment(symbol: str, n_tweets: int = 15, n_days_past: int = 2) -> pandas.core.frame.DataFrame - -Get sentiments from symbol - - Parameters - ---------- - symbol: str - Stock ticker symbol to get sentiment for - n_tweets: int - Number of tweets to get per hour - n_days_past: int - Number of days to extract tweets for - -## Getting charts -### stocks.ba.sentiment(symbol: str, n_tweets: int = 15, n_days_past: int = 2, compare: bool = False, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Plot sentiments from symbol - - Parameters - ---------- - symbol: str - Stock ticker symbol to get sentiment for - n_tweets: int - Number of tweets to get per hour - n_days_past: int - Number of days to extract tweets for - compare: bool - Show corresponding change in stock price - export: str - Format to export tweet dataframe - external_axes: Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/stocks/ba/sentiment/_index.rst b/website/content/SDK/stocks/ba/sentiment/_index.rst new file mode 100644 index 00000000000..4493d444a7e --- /dev/null +++ b/website/content/SDK/stocks/ba/sentiment/_index.rst @@ -0,0 +1,84 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ba.sentiment( + symbol: str, + n_tweets: int = 15, + n_days_past: int = 2, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get sentiments from symbol +

+ +* **Parameters** + + symbol: str + Stock ticker symbol to get sentiment for + n_tweets: int + Number of tweets to get per hour + n_days_past: int + Number of days to extract tweets for + chart: *bool* + Flag to display chart + + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.ba.sentiment( + symbol: str, + n_tweets: int = 15, + n_days_past: int = 2, + compare: bool = False, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Plot sentiments from symbol +

+ +* **Parameters** + + symbol: str + Stock ticker symbol to get sentiment for + n_tweets: int + Number of tweets to get per hour + n_days_past: int + Number of days to extract tweets for + compare: bool + Show corresponding change in stock price + export: str + Format to export tweet dataframe + external_axes: Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/ba/snews/_index.md b/website/content/SDK/stocks/ba/snews/_index.md deleted file mode 100644 index 02828911de7..00000000000 --- a/website/content/SDK/stocks/ba/snews/_index.md +++ /dev/null @@ -1,25 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.ba.snews(symbol: str) -> pandas.core.frame.DataFrame - -Get headlines sentiment using VADER model over time. [Source: Finnhub] - - Parameters - ---------- - symbol : str - Ticker of company - -## Getting charts -### stocks.ba.snews(symbol: str, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display stock price and headlines sentiment using VADER model over time. [Source: Finnhub] - - Parameters - ---------- - symbol : str - Ticker of company - export: str - Format to export data - external_axes : Optional[List[plt.Axes]], optional - External axes (2 axes are expected in the list), by default None diff --git a/website/content/SDK/stocks/ba/snews/_index.rst b/website/content/SDK/stocks/ba/snews/_index.rst new file mode 100644 index 00000000000..16b87f0648c --- /dev/null +++ b/website/content/SDK/stocks/ba/snews/_index.rst @@ -0,0 +1,69 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ba.snews( + symbol: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get headlines sentiment using VADER model over time. [Source: Finnhub] +

+ +* **Parameters** + + symbol : str + Ticker of company + chart: *bool* + Flag to display chart + + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.ba.snews( + symbol: str, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display stock price and headlines sentiment using VADER model over time. [Source: Finnhub] +

+ +* **Parameters** + + symbol : str + Ticker of company + export: str + Format to export data + external_axes : Optional[List[plt.Axes]], optional + External axes (2 axes are expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/ba/spac/_index.md b/website/content/SDK/stocks/ba/spac/_index.md deleted file mode 100644 index 4c9f96088b7..00000000000 --- a/website/content/SDK/stocks/ba/spac/_index.md +++ /dev/null @@ -1,18 +0,0 @@ -## Get underlying data -### stocks.ba.spac(limit: int = 5) -> Tuple[pandas.core.frame.DataFrame, dict, int] - -Get posts containing SPAC from top subreddits [Source: reddit] - - Parameters - ---------- - limit : int, optional - Number of posts to get for each subreddit, by default 5 - - Returns - ------- - pd.DataFrame : - Dataframe of reddit submissions - dict : - Dictionary of tickers and counts - int : - Number of posts found. diff --git a/website/content/SDK/stocks/ba/spac/_index.rst b/website/content/SDK/stocks/ba/spac/_index.rst new file mode 100644 index 00000000000..4bdfac41502 --- /dev/null +++ b/website/content/SDK/stocks/ba/spac/_index.rst @@ -0,0 +1,38 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ba.spac( + limit: int = 5, + chart: bool = False, +) -> Tuple[pandas.core.frame.DataFrame, dict, int] +{{< /highlight >}} + +.. raw:: html + +

+ Get posts containing SPAC from top subreddits [Source: reddit] +

+ +* **Parameters** + + limit : int, optional + Number of posts to get for each subreddit, by default 5 + +* **Returns** + + pd.DataFrame : + Dataframe of reddit submissions + dict : + Dictionary of tickers and counts + int : + Number of posts found. diff --git a/website/content/SDK/stocks/ba/spacc/_index.md b/website/content/SDK/stocks/ba/spacc/_index.md deleted file mode 100644 index 062f390c19f..00000000000 --- a/website/content/SDK/stocks/ba/spacc/_index.md +++ /dev/null @@ -1,18 +0,0 @@ -## Get underlying data -### stocks.ba.spacc(limit: int = 10, popular: bool = False) -> Tuple[pandas.core.frame.DataFrame, dict] - -Get top tickers from r/SPACs [Source: reddit] - - Parameters - ---------- - limit : int - Number of posts to look at - popular : bool - Search by hot instead of new - - Returns - ------- - pd.DataFrame: - Dataframe of reddit submission - dict: - Dictionary of tickers and number of mentions diff --git a/website/content/SDK/stocks/ba/spacc/_index.rst b/website/content/SDK/stocks/ba/spacc/_index.rst new file mode 100644 index 00000000000..ffeedb01086 --- /dev/null +++ b/website/content/SDK/stocks/ba/spacc/_index.rst @@ -0,0 +1,39 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ba.spacc( + limit: int = 10, + popular: bool = False, + chart: bool = False, +) -> Tuple[pandas.core.frame.DataFrame, dict] +{{< /highlight >}} + +.. raw:: html + +

+ Get top tickers from r/SPACs [Source: reddit] +

+ +* **Parameters** + + limit : int + Number of posts to look at + popular : bool + Search by hot instead of new + +* **Returns** + + pd.DataFrame: + Dataframe of reddit submission + dict: + Dictionary of tickers and number of mentions diff --git a/website/content/SDK/stocks/ba/stalker/_index.md b/website/content/SDK/stocks/ba/stalker/_index.md deleted file mode 100644 index 8213d7b10b7..00000000000 --- a/website/content/SDK/stocks/ba/stalker/_index.md +++ /dev/null @@ -1,11 +0,0 @@ -## Get underlying data -### stocks.ba.stalker(user: str, limit: int = 30) -> List[Dict] - -Gets messages from given user [Source: stocktwits] - - Parameters - ---------- - user : str - User to get posts for - limit : int, optional - Number of posts to get, by default 30 diff --git a/website/content/SDK/stocks/ba/stalker/_index.rst b/website/content/SDK/stocks/ba/stalker/_index.rst new file mode 100644 index 00000000000..36e94b97ded --- /dev/null +++ b/website/content/SDK/stocks/ba/stalker/_index.rst @@ -0,0 +1,32 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ba.stalker( + user: str, + limit: int = 30, + chart: bool = False, +) -> List[Dict] +{{< /highlight >}} + +.. raw:: html + +

+ Gets messages from given user [Source: stocktwits] +

+ +* **Parameters** + + user : str + User to get posts for + limit : int, optional + Number of posts to get, by default 30 diff --git a/website/content/SDK/stocks/ba/text_sent/_index.md b/website/content/SDK/stocks/ba/text_sent/_index.md deleted file mode 100644 index ee59c86a95a..00000000000 --- a/website/content/SDK/stocks/ba/text_sent/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### stocks.ba.text_sent(post_data: List[str]) -> float - -Find the sentiment of a post and related comments - - Parameters - ---------- - post_data: list[str] - A post and its comments in string form - - Returns - ------- - float - A number in the range [-1, 1] representing sentiment diff --git a/website/content/SDK/stocks/ba/text_sent/_index.rst b/website/content/SDK/stocks/ba/text_sent/_index.rst new file mode 100644 index 00000000000..9c1d59f4ac5 --- /dev/null +++ b/website/content/SDK/stocks/ba/text_sent/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ba.text_sent( + post_data: List[str], + chart: bool = False, +) -> float +{{< /highlight >}} + +.. raw:: html + +

+ Find the sentiment of a post and related comments +

+ +* **Parameters** + + post_data: list[str] + A post and its comments in string form + +* **Returns** + + float + A number in the range [-1, 1] representing sentiment diff --git a/website/content/SDK/stocks/ba/trend/_index.md b/website/content/SDK/stocks/ba/trend/_index.md deleted file mode 100644 index 7b9581658e1..00000000000 --- a/website/content/SDK/stocks/ba/trend/_index.md +++ /dev/null @@ -1,45 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.ba.trend(start_date: datetime.datetime = datetime.datetime(2022, 11, 3, 17, 23, 0, 782290), hour: int = 0, number: int = 10) -> pandas.core.frame.DataFrame - -Get sentiment data on the most talked about tickers - within the last hour - - Source: [Sentiment Investor] - - Parameters - ---------- - start_date: datetime - Datetime object (e.g. datetime(2021, 12, 21) - hour: int - Hour of the day in 24-hour notation (e.g. 14) - number : int - Number of results returned by API call - Maximum 250 per api call - - Returns - ------- - pd.DataFrame - Dataframe of trending data - -## Getting charts -### stocks.ba.trend(start_date: datetime.datetime = datetime.datetime(2022, 11, 3, 17, 23, 0, 782624, chart=True), hour: int = 0, number: int = 10, limit: int = 10, export: str = '') - -Display most talked about tickers within - the last hour together with their sentiment data. - - Parameters - ---------- - start_date: datetime - Datetime object (e.g. datetime(2021, 12, 21) - hour: int - Hour of the day in 24-hour notation (e.g. 14) - number : int - Number of results returned by API call - Maximum 250 per api call - limit: int - Number of results display on the terminal - Default: 10 - export: str - Format to export data diff --git a/website/content/SDK/stocks/ba/trend/_index.rst b/website/content/SDK/stocks/ba/trend/_index.rst new file mode 100644 index 00000000000..ecf8b974077 --- /dev/null +++ b/website/content/SDK/stocks/ba/trend/_index.rst @@ -0,0 +1,95 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ba.trend( + start_date: datetime.datetime = datetime.datetime( + 2022, 11, 8, 12, 2, 54, 989242, chart: bool = False, +), hour: int = 0, + number: int = 10, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get sentiment data on the most talked about tickers + within the last hour + + Source: [Sentiment Investor] +

+ +* **Parameters** + + start_date: datetime + Datetime object (e.g. datetime(2021, 12, 21) + hour: int + Hour of the day in 24-hour notation (e.g. 14) + number : int + Number of results returned by API call + Maximum 250 per api call + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Dataframe of trending data + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.ba.trend( + start_date: datetime.datetime = datetime.datetime( + 2022, 11, 8, 12, 2, 54, 989446, chart: bool = False, +), hour: int = 0, + number: int = 10, + limit: int = 10, + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display most talked about tickers within + the last hour together with their sentiment data. +

+ +* **Parameters** + + start_date: datetime + Datetime object (e.g. datetime(2021, 12, 21) + hour: int + Hour of the day in 24-hour notation (e.g. 14) + number : int + Number of results returned by API call + Maximum 250 per api call + limit: int + Number of results display on the terminal + Default: 10 + export: str + Format to export data + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/ba/trending/_index.md b/website/content/SDK/stocks/ba/trending/_index.md deleted file mode 100644 index 95aa13202b2..00000000000 --- a/website/content/SDK/stocks/ba/trending/_index.md +++ /dev/null @@ -1,9 +0,0 @@ -## Get underlying data -### stocks.ba.trending() -> pandas.core.frame.DataFrame - -Get trending tickers from stocktwits [Source: stocktwits] - - Returns - ------- - pd.DataFrame - Dataframe of trending tickers and watchlist count diff --git a/website/content/SDK/stocks/ba/trending/_index.rst b/website/content/SDK/stocks/ba/trending/_index.rst new file mode 100644 index 00000000000..2b310f93289 --- /dev/null +++ b/website/content/SDK/stocks/ba/trending/_index.rst @@ -0,0 +1,26 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ba.trending() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get trending tickers from stocktwits [Source: stocktwits] +

+ +* **Returns** + + pd.DataFrame + Dataframe of trending tickers and watchlist count diff --git a/website/content/SDK/stocks/ba/watchlist/_index.md b/website/content/SDK/stocks/ba/watchlist/_index.md deleted file mode 100644 index 2241f655f8f..00000000000 --- a/website/content/SDK/stocks/ba/watchlist/_index.md +++ /dev/null @@ -1,30 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.ba.watchlist(limit: int = 5) -> Tuple[List[praw.models.reddit.submission.Submission], dict, int] - -Get reddit users watchlists [Source: reddit] - - Parameters - ---------- - limit : int - Number of posts to look through - - Returns - ------- - list[praw.models.reddit.submission.Submission]: - List of reddit submissions - dict: - Dictionary of tickers and counts - int - Count of how many posts were analyzed - -## Getting charts -### stocks.ba.watchlist(limit: int = 5, chart=True) - -Print other users watchlist. [Source: Reddit] - - Parameters - ---------- - limit: int - Maximum number of submissions to look at diff --git a/website/content/SDK/stocks/ba/watchlist/_index.rst b/website/content/SDK/stocks/ba/watchlist/_index.rst new file mode 100644 index 00000000000..11a78308299 --- /dev/null +++ b/website/content/SDK/stocks/ba/watchlist/_index.rst @@ -0,0 +1,72 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ba.watchlist( + limit: int = 5, + chart: bool = False, +) -> Tuple[List[praw.models.reddit.submission.Submission], dict, int] +{{< /highlight >}} + +.. raw:: html + +

+ Get reddit users watchlists [Source: reddit] +

+ +* **Parameters** + + limit : int + Number of posts to look through + chart: *bool* + Flag to display chart + + +* **Returns** + + list[praw.models.reddit.submission.Submission]: + List of reddit submissions + dict: + Dictionary of tickers and counts + int + Count of how many posts were analyzed + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.ba.watchlist( + limit: int = 5, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Print other users watchlist. [Source: Reddit] +

+ +* **Parameters** + + limit: int + Maximum number of submissions to look at + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/ba/wsb/_index.md b/website/content/SDK/stocks/ba/wsb/_index.md deleted file mode 100644 index 8f0cd72b27e..00000000000 --- a/website/content/SDK/stocks/ba/wsb/_index.md +++ /dev/null @@ -1,16 +0,0 @@ -## Get underlying data -### stocks.ba.wsb(limit: int = 10, new: bool = False) -> pandas.core.frame.DataFrame - -Get wsb posts [Source: reddit] - - Parameters - ---------- - limit : int, optional - Number of posts to get, by default 10 - new : bool, optional - Flag to sort by new instead of hot, by default False - - Returns - ------- - pd.DataFrame - Dataframe of reddit submissions diff --git a/website/content/SDK/stocks/ba/wsb/_index.rst b/website/content/SDK/stocks/ba/wsb/_index.rst new file mode 100644 index 00000000000..4cc68fdd451 --- /dev/null +++ b/website/content/SDK/stocks/ba/wsb/_index.rst @@ -0,0 +1,37 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ba.wsb( + limit: int = 10, + new: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get wsb posts [Source: reddit] +

+ +* **Parameters** + + limit : int, optional + Number of posts to get, by default 10 + new : bool, optional + Flag to sort by new instead of hot, by default False + +* **Returns** + + pd.DataFrame + Dataframe of reddit submissions diff --git a/website/content/SDK/stocks/ca/balance/_index.md b/website/content/SDK/stocks/ca/balance/_index.md deleted file mode 100644 index 8ed727c5d47..00000000000 --- a/website/content/SDK/stocks/ca/balance/_index.md +++ /dev/null @@ -1,17 +0,0 @@ -## Get underlying data -### stocks.ca.balance(similar: List[str], timeframe: str = '2021', quarter: bool = False) - -Get balance data. [Source: Marketwatch] - - Parameters - ---------- - similar : List[str] - List of tickers to compare. - Comparable companies can be accessed through - finnhub_peers(), finviz_peers(), polygon_peers(). - timeframe : str - Column header to compare - quarter : bool, optional - Whether to use quarterly statements, by default False - export : str, optional - Format to export data diff --git a/website/content/SDK/stocks/ca/balance/_index.rst b/website/content/SDK/stocks/ca/balance/_index.rst new file mode 100644 index 00000000000..ce71e551276 --- /dev/null +++ b/website/content/SDK/stocks/ca/balance/_index.rst @@ -0,0 +1,39 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ca.balance( + similar: List[str], + timeframe: str = '2021', + quarter: bool = False, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Get balance data. [Source: Marketwatch] +

+ +* **Parameters** + + similar : List[str] + List of tickers to compare. + Comparable companies can be accessed through + finnhub_peers(), finviz_peers(), polygon_peers(). + timeframe : str + Column header to compare + quarter : bool, optional + Whether to use quarterly statements, by default False + export : str, optional + Format to export data diff --git a/website/content/SDK/stocks/ca/cashflow/_index.md b/website/content/SDK/stocks/ca/cashflow/_index.md deleted file mode 100644 index 04224e57323..00000000000 --- a/website/content/SDK/stocks/ca/cashflow/_index.md +++ /dev/null @@ -1,17 +0,0 @@ -## Get underlying data -### stocks.ca.cashflow(similar: List[str], timeframe: str = '2021', quarter: bool = False) - -Get cashflow data. [Source: Marketwatch] - - Parameters - ---------- - similar : List[str] - List of tickers to compare. - Comparable companies can be accessed through - finnhub_peers(), finviz_peers(), polygon_peers(). - timeframe : str - Column header to compare - quarter : bool, optional - Whether to use quarterly statements, by default False - export : str, optional - Format to export data diff --git a/website/content/SDK/stocks/ca/cashflow/_index.rst b/website/content/SDK/stocks/ca/cashflow/_index.rst new file mode 100644 index 00000000000..cbe85ff79dc --- /dev/null +++ b/website/content/SDK/stocks/ca/cashflow/_index.rst @@ -0,0 +1,39 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ca.cashflow( + similar: List[str], + timeframe: str = '2021', + quarter: bool = False, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Get cashflow data. [Source: Marketwatch] +

+ +* **Parameters** + + similar : List[str] + List of tickers to compare. + Comparable companies can be accessed through + finnhub_peers(), finviz_peers(), polygon_peers(). + timeframe : str + Column header to compare + quarter : bool, optional + Whether to use quarterly statements, by default False + export : str, optional + Format to export data diff --git a/website/content/SDK/stocks/ca/finnhub_peers/_index.md b/website/content/SDK/stocks/ca/finnhub_peers/_index.md deleted file mode 100644 index c0611acc04e..00000000000 --- a/website/content/SDK/stocks/ca/finnhub_peers/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### stocks.ca.finnhub_peers(symbol: str) -> List[str] - -Get similar companies from Finhub - - Parameters - ---------- - symbol : str - Ticker to find comparisons for - - Returns - ------- - List[str] - List of similar companies diff --git a/website/content/SDK/stocks/ca/finnhub_peers/_index.rst b/website/content/SDK/stocks/ca/finnhub_peers/_index.rst new file mode 100644 index 00000000000..8211635687b --- /dev/null +++ b/website/content/SDK/stocks/ca/finnhub_peers/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ca.finnhub_peers( + symbol: str, + chart: bool = False, +) -> List[str] +{{< /highlight >}} + +.. raw:: html + +

+ Get similar companies from Finhub +

+ +* **Parameters** + + symbol : str + Ticker to find comparisons for + +* **Returns** + + List[str] + List of similar companies diff --git a/website/content/SDK/stocks/ca/finviz_peers/_index.md b/website/content/SDK/stocks/ca/finviz_peers/_index.md deleted file mode 100644 index f2a83a6a6cc..00000000000 --- a/website/content/SDK/stocks/ca/finviz_peers/_index.md +++ /dev/null @@ -1,16 +0,0 @@ -## Get underlying data -### stocks.ca.finviz_peers(symbol: str, compare_list: List[str] = None) -> Tuple[List[str], str] - -Get similar companies from Finviz - - Parameters - ---------- - symbol : str - Ticker to find comparisons for - compare_list : List[str] - List of fields to compare, ["Sector", "Industry", "Country"] - - Returns - ------- - List[str] - List of similar companies diff --git a/website/content/SDK/stocks/ca/finviz_peers/_index.rst b/website/content/SDK/stocks/ca/finviz_peers/_index.rst new file mode 100644 index 00000000000..4949d95eb3e --- /dev/null +++ b/website/content/SDK/stocks/ca/finviz_peers/_index.rst @@ -0,0 +1,37 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ca.finviz_peers( + symbol: str, + compare_list: List[str] = None, + chart: bool = False, +) -> Tuple[List[str], str] +{{< /highlight >}} + +.. raw:: html + +

+ Get similar companies from Finviz +

+ +* **Parameters** + + symbol : str + Ticker to find comparisons for + compare_list : List[str] + List of fields to compare, ["Sector", "Industry", "Country"] + +* **Returns** + + List[str] + List of similar companies diff --git a/website/content/SDK/stocks/ca/hcorr/_index.md b/website/content/SDK/stocks/ca/hcorr/_index.rst similarity index 58% rename from website/content/SDK/stocks/ca/hcorr/_index.md rename to website/content/SDK/stocks/ca/hcorr/_index.rst index d223a75b5be..8fd3b97bda5 100644 --- a/website/content/SDK/stocks/ca/hcorr/_index.md +++ b/website/content/SDK/stocks/ca/hcorr/_index.rst @@ -1,13 +1,34 @@ -To obtain charts, make sure to add `chart=True` as the last parameter +.. role:: python(code) + :language: python + :class: highlight -## Get underlying data -### stocks.ca.hcorr(similar: List[str], start_date: str = '2021-11-02', candle_type: str = 'a') +| +To obtain charts, make sure to add :python:`chart = True` as the last parameter. +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ca.hcorr( + similar: List[str], + start_date: str = '2021-11-07', + candle_type: str = 'a', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

Get historical price correlation. [Source: Yahoo Finance] +

+ +* **Parameters** - Parameters - ---------- similar : List[str] List of similar tickers. Comparable companies can be accessed through @@ -16,16 +37,40 @@ To obtain charts, make sure to add `chart=True` as the last parameter Start date of comparison, by default 1 year ago candle_type : str, optional OHLCA column to use for candles or R for returns, by default "a" for Adjusted Close - -## Getting charts -### stocks.ca.hcorr(similar: List[str], start_date: str = '2021-11-02', candle_type: str = 'a', display_full_matrix: bool = False, raw: bool = False, external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, export: str = '', chart=True) + chart: *bool* + Flag to display chart +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.ca.hcorr( + similar: List[str], + start_date: str = '2021-11-07', + candle_type: str = 'a', + display_full_matrix: bool = False, + raw: bool = False, + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

Correlation heatmap based on historical price comparison between similar companies. [Source: Yahoo Finance] +

+ +* **Parameters** - Parameters - ---------- similar : List[str] List of similar tickers. Comparable companies can be accessed through @@ -42,3 +87,6 @@ To obtain charts, make sure to add `chart=True` as the last parameter External axes (1 axis is expected in the list), by default None export : str, optional Format to export correlation prices, by default "" + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/ca/hist/_index.md b/website/content/SDK/stocks/ca/hist/_index.rst similarity index 52% rename from website/content/SDK/stocks/ca/hist/_index.md rename to website/content/SDK/stocks/ca/hist/_index.rst index d49470cd54f..9757512312b 100644 --- a/website/content/SDK/stocks/ca/hist/_index.md +++ b/website/content/SDK/stocks/ca/hist/_index.rst @@ -1,12 +1,34 @@ -To obtain charts, make sure to add `chart=True` as the last parameter +.. role:: python(code) + :language: python + :class: highlight -## Get underlying data -### stocks.ca.hist(similar: List[str], start_date: str = '2021-11-02', candle_type: str = 'a') -> pandas.core.frame.DataFrame +| -Get historical prices for all comparison stocks +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ca.hist( + similar: List[str], + start_date: str = '2021-11-07', + candle_type: str = 'a', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get historical prices for all comparison stocks +

+ +* **Parameters** - Parameters - ---------- similar: List[str] List of similar tickers. Comparable companies can be accessed through @@ -15,19 +37,43 @@ Get historical prices for all comparison stocks Start date of comparison. Defaults to 1 year previously candle_type: str, optional Candle variable to compare, by default "a" for Adjusted Close. Possible values are: o, h, l, c, a, v, r + chart: *bool* + Flag to display chart + + +* **Returns** - Returns - ------- pd.DataFrame Dataframe containing candle type variable for each ticker -## Getting charts -### stocks.ca.hist(similar: List[str], start_date: str = '2021-11-02', candle_type: str = 'a', normalize: bool = True, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) +| -Display historical stock prices. [Source: Yahoo Finance] +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.ca.hist( + similar: List[str], + start_date: str = '2021-11-07', + candle_type: str = 'a', + normalize: bool = True, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display historical stock prices. [Source: Yahoo Finance] +

+ +* **Parameters** - Parameters - ---------- similar: List[str] List of similar tickers. Comparable companies can be accessed through @@ -42,4 +88,6 @@ Display historical stock prices. [Source: Yahoo Finance] Format to export historical prices, by default "" external_axes: Optional[List[plt.Axes]], optional External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart diff --git a/website/content/SDK/stocks/ca/income/_index.md b/website/content/SDK/stocks/ca/income/_index.md deleted file mode 100644 index cbf3ed9b3dd..00000000000 --- a/website/content/SDK/stocks/ca/income/_index.md +++ /dev/null @@ -1,38 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.ca.income(similar: List[str], timeframe: str = '2021', quarter: bool = False) - -Get income data. [Source: Marketwatch] - - Parameters - ---------- - similar : List[str] - List of tickers to compare. - Comparable companies can be accessed through - finnhub_peers(), finviz_peers(), polygon_peers(). - timeframe : str - Column header to compare - quarter : bool, optional - Whether to use quarterly statements, by default False - export : str, optional - Format to export data - -## Getting charts -### stocks.ca.income(symbols: List[str], timeframe: str = '2021', quarter: bool = False, export: str = '', chart=True) - -Display income data. [Source: Marketwatch] - - Parameters - ---------- - symbols : List[str] - List of tickers to compare. Enter tickers you want to see as shown below: - ["TSLA", "AAPL", "NFLX", "BBY"] - You can also get a list of comparable peers with - finnhub_peers(), finviz_peers(), polygon_peers(). - timeframe : str - What year to look at - quarter : bool, optional - Whether to use quarterly statements, by default False - export : str, optional - Format to export data diff --git a/website/content/SDK/stocks/ca/income/_index.rst b/website/content/SDK/stocks/ca/income/_index.rst new file mode 100644 index 00000000000..60c855a126a --- /dev/null +++ b/website/content/SDK/stocks/ca/income/_index.rst @@ -0,0 +1,85 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ca.income( + similar: List[str], + timeframe: str = '2021', + quarter: bool = False, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Get income data. [Source: Marketwatch] +

+ +* **Parameters** + + similar : List[str] + List of tickers to compare. + Comparable companies can be accessed through + finnhub_peers(), finviz_peers(), polygon_peers(). + timeframe : str + Column header to compare + quarter : bool, optional + Whether to use quarterly statements, by default False + export : str, optional + Format to export data + chart: *bool* + Flag to display chart + + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.ca.income( + symbols: List[str], + timeframe: str = '2021', + quarter: bool = False, + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display income data. [Source: Marketwatch] +

+ +* **Parameters** + + symbols : List[str] + List of tickers to compare. Enter tickers you want to see as shown below: + ["TSLA", "AAPL", "NFLX", "BBY"] + You can also get a list of comparable peers with + finnhub_peers(), finviz_peers(), polygon_peers(). + timeframe : str + What year to look at + quarter : bool, optional + Whether to use quarterly statements, by default False + export : str, optional + Format to export data + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/ca/polygon_peers/_index.md b/website/content/SDK/stocks/ca/polygon_peers/_index.md deleted file mode 100644 index 5ba70e01f27..00000000000 --- a/website/content/SDK/stocks/ca/polygon_peers/_index.md +++ /dev/null @@ -1,16 +0,0 @@ -## Get underlying data -### stocks.ca.polygon_peers(symbol: str, us_only: bool = False) -> List[str] - -Get similar companies from Polygon - - Parameters - ---------- - symbol: str - Ticker to get similar companies of - us_only: bool - Only stocks from the US stock exchanges - - Returns - ------- - List[str]: - List of similar tickers diff --git a/website/content/SDK/stocks/ca/polygon_peers/_index.rst b/website/content/SDK/stocks/ca/polygon_peers/_index.rst new file mode 100644 index 00000000000..b4795c7365d --- /dev/null +++ b/website/content/SDK/stocks/ca/polygon_peers/_index.rst @@ -0,0 +1,37 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ca.polygon_peers( + symbol: str, + us_only: bool = False, + chart: bool = False, +) -> List[str] +{{< /highlight >}} + +.. raw:: html + +

+ Get similar companies from Polygon +

+ +* **Parameters** + + symbol: str + Ticker to get similar companies of + us_only: bool + Only stocks from the US stock exchanges + +* **Returns** + + List[str]: + List of similar tickers diff --git a/website/content/SDK/stocks/ca/scorr/_index.md b/website/content/SDK/stocks/ca/scorr/_index.md deleted file mode 100644 index 4e33e2dbe3c..00000000000 --- a/website/content/SDK/stocks/ca/scorr/_index.md +++ /dev/null @@ -1,31 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.ca.scorr(similar: List[str]) - -Get correlation sentiments across similar companies. [Source: FinBrain] - - Parameters - ---------- - similar : List[str] - Similar companies to compare income with. - Comparable companies can be accessed through - finnhub_peers(), finviz_peers(), polygon_peers(). - -## Getting charts -### stocks.ca.scorr(similar: List[str], raw: bool = False, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Plot correlation sentiments heatmap across similar companies. [Source: FinBrain] - - Parameters - ---------- - similar : List[str] - Similar companies to compare income with. - Comparable companies can be accessed through - finviz_peers(), finnhub_peers() or polygon_peers(). - raw : bool, optional - Output raw values, by default False - export : str, optional - Format to export data - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/stocks/ca/scorr/_index.rst b/website/content/SDK/stocks/ca/scorr/_index.rst new file mode 100644 index 00000000000..c2f9bc3403a --- /dev/null +++ b/website/content/SDK/stocks/ca/scorr/_index.rst @@ -0,0 +1,76 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ca.scorr( + similar: List[str], + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Get correlation sentiments across similar companies. [Source: FinBrain] +

+ +* **Parameters** + + similar : List[str] + Similar companies to compare income with. + Comparable companies can be accessed through + finnhub_peers(), finviz_peers(), polygon_peers(). + chart: *bool* + Flag to display chart + + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.ca.scorr( + similar: List[str], + raw: bool = False, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Plot correlation sentiments heatmap across similar companies. [Source: FinBrain] +

+ +* **Parameters** + + similar : List[str] + Similar companies to compare income with. + Comparable companies can be accessed through + finviz_peers(), finnhub_peers() or polygon_peers(). + raw : bool, optional + Output raw values, by default False + export : str, optional + Format to export data + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/ca/screener/_index.md b/website/content/SDK/stocks/ca/screener/_index.rst similarity index 51% rename from website/content/SDK/stocks/ca/screener/_index.md rename to website/content/SDK/stocks/ca/screener/_index.rst index 61f6ee3791b..d8dda03ed9b 100644 --- a/website/content/SDK/stocks/ca/screener/_index.md +++ b/website/content/SDK/stocks/ca/screener/_index.rst @@ -1,10 +1,31 @@ -## Get underlying data -### stocks.ca.screener(similar: List[str], data_type: str = 'overview') +.. role:: python(code) + :language: python + :class: highlight -Screener Overview +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ca.screener( + similar: List[str], + data_type: str = 'overview', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Screener Overview +

+ +* **Parameters** - Parameters - ---------- similar: List of similar companies. Comparable companies can be accessed through @@ -12,7 +33,7 @@ Screener Overview data_type : str Data type between: overview, valuation, financial, ownership, performance, technical - Returns - ---------- +* **Returns** + pd.DataFrame Dataframe with overview, valuation, financial, ownership, performance or technical diff --git a/website/content/SDK/stocks/ca/sentiment/_index.md b/website/content/SDK/stocks/ca/sentiment/_index.md deleted file mode 100644 index bf2082120a1..00000000000 --- a/website/content/SDK/stocks/ca/sentiment/_index.md +++ /dev/null @@ -1,36 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.ca.sentiment(symbols: List[str]) -> pandas.core.frame.DataFrame - -Gets Sentiment analysis from several symbols provided by FinBrain's API - - Parameters - ---------- - symbols : List[str] - List of tickers to get sentiment - Comparable companies can be accessed through - finnhub_peers(), finviz_peers(), polygon_peers(). - - Returns - ------- - pd.DataFrame - Contains sentiment analysis from several tickers - -## Getting charts -### stocks.ca.sentiment(similar: List[str], raw: bool = False, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display sentiment for all ticker. [Source: FinBrain] - - Parameters - ---------- - similar : List[str] - Similar companies to compare income with. - Comparable companies can be accessed through - finviz_peers(), finnhub_peers() or polygon_peers(). - raw : bool, optional - Output raw values, by default False - export : str, optional - Format to export data - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/stocks/ca/sentiment/_index.rst b/website/content/SDK/stocks/ca/sentiment/_index.rst new file mode 100644 index 00000000000..1cb648bcff4 --- /dev/null +++ b/website/content/SDK/stocks/ca/sentiment/_index.rst @@ -0,0 +1,81 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ca.sentiment( + symbols: List[str], + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Gets Sentiment analysis from several symbols provided by FinBrain's API +

+ +* **Parameters** + + symbols : List[str] + List of tickers to get sentiment + Comparable companies can be accessed through + finnhub_peers(), finviz_peers(), polygon_peers(). + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Contains sentiment analysis from several tickers + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.ca.sentiment( + similar: List[str], + raw: bool = False, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display sentiment for all ticker. [Source: FinBrain] +

+ +* **Parameters** + + similar : List[str] + Similar companies to compare income with. + Comparable companies can be accessed through + finviz_peers(), finnhub_peers() or polygon_peers(). + raw : bool, optional + Output raw values, by default False + export : str, optional + Format to export data + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/ca/volume/_index.md b/website/content/SDK/stocks/ca/volume/_index.md deleted file mode 100644 index 66a829de964..00000000000 --- a/website/content/SDK/stocks/ca/volume/_index.md +++ /dev/null @@ -1,33 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.ca.volume(similar: List[str], start_date: str = '2021-11-02') -> pandas.core.frame.DataFrame - -Get stock volume. [Source: Yahoo Finance] - - Parameters - ---------- - similar : List[str] - List of similar tickers. - Comparable companies can be accessed through - finnhub_peers(), finviz_peers(), polygon_peers(). - start_date : str, optional - Start date of comparison, by default 1 year ago - -## Getting charts -### stocks.ca.volume(similar: List[str], start_date: str = '2021-11-02', export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display stock volume. [Source: Yahoo Finance] - - Parameters - ---------- - similar : List[str] - List of similar tickers. - Comparable companies can be accessed through - finnhub_peers(), finviz_peers(), polygon_peers(). - start_date : str, optional - Start date of comparison, by default 1 year ago - export : str, optional - Format to export historical prices, by default "" - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/stocks/ca/volume/_index.rst b/website/content/SDK/stocks/ca/volume/_index.rst new file mode 100644 index 00000000000..2ddde7d2f5c --- /dev/null +++ b/website/content/SDK/stocks/ca/volume/_index.rst @@ -0,0 +1,79 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ca.volume( + similar: List[str], + start_date: str = '2021-11-07', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get stock volume. [Source: Yahoo Finance] +

+ +* **Parameters** + + similar : List[str] + List of similar tickers. + Comparable companies can be accessed through + finnhub_peers(), finviz_peers(), polygon_peers(). + start_date : str, optional + Start date of comparison, by default 1 year ago + chart: *bool* + Flag to display chart + + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.ca.volume( + similar: List[str], + start_date: str = '2021-11-07', + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display stock volume. [Source: Yahoo Finance] +

+ +* **Parameters** + + similar : List[str] + List of similar tickers. + Comparable companies can be accessed through + finnhub_peers(), finviz_peers(), polygon_peers(). + start_date : str, optional + Start date of comparison, by default 1 year ago + export : str, optional + Format to export historical prices, by default "" + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/etf/candle/_index.md b/website/content/SDK/stocks/candle/_index.rst similarity index 53% rename from website/content/SDK/etf/candle/_index.md rename to website/content/SDK/stocks/candle/_index.rst index 93ae8f514dd..4783cae433f 100644 --- a/website/content/SDK/etf/candle/_index.md +++ b/website/content/SDK/stocks/candle/_index.rst @@ -1,12 +1,51 @@ -## Get underlying data -### etf.candle(symbol: str, data: pandas.core.frame.DataFrame = None, use_matplotlib: bool = True, intraday: bool = False, add_trend: bool = False, ma: Optional[Iterable[int]] = None, asset_type: str = '', start_date: datetime.datetime = datetime.datetime(2019, 10, 30, 17, 22, 59, 707808), interval: int = 1440, end_date: datetime.datetime = datetime.datetime(2022, 11, 3, 17, 22, 59, 707818), prepost: bool = False, source: str = 'YahooFinance', iexrange: str = 'ytd', weekly: bool = False, monthly: bool = False, external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, raw: bool = False, yscale: str = 'linear') +.. role:: python(code) + :language: python + :class: highlight -Show candle plot of loaded ticker. +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.candle( + symbol: str, + data: pandas.core.frame.DataFrame = None, + use_matplotlib: bool = True, + intraday: bool = False, + add_trend: bool = False, + ma: Optional[Iterable[int]] = None, + asset_type: str = '', + start_date: datetime.datetime = datetime.datetime( + 2019, 11, 4, 12, 2, 54, 348838, chart: bool = False, +), interval: int = 1440, + end_date: datetime.datetime = datetime.datetime( + 2022, 11, 8, 12, 2, 54, 348849, chart: bool = False, +), prepost: bool = False, + source: str = 'YahooFinance', + iexrange: str = 'ytd', + weekly: bool = False, + monthly: bool = False, + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + raw: bool = False, + yscale: str = 'linear', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Show candle plot of loaded ticker. [Source: Yahoo Finance, IEX Cloud or Alpha Vantage] +

+ +* **Parameters** - Parameters - ---------- symbol: str Ticker name data: pd.DataFrame @@ -19,11 +58,11 @@ Show candle plot of loaded ticker. Flag to add high and low trends to chart ma: Tuple[int] Moving averages to add to the candle - asset_type_: str + asset_type\_: str String to include in title external_axes : Optional[List[plt.Axes]], optional External axes (2 axes are expected in the list), by default None - asset_type_: str + asset_type\_: str String to include in title start_date: datetime Start date to get data from with diff --git a/website/content/SDK/stocks/dd/analyst/_index.md b/website/content/SDK/stocks/dd/analyst/_index.md deleted file mode 100644 index 601b26d0af7..00000000000 --- a/website/content/SDK/stocks/dd/analyst/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### stocks.dd.analyst(symbol: str) -> pandas.core.frame.DataFrame - -Get analyst data. [Source: Finviz] - - Parameters - ---------- - symbol : str - Stock ticker symbol - - Returns - ------- - df_fa: DataFrame - Analyst price targets diff --git a/website/content/SDK/stocks/dd/analyst/_index.rst b/website/content/SDK/stocks/dd/analyst/_index.rst new file mode 100644 index 00000000000..d2f4f279852 --- /dev/null +++ b/website/content/SDK/stocks/dd/analyst/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.dd.analyst( + symbol: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get analyst data. [Source: Finviz] +

+ +* **Parameters** + + symbol : str + Stock ticker symbol + +* **Returns** + + df_fa: DataFrame + Analyst price targets diff --git a/website/content/SDK/stocks/dd/arktrades/_index.md b/website/content/SDK/stocks/dd/arktrades/_index.md deleted file mode 100644 index 2e46ceab69a..00000000000 --- a/website/content/SDK/stocks/dd/arktrades/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### stocks.dd.arktrades(symbol: str) -> pandas.core.frame.DataFrame - -Gets a dataframe of ARK trades for ticker - - Parameters - ---------- - symbol : str - Ticker to get trades for - - Returns - ------- - pd.DataFrame - DataFrame of trades diff --git a/website/content/SDK/stocks/dd/arktrades/_index.rst b/website/content/SDK/stocks/dd/arktrades/_index.rst new file mode 100644 index 00000000000..c22c6ff3b0b --- /dev/null +++ b/website/content/SDK/stocks/dd/arktrades/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.dd.arktrades( + symbol: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Gets a dataframe of ARK trades for ticker +

+ +* **Parameters** + + symbol : str + Ticker to get trades for + +* **Returns** + + pd.DataFrame + DataFrame of trades diff --git a/website/content/SDK/stocks/dd/customer/_index.md b/website/content/SDK/stocks/dd/customer/_index.md deleted file mode 100644 index 55f88c64b7c..00000000000 --- a/website/content/SDK/stocks/dd/customer/_index.md +++ /dev/null @@ -1,16 +0,0 @@ -## Get underlying data -### stocks.dd.customer(symbol: str, limit: int = 50) -> pandas.core.frame.DataFrame - -Print customers from ticker provided - - Parameters - ---------- - symbol: str - Ticker to select customers from - limit: int - The maximum number of rows to show - - Returns - ------- - pd.DataFrame - A dataframe of suppliers diff --git a/website/content/SDK/stocks/dd/customer/_index.rst b/website/content/SDK/stocks/dd/customer/_index.rst new file mode 100644 index 00000000000..2771ce3aacd --- /dev/null +++ b/website/content/SDK/stocks/dd/customer/_index.rst @@ -0,0 +1,37 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.dd.customer( + symbol: str, + limit: int = 50, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Print customers from ticker provided +

+ +* **Parameters** + + symbol: str + Ticker to select customers from + limit: int + The maximum number of rows to show + +* **Returns** + + pd.DataFrame + A dataframe of suppliers diff --git a/website/content/SDK/stocks/dd/est/_index.md b/website/content/SDK/stocks/dd/est/_index.md deleted file mode 100644 index eff69d2f52b..00000000000 --- a/website/content/SDK/stocks/dd/est/_index.md +++ /dev/null @@ -1,18 +0,0 @@ -## Get underlying data -### stocks.dd.est(symbol: str) -> Tuple[pandas.core.frame.DataFrame, pandas.core.frame.DataFrame, pandas.core.frame.DataFrame] - -Get analysts' estimates for a given ticker. [Source: Business Insider] - - Parameters - ---------- - symbol : str - Ticker to get analysts' estimates - - Returns - ------- - df_year_estimates : pd.DataFrame - Year estimates - df_quarter_earnings : pd.DataFrame - Quarter earnings estimates - df_quarter_revenues : pd.DataFrame - Quarter revenues estimates diff --git a/website/content/SDK/stocks/dd/est/_index.rst b/website/content/SDK/stocks/dd/est/_index.rst new file mode 100644 index 00000000000..1435aa9470d --- /dev/null +++ b/website/content/SDK/stocks/dd/est/_index.rst @@ -0,0 +1,38 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.dd.est( + symbol: str, + chart: bool = False, +) -> Tuple[pandas.core.frame.DataFrame, pandas.core.frame.DataFrame, pandas.core.frame.DataFrame] +{{< /highlight >}} + +.. raw:: html + +

+ Get analysts' estimates for a given ticker. [Source: Business Insider] +

+ +* **Parameters** + + symbol : str + Ticker to get analysts' estimates + +* **Returns** + + df_year_estimates : pd.DataFrame + Year estimates + df_quarter_earnings : pd.DataFrame + Quarter earnings estimates + df_quarter_revenues : pd.DataFrame + Quarter revenues estimates diff --git a/website/content/SDK/stocks/dd/news/_index.md b/website/content/SDK/stocks/dd/news/_index.md deleted file mode 100644 index 281e012d511..00000000000 --- a/website/content/SDK/stocks/dd/news/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### stocks.dd.news(symbol: str) -> List[Any] - -Get news from Finviz - - Parameters - ---------- - symbol : str - Stock ticker symbol - - Returns - ------- - List[Any] - News diff --git a/website/content/SDK/stocks/dd/news/_index.rst b/website/content/SDK/stocks/dd/news/_index.rst new file mode 100644 index 00000000000..9a339ec4955 --- /dev/null +++ b/website/content/SDK/stocks/dd/news/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.dd.news( + symbol: str, + chart: bool = False, +) -> List[Any] +{{< /highlight >}} + +.. raw:: html + +

+ Get news from Finviz +

+ +* **Parameters** + + symbol : str + Stock ticker symbol + +* **Returns** + + List[Any] + News diff --git a/website/content/SDK/stocks/dd/pt/_index.md b/website/content/SDK/stocks/dd/pt/_index.md deleted file mode 100644 index 5e513a274fa..00000000000 --- a/website/content/SDK/stocks/dd/pt/_index.md +++ /dev/null @@ -1,38 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.dd.pt(symbol: str) -> pandas.core.frame.DataFrame - -Get analysts' price targets for a given stock. [Source: Business Insider] - - Parameters - ---------- - symbol : str - Ticker symbol - - Returns - ------- - pd.DataFrame - Analysts data - -## Getting charts -### stocks.dd.pt(symbol: str, data: pandas.core.frame.DataFrame, start_date: str = '2022-11-03', limit: int = 10, raw: bool = False, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display analysts' price targets for a given stock. [Source: Business Insider] - - Parameters - ---------- - symbol: str - Due diligence ticker symbol - data: DataFrame - Due diligence stock dataframe - start_date : str - Start date of the stock data - limit : int - Number of latest price targets from analysts to print - raw: bool - Display raw data only - export: str - Export dataframe data to csv,json,xlsx file - external_axes: Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/stocks/dd/pt/_index.rst b/website/content/SDK/stocks/dd/pt/_index.rst new file mode 100644 index 00000000000..32c4777cb6d --- /dev/null +++ b/website/content/SDK/stocks/dd/pt/_index.rst @@ -0,0 +1,86 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.dd.pt( + symbol: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get analysts' price targets for a given stock. [Source: Business Insider] +

+ +* **Parameters** + + symbol : str + Ticker symbol + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Analysts data + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.dd.pt( + symbol: str, + data: pandas.core.frame.DataFrame, + start_date: str = '2022-11-08', + limit: int = 10, + raw: bool = False, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display analysts' price targets for a given stock. [Source: Business Insider] +

+ +* **Parameters** + + symbol: str + Due diligence ticker symbol + data: DataFrame + Due diligence stock dataframe + start_date : str + Start date of the stock data + limit : int + Number of latest price targets from analysts to print + raw: bool + Display raw data only + export: str + Export dataframe data to csv,json,xlsx file + external_axes: Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/dd/rating/_index.md b/website/content/SDK/stocks/dd/rating/_index.md deleted file mode 100644 index e20fefc68bd..00000000000 --- a/website/content/SDK/stocks/dd/rating/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### stocks.dd.rating(symbol: str) -> pandas.core.frame.DataFrame - -Get ratings for a given ticker. [Source: Financial Modeling Prep] - - Parameters - ---------- - symbol : str - Stock ticker symbol - - Returns - ------- - pd.DataFrame - Rating data diff --git a/website/content/SDK/stocks/dd/rating/_index.rst b/website/content/SDK/stocks/dd/rating/_index.rst new file mode 100644 index 00000000000..934ce85ce8f --- /dev/null +++ b/website/content/SDK/stocks/dd/rating/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.dd.rating( + symbol: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get ratings for a given ticker. [Source: Financial Modeling Prep] +

+ +* **Parameters** + + symbol : str + Stock ticker symbol + +* **Returns** + + pd.DataFrame + Rating data diff --git a/website/content/SDK/stocks/dd/rot/_index.md b/website/content/SDK/stocks/dd/rot/_index.md deleted file mode 100644 index 294d70628ef..00000000000 --- a/website/content/SDK/stocks/dd/rot/_index.md +++ /dev/null @@ -1,34 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.dd.rot(symbol: str) -> pandas.core.frame.DataFrame - -Get rating over time data. [Source: Finnhub] - - Parameters - ---------- - symbol : str - Ticker symbol to get ratings from - - Returns - ------- - pd.DataFrame - Get dataframe with ratings - -## Getting charts -### stocks.dd.rot(symbol: str, limit: int = 10, raw: bool = False, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Rating over time (monthly). [Source: Finnhub] - - Parameters - ---------- - ticker : str - Ticker to get ratings from - limit : int - Number of last months ratings to show - raw: bool - Display raw data only - export: str - Export dataframe data to csv,json,xlsx file - external_axes : Optional[List[plt.Axes]] - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/stocks/dd/rot/_index.rst b/website/content/SDK/stocks/dd/rot/_index.rst new file mode 100644 index 00000000000..b517b3ad885 --- /dev/null +++ b/website/content/SDK/stocks/dd/rot/_index.rst @@ -0,0 +1,80 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.dd.rot( + symbol: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get rating over time data. [Source: Finnhub] +

+ +* **Parameters** + + symbol : str + Ticker symbol to get ratings from + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Get dataframe with ratings + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.dd.rot( + symbol: str, + limit: int = 10, + raw: bool = False, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Rating over time (monthly). [Source: Finnhub] +

+ +* **Parameters** + + ticker : str + Ticker to get ratings from + limit : int + Number of last months ratings to show + raw: bool + Display raw data only + export: str + Export dataframe data to csv,json,xlsx file + external_axes : Optional[List[plt.Axes]] + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/dd/sec/_index.md b/website/content/SDK/stocks/dd/sec/_index.md deleted file mode 100644 index dd4703604d4..00000000000 --- a/website/content/SDK/stocks/dd/sec/_index.md +++ /dev/null @@ -1,30 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.dd.sec(symbol: str) -> pandas.core.frame.DataFrame - -Get SEC filings for a given stock ticker. [Source: Market Watch] - - Parameters - ---------- - symbol : str - Stock ticker symbol - - Returns - ------- - df_financials : pd.DataFrame - SEC filings data - -## Getting charts -### stocks.dd.sec(symbol: str, limit: int = 5, export: str = '', chart=True) - -Display SEC filings for a given stock ticker. [Source: Market Watch] - - Parameters - ---------- - symbol: str - Stock ticker symbol - limit: int - Number of ratings to display - export: str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/stocks/dd/sec/_index.rst b/website/content/SDK/stocks/dd/sec/_index.rst new file mode 100644 index 00000000000..b0424602bff --- /dev/null +++ b/website/content/SDK/stocks/dd/sec/_index.rst @@ -0,0 +1,74 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.dd.sec( + symbol: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get SEC filings for a given stock ticker. [Source: Market Watch] +

+ +* **Parameters** + + symbol : str + Stock ticker symbol + chart: *bool* + Flag to display chart + + +* **Returns** + + df_financials : pd.DataFrame + SEC filings data + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.dd.sec( + symbol: str, + limit: int = 5, + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display SEC filings for a given stock ticker. [Source: Market Watch] +

+ +* **Parameters** + + symbol: str + Stock ticker symbol + limit: int + Number of ratings to display + export: str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/dd/supplier/_index.md b/website/content/SDK/stocks/dd/supplier/_index.md deleted file mode 100644 index dcd5a802c20..00000000000 --- a/website/content/SDK/stocks/dd/supplier/_index.md +++ /dev/null @@ -1,16 +0,0 @@ -## Get underlying data -### stocks.dd.supplier(symbol: str, limit: int = 50) -> pandas.core.frame.DataFrame - -Get suppliers from ticker provided. [Source: CSIMarket] - - Parameters - ---------- - symbol: str - Ticker to select suppliers from - limit: int - The maximum number of rows to show - - Returns - ------- - pd.DataFrame - A dataframe of suppliers diff --git a/website/content/SDK/stocks/dd/supplier/_index.rst b/website/content/SDK/stocks/dd/supplier/_index.rst new file mode 100644 index 00000000000..b5c45b590da --- /dev/null +++ b/website/content/SDK/stocks/dd/supplier/_index.rst @@ -0,0 +1,37 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.dd.supplier( + symbol: str, + limit: int = 50, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get suppliers from ticker provided. [Source: CSIMarket] +

+ +* **Parameters** + + symbol: str + Ticker to select suppliers from + limit: int + The maximum number of rows to show + +* **Returns** + + pd.DataFrame + A dataframe of suppliers diff --git a/website/content/SDK/stocks/disc/active/_index.md b/website/content/SDK/stocks/disc/active/_index.md deleted file mode 100644 index d7a9dd9b2f4..00000000000 --- a/website/content/SDK/stocks/disc/active/_index.md +++ /dev/null @@ -1,9 +0,0 @@ -## Get underlying data -### stocks.disc.active() -> pandas.core.frame.DataFrame - -Get stocks ordered in descending order by intraday trade volume. [Source: Yahoo Finance] - - Returns - ------- - pd.DataFrame - Most active stocks diff --git a/website/content/SDK/stocks/disc/active/_index.rst b/website/content/SDK/stocks/disc/active/_index.rst new file mode 100644 index 00000000000..892060741fa --- /dev/null +++ b/website/content/SDK/stocks/disc/active/_index.rst @@ -0,0 +1,26 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.disc.active() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get stocks ordered in descending order by intraday trade volume. [Source: Yahoo Finance] +

+ +* **Returns** + + pd.DataFrame + Most active stocks diff --git a/website/content/SDK/stocks/disc/arkord/_index.md b/website/content/SDK/stocks/disc/arkord/_index.md deleted file mode 100644 index 1b254b02308..00000000000 --- a/website/content/SDK/stocks/disc/arkord/_index.md +++ /dev/null @@ -1,19 +0,0 @@ -## Get underlying data -### stocks.disc.arkord(buys_only: bool = False, sells_only: bool = False, fund: str = '') -> pandas.core.frame.DataFrame - -Returns ARK orders in a Dataframe - - Parameters - ---------- - buys_only: bool - Flag to filter on buys only - sells_only: bool - Flag to sort on sells only - fund: str - Optional filter by fund - - Returns - ------- - DataFrame - ARK orders data frame with the following columns: - ticker, date, shares, weight, fund, direction diff --git a/website/content/SDK/stocks/disc/arkord/_index.rst b/website/content/SDK/stocks/disc/arkord/_index.rst new file mode 100644 index 00000000000..f734cfdbe3e --- /dev/null +++ b/website/content/SDK/stocks/disc/arkord/_index.rst @@ -0,0 +1,41 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.disc.arkord( + buys_only: bool = False, + sells_only: bool = False, + fund: str = '', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Returns ARK orders in a Dataframe +

+ +* **Parameters** + + buys_only: bool + Flag to filter on buys only + sells_only: bool + Flag to sort on sells only + fund: str + Optional filter by fund + +* **Returns** + + DataFrame + ARK orders data frame with the following columns: + ticker, date, shares, weight, fund, direction diff --git a/website/content/SDK/stocks/disc/asc/_index.md b/website/content/SDK/stocks/disc/asc/_index.md deleted file mode 100644 index d97b137ca14..00000000000 --- a/website/content/SDK/stocks/disc/asc/_index.md +++ /dev/null @@ -1,10 +0,0 @@ -## Get underlying data -### stocks.disc.asc() -> pandas.core.frame.DataFrame - -Get Yahoo Finance small cap stocks with earnings growth rates better than 25%. - [Source: Yahoo Finance] - - Returns - ------- - pd.DataFrame - Most aggressive small cap stocks diff --git a/website/content/SDK/stocks/disc/asc/_index.rst b/website/content/SDK/stocks/disc/asc/_index.rst new file mode 100644 index 00000000000..c0681c2ed34 --- /dev/null +++ b/website/content/SDK/stocks/disc/asc/_index.rst @@ -0,0 +1,27 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.disc.asc() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get Yahoo Finance small cap stocks with earnings growth rates better than 25%. + [Source: Yahoo Finance] +

+ +* **Returns** + + pd.DataFrame + Most aggressive small cap stocks diff --git a/website/content/SDK/stocks/disc/dividends/_index.md b/website/content/SDK/stocks/disc/dividends/_index.md deleted file mode 100644 index 60b9fb9f822..00000000000 --- a/website/content/SDK/stocks/disc/dividends/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### stocks.disc.dividends(date: str = '2022-11-03') -> pandas.core.frame.DataFrame - -Gets dividend calendar for given date. Date represents Ex-Dividend Date - - Parameters - ---------- - date: datetime - Date to get for in format YYYY-MM-DD - - Returns - ------- - pd.DataFrame: - Dataframe of dividend calendar diff --git a/website/content/SDK/stocks/disc/dividends/_index.rst b/website/content/SDK/stocks/disc/dividends/_index.rst new file mode 100644 index 00000000000..6c8e9ee4f33 --- /dev/null +++ b/website/content/SDK/stocks/disc/dividends/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.disc.dividends( + date: str = '2022-11-08', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Gets dividend calendar for given date. Date represents Ex-Dividend Date +

+ +* **Parameters** + + date: datetime + Date to get for in format YYYY-MM-DD + +* **Returns** + + pd.DataFrame: + Dataframe of dividend calendar diff --git a/website/content/SDK/stocks/disc/fipo/_index.md b/website/content/SDK/stocks/disc/fipo/_index.md deleted file mode 100644 index cb072aab32f..00000000000 --- a/website/content/SDK/stocks/disc/fipo/_index.md +++ /dev/null @@ -1,11 +0,0 @@ -## Get underlying data -### stocks.disc.fipo(num_days_ahead: int = 5, end_date: Optional[str] = None) - -Future IPOs dates. [Source: Finnhub] - - Parameters - ---------- - num_days_ahead: int - Number of days to look ahead for IPOs dates - end_date: datetime - The end date (format YYYY-MM-DD) to look for IPOs from today onwards diff --git a/website/content/SDK/stocks/disc/fipo/_index.rst b/website/content/SDK/stocks/disc/fipo/_index.rst new file mode 100644 index 00000000000..0d35fa670ff --- /dev/null +++ b/website/content/SDK/stocks/disc/fipo/_index.rst @@ -0,0 +1,32 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.disc.fipo( + num_days_ahead: int = 5, + end_date: Optional[str] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Future IPOs dates. [Source: Finnhub] +

+ +* **Parameters** + + num_days_ahead: int + Number of days to look ahead for IPOs dates + end_date: datetime + The end date (format YYYY-MM-DD) to look for IPOs from today onwards diff --git a/website/content/SDK/stocks/disc/gainers/_index.md b/website/content/SDK/stocks/disc/gainers/_index.md deleted file mode 100644 index ad30267df8f..00000000000 --- a/website/content/SDK/stocks/disc/gainers/_index.md +++ /dev/null @@ -1,9 +0,0 @@ -## Get underlying data -### stocks.disc.gainers() -> pandas.core.frame.DataFrame - -Get top gainers. [Source: Yahoo Finance] - - Returns - ------- - pd.DataFrame - Stock Gainers diff --git a/website/content/SDK/stocks/disc/gainers/_index.rst b/website/content/SDK/stocks/disc/gainers/_index.rst new file mode 100644 index 00000000000..96c06f35e58 --- /dev/null +++ b/website/content/SDK/stocks/disc/gainers/_index.rst @@ -0,0 +1,26 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.disc.gainers() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get top gainers. [Source: Yahoo Finance] +

+ +* **Returns** + + pd.DataFrame + Stock Gainers diff --git a/website/content/SDK/stocks/disc/gtech/_index.md b/website/content/SDK/stocks/disc/gtech/_index.md deleted file mode 100644 index 5f889ace0da..00000000000 --- a/website/content/SDK/stocks/disc/gtech/_index.md +++ /dev/null @@ -1,9 +0,0 @@ -## Get underlying data -### stocks.disc.gtech() -> pandas.core.frame.DataFrame - -Get technology stocks with revenue and earnings growth in excess of 25%. [Source: Yahoo Finance] - - Returns - ------- - pd.DataFrame - Growth technology stocks diff --git a/website/content/SDK/stocks/disc/gtech/_index.rst b/website/content/SDK/stocks/disc/gtech/_index.rst new file mode 100644 index 00000000000..308c320e2e7 --- /dev/null +++ b/website/content/SDK/stocks/disc/gtech/_index.rst @@ -0,0 +1,26 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.disc.gtech() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get technology stocks with revenue and earnings growth in excess of 25%. [Source: Yahoo Finance] +

+ +* **Returns** + + pd.DataFrame + Growth technology stocks diff --git a/website/content/SDK/stocks/disc/hotpenny/_index.md b/website/content/SDK/stocks/disc/hotpenny/_index.md deleted file mode 100644 index 6dedd643d27..00000000000 --- a/website/content/SDK/stocks/disc/hotpenny/_index.md +++ /dev/null @@ -1,10 +0,0 @@ -## Get underlying data -### stocks.disc.hotpenny() -> pandas.core.frame.DataFrame - -Returns today hot penny stocks - - Returns - ------- - DataFrame - Today hot penny stocks DataFrame with the following columns: - Ticker, Price, Change, $ Volume, Volume, # Trades diff --git a/website/content/SDK/stocks/disc/hotpenny/_index.rst b/website/content/SDK/stocks/disc/hotpenny/_index.rst new file mode 100644 index 00000000000..bf3a7abf2e1 --- /dev/null +++ b/website/content/SDK/stocks/disc/hotpenny/_index.rst @@ -0,0 +1,27 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.disc.hotpenny() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Returns today hot penny stocks +

+ +* **Returns** + + DataFrame + Today hot penny stocks DataFrame with the following columns: + Ticker, Price, Change, $ Volume, Volume, # Trades diff --git a/website/content/SDK/stocks/disc/ipo/_index.md b/website/content/SDK/stocks/disc/ipo/_index.md deleted file mode 100644 index 049f2b7ee2b..00000000000 --- a/website/content/SDK/stocks/disc/ipo/_index.md +++ /dev/null @@ -1,16 +0,0 @@ -## Get underlying data -### stocks.disc.ipo(start_date: str = '2022-10-29', end_date: str = '2022-11-03') -> pandas.core.frame.DataFrame - -Get IPO calendar - - Parameters - ---------- - start_date : str - start date (%Y-%m-%d) to get IPO calendar - end_date : str - end date (%Y-%m-%d) to get IPO calendar - - Returns - ------- - pd.DataFrame - Get dataframe with economic calendar events diff --git a/website/content/SDK/stocks/disc/ipo/_index.rst b/website/content/SDK/stocks/disc/ipo/_index.rst new file mode 100644 index 00000000000..1642874aeac --- /dev/null +++ b/website/content/SDK/stocks/disc/ipo/_index.rst @@ -0,0 +1,37 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.disc.ipo( + start_date: str = '2022-11-03', + end_date: str = '2022-11-08', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get IPO calendar +

+ +* **Parameters** + + start_date : str + start date (%Y-%m-%d) to get IPO calendar + end_date : str + end date (%Y-%m-%d) to get IPO calendar + +* **Returns** + + pd.DataFrame + Get dataframe with economic calendar events diff --git a/website/content/SDK/stocks/disc/losers/_index.md b/website/content/SDK/stocks/disc/losers/_index.md deleted file mode 100644 index 77fdd39d360..00000000000 --- a/website/content/SDK/stocks/disc/losers/_index.md +++ /dev/null @@ -1,9 +0,0 @@ -## Get underlying data -### stocks.disc.losers() -> pandas.core.frame.DataFrame - -Get top losers. [Source: Yahoo Finance] - - Returns - ------- - pd.DataFrame - Stock Losers diff --git a/website/content/SDK/stocks/disc/losers/_index.rst b/website/content/SDK/stocks/disc/losers/_index.rst new file mode 100644 index 00000000000..dbdb361e741 --- /dev/null +++ b/website/content/SDK/stocks/disc/losers/_index.rst @@ -0,0 +1,26 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.disc.losers() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get top losers. [Source: Yahoo Finance] +

+ +* **Returns** + + pd.DataFrame + Stock Losers diff --git a/website/content/SDK/stocks/disc/lowfloat/_index.md b/website/content/SDK/stocks/disc/lowfloat/_index.md deleted file mode 100644 index 35fb8874f47..00000000000 --- a/website/content/SDK/stocks/disc/lowfloat/_index.md +++ /dev/null @@ -1,10 +0,0 @@ -## Get underlying data -### stocks.disc.lowfloat() -> pandas.core.frame.DataFrame - -Returns low float DataFrame - - Returns - ------- - DataFrame - Low float DataFrame with the following columns: - Ticker, Company, Exchange, ShortInt, Float, Outstd, Industry diff --git a/website/content/SDK/stocks/disc/lowfloat/_index.rst b/website/content/SDK/stocks/disc/lowfloat/_index.rst new file mode 100644 index 00000000000..7cbccd65971 --- /dev/null +++ b/website/content/SDK/stocks/disc/lowfloat/_index.rst @@ -0,0 +1,27 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.disc.lowfloat() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Returns low float DataFrame +

+ +* **Returns** + + DataFrame + Low float DataFrame with the following columns: + Ticker, Company, Exchange, ShortInt, Float, Outstd, Industry diff --git a/website/content/SDK/stocks/disc/news/_index.md b/website/content/SDK/stocks/disc/news/_index.md deleted file mode 100644 index 51236072f97..00000000000 --- a/website/content/SDK/stocks/disc/news/_index.md +++ /dev/null @@ -1,17 +0,0 @@ -## Get underlying data -### stocks.disc.news(news_type: str = 'Top-News', limit: int = 5) -> List - -Gets news. [Source: SeekingAlpha] - - Parameters - ---------- - news_type : str - From: Top-News, On-The-Move, Market-Pulse, Notable-Calls, Buybacks, Commodities, Crypto, Issuance, Global, - Guidance, IPOs, SPACs, Politics, M-A, Consumer, Energy, Financials, Healthcare, MLPs, REITs, Technology - limit : int - Number of news to display - - Returns - ------- - List[dict] - List of dict news diff --git a/website/content/SDK/stocks/disc/news/_index.rst b/website/content/SDK/stocks/disc/news/_index.rst new file mode 100644 index 00000000000..d1d41556b81 --- /dev/null +++ b/website/content/SDK/stocks/disc/news/_index.rst @@ -0,0 +1,38 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.disc.news( + news_type: str = 'Top-News', + limit: int = 5, + chart: bool = False, +) -> List +{{< /highlight >}} + +.. raw:: html + +

+ Gets news. [Source: SeekingAlpha] +

+ +* **Parameters** + + news_type : str + From: Top-News, On-The-Move, Market-Pulse, Notable-Calls, Buybacks, Commodities, Crypto, Issuance, Global, + Guidance, IPOs, SPACs, Politics, M-A, Consumer, Energy, Financials, Healthcare, MLPs, REITs, Technology + limit : int + Number of news to display + +* **Returns** + + List[dict] + List of dict news diff --git a/website/content/SDK/stocks/disc/pipo/_index.md b/website/content/SDK/stocks/disc/pipo/_index.md deleted file mode 100644 index 73fa47480eb..00000000000 --- a/website/content/SDK/stocks/disc/pipo/_index.md +++ /dev/null @@ -1,11 +0,0 @@ -## Get underlying data -### stocks.disc.pipo(num_days_behind: int = 5, start_date: Optional[str] = None) - -Past IPOs dates. [Source: Finnhub] - - Parameters - ---------- - num_days_behind: int - Number of days to look behind for IPOs dates - start_date: str - The starting date (format YYYY-MM-DD) to look for IPOs diff --git a/website/content/SDK/stocks/disc/pipo/_index.rst b/website/content/SDK/stocks/disc/pipo/_index.rst new file mode 100644 index 00000000000..c5a1f2fa7b9 --- /dev/null +++ b/website/content/SDK/stocks/disc/pipo/_index.rst @@ -0,0 +1,32 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.disc.pipo( + num_days_behind: int = 5, + start_date: Optional[str] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Past IPOs dates. [Source: Finnhub] +

+ +* **Parameters** + + num_days_behind: int + Number of days to look behind for IPOs dates + start_date: str + The starting date (format YYYY-MM-DD) to look for IPOs diff --git a/website/content/SDK/stocks/disc/rtat/_index.md b/website/content/SDK/stocks/disc/rtat/_index.md deleted file mode 100644 index 642ae1db0dc..00000000000 --- a/website/content/SDK/stocks/disc/rtat/_index.md +++ /dev/null @@ -1,9 +0,0 @@ -## Get underlying data -### stocks.disc.rtat() -> pandas.core.frame.DataFrame - -Gets the top 10 retail stocks per day - - Returns - ------- - pd.DataFrame - Dataframe of tickers diff --git a/website/content/SDK/stocks/disc/rtat/_index.rst b/website/content/SDK/stocks/disc/rtat/_index.rst new file mode 100644 index 00000000000..165072be65f --- /dev/null +++ b/website/content/SDK/stocks/disc/rtat/_index.rst @@ -0,0 +1,26 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.disc.rtat() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Gets the top 10 retail stocks per day +

+ +* **Returns** + + pd.DataFrame + Dataframe of tickers diff --git a/website/content/SDK/stocks/disc/trending/_index.md b/website/content/SDK/stocks/disc/trending/_index.md deleted file mode 100644 index ee579ef1368..00000000000 --- a/website/content/SDK/stocks/disc/trending/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### stocks.disc.trending(limit: int = 5) -> list - -Returns a list of trending articles - - Parameters - ---------- - limit: int - Number of articles - - Returns - ------- - list - Trending articles list diff --git a/website/content/SDK/stocks/disc/trending/_index.rst b/website/content/SDK/stocks/disc/trending/_index.rst new file mode 100644 index 00000000000..96d7cb7ff5f --- /dev/null +++ b/website/content/SDK/stocks/disc/trending/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.disc.trending( + limit: int = 5, + chart: bool = False, +) -> list +{{< /highlight >}} + +.. raw:: html + +

+ Returns a list of trending articles +

+ +* **Parameters** + + limit: int + Number of articles + +* **Returns** + + list + Trending articles list diff --git a/website/content/SDK/stocks/disc/ugs/_index.md b/website/content/SDK/stocks/disc/ugs/_index.md deleted file mode 100644 index fbbbd66fd22..00000000000 --- a/website/content/SDK/stocks/disc/ugs/_index.md +++ /dev/null @@ -1,10 +0,0 @@ -## Get underlying data -### stocks.disc.ugs() -> pandas.core.frame.DataFrame - -Get stocks with earnings growth rates better than 25% and relatively low PE and PEG ratios. - [Source: Yahoo Finance] - - Returns - ------- - pd.DataFrame - Undervalued stocks diff --git a/website/content/SDK/stocks/disc/ugs/_index.rst b/website/content/SDK/stocks/disc/ugs/_index.rst new file mode 100644 index 00000000000..0624b60dcb9 --- /dev/null +++ b/website/content/SDK/stocks/disc/ugs/_index.rst @@ -0,0 +1,27 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.disc.ugs() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get stocks with earnings growth rates better than 25% and relatively low PE and PEG ratios. + [Source: Yahoo Finance] +

+ +* **Returns** + + pd.DataFrame + Undervalued stocks diff --git a/website/content/SDK/stocks/disc/ulc/_index.md b/website/content/SDK/stocks/disc/ulc/_index.md deleted file mode 100644 index 3e0e7a7d702..00000000000 --- a/website/content/SDK/stocks/disc/ulc/_index.md +++ /dev/null @@ -1,10 +0,0 @@ -## Get underlying data -### stocks.disc.ulc() -> pandas.core.frame.DataFrame - -Get Yahoo Finance potentially undervalued large cap stocks. - [Source: Yahoo Finance] - - Returns - ------- - pd.DataFrame - Most undervalued large cap stocks diff --git a/website/content/SDK/stocks/disc/ulc/_index.rst b/website/content/SDK/stocks/disc/ulc/_index.rst new file mode 100644 index 00000000000..21f00bcd913 --- /dev/null +++ b/website/content/SDK/stocks/disc/ulc/_index.rst @@ -0,0 +1,27 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.disc.ulc() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get Yahoo Finance potentially undervalued large cap stocks. + [Source: Yahoo Finance] +

+ +* **Returns** + + pd.DataFrame + Most undervalued large cap stocks diff --git a/website/content/SDK/stocks/disc/upcoming/_index.md b/website/content/SDK/stocks/disc/upcoming/_index.md deleted file mode 100644 index 496655c8351..00000000000 --- a/website/content/SDK/stocks/disc/upcoming/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### stocks.disc.upcoming(limit: int = 10) -> pandas.core.frame.DataFrame - -Returns a DataFrame with upcoming earnings - - Parameters - ---------- - limit : int - Number of pages - - Returns - ------- - DataFrame - Upcoming earnings DataFrame diff --git a/website/content/SDK/stocks/disc/upcoming/_index.rst b/website/content/SDK/stocks/disc/upcoming/_index.rst new file mode 100644 index 00000000000..67269b5d8de --- /dev/null +++ b/website/content/SDK/stocks/disc/upcoming/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.disc.upcoming( + limit: int = 10, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Returns a DataFrame with upcoming earnings +

+ +* **Parameters** + + limit : int + Number of pages + +* **Returns** + + DataFrame + Upcoming earnings DataFrame diff --git a/website/content/SDK/stocks/dps/ctb/_index.md b/website/content/SDK/stocks/dps/ctb/_index.md deleted file mode 100644 index 4def2811202..00000000000 --- a/website/content/SDK/stocks/dps/ctb/_index.md +++ /dev/null @@ -1,9 +0,0 @@ -## Get underlying data -### stocks.dps.ctb() -> pandas.core.frame.DataFrame - -Get stocks with highest cost to borrow [Source: Interactive Broker] - - Returns - ------- - pd.DataFrame - Cost to borrow diff --git a/website/content/SDK/stocks/dps/ctb/_index.rst b/website/content/SDK/stocks/dps/ctb/_index.rst new file mode 100644 index 00000000000..aa8adc88e0b --- /dev/null +++ b/website/content/SDK/stocks/dps/ctb/_index.rst @@ -0,0 +1,26 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.dps.ctb() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get stocks with highest cost to borrow [Source: Interactive Broker] +

+ +* **Returns** + + pd.DataFrame + Cost to borrow diff --git a/website/content/SDK/stocks/dps/dpotc/_index.md b/website/content/SDK/stocks/dps/dpotc/_index.md deleted file mode 100644 index 594af72f58b..00000000000 --- a/website/content/SDK/stocks/dps/dpotc/_index.md +++ /dev/null @@ -1,32 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.dps.dpotc(symbol: str) -> Tuple[pandas.core.frame.DataFrame, pandas.core.frame.DataFrame] - -Get all FINRA data associated with a ticker - - Parameters - ---------- - symbol : str - Stock ticker to get data from - - Returns - ------- - pd.DataFrame - Dark Pools (ATS) Data - pd.DataFrame - OTC (Non-ATS) Data - -## Getting charts -### stocks.dps.dpotc(symbol: str, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display barchart of dark pool (ATS) and OTC (Non ATS) data. [Source: FINRA] - - Parameters - ---------- - symbol : str - Stock ticker - export : str - Export dataframe data to csv,json,xlsx file - external_axes : Optional[List[plt.Axes]], optional - External axes (2 axes are expected in the list), by default None diff --git a/website/content/SDK/stocks/dps/dpotc/_index.rst b/website/content/SDK/stocks/dps/dpotc/_index.rst new file mode 100644 index 00000000000..179eed21bab --- /dev/null +++ b/website/content/SDK/stocks/dps/dpotc/_index.rst @@ -0,0 +1,76 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.dps.dpotc( + symbol: str, + chart: bool = False, +) -> Tuple[pandas.core.frame.DataFrame, pandas.core.frame.DataFrame] +{{< /highlight >}} + +.. raw:: html + +

+ Get all FINRA data associated with a ticker +

+ +* **Parameters** + + symbol : str + Stock ticker to get data from + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Dark Pools (ATS) Data + pd.DataFrame + OTC (Non-ATS) Data + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.dps.dpotc( + symbol: str, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display barchart of dark pool (ATS) and OTC (Non ATS) data. [Source: FINRA] +

+ +* **Parameters** + + symbol : str + Stock ticker + export : str + Export dataframe data to csv,json,xlsx file + external_axes : Optional[List[plt.Axes]], optional + External axes (2 axes are expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/dps/ftd/_index.md b/website/content/SDK/stocks/dps/ftd/_index.md deleted file mode 100644 index 33df4b4c983..00000000000 --- a/website/content/SDK/stocks/dps/ftd/_index.md +++ /dev/null @@ -1,47 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.dps.ftd(symbol: str, start_date: str = '2022-09-04', end_date: str = '2022-11-03', limit: int = 0) -> pandas.core.frame.DataFrame - -Display fails-to-deliver data for a given ticker. [Source: SEC] - - Parameters - ---------- - symbol : str - Stock ticker - start_date : str - Start of data, in YYYY-MM-DD format - end_date : str - End of data, in YYYY-MM-DD format - limit : int - Number of latest fails-to-deliver being printed - - Returns - ---------- - pd.DataFrame - Fail to deliver data - -## Getting charts -### stocks.dps.ftd(symbol: str, data: pandas.core.frame.DataFrame, start_date: str = '2022-09-04', end_date: str = '2022-11-03', limit: int = 0, raw: bool = False, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display fails-to-deliver data for a given ticker. [Source: SEC] - - Parameters - ---------- - symbol: str - Stock ticker - data: pd.DataFrame - Stock data - start_date: str - Start of data, in YYYY-MM-DD format - end_date: str - End of data, in YYYY-MM-DD format - limit : int - Number of latest fails-to-deliver being printed - raw: bool - Print raw data - export: str - Export dataframe data to csv,json,xlsx file - external_axes: Optional[List[plt.Axes]], optional - External axes (2 axes are expected in the list), by default None - diff --git a/website/content/SDK/stocks/dps/ftd/_index.rst b/website/content/SDK/stocks/dps/ftd/_index.rst new file mode 100644 index 00000000000..13139624054 --- /dev/null +++ b/website/content/SDK/stocks/dps/ftd/_index.rst @@ -0,0 +1,98 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.dps.ftd( + symbol: str, + start_date: str = '2022-09-09', + end_date: str = '2022-11-08', + limit: int = 0, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Display fails-to-deliver data for a given ticker. [Source: SEC] +

+ +* **Parameters** + + symbol : str + Stock ticker + start_date : str + Start of data, in YYYY-MM-DD format + end_date : str + End of data, in YYYY-MM-DD format + limit : int + Number of latest fails-to-deliver being printed + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Fail to deliver data + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.dps.ftd( + symbol: str, + data: pandas.core.frame.DataFrame, + start_date: str = '2022-09-09', + end_date: str = '2022-11-08', + limit: int = 0, + raw: bool = False, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display fails-to-deliver data for a given ticker. [Source: SEC] +

+ +* **Parameters** + + symbol: str + Stock ticker + data: pd.DataFrame + Stock data + start_date: str + Start of data, in YYYY-MM-DD format + end_date: str + End of data, in YYYY-MM-DD format + limit : int + Number of latest fails-to-deliver being printed + raw: bool + Print raw data + export: str + Export dataframe data to csv,json,xlsx file + external_axes: Optional[List[plt.Axes]], optional + External axes (2 axes are expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/dps/hsi/_index.md b/website/content/SDK/stocks/dps/hsi/_index.md deleted file mode 100644 index 4bd046e0626..00000000000 --- a/website/content/SDK/stocks/dps/hsi/_index.md +++ /dev/null @@ -1,10 +0,0 @@ -## Get underlying data -### stocks.dps.hsi() -> pandas.core.frame.DataFrame - -Returns a high short interest DataFrame - - Returns - ------- - DataFrame - High short interest Dataframe with the following columns: - Ticker, Company, Exchange, ShortInt, Float, Outstd, Industry diff --git a/website/content/SDK/stocks/dps/hsi/_index.rst b/website/content/SDK/stocks/dps/hsi/_index.rst new file mode 100644 index 00000000000..1a0875eb5ee --- /dev/null +++ b/website/content/SDK/stocks/dps/hsi/_index.rst @@ -0,0 +1,27 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.dps.hsi() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Returns a high short interest DataFrame +

+ +* **Returns** + + DataFrame + High short interest Dataframe with the following columns: + Ticker, Company, Exchange, ShortInt, Float, Outstd, Industry diff --git a/website/content/SDK/stocks/dps/pos/_index.md b/website/content/SDK/stocks/dps/pos/_index.md deleted file mode 100644 index 3888b0562c8..00000000000 --- a/website/content/SDK/stocks/dps/pos/_index.md +++ /dev/null @@ -1,19 +0,0 @@ -## Get underlying data -### stocks.dps.pos(sortby: str = 'dpp_dollar', ascend: bool = False) -> pandas.core.frame.DataFrame - -Get dark pool short positions. [Source: Stockgrid] - - Parameters - ---------- - sortby : str - Field for which to sort by, where 'sv': Short Vol. [1M], - 'sv_pct': Short Vol. %%, 'nsv': Net Short Vol. [1M], - 'nsv_dollar': Net Short Vol. ($100M), 'dpp': DP Position [1M], - 'dpp_dollar': DP Position ($1B) - ascend : bool - Data in ascending order - - Returns - ---------- - pd.DataFrame - Dark pool short position data diff --git a/website/content/SDK/stocks/dps/pos/_index.rst b/website/content/SDK/stocks/dps/pos/_index.rst new file mode 100644 index 00000000000..2a5916b3ce3 --- /dev/null +++ b/website/content/SDK/stocks/dps/pos/_index.rst @@ -0,0 +1,40 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.dps.pos( + sortby: str = 'dpp_dollar', + ascend: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get dark pool short positions. [Source: Stockgrid] +

+ +* **Parameters** + + sortby : str + Field for which to sort by, where 'sv': Short Vol. [1M], + 'sv_pct': Short Vol. %%, 'nsv': Net Short Vol. [1M], + 'nsv_dollar': Net Short Vol. ($100M), 'dpp': DP Position [1M], + 'dpp_dollar': DP Position ($1B) + ascend : bool + Data in ascending order + +* **Returns** + + pd.DataFrame + Dark pool short position data diff --git a/website/content/SDK/stocks/dps/prom/_index.md b/website/content/SDK/stocks/dps/prom/_index.md deleted file mode 100644 index 4014280938e..00000000000 --- a/website/content/SDK/stocks/dps/prom/_index.md +++ /dev/null @@ -1,40 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.dps.prom(limit: int = 1000, tier_ats: str = 'T1') -> Tuple[pandas.core.frame.DataFrame, Dict] - -Get all FINRA ATS data, and parse most promising tickers based on linear regression - - Parameters - ---------- - limit: int - Number of tickers to filter from entire ATS data based on the sum of the total weekly shares quantity - tier_ats : int - Tier to process data from: T1, T2 or OTCE - - Returns - ------- - pd.DataFrame - Dark Pools (ATS) Data - Dict - Tickers from Dark Pools with better regression slope - -## Getting charts -### stocks.dps.prom(input_limit: int = 1000, limit: int = 10, tier: str = 'T1', export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display dark pool (ATS) data of tickers with growing trades activity. [Source: FINRA] - - Parameters - ---------- - input_limit : int - Number of tickers to filter from entire ATS data based on - the sum of the total weekly shares quantity - limit : int - Number of tickers to display from most promising with - better linear regression slope - tier : str - Tier to process data from: T1, T2 or OTCE - export : str - Export dataframe data to csv,json,xlsx file - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/stocks/dps/prom/_index.rst b/website/content/SDK/stocks/dps/prom/_index.rst new file mode 100644 index 00000000000..bf2b1e7edb6 --- /dev/null +++ b/website/content/SDK/stocks/dps/prom/_index.rst @@ -0,0 +1,87 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.dps.prom( + limit: int = 1000, + tier_ats: str = 'T1', + chart: bool = False, +) -> Tuple[pandas.core.frame.DataFrame, Dict] +{{< /highlight >}} + +.. raw:: html + +

+ Get all FINRA ATS data, and parse most promising tickers based on linear regression +

+ +* **Parameters** + + limit: int + Number of tickers to filter from entire ATS data based on the sum of the total weekly shares quantity + tier_ats : int + Tier to process data from: T1, T2 or OTCE + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Dark Pools (ATS) Data + Dict + Tickers from Dark Pools with better regression slope + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.dps.prom( + input_limit: int = 1000, + limit: int = 10, + tier: str = 'T1', + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display dark pool (ATS) data of tickers with growing trades activity. [Source: FINRA] +

+ +* **Parameters** + + input_limit : int + Number of tickers to filter from entire ATS data based on + the sum of the total weekly shares quantity + limit : int + Number of tickers to display from most promising with + better linear regression slope + tier : str + Tier to process data from: T1, T2 or OTCE + export : str + Export dataframe data to csv,json,xlsx file + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/dps/psi_q/_index.md b/website/content/SDK/stocks/dps/psi_q/_index.md deleted file mode 100644 index 2b7cb775ea1..00000000000 --- a/website/content/SDK/stocks/dps/psi_q/_index.md +++ /dev/null @@ -1,42 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.dps.psi_q(symbol: str, nyse: bool = False) -> pandas.core.frame.DataFrame - -Plots the short interest of a stock. This corresponds to the - number of shares that have been sold short but have not yet been - covered or closed out. Either NASDAQ or NYSE [Source: Quandl] - - Parameters - ---------- - symbol : str - ticker to get short interest from - nyse : bool - data from NYSE if true, otherwise NASDAQ - - Returns - ---------- - pd.DataFrame - short interest volume data - -## Getting charts -### stocks.dps.psi_q(symbol: str, nyse: bool = False, limit: int = 10, raw: bool = False, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Plots the short interest of a stock. This corresponds to the - number of shares that have been sold short but have not yet been - covered or closed out. Either NASDAQ or NYSE [Source: Quandl] - - Parameters - ---------- - symbol : str - ticker to get short interest from - nyse : bool - data from NYSE if true, otherwise NASDAQ - limit: int - Number of past days to show short interest - raw : bool - Flag to print raw data instead - export : str - Export dataframe data to csv,json,xlsx file - external_axes : Optional[List[plt.Axes]], optional - External axes (2 axes are expected in the list), by default None diff --git a/website/content/SDK/stocks/dps/psi_q/_index.rst b/website/content/SDK/stocks/dps/psi_q/_index.rst new file mode 100644 index 00000000000..ed79ec460ed --- /dev/null +++ b/website/content/SDK/stocks/dps/psi_q/_index.rst @@ -0,0 +1,90 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.dps.psi_q( + symbol: str, + nyse: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Plots the short interest of a stock. This corresponds to the + number of shares that have been sold short but have not yet been + covered or closed out. Either NASDAQ or NYSE [Source: Quandl] +

+ +* **Parameters** + + symbol : str + ticker to get short interest from + nyse : bool + data from NYSE if true, otherwise NASDAQ + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + short interest volume data + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.dps.psi_q( + symbol: str, + nyse: bool = False, + limit: int = 10, + raw: bool = False, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Plots the short interest of a stock. This corresponds to the + number of shares that have been sold short but have not yet been + covered or closed out. Either NASDAQ or NYSE [Source: Quandl] +

+ +* **Parameters** + + symbol : str + ticker to get short interest from + nyse : bool + data from NYSE if true, otherwise NASDAQ + limit: int + Number of past days to show short interest + raw : bool + Flag to print raw data instead + export : str + Export dataframe data to csv,json,xlsx file + external_axes : Optional[List[plt.Axes]], optional + External axes (2 axes are expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/dps/psi_sg/_index.md b/website/content/SDK/stocks/dps/psi_sg/_index.md deleted file mode 100644 index 1a22d40e810..00000000000 --- a/website/content/SDK/stocks/dps/psi_sg/_index.md +++ /dev/null @@ -1,37 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.dps.psi_sg(symbol: str) -> Tuple[pandas.core.frame.DataFrame, List] - -Get price vs short interest volume. [Source: Stockgrid] - - Parameters - ---------- - symbol : str - Stock to get data from - - Returns - ---------- - pd.DataFrame - Short interest volume data - List - Price data - -## Getting charts -### stocks.dps.psi_sg(symbol: str, limit: int = 84, raw: bool = False, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Plot price vs short interest volume. [Source: Stockgrid] - - Parameters - ---------- - symbol : str - Stock to plot for - limit : int - Number of last open market days to show - raw : bool - Flag to print raw data instead - export : str - Export dataframe data to csv,json,xlsx file - external_axes : Optional[List[plt.Axes]], optional - External axes (3 axes are expected in the list), by default None - diff --git a/website/content/SDK/stocks/dps/psi_sg/_index.rst b/website/content/SDK/stocks/dps/psi_sg/_index.rst new file mode 100644 index 00000000000..fcb3f660009 --- /dev/null +++ b/website/content/SDK/stocks/dps/psi_sg/_index.rst @@ -0,0 +1,82 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.dps.psi_sg( + symbol: str, + chart: bool = False, +) -> Tuple[pandas.core.frame.DataFrame, List] +{{< /highlight >}} + +.. raw:: html + +

+ Get price vs short interest volume. [Source: Stockgrid] +

+ +* **Parameters** + + symbol : str + Stock to get data from + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Short interest volume data + List + Price data + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.dps.psi_sg( + symbol: str, + limit: int = 84, + raw: bool = False, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Plot price vs short interest volume. [Source: Stockgrid] +

+ +* **Parameters** + + symbol : str + Stock to plot for + limit : int + Number of last open market days to show + raw : bool + Flag to print raw data instead + export : str + Export dataframe data to csv,json,xlsx file + external_axes : Optional[List[plt.Axes]], optional + External axes (3 axes are expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/dps/shorted/_index.md b/website/content/SDK/stocks/dps/shorted/_index.md deleted file mode 100644 index 1af793f0050..00000000000 --- a/website/content/SDK/stocks/dps/shorted/_index.md +++ /dev/null @@ -1,9 +0,0 @@ -## Get underlying data -### stocks.dps.shorted() -> pandas.core.frame.DataFrame - -Get most shorted stock screener [Source: Yahoo Finance] - - Returns - ------- - pd.DataFrame - Most Shorted Stocks diff --git a/website/content/SDK/stocks/dps/shorted/_index.rst b/website/content/SDK/stocks/dps/shorted/_index.rst new file mode 100644 index 00000000000..a080b37e638 --- /dev/null +++ b/website/content/SDK/stocks/dps/shorted/_index.rst @@ -0,0 +1,26 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.dps.shorted() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get most shorted stock screener [Source: Yahoo Finance] +

+ +* **Returns** + + pd.DataFrame + Most Shorted Stocks diff --git a/website/content/SDK/stocks/dps/sidtc/_index.md b/website/content/SDK/stocks/dps/sidtc/_index.md deleted file mode 100644 index 22a5b206bf5..00000000000 --- a/website/content/SDK/stocks/dps/sidtc/_index.md +++ /dev/null @@ -1,15 +0,0 @@ -## Get underlying data -### stocks.dps.sidtc(sortby: str = 'float') -> pandas.core.frame.DataFrame - -Get short interest and days to cover. [Source: Stockgrid] - - Parameters - ---------- - sortby : str - Field for which to sort by, where 'float': Float Short %%, - 'dtc': Days to Cover, 'si': Short Interest - - Returns - ---------- - pd.DataFrame - Short interest and days to cover data diff --git a/website/content/SDK/stocks/dps/sidtc/_index.rst b/website/content/SDK/stocks/dps/sidtc/_index.rst new file mode 100644 index 00000000000..040c527a808 --- /dev/null +++ b/website/content/SDK/stocks/dps/sidtc/_index.rst @@ -0,0 +1,35 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.dps.sidtc( + sortby: str = 'float', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get short interest and days to cover. [Source: Stockgrid] +

+ +* **Parameters** + + sortby : str + Field for which to sort by, where 'float': Float Short %%, + 'dtc': Days to Cover, 'si': Short Interest + +* **Returns** + + pd.DataFrame + Short interest and days to cover data diff --git a/website/content/SDK/stocks/dps/spos/_index.md b/website/content/SDK/stocks/dps/spos/_index.md deleted file mode 100644 index a162426ae99..00000000000 --- a/website/content/SDK/stocks/dps/spos/_index.md +++ /dev/null @@ -1,35 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.dps.spos(symbol: str) -> pandas.core.frame.DataFrame - -Get net short position. [Source: Stockgrid] - - Parameters - ---------- - symbol: str - Stock to get data from - - Returns - ---------- - pd.DataFrame - Net short position - -## Getting charts -### stocks.dps.spos(symbol: str, limit: int = 84, raw: bool = False, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Plot net short position. [Source: Stockgrid] - - Parameters - ---------- - symbol: str - Stock to plot for - limit : int - Number of last open market days to show - raw : bool - Flag to print raw data instead - export : str - Export dataframe data to csv,json,xlsx file - external_axes : Optional[List[plt.Axes]], optional - External axes (2 axes are expected in the list), by default None - diff --git a/website/content/SDK/stocks/dps/spos/_index.rst b/website/content/SDK/stocks/dps/spos/_index.rst new file mode 100644 index 00000000000..4a4ebaf7d55 --- /dev/null +++ b/website/content/SDK/stocks/dps/spos/_index.rst @@ -0,0 +1,80 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.dps.spos( + symbol: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get net short position. [Source: Stockgrid] +

+ +* **Parameters** + + symbol: str + Stock to get data from + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Net short position + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.dps.spos( + symbol: str, + limit: int = 84, + raw: bool = False, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Plot net short position. [Source: Stockgrid] +

+ +* **Parameters** + + symbol: str + Stock to plot for + limit : int + Number of last open market days to show + raw : bool + Flag to print raw data instead + export : str + Export dataframe data to csv,json,xlsx file + external_axes : Optional[List[plt.Axes]], optional + External axes (2 axes are expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/dps/volexch/_index.md b/website/content/SDK/stocks/dps/volexch/_index.md deleted file mode 100644 index f8d6bf5f559..00000000000 --- a/website/content/SDK/stocks/dps/volexch/_index.md +++ /dev/null @@ -1,39 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.dps.volexch(symbol: str) -> pandas.core.frame.DataFrame - -Gets short data for 5 exchanges [https://ftp.nyse.com] starting at 1/1/2021 - - Parameters - ---------- - symbol : str - Ticker to get data for - - Returns - ------- - pd.DataFrame - DataFrame of short data by exchange - -## Getting charts -### stocks.dps.volexch(symbol: str, raw: bool = False, sortby: str = '', ascend: bool = False, mpl: bool = True, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display short data by exchange - - Parameters - ---------- - symbol : str - Stock ticker - raw : bool - Flag to display raw data - sortby: str - Column to sort by - ascend: bool - Sort in ascending order - mpl: bool - Display using matplotlib - export : str, optional - Format of export data - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None - diff --git a/website/content/SDK/stocks/dps/volexch/_index.rst b/website/content/SDK/stocks/dps/volexch/_index.rst new file mode 100644 index 00000000000..70924b3b0c9 --- /dev/null +++ b/website/content/SDK/stocks/dps/volexch/_index.rst @@ -0,0 +1,86 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.dps.volexch( + symbol: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Gets short data for 5 exchanges [https://ftp.nyse.com] starting at 1/1/2021 +

+ +* **Parameters** + + symbol : str + Ticker to get data for + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + DataFrame of short data by exchange + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.dps.volexch( + symbol: str, + raw: bool = False, + sortby: str = '', + ascend: bool = False, + mpl: bool = True, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display short data by exchange +

+ +* **Parameters** + + symbol : str + Stock ticker + raw : bool + Flag to display raw data + sortby: str + Column to sort by + ascend: bool + Sort in ascending order + mpl: bool + Display using matplotlib + export : str, optional + Format of export data + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/fa/analysis/_index.md b/website/content/SDK/stocks/fa/analysis/_index.md deleted file mode 100644 index c0512877c4a..00000000000 --- a/website/content/SDK/stocks/fa/analysis/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### stocks.fa.analysis(symbol: str) -> pandas.core.frame.DataFrame - -Save time reading SEC filings with the help of machine learning. [Source: https://eclect.us] - - Parameters - ---------- - symbol: str - Ticker symbol to see analysis of filings - - Returns - ------- - str - Analysis of filings text diff --git a/website/content/SDK/stocks/fa/analysis/_index.rst b/website/content/SDK/stocks/fa/analysis/_index.rst new file mode 100644 index 00000000000..cf670ae817d --- /dev/null +++ b/website/content/SDK/stocks/fa/analysis/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.fa.analysis( + symbol: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Save time reading SEC filings with the help of machine learning. [Source: https://eclect.us] +

+ +* **Parameters** + + symbol: str + Ticker symbol to see analysis of filings + +* **Returns** + + str + Analysis of filings text diff --git a/website/content/SDK/stocks/fa/av_balance/_index.md b/website/content/SDK/stocks/fa/av_balance/_index.md deleted file mode 100644 index 6fe1b5bb6e9..00000000000 --- a/website/content/SDK/stocks/fa/av_balance/_index.md +++ /dev/null @@ -1,22 +0,0 @@ -## Get underlying data -### stocks.fa.av_balance(symbol: str, limit: int = 5, quarterly: bool = False, ratios: bool = False, plot: bool = False) -> pandas.core.frame.DataFrame - -Get balance sheets for company - - Parameters - ---------- - symbol : str - Stock ticker symbol - limit : int - Number of past to get - quarterly : bool, optional - Flag to get quarterly instead of annual, by default False - ratios: bool - Shows percentage change, by default False - plot: bool - If the data shall be formatted ready to plot - - Returns - ------- - pd.DataFrame - DataFrame of the balance sheet diff --git a/website/content/SDK/stocks/fa/av_balance/_index.rst b/website/content/SDK/stocks/fa/av_balance/_index.rst new file mode 100644 index 00000000000..16ef3530845 --- /dev/null +++ b/website/content/SDK/stocks/fa/av_balance/_index.rst @@ -0,0 +1,46 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.fa.av_balance( + symbol: str, + limit: int = 5, + quarterly: bool = False, + ratios: bool = False, + plot: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get balance sheets for company +

+ +* **Parameters** + + symbol : str + Stock ticker symbol + limit : int + Number of past to get + quarterly : bool, optional + Flag to get quarterly instead of annual, by default False + ratios: bool + Shows percentage change, by default False + plot: bool + If the data shall be formatted ready to plot + +* **Returns** + + pd.DataFrame + DataFrame of the balance sheet diff --git a/website/content/SDK/stocks/fa/av_cash/_index.md b/website/content/SDK/stocks/fa/av_cash/_index.md deleted file mode 100644 index 6542033fd02..00000000000 --- a/website/content/SDK/stocks/fa/av_cash/_index.md +++ /dev/null @@ -1,44 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.fa.av_cash(symbol: str, limit: int = 5, quarterly: bool = False, ratios: bool = False, plot: bool = False) -> pandas.core.frame.DataFrame - -Get cash flows for company - - Parameters - ---------- - symbol : str - Stock ticker symbol - limit : int - Number of past to get - quarterly : bool, optional - Flag to get quarterly instead of annual, by default False - ratios: bool - Shows percentage change, by default False - plot: bool - If the data shall be formatted ready to plot - - Returns - ------- - pd.DataFrame - Dataframe of cash flow statements - -## Getting charts -### stocks.fa.av_cash(symbol: str, limit: int = 5, quarterly: bool = False, ratios: bool = False, plot: list = None, export: str = '', chart=True) - -Alpha Vantage income statement - - Parameters - ---------- - symbol : str - Fundamental analysis ticker symbol - limit: int - Number of past statements, by default 5 - quarterly: bool - Flag to get quarterly instead of annual, by default False - ratios: bool - Shows percentage change, by default False - plot: list - List of row labels to plot - export: str - Format to export data diff --git a/website/content/SDK/stocks/fa/av_cash/_index.rst b/website/content/SDK/stocks/fa/av_cash/_index.rst new file mode 100644 index 00000000000..e30ff410a4c --- /dev/null +++ b/website/content/SDK/stocks/fa/av_cash/_index.rst @@ -0,0 +1,95 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.fa.av_cash( + symbol: str, + limit: int = 5, + quarterly: bool = False, + ratios: bool = False, + plot: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get cash flows for company +

+ +* **Parameters** + + symbol : str + Stock ticker symbol + limit : int + Number of past to get + quarterly : bool, optional + Flag to get quarterly instead of annual, by default False + ratios: bool + Shows percentage change, by default False + plot: bool + If the data shall be formatted ready to plot + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Dataframe of cash flow statements + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.fa.av_cash( + symbol: str, + limit: int = 5, + quarterly: bool = False, + ratios: bool = False, + plot: list = None, + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Alpha Vantage income statement +

+ +* **Parameters** + + symbol : str + Fundamental analysis ticker symbol + limit: int + Number of past statements, by default 5 + quarterly: bool + Flag to get quarterly instead of annual, by default False + ratios: bool + Shows percentage change, by default False + plot: list + List of row labels to plot + export: str + Format to export data + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/fa/av_income/_index.md b/website/content/SDK/stocks/fa/av_income/_index.md deleted file mode 100644 index 450bd7bc34e..00000000000 --- a/website/content/SDK/stocks/fa/av_income/_index.md +++ /dev/null @@ -1,22 +0,0 @@ -## Get underlying data -### stocks.fa.av_income(symbol: str, limit: int = 5, quarterly: bool = False, ratios: bool = False, plot: bool = False) -> pandas.core.frame.DataFrame - -Get income statements for company - - Parameters - ---------- - symbol : str - Stock ticker symbol - limit : int - Number of past to get - quarterly : bool, optional - Flag to get quarterly instead of annual, by default False - ratios: bool - Shows percentage change, by default False - plot: bool - If the data shall be formatted ready to plot - - Returns - ------- - pd.DataFrame - DataFrame of income statements diff --git a/website/content/SDK/stocks/fa/av_income/_index.rst b/website/content/SDK/stocks/fa/av_income/_index.rst new file mode 100644 index 00000000000..6b4cae85c56 --- /dev/null +++ b/website/content/SDK/stocks/fa/av_income/_index.rst @@ -0,0 +1,46 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.fa.av_income( + symbol: str, + limit: int = 5, + quarterly: bool = False, + ratios: bool = False, + plot: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get income statements for company +

+ +* **Parameters** + + symbol : str + Stock ticker symbol + limit : int + Number of past to get + quarterly : bool, optional + Flag to get quarterly instead of annual, by default False + ratios: bool + Shows percentage change, by default False + plot: bool + If the data shall be formatted ready to plot + +* **Returns** + + pd.DataFrame + DataFrame of income statements diff --git a/website/content/SDK/stocks/fa/av_metrics/_index.md b/website/content/SDK/stocks/fa/av_metrics/_index.md deleted file mode 100644 index bbc2ce944f3..00000000000 --- a/website/content/SDK/stocks/fa/av_metrics/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### stocks.fa.av_metrics(symbol: str) -> pandas.core.frame.DataFrame - -Get key metrics from overview - - Parameters - ---------- - symbol : str - Stock ticker symbol - - Returns - ------- - pd.DataFrame - Dataframe of key metrics diff --git a/website/content/SDK/stocks/fa/av_metrics/_index.rst b/website/content/SDK/stocks/fa/av_metrics/_index.rst new file mode 100644 index 00000000000..14f22f1f579 --- /dev/null +++ b/website/content/SDK/stocks/fa/av_metrics/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.fa.av_metrics( + symbol: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get key metrics from overview +

+ +* **Parameters** + + symbol : str + Stock ticker symbol + +* **Returns** + + pd.DataFrame + Dataframe of key metrics diff --git a/website/content/SDK/stocks/fa/av_overview/_index.md b/website/content/SDK/stocks/fa/av_overview/_index.md deleted file mode 100644 index 628d537f092..00000000000 --- a/website/content/SDK/stocks/fa/av_overview/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### stocks.fa.av_overview(symbol: str) -> pandas.core.frame.DataFrame - -Get alpha vantage company overview - - Parameters - ---------- - symbol : str - Stock ticker symbol - - Returns - ------- - pd.DataFrame - Dataframe of fundamentals diff --git a/website/content/SDK/stocks/fa/av_overview/_index.rst b/website/content/SDK/stocks/fa/av_overview/_index.rst new file mode 100644 index 00000000000..e3529447420 --- /dev/null +++ b/website/content/SDK/stocks/fa/av_overview/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.fa.av_overview( + symbol: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get alpha vantage company overview +

+ +* **Parameters** + + symbol : str + Stock ticker symbol + +* **Returns** + + pd.DataFrame + Dataframe of fundamentals diff --git a/website/content/SDK/stocks/fa/cal/_index.md b/website/content/SDK/stocks/fa/cal/_index.md deleted file mode 100644 index e9aa34168b0..00000000000 --- a/website/content/SDK/stocks/fa/cal/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### stocks.fa.cal(symbol: str) -> pandas.core.frame.DataFrame - -Get calendar earnings for ticker symbol - - Parameters - ---------- - symbol: str - Stock ticker symbol - - Returns - ------- - pd.DataFrame - Dataframe of calendar earnings diff --git a/website/content/SDK/stocks/fa/cal/_index.rst b/website/content/SDK/stocks/fa/cal/_index.rst new file mode 100644 index 00000000000..f4c6cc38436 --- /dev/null +++ b/website/content/SDK/stocks/fa/cal/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.fa.cal( + symbol: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get calendar earnings for ticker symbol +

+ +* **Parameters** + + symbol: str + Stock ticker symbol + +* **Returns** + + pd.DataFrame + Dataframe of calendar earnings diff --git a/website/content/SDK/stocks/fa/data/_index.md b/website/content/SDK/stocks/fa/data/_index.md deleted file mode 100644 index adcb52c3b1b..00000000000 --- a/website/content/SDK/stocks/fa/data/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### stocks.fa.data(symbol: str) -> pandas.core.frame.DataFrame - -Get fundamental data from finviz - - Parameters - ---------- - symbol : str - Stock ticker symbol - - Returns - ------- - pd.DataFrame - DataFrame of fundamental data diff --git a/website/content/SDK/stocks/fa/data/_index.rst b/website/content/SDK/stocks/fa/data/_index.rst new file mode 100644 index 00000000000..17e89ea5929 --- /dev/null +++ b/website/content/SDK/stocks/fa/data/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.fa.data( + symbol: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get fundamental data from finviz +

+ +* **Parameters** + + symbol : str + Stock ticker symbol + +* **Returns** + + pd.DataFrame + DataFrame of fundamental data diff --git a/website/content/SDK/stocks/fa/dcf/_index.md b/website/content/SDK/stocks/fa/dcf/_index.md deleted file mode 100644 index 4370d6c137f..00000000000 --- a/website/content/SDK/stocks/fa/dcf/_index.md +++ /dev/null @@ -1,18 +0,0 @@ -## Get underlying data -### stocks.fa.dcf(symbol: str, limit: int = 5, quarterly: bool = False) -> pandas.core.frame.DataFrame - -Get stocks dcf from FMP - - Parameters - ---------- - symbol : str - Stock ticker symbol - limit : int - Number to get - quarterly : bool, optional - Flag to get quarterly data, by default False - - Returns - ------- - pd.DataFrame - Dataframe of dcf data diff --git a/website/content/SDK/stocks/fa/dcf/_index.rst b/website/content/SDK/stocks/fa/dcf/_index.rst new file mode 100644 index 00000000000..6ca62de3e9d --- /dev/null +++ b/website/content/SDK/stocks/fa/dcf/_index.rst @@ -0,0 +1,40 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.fa.dcf( + symbol: str, + limit: int = 5, + quarterly: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get stocks dcf from FMP +

+ +* **Parameters** + + symbol : str + Stock ticker symbol + limit : int + Number to get + quarterly : bool, optional + Flag to get quarterly data, by default False + +* **Returns** + + pd.DataFrame + Dataframe of dcf data diff --git a/website/content/SDK/stocks/fa/divs/_index.md b/website/content/SDK/stocks/fa/divs/_index.md deleted file mode 100644 index 9488c66ec91..00000000000 --- a/website/content/SDK/stocks/fa/divs/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### stocks.fa.divs(symbol: str) -> pandas.core.frame.DataFrame - -Get historical dividend for ticker - - Parameters - ---------- - symbol: str - Ticker symbol to get dividend for - - Returns - ------- - pd.DataFrame: - Dataframe of dividends and dates diff --git a/website/content/SDK/stocks/fa/divs/_index.rst b/website/content/SDK/stocks/fa/divs/_index.rst new file mode 100644 index 00000000000..bc853a7a354 --- /dev/null +++ b/website/content/SDK/stocks/fa/divs/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.fa.divs( + symbol: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get historical dividend for ticker +

+ +* **Parameters** + + symbol: str + Ticker symbol to get dividend for + +* **Returns** + + pd.DataFrame: + Dataframe of dividends and dates diff --git a/website/content/SDK/stocks/fa/dupont/_index.md b/website/content/SDK/stocks/fa/dupont/_index.md deleted file mode 100644 index 593516ee89f..00000000000 --- a/website/content/SDK/stocks/fa/dupont/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### stocks.fa.dupont(symbol: str) -> pandas.core.frame.DataFrame - -Get dupont ratios - - Parameters - ---------- - symbol : str - Stock ticker symbol - - Returns - ------- - dupont : pd.DataFrame - The dupont ratio breakdown diff --git a/website/content/SDK/stocks/fa/dupont/_index.rst b/website/content/SDK/stocks/fa/dupont/_index.rst new file mode 100644 index 00000000000..83c4d3ac0de --- /dev/null +++ b/website/content/SDK/stocks/fa/dupont/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.fa.dupont( + symbol: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get dupont ratios +

+ +* **Parameters** + + symbol : str + Stock ticker symbol + +* **Returns** + + dupont : pd.DataFrame + The dupont ratio breakdown diff --git a/website/content/SDK/stocks/fa/earnings/_index.md b/website/content/SDK/stocks/fa/earnings/_index.md deleted file mode 100644 index c2f536db9bf..00000000000 --- a/website/content/SDK/stocks/fa/earnings/_index.md +++ /dev/null @@ -1,16 +0,0 @@ -## Get underlying data -### stocks.fa.earnings(symbol: str, quarterly: bool = False) -> pandas.core.frame.DataFrame - -Get earnings calendar for ticker - - Parameters - ---------- - symbol : str - Stock ticker symbol - quarterly : bool, optional - Flag to get quarterly and not annual, by default False - - Returns - ------- - pd.DataFrame - Dataframe of earnings diff --git a/website/content/SDK/stocks/fa/earnings/_index.rst b/website/content/SDK/stocks/fa/earnings/_index.rst new file mode 100644 index 00000000000..dda462091dc --- /dev/null +++ b/website/content/SDK/stocks/fa/earnings/_index.rst @@ -0,0 +1,37 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.fa.earnings( + symbol: str, + quarterly: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get earnings calendar for ticker +

+ +* **Parameters** + + symbol : str + Stock ticker symbol + quarterly : bool, optional + Flag to get quarterly and not annual, by default False + +* **Returns** + + pd.DataFrame + Dataframe of earnings diff --git a/website/content/SDK/stocks/fa/enterprise/_index.md b/website/content/SDK/stocks/fa/enterprise/_index.md deleted file mode 100644 index 1a4f8bbdccf..00000000000 --- a/website/content/SDK/stocks/fa/enterprise/_index.md +++ /dev/null @@ -1,18 +0,0 @@ -## Get underlying data -### stocks.fa.enterprise(symbol: str, limit: int = 5, quarterly: bool = False) -> pandas.core.frame.DataFrame - -Financial Modeling Prep ticker enterprise - - Parameters - ---------- - symbol : str - Fundamental analysis ticker symbol - limit: int - Number to get - quarterly: bool - Flag to get quarterly data - - Returns - ---------- - pd.DataFrame: - Dataframe of enterprise information diff --git a/website/content/SDK/stocks/fa/enterprise/_index.rst b/website/content/SDK/stocks/fa/enterprise/_index.rst new file mode 100644 index 00000000000..05d437ed727 --- /dev/null +++ b/website/content/SDK/stocks/fa/enterprise/_index.rst @@ -0,0 +1,40 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.fa.enterprise( + symbol: str, + limit: int = 5, + quarterly: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Financial Modeling Prep ticker enterprise +

+ +* **Parameters** + + symbol : str + Fundamental analysis ticker symbol + limit: int + Number to get + quarterly: bool + Flag to get quarterly data + +* **Returns** + + pd.DataFrame: + Dataframe of enterprise information diff --git a/website/content/SDK/stocks/fa/fama_coe/_index.md b/website/content/SDK/stocks/fa/fama_coe/_index.md deleted file mode 100644 index f1d6cfee049..00000000000 --- a/website/content/SDK/stocks/fa/fama_coe/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### stocks.fa.fama_coe(symbol: str) -> float - -Use Fama and French to get the cost of equity for a company - - Parameters - ---------- - symbol : str - The ticker symbol to be analyzed - - Returns - ------- - coef : float - The stock's Fama French coefficient diff --git a/website/content/SDK/stocks/fa/fama_coe/_index.rst b/website/content/SDK/stocks/fa/fama_coe/_index.rst new file mode 100644 index 00000000000..f86ae0a334b --- /dev/null +++ b/website/content/SDK/stocks/fa/fama_coe/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.fa.fama_coe( + symbol: str, + chart: bool = False, +) -> float +{{< /highlight >}} + +.. raw:: html + +

+ Use Fama and French to get the cost of equity for a company +

+ +* **Parameters** + + symbol : str + The ticker symbol to be analyzed + +* **Returns** + + coef : float + The stock's Fama French coefficient diff --git a/website/content/SDK/stocks/fa/fama_raw/_index.md b/website/content/SDK/stocks/fa/fama_raw/_index.md deleted file mode 100644 index 2067733cfa7..00000000000 --- a/website/content/SDK/stocks/fa/fama_raw/_index.md +++ /dev/null @@ -1,9 +0,0 @@ -## Get underlying data -### stocks.fa.fama_raw() -> pandas.core.frame.DataFrame - -Get Fama French data - - Returns - ------- - df : pd.DataFrame - Fama French data diff --git a/website/content/SDK/stocks/fa/fama_raw/_index.rst b/website/content/SDK/stocks/fa/fama_raw/_index.rst new file mode 100644 index 00000000000..6f441c8f9e9 --- /dev/null +++ b/website/content/SDK/stocks/fa/fama_raw/_index.rst @@ -0,0 +1,26 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.fa.fama_raw() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get Fama French data +

+ +* **Returns** + + df : pd.DataFrame + Fama French data diff --git a/website/content/SDK/stocks/fa/fmp_balance/_index.md b/website/content/SDK/stocks/fa/fmp_balance/_index.md deleted file mode 100644 index db6ecbc7034..00000000000 --- a/website/content/SDK/stocks/fa/fmp_balance/_index.md +++ /dev/null @@ -1,22 +0,0 @@ -## Get underlying data -### stocks.fa.fmp_balance(symbol: str, limit: int = 5, quarterly: bool = False, ratios: bool = False, plot: bool = False) -> pandas.core.frame.DataFrame - -Get balance sheets - - Parameters - ---------- - symbol : str - Stock ticker symbol - limit : int - Number to get - quarterly : bool, optional - Flag to get quarterly data, by default False - ratios: bool - Shows percentage change, by default False - plot: bool - If the data shall be formatted ready to plot - - Returns - ------- - pd.DataFrame - Dataframe of balance sheet diff --git a/website/content/SDK/stocks/fa/fmp_balance/_index.rst b/website/content/SDK/stocks/fa/fmp_balance/_index.rst new file mode 100644 index 00000000000..6299cf54784 --- /dev/null +++ b/website/content/SDK/stocks/fa/fmp_balance/_index.rst @@ -0,0 +1,46 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.fa.fmp_balance( + symbol: str, + limit: int = 5, + quarterly: bool = False, + ratios: bool = False, + plot: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get balance sheets +

+ +* **Parameters** + + symbol : str + Stock ticker symbol + limit : int + Number to get + quarterly : bool, optional + Flag to get quarterly data, by default False + ratios: bool + Shows percentage change, by default False + plot: bool + If the data shall be formatted ready to plot + +* **Returns** + + pd.DataFrame + Dataframe of balance sheet diff --git a/website/content/SDK/stocks/fa/fmp_cash/_index.md b/website/content/SDK/stocks/fa/fmp_cash/_index.md deleted file mode 100644 index ca00ea1458a..00000000000 --- a/website/content/SDK/stocks/fa/fmp_cash/_index.md +++ /dev/null @@ -1,22 +0,0 @@ -## Get underlying data -### stocks.fa.fmp_cash(symbol: str, limit: int = 5, quarterly: bool = False, ratios: bool = False, plot: bool = False) -> pandas.core.frame.DataFrame - -Get cash flow - - Parameters - ---------- - symbol : str - Stock ticker symbol - limit : int - Number to get - quarterly : bool, optional - Flag to get quarterly data, by default False - ratios: bool - Shows percentage change, by default False - plot: bool - If the data shall be formatted ready to plot - - Returns - ------- - pd.DataFrame - Dataframe of company cash flow diff --git a/website/content/SDK/stocks/fa/fmp_cash/_index.rst b/website/content/SDK/stocks/fa/fmp_cash/_index.rst new file mode 100644 index 00000000000..06e7a9f45c4 --- /dev/null +++ b/website/content/SDK/stocks/fa/fmp_cash/_index.rst @@ -0,0 +1,46 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.fa.fmp_cash( + symbol: str, + limit: int = 5, + quarterly: bool = False, + ratios: bool = False, + plot: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get cash flow +

+ +* **Parameters** + + symbol : str + Stock ticker symbol + limit : int + Number to get + quarterly : bool, optional + Flag to get quarterly data, by default False + ratios: bool + Shows percentage change, by default False + plot: bool + If the data shall be formatted ready to plot + +* **Returns** + + pd.DataFrame + Dataframe of company cash flow diff --git a/website/content/SDK/stocks/fa/fmp_income/_index.md b/website/content/SDK/stocks/fa/fmp_income/_index.md deleted file mode 100644 index 259c4580683..00000000000 --- a/website/content/SDK/stocks/fa/fmp_income/_index.md +++ /dev/null @@ -1,22 +0,0 @@ -## Get underlying data -### stocks.fa.fmp_income(symbol: str, limit: int = 5, quarterly: bool = False, ratios: bool = False, plot: bool = False) -> pandas.core.frame.DataFrame - -Get income statements - - Parameters - ---------- - symbol : str - Stock ticker symbol - limit : int - Number to get - quarterly : bool, optional - Flag to get quarterly data, by default False - ratios: bool - Shows percentage change, by default False - plot: bool - If the data shall be formatted ready to plot - - Returns - ------- - pd.DataFrame - Dataframe of the income statements diff --git a/website/content/SDK/stocks/fa/fmp_income/_index.rst b/website/content/SDK/stocks/fa/fmp_income/_index.rst new file mode 100644 index 00000000000..32453ea08b3 --- /dev/null +++ b/website/content/SDK/stocks/fa/fmp_income/_index.rst @@ -0,0 +1,46 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.fa.fmp_income( + symbol: str, + limit: int = 5, + quarterly: bool = False, + ratios: bool = False, + plot: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get income statements +

+ +* **Parameters** + + symbol : str + Stock ticker symbol + limit : int + Number to get + quarterly : bool, optional + Flag to get quarterly data, by default False + ratios: bool + Shows percentage change, by default False + plot: bool + If the data shall be formatted ready to plot + +* **Returns** + + pd.DataFrame + Dataframe of the income statements diff --git a/website/content/SDK/stocks/fa/fmp_metrics/_index.md b/website/content/SDK/stocks/fa/fmp_metrics/_index.md deleted file mode 100644 index 053e8d448bc..00000000000 --- a/website/content/SDK/stocks/fa/fmp_metrics/_index.md +++ /dev/null @@ -1,18 +0,0 @@ -## Get underlying data -### stocks.fa.fmp_metrics(symbol: str, limit: int = 5, quarterly: bool = False) -> pandas.core.frame.DataFrame - -Get key metrics - - Parameters - ---------- - symbol : str - Stock ticker symbol - limit : int - Number to get - quarterly : bool, optional - Flag to get quarterly data, by default False - - Returns - ------- - pd.DataFrame - Dataframe of key metrics diff --git a/website/content/SDK/stocks/fa/fmp_metrics/_index.rst b/website/content/SDK/stocks/fa/fmp_metrics/_index.rst new file mode 100644 index 00000000000..cb67e3de616 --- /dev/null +++ b/website/content/SDK/stocks/fa/fmp_metrics/_index.rst @@ -0,0 +1,40 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.fa.fmp_metrics( + symbol: str, + limit: int = 5, + quarterly: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get key metrics +

+ +* **Parameters** + + symbol : str + Stock ticker symbol + limit : int + Number to get + quarterly : bool, optional + Flag to get quarterly data, by default False + +* **Returns** + + pd.DataFrame + Dataframe of key metrics diff --git a/website/content/SDK/stocks/fa/fmp_ratios/_index.md b/website/content/SDK/stocks/fa/fmp_ratios/_index.md deleted file mode 100644 index c216164e7ab..00000000000 --- a/website/content/SDK/stocks/fa/fmp_ratios/_index.md +++ /dev/null @@ -1,18 +0,0 @@ -## Get underlying data -### stocks.fa.fmp_ratios(symbol: str, limit: int = 5, quarterly: bool = False) -> pandas.core.frame.DataFrame - -Get key ratios - - Parameters - ---------- - symbol : str - Stock ticker symbol - limit : int - Number to get - quarterly : bool, optional - Flag to get quarterly data, by default False - - Returns - ------- - pd.DataFrame - Dataframe of key ratios diff --git a/website/content/SDK/stocks/fa/fmp_ratios/_index.rst b/website/content/SDK/stocks/fa/fmp_ratios/_index.rst new file mode 100644 index 00000000000..5fca6c03b01 --- /dev/null +++ b/website/content/SDK/stocks/fa/fmp_ratios/_index.rst @@ -0,0 +1,40 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.fa.fmp_ratios( + symbol: str, + limit: int = 5, + quarterly: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get key ratios +

+ +* **Parameters** + + symbol : str + Stock ticker symbol + limit : int + Number to get + quarterly : bool, optional + Flag to get quarterly data, by default False + +* **Returns** + + pd.DataFrame + Dataframe of key ratios diff --git a/website/content/SDK/stocks/fa/fraud/_index.md b/website/content/SDK/stocks/fa/fraud/_index.md deleted file mode 100644 index 019de903062..00000000000 --- a/website/content/SDK/stocks/fa/fraud/_index.md +++ /dev/null @@ -1,16 +0,0 @@ -## Get underlying data -### stocks.fa.fraud(symbol: str, detail: bool = False) -> pandas.core.frame.DataFrame - -Get fraud ratios based on fundamentals - - Parameters - ---------- - symbol : str - Stock ticker symbol - detail : bool - Whether to provide extra m-score details - - Returns - ------- - metrics : pd.DataFrame - The fraud ratios diff --git a/website/content/SDK/stocks/fa/fraud/_index.rst b/website/content/SDK/stocks/fa/fraud/_index.rst new file mode 100644 index 00000000000..df3ace47fef --- /dev/null +++ b/website/content/SDK/stocks/fa/fraud/_index.rst @@ -0,0 +1,37 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.fa.fraud( + symbol: str, + detail: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get fraud ratios based on fundamentals +

+ +* **Parameters** + + symbol : str + Stock ticker symbol + detail : bool + Whether to provide extra m-score details + +* **Returns** + + metrics : pd.DataFrame + The fraud ratios diff --git a/website/content/SDK/stocks/fa/growth/_index.md b/website/content/SDK/stocks/fa/growth/_index.md deleted file mode 100644 index b6b58b68e99..00000000000 --- a/website/content/SDK/stocks/fa/growth/_index.md +++ /dev/null @@ -1,18 +0,0 @@ -## Get underlying data -### stocks.fa.growth(symbol: str, limit: int = 5, quarterly: bool = False) -> pandas.core.frame.DataFrame - -Get financial statement growth - - Parameters - ---------- - symbol : str - Stock ticker symbol - limit : int - Number to get - quarterly : bool, optional - Flag to get quarterly data, by default False - - Returns - ------- - pd.DataFrame - Dataframe of financial statement growth diff --git a/website/content/SDK/stocks/fa/growth/_index.rst b/website/content/SDK/stocks/fa/growth/_index.rst new file mode 100644 index 00000000000..b292fd5b333 --- /dev/null +++ b/website/content/SDK/stocks/fa/growth/_index.rst @@ -0,0 +1,40 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.fa.growth( + symbol: str, + limit: int = 5, + quarterly: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get financial statement growth +

+ +* **Parameters** + + symbol : str + Stock ticker symbol + limit : int + Number to get + quarterly : bool, optional + Flag to get quarterly data, by default False + +* **Returns** + + pd.DataFrame + Dataframe of financial statement growth diff --git a/website/content/SDK/stocks/fa/historical_5/_index.md b/website/content/SDK/stocks/fa/historical_5/_index.md deleted file mode 100644 index eb52e365fd7..00000000000 --- a/website/content/SDK/stocks/fa/historical_5/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### stocks.fa.historical_5(symbol: str) -> pandas.core.frame.DataFrame - -Get 5 year monthly historical performance for a ticker with dividends filtered - - Parameters - ---------- - symbol: str - The ticker symbol to be analyzed - - Returns - ------- - df: pd.DataFrame - Historical data diff --git a/website/content/SDK/stocks/fa/historical_5/_index.rst b/website/content/SDK/stocks/fa/historical_5/_index.rst new file mode 100644 index 00000000000..fa565d9fa3f --- /dev/null +++ b/website/content/SDK/stocks/fa/historical_5/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.fa.historical_5( + symbol: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get 5 year monthly historical performance for a ticker with dividends filtered +

+ +* **Parameters** + + symbol: str + The ticker symbol to be analyzed + +* **Returns** + + df: pd.DataFrame + Historical data diff --git a/website/content/SDK/stocks/fa/hq/_index.md b/website/content/SDK/stocks/fa/hq/_index.md deleted file mode 100644 index 73296fad92b..00000000000 --- a/website/content/SDK/stocks/fa/hq/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### stocks.fa.hq(symbol: str) -> str - -Gets google map url for headquarter - - Parameters - ---------- - symbol: str - Stock ticker symbol - - Returns - ------- - str - Headquarter google maps url diff --git a/website/content/SDK/stocks/fa/hq/_index.rst b/website/content/SDK/stocks/fa/hq/_index.rst new file mode 100644 index 00000000000..64d8720d5ed --- /dev/null +++ b/website/content/SDK/stocks/fa/hq/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.fa.hq( + symbol: str, + chart: bool = False, +) -> str +{{< /highlight >}} + +.. raw:: html + +

+ Gets google map url for headquarter +

+ +* **Parameters** + + symbol: str + Stock ticker symbol + +* **Returns** + + str + Headquarter google maps url diff --git a/website/content/SDK/stocks/fa/info/_index.md b/website/content/SDK/stocks/fa/info/_index.md deleted file mode 100644 index f31bc8af13d..00000000000 --- a/website/content/SDK/stocks/fa/info/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### stocks.fa.info(symbol: str) -> pandas.core.frame.DataFrame - -Gets ticker symbol info - - Parameters - ---------- - symbol: str - Stock ticker symbol - - Returns - ------- - pd.DataFrame - DataFrame of yfinance information diff --git a/website/content/SDK/stocks/fa/info/_index.rst b/website/content/SDK/stocks/fa/info/_index.rst new file mode 100644 index 00000000000..843d6a7bf5a --- /dev/null +++ b/website/content/SDK/stocks/fa/info/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.fa.info( + symbol: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Gets ticker symbol info +

+ +* **Parameters** + + symbol: str + Stock ticker symbol + +* **Returns** + + pd.DataFrame + DataFrame of yfinance information diff --git a/website/content/SDK/stocks/fa/mgmt/_index.md b/website/content/SDK/stocks/fa/mgmt/_index.md deleted file mode 100644 index c2ff86ce50c..00000000000 --- a/website/content/SDK/stocks/fa/mgmt/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### stocks.fa.mgmt(symbol: str) -> pandas.core.frame.DataFrame - -Get company managers from Business Insider - - Parameters - ---------- - symbol : str - Stock ticker symbol - - Returns - ------- - pd.DataFrame - Dataframe of managers diff --git a/website/content/SDK/stocks/fa/mgmt/_index.rst b/website/content/SDK/stocks/fa/mgmt/_index.rst new file mode 100644 index 00000000000..9c3c68727bd --- /dev/null +++ b/website/content/SDK/stocks/fa/mgmt/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.fa.mgmt( + symbol: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get company managers from Business Insider +

+ +* **Parameters** + + symbol : str + Stock ticker symbol + +* **Returns** + + pd.DataFrame + Dataframe of managers diff --git a/website/content/SDK/stocks/fa/mktcap/_index.md b/website/content/SDK/stocks/fa/mktcap/_index.md deleted file mode 100644 index 2df45dd4403..00000000000 --- a/website/content/SDK/stocks/fa/mktcap/_index.md +++ /dev/null @@ -1,36 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.fa.mktcap(symbol: str, start_date: str = '2019-11-01') -> Tuple[pandas.core.frame.DataFrame, str] - -Get market cap over time for ticker. [Source: Yahoo Finance] - - Parameters - ---------- - symbol: str - Ticker to get market cap over time - start_date: str - Start date to display market cap - - Returns - ------- - pd.DataFrame: - Dataframe of estimated market cap over time - str: - Currency of ticker - -## Getting charts -### stocks.fa.mktcap(symbol: str, start_date: str = '2019-11-01', export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display market cap over time. [Source: Yahoo Finance] - - Parameters - ---------- - symbol: str - Stock ticker symbol - start_date: str - Start date to display market cap - export: str - Format to export data - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/stocks/fa/mktcap/_index.rst b/website/content/SDK/stocks/fa/mktcap/_index.rst new file mode 100644 index 00000000000..b1ab833992e --- /dev/null +++ b/website/content/SDK/stocks/fa/mktcap/_index.rst @@ -0,0 +1,82 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.fa.mktcap( + symbol: str, + start_date: str = '2019-11-06', + chart: bool = False, +) -> Tuple[pandas.core.frame.DataFrame, str] +{{< /highlight >}} + +.. raw:: html + +

+ Get market cap over time for ticker. [Source: Yahoo Finance] +

+ +* **Parameters** + + symbol: str + Ticker to get market cap over time + start_date: str + Start date to display market cap + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame: + Dataframe of estimated market cap over time + str: + Currency of ticker + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.fa.mktcap( + symbol: str, + start_date: str = '2019-11-06', + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display market cap over time. [Source: Yahoo Finance] +

+ +* **Parameters** + + symbol: str + Stock ticker symbol + start_date: str + Start date to display market cap + export: str + Format to export data + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/fa/poly_financials/_index.md b/website/content/SDK/stocks/fa/poly_financials/_index.md deleted file mode 100644 index 9dc2498fe1c..00000000000 --- a/website/content/SDK/stocks/fa/poly_financials/_index.md +++ /dev/null @@ -1,44 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.fa.poly_financials(symbol: str, statement: str, quarterly: bool = False, ratios: bool = False) -> pandas.core.frame.DataFrame - -Get ticker financial statements from polygon - - Parameters - ---------- - symbol: str - Stock ticker symbol - statement: str - Financial statement data to retrieve, can be balance, income or cash - quarterly:bool - Flag to get quarterly reports, by default False - ratios: bool - Shows percentage change, by default False - - Returns - ------- - pd.DataFrame - Balance Sheets or Income Statements - -## Getting charts -### stocks.fa.poly_financials(symbol: str, statement: str, limit: int = 10, quarterly: bool = False, ratios: bool = False, plot: list = None, export: str = '', chart=True) - -Display tickers balance sheet or income statement - - Parameters - ---------- - symbol: str - Stock ticker symbol - statement:str - Either balance or income - limit: int - Number of results to show, by default 10 - quarterly: bool - Flag to get quarterly reports, by default False - ratios: bool - Shows percentage change, by default False - plot: list - List of row labels to plot - export: str - Format to export data diff --git a/website/content/SDK/stocks/fa/poly_financials/_index.rst b/website/content/SDK/stocks/fa/poly_financials/_index.rst new file mode 100644 index 00000000000..9408b50ed58 --- /dev/null +++ b/website/content/SDK/stocks/fa/poly_financials/_index.rst @@ -0,0 +1,95 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.fa.poly_financials( + symbol: str, + statement: str, + quarterly: bool = False, + ratios: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get ticker financial statements from polygon +

+ +* **Parameters** + + symbol: str + Stock ticker symbol + statement: str + Financial statement data to retrieve, can be balance, income or cash + quarterly:bool + Flag to get quarterly reports, by default False + ratios: bool + Shows percentage change, by default False + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Balance Sheets or Income Statements + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.fa.poly_financials( + symbol: str, + statement: str, + limit: int = 10, + quarterly: bool = False, + ratios: bool = False, + plot: list = None, + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display tickers balance sheet or income statement +

+ +* **Parameters** + + symbol: str + Stock ticker symbol + statement:str + Either balance or income + limit: int + Number of results to show, by default 10 + quarterly: bool + Flag to get quarterly reports, by default False + ratios: bool + Shows percentage change, by default False + plot: list + List of row labels to plot + export: str + Format to export data + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/fa/profile/_index.md b/website/content/SDK/stocks/fa/profile/_index.md deleted file mode 100644 index 2b821ca7706..00000000000 --- a/website/content/SDK/stocks/fa/profile/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### stocks.fa.profile(symbol: str) -> pandas.core.frame.DataFrame - -Get ticker profile from FMP - - Parameters - ---------- - symbol : str - Stock ticker symbol - - Returns - ---------- - pd.DataFrame: - Dataframe of ticker profile diff --git a/website/content/SDK/stocks/fa/profile/_index.rst b/website/content/SDK/stocks/fa/profile/_index.rst new file mode 100644 index 00000000000..72d438849c7 --- /dev/null +++ b/website/content/SDK/stocks/fa/profile/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.fa.profile( + symbol: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get ticker profile from FMP +

+ +* **Parameters** + + symbol : str + Stock ticker symbol + +* **Returns** + + pd.DataFrame: + Dataframe of ticker profile diff --git a/website/content/SDK/stocks/fa/quote/_index.md b/website/content/SDK/stocks/fa/quote/_index.md deleted file mode 100644 index 9d0b78acc47..00000000000 --- a/website/content/SDK/stocks/fa/quote/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### stocks.fa.quote(symbol: str) -> pandas.core.frame.DataFrame - -Gets ticker quote from FMP - - Parameters - ---------- - symbol : str - Stock ticker symbol - - Returns - ---------- - pd.DataFrame: - Dataframe of ticker quote diff --git a/website/content/SDK/stocks/fa/quote/_index.rst b/website/content/SDK/stocks/fa/quote/_index.rst new file mode 100644 index 00000000000..50efddd8101 --- /dev/null +++ b/website/content/SDK/stocks/fa/quote/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.fa.quote( + symbol: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Gets ticker quote from FMP +

+ +* **Parameters** + + symbol : str + Stock ticker symbol + +* **Returns** + + pd.DataFrame: + Dataframe of ticker quote diff --git a/website/content/SDK/stocks/fa/score/_index.md b/website/content/SDK/stocks/fa/score/_index.md deleted file mode 100644 index 2dedf08a7a9..00000000000 --- a/website/content/SDK/stocks/fa/score/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### stocks.fa.score(symbol: str) -> Optional[numpy.number] - -Gets value score from fmp - - Parameters - ---------- - symbol : str - Stock ticker symbol - - Returns - ------- - np.number - Value score diff --git a/website/content/SDK/stocks/fa/score/_index.rst b/website/content/SDK/stocks/fa/score/_index.rst new file mode 100644 index 00000000000..a6e8b94a1a0 --- /dev/null +++ b/website/content/SDK/stocks/fa/score/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.fa.score( + symbol: str, + chart: bool = False, +) -> Optional[numpy.number] +{{< /highlight >}} + +.. raw:: html + +

+ Gets value score from fmp +

+ +* **Parameters** + + symbol : str + Stock ticker symbol + +* **Returns** + + np.number + Value score diff --git a/website/content/SDK/stocks/fa/shrs/_index.md b/website/content/SDK/stocks/fa/shrs/_index.md deleted file mode 100644 index cd995ccbc99..00000000000 --- a/website/content/SDK/stocks/fa/shrs/_index.md +++ /dev/null @@ -1,16 +0,0 @@ -## Get underlying data -### stocks.fa.shrs(symbol: str, holder: str = 'institutional') -> pandas.core.frame.DataFrame - -Get shareholders from yahoo - - Parameters - ---------- - symbol : str - Stock ticker symbol - holder : str - Which holder to get table for - - Returns - ------- - pd.DataFrame - Major holders diff --git a/website/content/SDK/stocks/fa/shrs/_index.rst b/website/content/SDK/stocks/fa/shrs/_index.rst new file mode 100644 index 00000000000..219b98d6925 --- /dev/null +++ b/website/content/SDK/stocks/fa/shrs/_index.rst @@ -0,0 +1,37 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.fa.shrs( + symbol: str, + holder: str = 'institutional', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get shareholders from yahoo +

+ +* **Parameters** + + symbol : str + Stock ticker symbol + holder : str + Which holder to get table for + +* **Returns** + + pd.DataFrame + Major holders diff --git a/website/content/SDK/stocks/fa/similar_dfs/_index.md b/website/content/SDK/stocks/fa/similar_dfs/_index.rst similarity index 53% rename from website/content/SDK/stocks/fa/similar_dfs/_index.md rename to website/content/SDK/stocks/fa/similar_dfs/_index.rst index 2263c59cdd4..13433560253 100644 --- a/website/content/SDK/stocks/fa/similar_dfs/_index.md +++ b/website/content/SDK/stocks/fa/similar_dfs/_index.rst @@ -1,11 +1,33 @@ -## Get underlying data -### stocks.fa.similar_dfs(symbol: str, info: Dict[str, Any], n: int, no_filter: bool = False) +.. role:: python(code) + :language: python + :class: highlight +| +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.fa.similar_dfs( + symbol: str, + info: Dict[str, Any], + n: int, + no_filter: bool = False, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

Get dataframes for similar companies +

+ +* **Parameters** - Parameters - ---------- symbol : str The ticker symbol to create a dataframe for into : Dict[str,Any] @@ -15,7 +37,7 @@ no_filter : bool True means that we do not filter based on market cap - Returns - ------- +* **Returns** + new_list : List[str, pd.DataFrame] A list of similar companies diff --git a/website/content/SDK/stocks/fa/splits/_index.md b/website/content/SDK/stocks/fa/splits/_index.md deleted file mode 100644 index e69a4edd6e0..00000000000 --- a/website/content/SDK/stocks/fa/splits/_index.md +++ /dev/null @@ -1,30 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.fa.splits(symbol: str) -> pandas.core.frame.DataFrame - -Get splits and reverse splits events. [Source: Yahoo Finance] - - Parameters - ---------- - symbol: str - Ticker to get forward and reverse splits - - Returns - ------- - pd.DataFrame: - Dataframe of forward and reverse splits - -## Getting charts -### stocks.fa.splits(symbol: str, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display splits and reverse splits events. [Source: Yahoo Finance] - - Parameters - ---------- - symbol: str - Stock ticker symbol - export: str - Format to export data - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/stocks/fa/splits/_index.rst b/website/content/SDK/stocks/fa/splits/_index.rst new file mode 100644 index 00000000000..85d7789e075 --- /dev/null +++ b/website/content/SDK/stocks/fa/splits/_index.rst @@ -0,0 +1,74 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.fa.splits( + symbol: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get splits and reverse splits events. [Source: Yahoo Finance] +

+ +* **Parameters** + + symbol: str + Ticker to get forward and reverse splits + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame: + Dataframe of forward and reverse splits + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.fa.splits( + symbol: str, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display splits and reverse splits events. [Source: Yahoo Finance] +

+ +* **Parameters** + + symbol: str + Stock ticker symbol + export: str + Format to export data + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/fa/sust/_index.md b/website/content/SDK/stocks/fa/sust/_index.md deleted file mode 100644 index 63bdda7edd2..00000000000 --- a/website/content/SDK/stocks/fa/sust/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### stocks.fa.sust(symbol: str) -> pandas.core.frame.DataFrame - -Get sustainability metrics from yahoo - - Parameters - ---------- - symbol : str - Stock ticker symbol - - Returns - ------- - pd.DataFrame - Dataframe of sustainability metrics diff --git a/website/content/SDK/stocks/fa/sust/_index.rst b/website/content/SDK/stocks/fa/sust/_index.rst new file mode 100644 index 00000000000..c4225475c76 --- /dev/null +++ b/website/content/SDK/stocks/fa/sust/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.fa.sust( + symbol: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get sustainability metrics from yahoo +

+ +* **Parameters** + + symbol : str + Stock ticker symbol + +* **Returns** + + pd.DataFrame + Dataframe of sustainability metrics diff --git a/website/content/SDK/stocks/fa/website/_index.md b/website/content/SDK/stocks/fa/website/_index.md deleted file mode 100644 index bb4e8686dd7..00000000000 --- a/website/content/SDK/stocks/fa/website/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### stocks.fa.website(symbol: str) -> str - -Gets website of company from yfinance - - Parameters - ---------- - symbol: str - Stock ticker symbol - - Returns - ------- - str - Company we diff --git a/website/content/SDK/stocks/fa/website/_index.rst b/website/content/SDK/stocks/fa/website/_index.rst new file mode 100644 index 00000000000..be330a81988 --- /dev/null +++ b/website/content/SDK/stocks/fa/website/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.fa.website( + symbol: str, + chart: bool = False, +) -> str +{{< /highlight >}} + +.. raw:: html + +

+ Gets website of company from yfinance +

+ +* **Parameters** + + symbol: str + Stock ticker symbol + +* **Returns** + + str + Company websit diff --git a/website/content/SDK/stocks/fa/yf_financials/_index.md b/website/content/SDK/stocks/fa/yf_financials/_index.md deleted file mode 100644 index db120d1d6e0..00000000000 --- a/website/content/SDK/stocks/fa/yf_financials/_index.md +++ /dev/null @@ -1,45 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.fa.yf_financials(symbol: str, statement: str, ratios: bool = False) -> pandas.core.frame.DataFrame - -Get cashflow statement for company - - Parameters - ---------- - symbol : str - Stock ticker symbol - statement: str - can be: - cash-flow - financials for Income - balance-sheet - ratios: bool - Shows percentage change - - Returns - ------- - pd.DataFrame - Dataframe of Financial statement - -## Getting charts -### stocks.fa.yf_financials(symbol: str, statement: str, limit: int = 12, ratios: bool = False, plot: list = None, export: str = '', chart=True) - -Display tickers balance sheet, income statement or cash-flow - - Parameters - ---------- - symbol: str - Stock ticker symbol - statement: str - can be: - cash-flow - financials for Income - balance-sheet - limit: int - ratios: bool - Shows percentage change - plot: list - List of row labels to plot - export: str - Format to export data diff --git a/website/content/SDK/stocks/fa/yf_financials/_index.rst b/website/content/SDK/stocks/fa/yf_financials/_index.rst new file mode 100644 index 00000000000..b3c8892b7c7 --- /dev/null +++ b/website/content/SDK/stocks/fa/yf_financials/_index.rst @@ -0,0 +1,99 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.fa.yf_financials( + symbol: str, + statement: str, + ratios: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get cashflow statement for company +

+ +* **Parameters** + + symbol : str + Stock ticker symbol + statement: str + can be: + + - cash-flow + - financials for Income + - balance-sheet + + ratios: bool + Shows percentage change + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Dataframe of Financial statement + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.fa.yf_financials( + symbol: str, + statement: str, + limit: int = 12, + ratios: bool = False, + plot: list = None, + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display tickers balance sheet, income statement or cash-flow +

+ +* **Parameters** + + symbol: str + Stock ticker symbol + statement: str + Possible values are: + + - cash-flow + - financials for Income + - balance-sheet + + limit: int + Number of periods to show + ratios: bool + Shows percentage change + plot: list + List of row labels to plot + export: str + Format to export data + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/gov/contracts/_index.md b/website/content/SDK/stocks/gov/contracts/_index.md deleted file mode 100644 index 92fd9aa7dee..00000000000 --- a/website/content/SDK/stocks/gov/contracts/_index.md +++ /dev/null @@ -1,36 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.gov.contracts(symbol: str, past_transaction_days: int = 10) -> pandas.core.frame.DataFrame - -Get government contracts for ticker [Source: quiverquant.com] - - Parameters - ---------- - symbol: str - Ticker to get congress trading data from - past_transaction_days: int - Number of days to get transactions for - - Returns - ------- - pd.DataFrame - Most recent transactions by members of U.S. Congress - -## Getting charts -### stocks.gov.contracts(symbol: str, past_transaction_days: int = 10, raw: bool = False, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Show government contracts for ticker [Source: quiverquant.com] - - Parameters - ---------- - symbol: str - Ticker to get congress trading data from - past_transaction_days: int - Number of days to get transactions for - raw: bool - Flag to display raw data - export: str - Format to export data - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/stocks/gov/contracts/_index.rst b/website/content/SDK/stocks/gov/contracts/_index.rst new file mode 100644 index 00000000000..a4b906a5153 --- /dev/null +++ b/website/content/SDK/stocks/gov/contracts/_index.rst @@ -0,0 +1,83 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.gov.contracts( + symbol: str, + past_transaction_days: int = 10, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get government contracts for ticker [Source: quiverquant.com] +

+ +* **Parameters** + + symbol: str + Ticker to get congress trading data from + past_transaction_days: int + Number of days to get transactions for + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Most recent transactions by members of U.S. Congress + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.gov.contracts( + symbol: str, + past_transaction_days: int = 10, + raw: bool = False, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Show government contracts for ticker [Source: quiverquant.com] +

+ +* **Parameters** + + symbol: str + Ticker to get congress trading data from + past_transaction_days: int + Number of days to get transactions for + raw: bool + Flag to display raw data + export: str + Format to export data + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/gov/government_trading/_index.md b/website/content/SDK/stocks/gov/government_trading/_index.md deleted file mode 100644 index 3b3571d9229..00000000000 --- a/website/content/SDK/stocks/gov/government_trading/_index.md +++ /dev/null @@ -1,17 +0,0 @@ -## Get underlying data -### stocks.gov.government_trading(gov_type: str = 'congress', symbol: str = '') -> pandas.core.frame.DataFrame - -Returns the most recent transactions by members of government - - Parameters - ---------- - gov_type: str - Type of government data between: - 'congress', 'senate', 'house', 'contracts', 'quarter-contracts' and 'corporate-lobbying' - symbol : str - Ticker symbol to get congress trading data from - - Returns - ------- - pd.DataFrame - Most recent transactions by members of U.S. Congress diff --git a/website/content/SDK/stocks/gov/government_trading/_index.rst b/website/content/SDK/stocks/gov/government_trading/_index.rst new file mode 100644 index 00000000000..65b0e947b48 --- /dev/null +++ b/website/content/SDK/stocks/gov/government_trading/_index.rst @@ -0,0 +1,38 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.gov.government_trading( + gov_type: str = 'congress', + symbol: str = '', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Returns the most recent transactions by members of government +

+ +* **Parameters** + + gov_type: str + Type of government data between: + 'congress', 'senate', 'house', 'contracts', 'quarter-contracts' and 'corporate-lobbying' + symbol : str + Ticker symbol to get congress trading data from + +* **Returns** + + pd.DataFrame + Most recent transactions by members of U.S. Congress diff --git a/website/content/SDK/stocks/gov/gtrades/_index.md b/website/content/SDK/stocks/gov/gtrades/_index.md deleted file mode 100644 index 192fe9103c6..00000000000 --- a/website/content/SDK/stocks/gov/gtrades/_index.md +++ /dev/null @@ -1,40 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.gov.gtrades(symbol: str, gov_type: str = 'congress', past_transactions_months: int = 6) -> pandas.core.frame.DataFrame - -Government trading for specific ticker [Source: quiverquant.com] - - Parameters - ---------- - symbol: str - Ticker symbol to get congress trading data from - gov_type: str - Type of government data between: congress, senate and house - past_transactions_months: int - Number of months to get transactions for - - Returns - ------- - pd.DataFrame - DataFrame of tickers government trading - -## Getting charts -### stocks.gov.gtrades(symbol: str, gov_type: str = 'congress', past_transactions_months: int = 6, raw: bool = False, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Government trading for specific ticker [Source: quiverquant.com] - - Parameters - ---------- - symbol: str - Ticker symbol to get congress trading data from - gov_type: str - Type of government data between: congress, senate and house - past_transactions_months: int - Number of months to get transactions for - raw: bool - Show raw output of trades - export: str - Format to export data - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/stocks/gov/gtrades/_index.rst b/website/content/SDK/stocks/gov/gtrades/_index.rst new file mode 100644 index 00000000000..aa7faf8f03b --- /dev/null +++ b/website/content/SDK/stocks/gov/gtrades/_index.rst @@ -0,0 +1,89 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.gov.gtrades( + symbol: str, + gov_type: str = 'congress', + past_transactions_months: int = 6, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Government trading for specific ticker [Source: quiverquant.com] +

+ +* **Parameters** + + symbol: str + Ticker symbol to get congress trading data from + gov_type: str + Type of government data between: congress, senate and house + past_transactions_months: int + Number of months to get transactions for + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + DataFrame of tickers government trading + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.gov.gtrades( + symbol: str, + gov_type: str = 'congress', + past_transactions_months: int = 6, + raw: bool = False, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Government trading for specific ticker [Source: quiverquant.com] +

+ +* **Parameters** + + symbol: str + Ticker symbol to get congress trading data from + gov_type: str + Type of government data between: congress, senate and house + past_transactions_months: int + Number of months to get transactions for + raw: bool + Show raw output of trades + export: str + Format to export data + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/gov/histcont/_index.md b/website/content/SDK/stocks/gov/histcont/_index.md deleted file mode 100644 index 358b4f6777b..00000000000 --- a/website/content/SDK/stocks/gov/histcont/_index.md +++ /dev/null @@ -1,32 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.gov.histcont(symbol: str) -> pandas.core.frame.DataFrame - -Get historical quarterly government contracts [Source: quiverquant.com] - - Parameters - ---------- - symbol: str - Ticker symbol to get congress trading data from - - Returns - ------- - pd.DataFrame - Historical quarterly government contracts - -## Getting charts -### stocks.gov.histcont(symbol: str, raw: bool = False, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Show historical quarterly government contracts [Source: quiverquant.com] - - Parameters - ---------- - symbol: str - Ticker symbol to get congress trading data from - raw: bool - Flag to display raw data - export: str - Format to export data - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/stocks/gov/histcont/_index.rst b/website/content/SDK/stocks/gov/histcont/_index.rst new file mode 100644 index 00000000000..04ac30a46e6 --- /dev/null +++ b/website/content/SDK/stocks/gov/histcont/_index.rst @@ -0,0 +1,77 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.gov.histcont( + symbol: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get historical quarterly government contracts [Source: quiverquant.com] +

+ +* **Parameters** + + symbol: str + Ticker symbol to get congress trading data from + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Historical quarterly government contracts + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.gov.histcont( + symbol: str, + raw: bool = False, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Show historical quarterly government contracts [Source: quiverquant.com] +

+ +* **Parameters** + + symbol: str + Ticker symbol to get congress trading data from + raw: bool + Flag to display raw data + export: str + Format to export data + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/gov/lastcontracts/_index.md b/website/content/SDK/stocks/gov/lastcontracts/_index.md deleted file mode 100644 index a98cdfcb706..00000000000 --- a/website/content/SDK/stocks/gov/lastcontracts/_index.md +++ /dev/null @@ -1,34 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.gov.lastcontracts(past_transaction_days: int = 2) -> pandas.core.frame.DataFrame - -Get last government contracts [Source: quiverquant.com] - - Parameters - ---------- - past_transaction_days: int - Number of days to look back - - Returns - ------- - pd.DataFrame - DataFrame of government contracts - -## Getting charts -### stocks.gov.lastcontracts(past_transaction_days: int = 2, limit: int = 20, sum_contracts: bool = False, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Last government contracts [Source: quiverquant.com] - - Parameters - ---------- - past_transaction_days: int - Number of days to look back - limit: int - Number of contracts to show - sum_contracts: bool - Flag to show total amount of contracts given out. - export: str - Format to export data - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/stocks/gov/lastcontracts/_index.rst b/website/content/SDK/stocks/gov/lastcontracts/_index.rst new file mode 100644 index 00000000000..87dcd7d1490 --- /dev/null +++ b/website/content/SDK/stocks/gov/lastcontracts/_index.rst @@ -0,0 +1,80 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.gov.lastcontracts( + past_transaction_days: int = 2, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get last government contracts [Source: quiverquant.com] +

+ +* **Parameters** + + past_transaction_days: int + Number of days to look back + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + DataFrame of government contracts + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.gov.lastcontracts( + past_transaction_days: int = 2, + limit: int = 20, + sum_contracts: bool = False, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Last government contracts [Source: quiverquant.com] +

+ +* **Parameters** + + past_transaction_days: int + Number of days to look back + limit: int + Number of contracts to show + sum_contracts: bool + Flag to show total amount of contracts given out. + export: str + Format to export data + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/gov/lasttrades/_index.md b/website/content/SDK/stocks/gov/lasttrades/_index.md deleted file mode 100644 index be2771316c7..00000000000 --- a/website/content/SDK/stocks/gov/lasttrades/_index.md +++ /dev/null @@ -1,18 +0,0 @@ -## Get underlying data -### stocks.gov.lasttrades(gov_type: str = 'congress', limit: int = -1, representative: str = '') -> pandas.core.frame.DataFrame - -Get last government trading [Source: quiverquant.com] - - Parameters - ---------- - gov_type: str - Type of government data between: congress, senate and house - limit: int - Number of days to look back - representative: str - Specific representative to look at - - Returns - ------- - pd.DataFrame - Last government trading diff --git a/website/content/SDK/stocks/gov/lasttrades/_index.rst b/website/content/SDK/stocks/gov/lasttrades/_index.rst new file mode 100644 index 00000000000..7142122b68e --- /dev/null +++ b/website/content/SDK/stocks/gov/lasttrades/_index.rst @@ -0,0 +1,40 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.gov.lasttrades( + gov_type: str = 'congress', + limit: int = -1, + representative: str = '', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get last government trading [Source: quiverquant.com] +

+ +* **Parameters** + + gov_type: str + Type of government data between: congress, senate and house + limit: int + Number of days to look back + representative: str + Specific representative to look at + +* **Returns** + + pd.DataFrame + Last government trading diff --git a/website/content/SDK/stocks/gov/lobbying/_index.md b/website/content/SDK/stocks/gov/lobbying/_index.md deleted file mode 100644 index b937a6004b7..00000000000 --- a/website/content/SDK/stocks/gov/lobbying/_index.md +++ /dev/null @@ -1,16 +0,0 @@ -## Get underlying data -### stocks.gov.lobbying(symbol: str, limit: int = 10) -> pandas.core.frame.DataFrame - -Corporate lobbying details - - Parameters - ---------- - symbol: str - Ticker symbol to get corporate lobbying data from - limit: int - Number of events to show - - Returns - ------- - pd.DataFrame - Dataframe with corporate lobbying data diff --git a/website/content/SDK/stocks/gov/lobbying/_index.rst b/website/content/SDK/stocks/gov/lobbying/_index.rst new file mode 100644 index 00000000000..df6b2652cfa --- /dev/null +++ b/website/content/SDK/stocks/gov/lobbying/_index.rst @@ -0,0 +1,37 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.gov.lobbying( + symbol: str, + limit: int = 10, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Corporate lobbying details +

+ +* **Parameters** + + symbol: str + Ticker symbol to get corporate lobbying data from + limit: int + Number of events to show + +* **Returns** + + pd.DataFrame + Dataframe with corporate lobbying data diff --git a/website/content/SDK/stocks/gov/qtrcontracts/_index.md b/website/content/SDK/stocks/gov/qtrcontracts/_index.md deleted file mode 100644 index 07e29409e82..00000000000 --- a/website/content/SDK/stocks/gov/qtrcontracts/_index.md +++ /dev/null @@ -1,36 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.gov.qtrcontracts(analysis: str = 'total', limit: int = 5) -> pandas.core.frame.DataFrame - -Analyzes quarterly contracts by ticker - - Parameters - ---------- - analysis : str - How to analyze. Either gives total amount or sorts by high/low momentum. - limit : int, optional - Number to return, by default 5 - - Returns - ------- - pd.DataFrame - Dataframe with tickers and total amount if total selected. - -## Getting charts -### stocks.gov.qtrcontracts(analysis: str = 'total', limit: int = 5, raw: bool = False, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Quarterly contracts [Source: quiverquant.com] - - Parameters - ---------- - analysis: str - Analysis to perform. Either 'total', 'upmom' 'downmom' - limit: int - Number to show - raw: bool - Flag to display raw data - export: str - Format to export data - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/stocks/gov/qtrcontracts/_index.rst b/website/content/SDK/stocks/gov/qtrcontracts/_index.rst new file mode 100644 index 00000000000..843758a7816 --- /dev/null +++ b/website/content/SDK/stocks/gov/qtrcontracts/_index.rst @@ -0,0 +1,83 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.gov.qtrcontracts( + analysis: str = 'total', + limit: int = 5, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Analyzes quarterly contracts by ticker +

+ +* **Parameters** + + analysis : str + How to analyze. Either gives total amount or sorts by high/low momentum. + limit : int, optional + Number to return, by default 5 + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Dataframe with tickers and total amount if total selected. + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.gov.qtrcontracts( + analysis: str = 'total', + limit: int = 5, + raw: bool = False, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Quarterly contracts [Source: quiverquant.com] +

+ +* **Parameters** + + analysis: str + Analysis to perform. Either 'total', 'upmom' 'downmom' + limit: int + Number to show + raw: bool + Flag to display raw data + export: str + Format to export data + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/gov/topbuys/_index.md b/website/content/SDK/stocks/gov/topbuys/_index.md deleted file mode 100644 index e92b03829a5..00000000000 --- a/website/content/SDK/stocks/gov/topbuys/_index.md +++ /dev/null @@ -1,39 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.gov.topbuys(gov_type: str = 'congress', past_transactions_months: int = 6) -> pandas.core.frame.DataFrame - -Get top buy government trading [Source: quiverquant.com] - - Parameters - ---------- - gov_type: str - Type of government data between: congress, senate and house - past_transactions_months: int - Number of months to get trading for - - Returns - ------- - pd.DataFrame - DataFrame of top government buy trading - -## Getting charts -### stocks.gov.topbuys(gov_type: str = 'congress', past_transactions_months: int = 6, limit: int = 10, raw: bool = False, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Top buy government trading [Source: quiverquant.com] - - Parameters - ---------- - gov_type: str - Type of government data between: congress, senate and house - past_transactions_months: int - Number of months to get trading for - limit: int - Number of tickers to show - raw: bool - Display raw data - export: str - Format to export data - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None - diff --git a/website/content/SDK/stocks/gov/topbuys/_index.rst b/website/content/SDK/stocks/gov/topbuys/_index.rst new file mode 100644 index 00000000000..5990893118b --- /dev/null +++ b/website/content/SDK/stocks/gov/topbuys/_index.rst @@ -0,0 +1,86 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.gov.topbuys( + gov_type: str = 'congress', + past_transactions_months: int = 6, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get top buy government trading [Source: quiverquant.com] +

+ +* **Parameters** + + gov_type: str + Type of government data between: congress, senate and house + past_transactions_months: int + Number of months to get trading for + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + DataFrame of top government buy trading + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.gov.topbuys( + gov_type: str = 'congress', + past_transactions_months: int = 6, + limit: int = 10, + raw: bool = False, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Top buy government trading [Source: quiverquant.com] +

+ +* **Parameters** + + gov_type: str + Type of government data between: congress, senate and house + past_transactions_months: int + Number of months to get trading for + limit: int + Number of tickers to show + raw: bool + Display raw data + export: str + Format to export data + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/gov/toplobbying/_index.md b/website/content/SDK/stocks/gov/toplobbying/_index.md deleted file mode 100644 index bc7bb900cc7..00000000000 --- a/website/content/SDK/stocks/gov/toplobbying/_index.md +++ /dev/null @@ -1,29 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.gov.toplobbying() -> pandas.core.frame.DataFrame - -Corporate lobbying details - - Returns - ------- - pd.DataFrame - DataFrame of top corporate lobbying - - -## Getting charts -### stocks.gov.toplobbying(limit: int = 10, raw: bool = False, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Top lobbying tickers based on total spent - - Parameters - ---------- - limit: int - Number of tickers to show - raw: bool - Show raw data - export: - Format to export data - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None - diff --git a/website/content/SDK/stocks/gov/toplobbying/_index.rst b/website/content/SDK/stocks/gov/toplobbying/_index.rst new file mode 100644 index 00000000000..2198bee5284 --- /dev/null +++ b/website/content/SDK/stocks/gov/toplobbying/_index.rst @@ -0,0 +1,66 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.gov.toplobbying() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Corporate lobbying details +

+ +* **Returns** + + pd.DataFrame + DataFrame of top corporate lobbying + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.gov.toplobbying( + limit: int = 10, + raw: bool = False, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Top lobbying tickers based on total spent +

+ +* **Parameters** + + limit: int + Number of tickers to show + raw: bool + Show raw data + export: + Format to export data + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/gov/topsells/_index.md b/website/content/SDK/stocks/gov/topsells/_index.md deleted file mode 100644 index 2c90801c9fa..00000000000 --- a/website/content/SDK/stocks/gov/topsells/_index.md +++ /dev/null @@ -1,38 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.gov.topsells(gov_type: str = 'congress', past_transactions_months: int = 6) -> pandas.core.frame.DataFrame - -Get top sell government trading [Source: quiverquant.com] - - Parameters - ---------- - gov_type: str - Type of government data between: congress, senate and house - past_transactions_months: int - Number of months to get trading for - - Returns - ------- - pd.DataFrame - DataFrame of top government sell trading - -## Getting charts -### stocks.gov.topsells(gov_type: str = 'congress', past_transactions_months: int = 6, limit: int = 10, raw: bool = False, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Top sell government trading [Source: quiverquant.com] - - Parameters - ---------- - gov_type: str - Type of government data between: congress, senate and house - past_transactions_months: int - Number of months to get trading for - limit: int - Number of tickers to show - raw: bool - Display raw data - export: str - Format to export data - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/stocks/gov/topsells/_index.rst b/website/content/SDK/stocks/gov/topsells/_index.rst new file mode 100644 index 00000000000..9c645d3fada --- /dev/null +++ b/website/content/SDK/stocks/gov/topsells/_index.rst @@ -0,0 +1,86 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.gov.topsells( + gov_type: str = 'congress', + past_transactions_months: int = 6, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get top sell government trading [Source: quiverquant.com] +

+ +* **Parameters** + + gov_type: str + Type of government data between: congress, senate and house + past_transactions_months: int + Number of months to get trading for + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + DataFrame of top government sell trading + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.gov.topsells( + gov_type: str = 'congress', + past_transactions_months: int = 6, + limit: int = 10, + raw: bool = False, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Top sell government trading [Source: quiverquant.com] +

+ +* **Parameters** + + gov_type: str + Type of government data between: congress, senate and house + past_transactions_months: int + Number of months to get trading for + limit: int + Number of tickers to show + raw: bool + Display raw data + export: str + Format to export data + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/ins/act/_index.md b/website/content/SDK/stocks/ins/act/_index.md deleted file mode 100644 index 60a4efd287b..00000000000 --- a/website/content/SDK/stocks/ins/act/_index.md +++ /dev/null @@ -1,40 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.ins.act(symbol: str) -> pandas.core.frame.DataFrame - -Get insider activity. [Source: Business Insider] - - Parameters - ---------- - symbol : str - Ticker symbol to get insider activity data from - - Returns - ------- - df_insider : pd.DataFrame - Get insider activity data - -## Getting charts -### stocks.ins.act(data: pandas.core.frame.DataFrame, symbol: str, start_date: str = '2019-10-30', interval: str = '1440min', limit: int = 10, raw: bool = False, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display insider activity. [Source: Business Insider] - - Parameters - ---------- - data: pd.DataFrame - Stock dataframe - symbol: str - Due diligence ticker symbol - start_date: str - Start date of the stock data - interval: str - Stock data interval - limit: int - Number of latest days of inside activity - raw: bool - Print to console - export: str - Export dataframe data to csv,json,xlsx file - external_axes: Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/stocks/ins/act/_index.rst b/website/content/SDK/stocks/ins/act/_index.rst new file mode 100644 index 00000000000..76e459501d4 --- /dev/null +++ b/website/content/SDK/stocks/ins/act/_index.rst @@ -0,0 +1,89 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ins.act( + symbol: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get insider activity. [Source: Business Insider] +

+ +* **Parameters** + + symbol : str + Ticker symbol to get insider activity data from + chart: *bool* + Flag to display chart + + +* **Returns** + + df_insider : pd.DataFrame + Get insider activity data + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.ins.act( + data: pandas.core.frame.DataFrame, + symbol: str, + start_date: str = '2019-11-04', + interval: str = '1440min', + limit: int = 10, + raw: bool = False, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display insider activity. [Source: Business Insider] +

+ +* **Parameters** + + data: pd.DataFrame + Stock dataframe + symbol: str + Due diligence ticker symbol + start_date: str + Start date of the stock data + interval: str + Stock data interval + limit: int + Number of latest days of inside activity + raw: bool + Print to console + export: str + Export dataframe data to csv,json,xlsx file + external_axes: Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/ins/lins/_index.md b/website/content/SDK/stocks/ins/lins/_index.md deleted file mode 100644 index ffc722b68cc..00000000000 --- a/website/content/SDK/stocks/ins/lins/_index.md +++ /dev/null @@ -1,28 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.ins.lins(symbol: str) -> pandas.core.frame.DataFrame - -Get last insider activity for a given stock ticker. [Source: Finviz] - - Parameters - ---------- - symbol : str - Stock ticker symbol - - pd.DataFrame - Latest insider trading activity - -## Getting charts -### stocks.ins.lins(symbol: str, limit: int = 10, export: str = '', chart=True) - -Display insider activity for a given stock ticker. [Source: Finviz] - - Parameters - ---------- - symbol : str - Stock ticker symbol - limit : int - Number of latest insider activity to display - export : str - Export dataframe data to csv,json,xlsx file diff --git a/website/content/SDK/stocks/ins/lins/_index.rst b/website/content/SDK/stocks/ins/lins/_index.rst new file mode 100644 index 00000000000..c737a443e7b --- /dev/null +++ b/website/content/SDK/stocks/ins/lins/_index.rst @@ -0,0 +1,72 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ins.lins( + symbol: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get last insider activity for a given stock ticker. [Source: Finviz] +

+ +* **Parameters** + + symbol : str + Stock ticker symbol + + pd.DataFrame + Latest insider trading activity + chart: *bool* + Flag to display chart + + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.ins.lins( + symbol: str, + limit: int = 10, + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display insider activity for a given stock ticker. [Source: Finviz] +

+ +* **Parameters** + + symbol : str + Stock ticker symbol + limit : int + Number of latest insider activity to display + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/ins/print_insider_data/_index.md b/website/content/SDK/stocks/ins/print_insider_data/_index.md deleted file mode 100644 index 62777186917..00000000000 --- a/website/content/SDK/stocks/ins/print_insider_data/_index.md +++ /dev/null @@ -1,27 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.ins.print_insider_data(type_insider: str = 'lcb', limit: int = 10) - -Print insider data - - Parameters - ---------- - type_insider: str - Insider type of data. Available types can be accessed through get_insider_types(). - limit: int - Limit of data rows to display - -## Getting charts -### stocks.ins.print_insider_data(type_insider: str = 'lcb', limit: int = 10, export: str = '', chart=True) - -Print insider data - - Parameters - ---------- - type_insider: str - Insider type of data. Available types can be accessed through get_insider_types(). - limit: int - Limit of data rows to display - export: str - Export data format diff --git a/website/content/SDK/stocks/ins/print_insider_data/_index.rst b/website/content/SDK/stocks/ins/print_insider_data/_index.rst new file mode 100644 index 00000000000..6f2a9ae19f0 --- /dev/null +++ b/website/content/SDK/stocks/ins/print_insider_data/_index.rst @@ -0,0 +1,72 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ins.print_insider_data( + type_insider: str = 'lcb', + limit: int = 10, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Print insider data +

+ +* **Parameters** + + type_insider: str + Insider type of data. Available types can be accessed through get_insider_types(). + limit: int + Limit of data rows to display + chart: *bool* + Flag to display chart + + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.ins.print_insider_data( + type_insider: str = 'lcb', + limit: int = 10, + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Print insider data +

+ +* **Parameters** + + type_insider: str + Insider type of data. Available types can be accessed through get_insider_types(). + limit: int + Limit of data rows to display + export: str + Export data format + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/etf/load/_index.md b/website/content/SDK/stocks/load/_index.rst similarity index 77% rename from website/content/SDK/etf/load/_index.md rename to website/content/SDK/stocks/load/_index.rst index fc48617b05d..d84ff4508ce 100644 --- a/website/content/SDK/etf/load/_index.md +++ b/website/content/SDK/stocks/load/_index.rst @@ -1,7 +1,35 @@ -## Get underlying data -### etf.load(symbol: str, start_date: datetime.datetime = None, interval: int = 1440, end_date: datetime.datetime = None, prepost: bool = False, source: str = 'YahooFinance', iexrange: str = 'ytd', weekly: bool = False, monthly: bool = False, verbose: bool = True) +.. role:: python(code) + :language: python + :class: highlight -Load a symbol to perform analysis using the string above as a template. +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.load( + symbol: str, + start_date: datetime.datetime = None, + interval: int = 1440, + end_date: datetime.datetime = None, + prepost: bool = False, + source: str = 'YahooFinance', + iexrange: str = 'ytd', + weekly: bool = False, + monthly: bool = False, + verbose: bool = True, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Load a symbol to perform analysis using the string above as a template. Optional arguments and their descriptions are listed above. @@ -30,9 +58,10 @@ Load a symbol to perform analysis using the string above as a template. including Pre/After Market data, using the default source, yFinance. Certain features, such as the Prediction menu, require the symbol to be loaded as daily and not intraday. +

+ +* **Parameters** - Parameters - ---------- symbol: str Ticker to get data start_date: datetime @@ -54,7 +83,7 @@ Load a symbol to perform analysis using the string above as a template. verbose: bool Display verbose information on what was the symbol that was loaded - Returns - ------- +* **Returns** + df_stock_candidate: pd.DataFrame Dataframe of data diff --git a/website/content/SDK/stocks/options/chains/_index.md b/website/content/SDK/stocks/options/chains/_index.md deleted file mode 100644 index 552ce3c1ac7..00000000000 --- a/website/content/SDK/stocks/options/chains/_index.md +++ /dev/null @@ -1,42 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.options.chains(symbol: str, expiry: str) -> pandas.core.frame.DataFrame - -Display option chains [Source: Tradier]" - - Parameters - ---------- - symbol : str - Ticker to get options for - expiry : str - Expiration date in the form of "YYYY-MM-DD" - - Returns - ------- - chains: pd.DataFrame - Dataframe with options for the given Symbol and Expiration date - -## Getting charts -### stocks.options.chains(symbol: str, expiry: str, to_display: List[str] = None, min_sp: float = -1, max_sp: float = -1, calls_only: bool = False, puts_only: bool = False, export: str = '', chart=True) - -Display option chain - - Parameters - ---------- - symbol: str - Stock ticker symbol - expiry: str - Expiration date of option - to_display: List[str] - List of columns to display - min_sp: float - Min strike price to display - max_sp: float - Max strike price to display - calls_only: bool - Only display calls - puts_only: bool - Only display puts - export: str - Format to export file diff --git a/website/content/SDK/stocks/options/chains/_index.rst b/website/content/SDK/stocks/options/chains/_index.rst new file mode 100644 index 00000000000..75028200fbe --- /dev/null +++ b/website/content/SDK/stocks/options/chains/_index.rst @@ -0,0 +1,92 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.options.chains( + symbol: str, + expiry: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Display option chains [Source: Tradier]" +

+ +* **Parameters** + + symbol : str + Ticker to get options for + expiry : str + Expiration date in the form of "YYYY-MM-DD" + chart: *bool* + Flag to display chart + + +* **Returns** + + chains: pd.DataFrame + Dataframe with options for the given Symbol and Expiration date + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.options.chains( + symbol: str, + expiry: str, + to_display: List[str] = None, + min_sp: float = -1, + max_sp: float = -1, + calls_only: bool = False, + puts_only: bool = False, + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display option chain +

+ +* **Parameters** + + symbol: str + Stock ticker symbol + expiry: str + Expiration date of option + to_display: List[str] + List of columns to display + min_sp: float + Min strike price to display + max_sp: float + Max strike price to display + calls_only: bool + Only display calls + puts_only: bool + Only display puts + export: str + Format to export file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/options/chains_yf/_index.md b/website/content/SDK/stocks/options/chains_yf/_index.md deleted file mode 100644 index 3d32275a9ed..00000000000 --- a/website/content/SDK/stocks/options/chains_yf/_index.md +++ /dev/null @@ -1,45 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.options.chains_yf(symbol: str, expiry: str, min_sp: float = -1, max_sp: float = -1, calls: bool = True, puts: bool = True) -> pandas.core.frame.DataFrame - -Get full option chains with calculated greeks - - Parameters - ---------- - symbol: str - Stock ticker symbol - expiry: str - Expiration date for chain in format YYY-mm-dd - calls: bool - Flag to get calls - puts: bool - Flag to get puts - - Returns - ------- - pd.DataFrame - DataFrame of option chain. If both calls and puts - -## Getting charts -### stocks.options.chains_yf(symbol: str, expiry: str, min_sp: float = -1, max_sp: float = -1, calls_only: bool = False, puts_only: bool = False, export: str = '', chart=True) - -Display option chains for given ticker and expiration - - Parameters - ---------- - symbol: str - Stock ticker symbol - expiry: str - Expiration for option chain - min_sp: float - Min strike - max_sp: float - Max strike - calls_only: bool - Flag to get calls only - puts_only: bool - Flag to get puts only - export: str - Format to export data - diff --git a/website/content/SDK/stocks/options/chains_yf/_index.rst b/website/content/SDK/stocks/options/chains_yf/_index.rst new file mode 100644 index 00000000000..9f8fccbc4b2 --- /dev/null +++ b/website/content/SDK/stocks/options/chains_yf/_index.rst @@ -0,0 +1,97 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.options.chains_yf( + symbol: str, + expiry: str, + min_sp: float = -1, + max_sp: float = -1, + calls: bool = True, + puts: bool = True, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get full option chains with calculated greeks +

+ +* **Parameters** + + symbol: str + Stock ticker symbol + expiry: str + Expiration date for chain in format YYY-mm-dd + calls: bool + Flag to get calls + puts: bool + Flag to get puts + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + DataFrame of option chain. If both calls and puts + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.options.chains_yf( + symbol: str, + expiry: str, + min_sp: float = -1, + max_sp: float = -1, + calls_only: bool = False, + puts_only: bool = False, + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display option chains for given ticker and expiration +

+ +* **Parameters** + + symbol: str + Stock ticker symbol + expiry: str + Expiration for option chain + min_sp: float + Min strike + max_sp: float + Max strike + calls_only: bool + Flag to get calls only + puts_only: bool + Flag to get puts only + export: str + Format to export data + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/options/closing/_index.md b/website/content/SDK/stocks/options/closing/_index.md deleted file mode 100644 index 6a58fa1626c..00000000000 --- a/website/content/SDK/stocks/options/closing/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### stocks.options.closing(symbol: str) -> pandas.core.series.Series - -Get closing prices for a given ticker - - Parameters - ---------- - symbol : str - The ticker symbol to get the price for - - Returns - ---------- - price : List[float] - A list of closing prices for a ticker diff --git a/website/content/SDK/stocks/options/closing/_index.rst b/website/content/SDK/stocks/options/closing/_index.rst new file mode 100644 index 00000000000..a85a7fa8b10 --- /dev/null +++ b/website/content/SDK/stocks/options/closing/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.options.closing( + symbol: str, + chart: bool = False, +) -> pandas.core.series.Series +{{< /highlight >}} + +.. raw:: html + +

+ Get closing prices for a given ticker +

+ +* **Parameters** + + symbol : str + The ticker symbol to get the price for + +* **Returns** + + price : List[float] + A list of closing prices for a ticker diff --git a/website/content/SDK/stocks/options/dividend/_index.md b/website/content/SDK/stocks/options/dividend/_index.md deleted file mode 100644 index fd8b1d84b59..00000000000 --- a/website/content/SDK/stocks/options/dividend/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### stocks.options.dividend(symbol: str) -> pandas.core.series.Series - -Gets option chain from yf for given ticker and expiration - - Parameters - ---------- - symbol: str - Ticker symbol to get options for - - Returns - ------- - chains: yf.ticker.Dividends - Dividends diff --git a/website/content/SDK/stocks/options/dividend/_index.rst b/website/content/SDK/stocks/options/dividend/_index.rst new file mode 100644 index 00000000000..e5b299090e6 --- /dev/null +++ b/website/content/SDK/stocks/options/dividend/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.options.dividend( + symbol: str, + chart: bool = False, +) -> pandas.core.series.Series +{{< /highlight >}} + +.. raw:: html + +

+ Gets option chain from yf for given ticker and expiration +

+ +* **Parameters** + + symbol: str + Ticker symbol to get options for + +* **Returns** + + chains: yf.ticker.Dividends + Dividends diff --git a/website/content/SDK/stocks/options/dte/_index.md b/website/content/SDK/stocks/options/dte/_index.md deleted file mode 100644 index 5cecaf595c9..00000000000 --- a/website/content/SDK/stocks/options/dte/_index.md +++ /dev/null @@ -1,4 +0,0 @@ -## Get underlying data -### stocks.options.dte(date_value: str) -> int - -Gets days to expiration from yfinance option diff --git a/website/content/SDK/stocks/options/dte/_index.rst b/website/content/SDK/stocks/options/dte/_index.rst new file mode 100644 index 00000000000..8aa15887bf7 --- /dev/null +++ b/website/content/SDK/stocks/options/dte/_index.rst @@ -0,0 +1,24 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.options.dte( + date_value: str, + chart: bool = False, +) -> int +{{< /highlight >}} + +.. raw:: html + +

+ Gets days to expiration from yfinance option dat +

diff --git a/website/content/SDK/stocks/options/generate_data/_index.md b/website/content/SDK/stocks/options/generate_data/_index.md deleted file mode 100644 index 0249472e518..00000000000 --- a/website/content/SDK/stocks/options/generate_data/_index.md +++ /dev/null @@ -1,4 +0,0 @@ -## Get underlying data -### stocks.options.generate_data(current_price: float, options: List[Dict[str, int]], underlying: int) -> Tuple[List[float], List[float], List[float]] - -Gets x values, and y values before and after pre diff --git a/website/content/SDK/stocks/options/generate_data/_index.rst b/website/content/SDK/stocks/options/generate_data/_index.rst new file mode 100644 index 00000000000..688d7bd962e --- /dev/null +++ b/website/content/SDK/stocks/options/generate_data/_index.rst @@ -0,0 +1,26 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.options.generate_data( + current_price: float, + options: List[Dict[str, int]], + underlying: int, + chart: bool = False, +) -> Tuple[List[float], List[float], List[float]] +{{< /highlight >}} + +.. raw:: html + +

+ Gets x values, and y values before and after premium +

diff --git a/website/content/SDK/stocks/options/grhist/_index.md b/website/content/SDK/stocks/options/grhist/_index.md deleted file mode 100644 index 7e6a7fe8ace..00000000000 --- a/website/content/SDK/stocks/options/grhist/_index.md +++ /dev/null @@ -1,52 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.options.grhist(symbol: str, expiry: str, strike: Union[str, float], chain_id: str = '', put: bool = False) -> pandas.core.frame.DataFrame - -Get histoical option greeks - - Parameters - ---------- - symbol: str - Stock ticker symbol - expiry: str - Option expiration date - strike: Union[str, float] - Strike price to look for - chain_id: str - OCC option symbol. Overwrites other inputs - put: bool - Is this a put option? - - Returns - ------- - df: pd.DataFrame - Dataframe containing historical greeks - -## Getting charts -### stocks.options.grhist(symbol: str, expiry: str, strike: Union[float, str], greek: str = 'Delta', chain_id: str = '', put: bool = False, raw: bool = False, limit: Union[int, str] = 20, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Plots historical greeks for a given option. [Source: Syncretism] - - Parameters - ---------- - symbol: str - Stock ticker - expiry: str - Expiration date - strike: Union[str, float] - Strike price to consider - greek: str - Greek variable to plot - chain_id: str - OCC option chain. Overwrites other variables - put: bool - Is this a put option? - raw: bool - Print to console - limit: int - Number of rows to show in raw - export: str - Format to export data - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/stocks/options/grhist/_index.rst b/website/content/SDK/stocks/options/grhist/_index.rst new file mode 100644 index 00000000000..1f16ef86f9d --- /dev/null +++ b/website/content/SDK/stocks/options/grhist/_index.rst @@ -0,0 +1,107 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.options.grhist( + symbol: str, + expiry: str, + strike: Union[str, float], + chain_id: str = '', + put: bool = False, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get histoical option greeks +

+ +* **Parameters** + + symbol: str + Stock ticker symbol + expiry: str + Option expiration date + strike: Union[str, float] + Strike price to look for + chain_id: str + OCC option symbol. Overwrites other inputs + put: bool + Is this a put option? + chart: *bool* + Flag to display chart + + +* **Returns** + + df: pd.DataFrame + Dataframe containing historical greeks + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.options.grhist( + symbol: str, + expiry: str, + strike: Union[float, str], + greek: str = 'Delta', + chain_id: str = '', + put: bool = False, + raw: bool = False, + limit: Union[int, str] = 20, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Plots historical greeks for a given option. [Source: Syncretism] +

+ +* **Parameters** + + symbol: str + Stock ticker + expiry: str + Expiration date + strike: Union[str, float] + Strike price to consider + greek: str + Greek variable to plot + chain_id: str + OCC option chain. Overwrites other variables + put: bool + Is this a put option? + raw: bool + Print to console + limit: int + Number of rows to show in raw + export: str + Format to export data + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/options/hedge/add_hedge_option/_index.md b/website/content/SDK/stocks/options/hedge/add_hedge_option/_index.md deleted file mode 100644 index 26dfc78c008..00000000000 --- a/website/content/SDK/stocks/options/hedge/add_hedge_option/_index.md +++ /dev/null @@ -1,49 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.options.hedge.add_hedge_option(price: float = 100, implied_volatility: float = 20, strike: float = 120, days: float = 30, sign: int = 1) -> tuple - -Determine the delta, gamma and vega value of the portfolio and/or options. - - Parameters - ---------- - price: float - The price. - implied_volatility: float - The implied volatility. - strike: float - The strike price. - days: float - The amount of days until expiration. Use annual notation thus a month would be 30 / 360. - sign: int - Whether you have a long (1) or short (-1) position - - Returns - ------- - delta: float - gamma: float - portfolio: float - -## Getting charts -### stocks.options.hedge.add_hedge_option(price: float = 100, implied_volatility: float = 20, strike: float = 120, days: float = 30, sign: int = 1, chart=True) - -Determine the delta, gamma and vega value of the portfolio and/or options and show them. - - Parameters - ---------- - price: float - The price. - implied_volatility: float - The implied volatility. - strike: float - The strike price. - days: float - The amount of days until expiration. Use annual notation thus a month would be 30 / 360. - sign: int - Whether you have a long (1) or short (-1) position - - Returns - ------- - delta: float - gamma: float - vega: float diff --git a/website/content/SDK/stocks/options/hedge/add_hedge_option/_index.rst b/website/content/SDK/stocks/options/hedge/add_hedge_option/_index.rst new file mode 100644 index 00000000000..c07e23a636f --- /dev/null +++ b/website/content/SDK/stocks/options/hedge/add_hedge_option/_index.rst @@ -0,0 +1,99 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.options.hedge.add_hedge_option( + price: float = 100, + implied_volatility: float = 20, + strike: float = 120, + days: float = 30, + sign: int = 1, + chart: bool = False, +) -> tuple +{{< /highlight >}} + +.. raw:: html + +

+ Determine the delta, gamma and vega value of the portfolio and/or options. +

+ +* **Parameters** + + price: float + The price. + implied_volatility: float + The implied volatility. + strike: float + The strike price. + days: float + The amount of days until expiration. Use annual notation thus a month would be 30 / 360. + sign: int + Whether you have a long (1) or short (-1) position + chart: *bool* + Flag to display chart + + +* **Returns** + + delta: float + gamma: float + portfolio: float + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.options.hedge.add_hedge_option( + price: float = 100, + implied_volatility: float = 20, + strike: float = 120, + days: float = 30, + sign: int = 1, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Determine the delta, gamma and vega value of the portfolio and/or options and show them. +

+ +* **Parameters** + + price: float + The price. + implied_volatility: float + The implied volatility. + strike: float + The strike price. + days: float + The amount of days until expiration. Use annual notation thus a month would be 30 / 360. + sign: int + Whether you have a long (1) or short (-1) position + chart: *bool* + Flag to display chart + + +* **Returns** + + delta: float + gamma: float + vega: float diff --git a/website/content/SDK/stocks/options/hedge/calc_delta/_index.md b/website/content/SDK/stocks/options/hedge/calc_delta/_index.rst similarity index 60% rename from website/content/SDK/stocks/options/hedge/calc_delta/_index.md rename to website/content/SDK/stocks/options/hedge/calc_delta/_index.rst index 0db2575a22d..6134231387b 100644 --- a/website/content/SDK/stocks/options/hedge/calc_delta/_index.md +++ b/website/content/SDK/stocks/options/hedge/calc_delta/_index.rst @@ -1,14 +1,39 @@ -## Get underlying data -### stocks.options.hedge.calc_delta(asset_price: float = 100, asset_volatility: float = 20, strike_price: float = 120, time_to_expiration: float = 30, risk_free_rate: float = 0, sign: int = 1) +.. role:: python(code) + :language: python + :class: highlight -The first-order partial-derivative with respect to the underlying asset of the Black-Scholes +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.options.hedge.calc_delta( + asset_price: float = 100, + asset_volatility: float = 20, + strike_price: float = 120, + time_to_expiration: float = 30, + risk_free_rate: float = 0, + sign: int = 1, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ The first-order partial-derivative with respect to the underlying asset of the Black-Scholes equation is known as delta. Delta refers to how the option value changes when there is a change in the underlying asset price. Multiplying delta by a +-$1 change in the underlying asset, holding all other parameters constant, will give you the new value of the option. Delta will be positive for long call and short put positions, negative for short call and long put positions. +

+ +* **Parameters** - Parameters - ---------- asset_price: int The price. asset_volatility: float @@ -22,7 +47,7 @@ The first-order partial-derivative with respect to the underlying asset of the B sign: int Whether you have a long (1) or short (-1) position - Returns - ------- +* **Returns** + delta: float Returns the value for the delta. diff --git a/website/content/SDK/stocks/options/hedge/calc_gamma/_index.md b/website/content/SDK/stocks/options/hedge/calc_gamma/_index.rst similarity index 60% rename from website/content/SDK/stocks/options/hedge/calc_gamma/_index.md rename to website/content/SDK/stocks/options/hedge/calc_gamma/_index.rst index a6f6f17226c..3be5a93fd33 100644 --- a/website/content/SDK/stocks/options/hedge/calc_gamma/_index.md +++ b/website/content/SDK/stocks/options/hedge/calc_gamma/_index.rst @@ -1,15 +1,39 @@ -## Get underlying data -### stocks.options.hedge.calc_gamma(asset_price: float = 100, asset_volatility: float = 20, strike_price: float = 120, time_to_expiration: float = 30, risk_free_rate: float = 0) +.. role:: python(code) + :language: python + :class: highlight -The second-order partial-derivative with respect to the underlying asset of the Black-Scholes equation +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.options.hedge.calc_gamma( + asset_price: float = 100, + asset_volatility: float = 20, + strike_price: float = 120, + time_to_expiration: float = 30, + risk_free_rate: float = 0, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ The second-order partial-derivative with respect to the underlying asset of the Black-Scholes equation is known as gamma. Gamma refers to how the option’s delta changes when there is a change in the underlying asset price. Multiplying gamma by a +-$1 change in the underlying asset, holding all other parameters constant, will give you the new value of the option’s delta. Essentially, gamma is telling us the rate of change of delta given a +-1 change in the underlying asset price. Gamma is always positive for long positions and negative for short positions. +

+ +* **Parameters** - Parameters - ---------- asset_price: int The price. asset_volatility: float @@ -21,7 +45,7 @@ The second-order partial-derivative with respect to the underlying asset of the risk_free_rate: float The risk free rate. - Returns - ------- +* **Returns** + gamma: float Returns the value for the gamma. diff --git a/website/content/SDK/stocks/options/hedge/calc_hedge/_index.md b/website/content/SDK/stocks/options/hedge/calc_hedge/_index.md deleted file mode 100644 index 080990d3682..00000000000 --- a/website/content/SDK/stocks/options/hedge/calc_hedge/_index.md +++ /dev/null @@ -1,48 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.options.hedge.calc_hedge(portfolio_option_amount: float = 100, side: str = 'Call', greeks: dict = {'Portfolio': {'Delta': 1, 'Gamma': 9.1268e-05, 'Vega': 5.4661}, 'Option A': {'Delta': 1, 'Gamma': 9.1268e-05, 'Vega': 5.4661}, 'Option B': {'Delta': 1, 'Gamma': 9.1268e-05, 'Vega': 5.4661}}, sign: int = 1) - -Determine the hedge position and the weights within each option and - underlying asset to hold a neutral portfolio - - Parameters - ---------- - portfolio_option_amount: float - Number to show - side: str - Whether you have a Call or Put instrument - greeks: dict - Dictionary containing delta, gamma and vega values for the portfolio and option A and B. Structure is - as follows: {'Portfolio': {'Delta': VALUE, 'Gamma': VALUE, 'Vega': VALUE}} etc - sign: int - Whether you have a long (1) or short (-1) position - - Returns - ------- - option A weight: float - option B weight: float - portfolio weight: float - is_singular: boolean - -## Getting charts -### stocks.options.hedge.calc_hedge(portfolio_option_amount: float = 100, side: str = 'Call', greeks: dict = {'Portfolio': {'Delta': 1, 'Gamma': 9.1268e-05, 'Vega': 5.4661}, 'Option A': {'Delta': 1, 'Gamma': 9.1268e-05, 'Vega': 5.4661}, 'Option B': {'Delta': 1, 'Gamma': 9.1268e-05, 'Vega': 5.4661}}, sign: int = 1, chart=True) - -Determine the hedge position and the weights within each option and - underlying asset to hold a neutral portfolio and show them - - Parameters - ---------- - portfolio_option_amount: float - Number to show - side: str - Whether you have a Call or Put instrument - greeks: dict - Dictionary containing delta, gamma and vega values for the portfolio and option A and B. Structure is - as follows: {'Portfolio': {'Delta': VALUE, 'Gamma': VALUE, 'Vega': VALUE}} etc - sign: int - Whether you have a long (1) or short (-1) position - - Returns - ------- - A table with the neutral portfolio weights. diff --git a/website/content/SDK/stocks/options/hedge/calc_hedge/_index.rst b/website/content/SDK/stocks/options/hedge/calc_hedge/_index.rst new file mode 100644 index 00000000000..f8bd4c4985c --- /dev/null +++ b/website/content/SDK/stocks/options/hedge/calc_hedge/_index.rst @@ -0,0 +1,94 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.options.hedge.calc_hedge( + portfolio_option_amount: float = 100, + side: str = 'Call', + greeks: dict = {'Portfolio': {'Delta': 1, 'Gamma': 9.1268e-05, 'Vega': 5.4661}, 'Option A': {'Delta': 1, 'Gamma': 9.1268e-05, 'Vega': 5.4661}, 'Option B': {'Delta': 1, 'Gamma': 9.1268e-05, 'Vega': 5.4661}}, sign: int = 1, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Determine the hedge position and the weights within each option and + underlying asset to hold a neutral portfolio +

+ +* **Parameters** + + portfolio_option_amount: float + Number to show + side: str + Whether you have a Call or Put instrument + greeks: dict + Dictionary containing delta, gamma and vega values for the portfolio and option A and B. Structure is + as follows: {'Portfolio': {'Delta': VALUE, 'Gamma': VALUE, 'Vega': VALUE}} etc + sign: int + Whether you have a long (1) or short (-1) position + chart: *bool* + Flag to display chart + + +* **Returns** + + option A weight: float + option B weight: float + portfolio weight: float + is_singular: boolean + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.options.hedge.calc_hedge( + portfolio_option_amount: float = 100, + side: str = 'Call', + greeks: dict = {'Portfolio': {'Delta': 1, 'Gamma': 9.1268e-05, 'Vega': 5.4661}, 'Option A': {'Delta': 1, 'Gamma': 9.1268e-05, 'Vega': 5.4661}, 'Option B': {'Delta': 1, 'Gamma': 9.1268e-05, 'Vega': 5.4661}}, sign: int = 1, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Determine the hedge position and the weights within each option and + underlying asset to hold a neutral portfolio and show them +

+ +* **Parameters** + + portfolio_option_amount: float + Number to show + side: str + Whether you have a Call or Put instrument + greeks: dict + Dictionary containing delta, gamma and vega values for the portfolio and option A and B. Structure is + as follows: {'Portfolio': {'Delta': VALUE, 'Gamma': VALUE, 'Vega': VALUE}} etc + sign: int + Whether you have a long (1) or short (-1) position + chart: *bool* + Flag to display chart + + +* **Returns** + + A table with the neutral portfolio weights. diff --git a/website/content/SDK/stocks/options/hedge/calc_vega/_index.md b/website/content/SDK/stocks/options/hedge/calc_vega/_index.rst similarity index 58% rename from website/content/SDK/stocks/options/hedge/calc_vega/_index.md rename to website/content/SDK/stocks/options/hedge/calc_vega/_index.rst index e78827a537a..37016549d5c 100644 --- a/website/content/SDK/stocks/options/hedge/calc_vega/_index.md +++ b/website/content/SDK/stocks/options/hedge/calc_vega/_index.rst @@ -1,14 +1,38 @@ -## Get underlying data -### stocks.options.hedge.calc_vega(asset_price: float = 100, asset_volatility: float = 20, strike_price: float = 120, time_to_expiration: float = 30, risk_free_rate: float = 0) +.. role:: python(code) + :language: python + :class: highlight -The first-order partial-derivative with respect to the underlying asset volatility of +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.options.hedge.calc_vega( + asset_price: float = 100, + asset_volatility: float = 20, + strike_price: float = 120, + time_to_expiration: float = 30, + risk_free_rate: float = 0, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ The first-order partial-derivative with respect to the underlying asset volatility of the Black-Scholes equation is known as vega. Vega refers to how the option value changes when there is a change in the underlying asset volatility. Multiplying vega by a +-1% change in the underlying asset volatility, holding all other parameters constant, will give you the new value of the option. Vega will be positive for long positions and negative for short positions. +

+ +* **Parameters** - Parameters - ---------- asset_price: int The price. asset_volatility: float @@ -20,7 +44,7 @@ The first-order partial-derivative with respect to the underlying asset volatili risk_free_rate: float The risk free rate. - Returns - ------- +* **Returns** + vega: float Returns the value for the gamma. diff --git a/website/content/SDK/stocks/options/hist_ce/_index.md b/website/content/SDK/stocks/options/hist_ce/_index.md deleted file mode 100644 index 7079a2427d0..00000000000 --- a/website/content/SDK/stocks/options/hist_ce/_index.md +++ /dev/null @@ -1,44 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.options.hist_ce(symbol: str = 'GME', date: str = '2021-02-05', call: bool = True, price: str = '90') -> pandas.core.frame.DataFrame - -Historic prices for a specific option [chartexchange] - - Parameters - ---------- - symbol : str - Ticker symbol to get historical data from - date : str - Date as a string YYYYMMDD - call : bool - Whether to show a call or a put - price : str - Strike price for a specific option - - Returns - ------- - historical : pd.Dataframe - Historic information for an option - -## Getting charts -### stocks.options.hist_ce(symbol: str = 'GME', expiry: str = '2021-02-05', call: bool = True, price: float = 90, limit: int = 10, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) -> None - -Return raw stock data[chartexchange] - - Parameters - ---------- - symbol : str - Ticker symbol for the given option - expiry : str - The expiry of expiration, format "YYYY-MM-DD", i.e. 2010-12-31. - call : bool - Whether the underlying asset should be a call or a put - price : float - The strike of the expiration - limit : int - Number of rows to show - export : str - Export data as CSV, JSON, XLSX - external_axes: Optional[List[plt.Axes]] - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/stocks/options/hist_ce/_index.rst b/website/content/SDK/stocks/options/hist_ce/_index.rst new file mode 100644 index 00000000000..71d9041c152 --- /dev/null +++ b/website/content/SDK/stocks/options/hist_ce/_index.rst @@ -0,0 +1,95 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.options.hist_ce( + symbol: str = 'GME', + date: str = '2021-02-05', + call: bool = True, + price: str = '90', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Historic prices for a specific option [chartexchange] +

+ +* **Parameters** + + symbol : str + Ticker symbol to get historical data from + date : str + Date as a string YYYYMMDD + call : bool + Whether to show a call or a put + price : str + Strike price for a specific option + chart: *bool* + Flag to display chart + + +* **Returns** + + historical : pd.Dataframe + Historic information for an option + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.options.hist_ce( + symbol: str = 'GME', + expiry: str = '2021-02-05', + call: bool = True, + price: float = 90, + limit: int = 10, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Return raw stock data[chartexchange] +

+ +* **Parameters** + + symbol : str + Ticker symbol for the given option + expiry : str + The expiry of expiration, format "YYYY-MM-DD", i.e. 2010-12-31. + call : bool + Whether the underlying asset should be a call or a put + price : float + The strike of the expiration + limit : int + Number of rows to show + export : str + Export data as CSV, JSON, XLSX + external_axes: Optional[List[plt.Axes]] + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/options/hist_tr/_index.md b/website/content/SDK/stocks/options/hist_tr/_index.md deleted file mode 100644 index 7bef911eb2f..00000000000 --- a/website/content/SDK/stocks/options/hist_tr/_index.md +++ /dev/null @@ -1,50 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.options.hist_tr(symbol: str, expiry: str, strike: float = 0, put: bool = False, chain_id: Optional[str] = None) -> pandas.core.frame.DataFrame - - - Gets historical option pricing. This inputs either ticker, expiration, strike or the OCC chain ID and processes - the request to tradier for historical premiums. - - Parameters - ---------- - symbol: str - Stock ticker symbol - expiry: str - Option expiration date - strike: int - Option strike price - put: bool - Is this a put option? - chain_id: Optional[str] - OCC chain ID - - Returns - ------- - df_hist: pd.DataFrame - Dataframe of historical option prices - -## Getting charts -### stocks.options.hist_tr(symbol: str, expiry: str, strike: float = 0, put: bool = False, raw: bool = False, chain_id: str = None, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Plot historical option prices - - Parameters - ---------- - symbol: str - Stock ticker symbol - expiry: str - Expiry date of option - strike: float - Option strike price - put: bool - Is this a put option? - raw: bool - Print raw data - chain_id: str - OCC option symbol - export: str - Format of export file - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/stocks/options/hist_tr/_index.rst b/website/content/SDK/stocks/options/hist_tr/_index.rst new file mode 100644 index 00000000000..15c5cef28d5 --- /dev/null +++ b/website/content/SDK/stocks/options/hist_tr/_index.rst @@ -0,0 +1,102 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.options.hist_tr( + symbol: str, + expiry: str, + strike: float = 0, + put: bool = False, + chain_id: Optional[str] = None, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Gets historical option pricing. This inputs either ticker, expiration, strike or the OCC chain ID and processes + the request to tradier for historical premiums. +

+ +* **Parameters** + + symbol: str + Stock ticker symbol + expiry: str + Option expiration date + strike: int + Option strike price + put: bool + Is this a put option? + chain_id: Optional[str] + OCC chain ID + chart: *bool* + Flag to display chart + + +* **Returns** + + df_hist: pd.DataFrame + Dataframe of historical option prices + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.options.hist_tr( + symbol: str, + expiry: str, + strike: float = 0, + put: bool = False, + raw: bool = False, + chain_id: str = None, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Plot historical option prices +

+ +* **Parameters** + + symbol: str + Stock ticker symbol + expiry: str + Expiry date of option + strike: float + Option strike price + put: bool + Is this a put option? + raw: bool + Print raw data + chain_id: str + OCC option symbol + export: str + Format of export file + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/options/info/_index.md b/website/content/SDK/stocks/options/info/_index.md deleted file mode 100644 index 826b472d5e1..00000000000 --- a/website/content/SDK/stocks/options/info/_index.md +++ /dev/null @@ -1,28 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.options.info(symbol: str) - -Get info for a given ticker - - Parameters - ---------- - symbol : str - The ticker symbol to get the price for - - Returns - ---------- - price : float - The info for a given ticker - -## Getting charts -### stocks.options.info(symbol: str, export: str = '', chart=True) - -Scrapes Barchart.com for the options information - - Parameters - ---------- - symbol: str - Ticker symbol to get options info for - export: str - Format of export file diff --git a/website/content/SDK/stocks/options/info/_index.rst b/website/content/SDK/stocks/options/info/_index.rst new file mode 100644 index 00000000000..8242225bcc6 --- /dev/null +++ b/website/content/SDK/stocks/options/info/_index.rst @@ -0,0 +1,71 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.options.info( + symbol: str, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Get info for a given ticker +

+ +* **Parameters** + + symbol : str + The ticker symbol to get the price for + chart: *bool* + Flag to display chart + + +* **Returns** + + price : float + The info for a given ticker + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.options.info( + symbol: str, + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Scrapes Barchart.com for the options information +

+ +* **Parameters** + + symbol: str + Ticker symbol to get options info for + export: str + Format of export file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/options/last_price/_index.md b/website/content/SDK/stocks/options/last_price/_index.md deleted file mode 100644 index 039307733b9..00000000000 --- a/website/content/SDK/stocks/options/last_price/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### stocks.options.last_price(symbol: str) - -Makes api request for last price - - Parameters - ---------- - symbol: str - Ticker symbol - - Returns - ------- - float: - Last price diff --git a/website/content/SDK/stocks/options/last_price/_index.rst b/website/content/SDK/stocks/options/last_price/_index.rst new file mode 100644 index 00000000000..3c3e09208c8 --- /dev/null +++ b/website/content/SDK/stocks/options/last_price/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.options.last_price( + symbol: str, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Makes api request for last price +

+ +* **Parameters** + + symbol: str + Ticker symbol + +* **Returns** + + float: + Last price diff --git a/website/content/SDK/stocks/options/option_chain/_index.md b/website/content/SDK/stocks/options/option_chain/_index.md deleted file mode 100644 index 465753a5135..00000000000 --- a/website/content/SDK/stocks/options/option_chain/_index.md +++ /dev/null @@ -1,16 +0,0 @@ -## Get underlying data -### stocks.options.option_chain(symbol: str, expiry: str) - -Gets option chain from yf for given ticker and expiration - - Parameters - ---------- - symbol: str - Ticker symbol to get options for - expiry: str - Date to get options for. YYYY-MM-DD - - Returns - ------- - chains: yf.ticker.Options - Options chain diff --git a/website/content/SDK/stocks/options/option_chain/_index.rst b/website/content/SDK/stocks/options/option_chain/_index.rst new file mode 100644 index 00000000000..3b61c5de4fe --- /dev/null +++ b/website/content/SDK/stocks/options/option_chain/_index.rst @@ -0,0 +1,37 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.options.option_chain( + symbol: str, + expiry: str, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Gets option chain from yf for given ticker and expiration +

+ +* **Parameters** + + symbol: str + Ticker symbol to get options for + expiry: str + Date to get options for. YYYY-MM-DD + +* **Returns** + + chains: yf.ticker.Options + Options chain diff --git a/website/content/SDK/stocks/options/option_expirations/_index.md b/website/content/SDK/stocks/options/option_expirations/_index.md deleted file mode 100644 index 7d211c67811..00000000000 --- a/website/content/SDK/stocks/options/option_expirations/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### stocks.options.option_expirations(symbol: str) - -Get available expiration dates for given ticker - - Parameters - ---------- - symbol: str - Ticker symbol to get expirations for - - Returns - ------- - dates: List[str] - List of of available expirations diff --git a/website/content/SDK/stocks/options/option_expirations/_index.rst b/website/content/SDK/stocks/options/option_expirations/_index.rst new file mode 100644 index 00000000000..1c919c7a220 --- /dev/null +++ b/website/content/SDK/stocks/options/option_expirations/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.options.option_expirations( + symbol: str, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Get available expiration dates for given ticker +

+ +* **Parameters** + + symbol: str + Ticker symbol to get expirations for + +* **Returns** + + dates: List[str] + List of of available expirations diff --git a/website/content/SDK/stocks/options/pcr/_index.md b/website/content/SDK/stocks/options/pcr/_index.md deleted file mode 100644 index f3de76b7660..00000000000 --- a/website/content/SDK/stocks/options/pcr/_index.md +++ /dev/null @@ -1,33 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.options.pcr(symbol: str, window: int = 30, start_date: str = '2021-11-02') -> pandas.core.frame.DataFrame - -Gets put call ratio over last time window [Source: AlphaQuery.com] - - Parameters - ---------- - symbol: str - Ticker symbol to look for - window: int, optional - Window to consider, by default 30 - start_date: str, optional - Start date to plot, by default last 366 days - -## Getting charts -### stocks.options.pcr(symbol: str, window: int = 30, start_date: str = '2021-11-02', export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display put call ratio [Source: AlphaQuery.com] - - Parameters - ---------- - symbol : str - Stock ticker symbol - window : int, optional - Window length to look at, by default 30 - start_date : str, optional - Starting date for data, by default (datetime.now() - timedelta(days=366)).strftime("%Y-%m-%d") - export : str, optional - Format to export data, by default "" - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/stocks/options/pcr/_index.rst b/website/content/SDK/stocks/options/pcr/_index.rst new file mode 100644 index 00000000000..9f6567793b4 --- /dev/null +++ b/website/content/SDK/stocks/options/pcr/_index.rst @@ -0,0 +1,81 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.options.pcr( + symbol: str, + window: int = 30, + start_date: str = '2021-11-07', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Gets put call ratio over last time window [Source: AlphaQuery.com] +

+ +* **Parameters** + + symbol: str + Ticker symbol to look for + window: int, optional + Window to consider, by default 30 + start_date: str, optional + Start date to plot, by default last 366 days + chart: *bool* + Flag to display chart + + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.options.pcr( + symbol: str, + window: int = 30, + start_date: str = '2021-11-07', + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display put call ratio [Source: AlphaQuery.com] +

+ +* **Parameters** + + symbol : str + Stock ticker symbol + window : int, optional + Window length to look at, by default 30 + start_date : str, optional + Starting date for data, by default (datetime.now() - timedelta(days=366)).strftime("%Y-%m-%d") + export : str, optional + Format to export data, by default "" + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/options/price/_index.md b/website/content/SDK/stocks/options/price/_index.md deleted file mode 100644 index 0b9d3b547f9..00000000000 --- a/website/content/SDK/stocks/options/price/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### stocks.options.price(symbol: str) -> float - -Get current price for a given ticker - - Parameters - ---------- - symbol : str - The ticker symbol to get the price for - - Returns - ---------- - price : float - The price of the ticker diff --git a/website/content/SDK/stocks/options/price/_index.rst b/website/content/SDK/stocks/options/price/_index.rst new file mode 100644 index 00000000000..3cfbbaec6df --- /dev/null +++ b/website/content/SDK/stocks/options/price/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.options.price( + symbol: str, + chart: bool = False, +) -> float +{{< /highlight >}} + +.. raw:: html + +

+ Get current price for a given ticker +

+ +* **Parameters** + + symbol : str + The ticker symbol to get the price for + +* **Returns** + + price : float + The price of the ticker diff --git a/website/content/SDK/stocks/options/process_chains/_index.md b/website/content/SDK/stocks/options/process_chains/_index.md deleted file mode 100644 index 7bb06014b83..00000000000 --- a/website/content/SDK/stocks/options/process_chains/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### stocks.options.process_chains(response: requests.models.Response) -> pandas.core.frame.DataFrame - -Function to take in the requests.get and return a DataFrame - - Parameters - ---------- - response: requests.models.Response - This is the response from tradier api. - - Returns - ------- - opt_chain: pd.DataFrame - Dataframe with all available options diff --git a/website/content/SDK/stocks/options/process_chains/_index.rst b/website/content/SDK/stocks/options/process_chains/_index.rst new file mode 100644 index 00000000000..bfdb568a1d9 --- /dev/null +++ b/website/content/SDK/stocks/options/process_chains/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.options.process_chains( + response: requests.models.Response, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Function to take in the requests.get and return a DataFrame +

+ +* **Parameters** + + response: requests.models.Response + This is the response from tradier api. + +* **Returns** + + opt_chain: pd.DataFrame + Dataframe with all available options diff --git a/website/content/SDK/stocks/options/screen/check_presets/_index.md b/website/content/SDK/stocks/options/screen/check_presets/_index.md deleted file mode 100644 index 131037167ea..00000000000 --- a/website/content/SDK/stocks/options/screen/check_presets/_index.md +++ /dev/null @@ -1,13 +0,0 @@ -## Get underlying data -### stocks.options.screen.check_presets(preset_dict: dict) -> str - -Checks option screener preset values - - Parameters - ---------- - preset_dict: dict - Defined presets from configparser - Returns - ------- - error: str - String of all errors accumulated diff --git a/website/content/SDK/stocks/options/screen/check_presets/_index.rst b/website/content/SDK/stocks/options/screen/check_presets/_index.rst new file mode 100644 index 00000000000..ba6271e654f --- /dev/null +++ b/website/content/SDK/stocks/options/screen/check_presets/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.options.screen.check_presets( + preset_dict: dict, + chart: bool = False, +) -> str +{{< /highlight >}} + +.. raw:: html + +

+ Checks option screener preset values +

+ +* **Parameters** + + preset_dict: dict + Defined presets from configparser + +* **Returns** + + error: str + String of all errors accumulated diff --git a/website/content/SDK/stocks/options/screen/screener_output/_index.md b/website/content/SDK/stocks/options/screen/screener_output/_index.md deleted file mode 100644 index e991645eac3..00000000000 --- a/website/content/SDK/stocks/options/screen/screener_output/_index.md +++ /dev/null @@ -1,36 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.options.screen.screener_output(preset: str) -> Tuple[pandas.core.frame.DataFrame, str] - -Screen options based on preset filters - - Parameters - ---------- - preset: str - Chosen preset - Returns - ------- - pd.DataFrame: - DataFrame with screener data, or empty if errors - str: - String containing error message if supplied - -## Getting charts -### stocks.options.screen.screener_output(preset: str, limit: int = 20, export: str = '', chart=True) -> List - -Print the output of screener - - Parameters - ---------- - preset: str - Chosen preset - limit: int - Number of randomly sorted rows to display - export: str - Format for export file - - Returns - ------- - List - List of tickers screened diff --git a/website/content/SDK/stocks/options/screen/screener_output/_index.rst b/website/content/SDK/stocks/options/screen/screener_output/_index.rst new file mode 100644 index 00000000000..e7308214687 --- /dev/null +++ b/website/content/SDK/stocks/options/screen/screener_output/_index.rst @@ -0,0 +1,81 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.options.screen.screener_output( + preset: str, + chart: bool = False, +) -> Tuple[pandas.core.frame.DataFrame, str] +{{< /highlight >}} + +.. raw:: html + +

+ Screen options based on preset filters +

+ +* **Parameters** + + preset: str + Chosen preset + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame: + DataFrame with screener data, or empty if errors + str: + String containing error message if supplied + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.options.screen.screener_output( + preset: str, + limit: int = 20, + export: str = '', + chart: bool = False, +) -> List +{{< /highlight >}} + +.. raw:: html + +

+ Print the output of screener +

+ +* **Parameters** + + preset: str + Chosen preset + limit: int + Number of randomly sorted rows to display + export: str + Format for export file + chart: *bool* + Flag to display chart + + +* **Returns** + + List + List of tickers screened diff --git a/website/content/SDK/stocks/options/unu/_index.md b/website/content/SDK/stocks/options/unu/_index.md deleted file mode 100644 index 8dbae20c545..00000000000 --- a/website/content/SDK/stocks/options/unu/_index.md +++ /dev/null @@ -1,38 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.options.unu(limit: int = 100) - -Get unusual option activity from fdscanner.com - - Parameters - ---------- - limit: int - Number to show - - Returns - ------- - df: pd.DataFrame - Dataframe containing options information - last_updated: pd.Timestamp - Timestamp indicated when data was updated from website - -## Getting charts -### stocks.options.unu(limit: int = 20, sortby: str = 'Vol/OI', ascend: bool = False, calls_only: bool = False, puts_only: bool = False, export: str = '', chart=True) - -Displays the unusual options table - - Parameters - ---------- - limit: int - Number of rows to show - sortby: str - Data column to sort on - ascend: bool - Whether to sort in ascend order - calls_only : bool - Flag to only show calls - puts_only : bool - Flag to show puts only - export: str - File type to export diff --git a/website/content/SDK/stocks/options/unu/_index.rst b/website/content/SDK/stocks/options/unu/_index.rst new file mode 100644 index 00000000000..4cc6820944c --- /dev/null +++ b/website/content/SDK/stocks/options/unu/_index.rst @@ -0,0 +1,84 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.options.unu( + limit: int = 100, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Get unusual option activity from fdscanner.com +

+ +* **Parameters** + + limit: int + Number to show + chart: *bool* + Flag to display chart + + +* **Returns** + + df: pd.DataFrame + Dataframe containing options information + last_updated: pd.Timestamp + Timestamp indicated when data was updated from website + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.options.unu( + limit: int = 20, + sortby: str = 'Vol/OI', ascend: bool = False, + calls_only: bool = False, + puts_only: bool = False, + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Displays the unusual options table +

+ +* **Parameters** + + limit: int + Number of rows to show + sortby: str + Data column to sort on + ascend: bool + Whether to sort in ascend order + calls_only : bool + Flag to only show calls + puts_only : bool + Flag to show puts only + export: str + File type to export + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/options/voi_yf/_index.md b/website/content/SDK/stocks/options/voi_yf/_index.md deleted file mode 100644 index 9e91ca3342b..00000000000 --- a/website/content/SDK/stocks/options/voi_yf/_index.md +++ /dev/null @@ -1,35 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.options.voi_yf(symbol: str, expiry: str) -> pandas.core.frame.DataFrame - -Plot volume and open interest - - Parameters - ---------- - symbol: str - Stock ticker symbol - expiry: str - Option expiration - -## Getting charts -### stocks.options.voi_yf(symbol: str, expiry: str, min_sp: float = -1, max_sp: float = -1, min_vol: float = -1, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Plot volume and open interest - - Parameters - ---------- - symbol: str - Stock ticker symbol - expiry: str - Option expiration - min_sp: float - Min strike price - max_sp: float - Max strike price - min_vol: float - Min volume to consider - export: str - Format for exporting data - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/stocks/options/voi_yf/_index.rst b/website/content/SDK/stocks/options/voi_yf/_index.rst new file mode 100644 index 00000000000..41bfc03f8e2 --- /dev/null +++ b/website/content/SDK/stocks/options/voi_yf/_index.rst @@ -0,0 +1,84 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.options.voi_yf( + symbol: str, + expiry: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Plot volume and open interest +

+ +* **Parameters** + + symbol: str + Stock ticker symbol + expiry: str + Option expiration + chart: *bool* + Flag to display chart + + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.options.voi_yf( + symbol: str, + expiry: str, + min_sp: float = -1, + max_sp: float = -1, + min_vol: float = -1, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Plot volume and open interest +

+ +* **Parameters** + + symbol: str + Stock ticker symbol + expiry: str + Option expiration + min_sp: float + Min strike price + max_sp: float + Max strike price + min_vol: float + Min volume to consider + export: str + Format for exporting data + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/options/vol_yf/_index.md b/website/content/SDK/stocks/options/vol_yf/_index.md deleted file mode 100644 index ad98705d44f..00000000000 --- a/website/content/SDK/stocks/options/vol_yf/_index.md +++ /dev/null @@ -1,37 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.options.vol_yf(symbol: str, expiry: str) -> pandas.core.frame.DataFrame - -Plot volume - - Parameters - ---------- - symbol: str - Ticker symbol - expiry: str - expiration date for options - -## Getting charts -### stocks.options.vol_yf(symbol: str, expiry: str, min_sp: float = -1, max_sp: float = -1, calls_only: bool = False, puts_only: bool = False, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Plot volume - - Parameters - ---------- - symbol: str - Ticker symbol - expiry: str - expiration date for options - min_sp: float - Min strike to consider - max_sp: float - Max strike to consider - calls_only: bool - Show calls only - puts_only: bool - Show puts only - export: str - Format to export file - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/stocks/options/vol_yf/_index.rst b/website/content/SDK/stocks/options/vol_yf/_index.rst new file mode 100644 index 00000000000..52f75083cc7 --- /dev/null +++ b/website/content/SDK/stocks/options/vol_yf/_index.rst @@ -0,0 +1,87 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.options.vol_yf( + symbol: str, + expiry: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Plot volume +

+ +* **Parameters** + + symbol: str + Ticker symbol + expiry: str + expiration date for options + chart: *bool* + Flag to display chart + + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.options.vol_yf( + symbol: str, + expiry: str, + min_sp: float = -1, + max_sp: float = -1, + calls_only: bool = False, + puts_only: bool = False, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Plot volume +

+ +* **Parameters** + + symbol: str + Ticker symbol + expiry: str + expiration date for options + min_sp: float + Min strike to consider + max_sp: float + Max strike to consider + calls_only: bool + Show calls only + puts_only: bool + Show puts only + export: str + Format to export file + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/options/vsurf/_index.md b/website/content/SDK/stocks/options/vsurf/_index.md deleted file mode 100644 index 0c848ae234e..00000000000 --- a/website/content/SDK/stocks/options/vsurf/_index.md +++ /dev/null @@ -1,32 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.options.vsurf(symbol: str) -> pandas.core.frame.DataFrame - -Gets IV surface for calls and puts for ticker - - Parameters - ---------- - symbol: str - Stock ticker symbol to get - - Returns - ------- - pd.DataFrame - Dataframe of DTE, Strike and IV - -## Getting charts -### stocks.options.vsurf(symbol: str, export: str = '', z: str = 'IV', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display vol surface - - Parameters - ---------- - symbol : str - Ticker symbol to get surface for - export : str - Format to export data - z : str - The variable for the Z axis - external_axes: Optional[List[plt.Axes]] - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/stocks/options/vsurf/_index.rst b/website/content/SDK/stocks/options/vsurf/_index.rst new file mode 100644 index 00000000000..3e86ebb5885 --- /dev/null +++ b/website/content/SDK/stocks/options/vsurf/_index.rst @@ -0,0 +1,77 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.options.vsurf( + symbol: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Gets IV surface for calls and puts for ticker +

+ +* **Parameters** + + symbol: str + Stock ticker symbol to get + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Dataframe of DTE, Strike and IV + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.options.vsurf( + symbol: str, + export: str = '', + z: str = 'IV', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display vol surface +

+ +* **Parameters** + + symbol : str + Ticker symbol to get surface for + export : str + Format to export data + z : str + The variable for the Z axis + external_axes: Optional[List[plt.Axes]] + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/options/x_values/_index.md b/website/content/SDK/stocks/options/x_values/_index.md deleted file mode 100644 index 6af1e7228ad..00000000000 --- a/website/content/SDK/stocks/options/x_values/_index.md +++ /dev/null @@ -1,4 +0,0 @@ -## Get underlying data -### stocks.options.x_values(current_price: float, options: List[Dict[str, int]]) -> List[float] - -Generates different price values that need to be t diff --git a/website/content/SDK/stocks/options/x_values/_index.rst b/website/content/SDK/stocks/options/x_values/_index.rst new file mode 100644 index 00000000000..1e246cf5053 --- /dev/null +++ b/website/content/SDK/stocks/options/x_values/_index.rst @@ -0,0 +1,25 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.options.x_values( + current_price: float, + options: List[Dict[str, int]], + chart: bool = False, +) -> List[float] +{{< /highlight >}} + +.. raw:: html + +

+ Generates different price values that need to be teste +

diff --git a/website/content/SDK/stocks/options/y_values/_index.md b/website/content/SDK/stocks/options/y_values/_index.md deleted file mode 100644 index 186b083a1fa..00000000000 --- a/website/content/SDK/stocks/options/y_values/_index.md +++ /dev/null @@ -1,4 +0,0 @@ -## Get underlying data -### stocks.options.y_values(base: float, price: float, options: List[Dict[Any, Any]], underlying: int) -> float - -Generates y values for corresponding x v diff --git a/website/content/SDK/stocks/options/y_values/_index.rst b/website/content/SDK/stocks/options/y_values/_index.rst new file mode 100644 index 00000000000..a236e1987a3 --- /dev/null +++ b/website/content/SDK/stocks/options/y_values/_index.rst @@ -0,0 +1,27 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.options.y_values( + base: float, + price: float, + options: List[Dict[Any, Any]], + underlying: int, + chart: bool = False, +) -> float +{{< /highlight >}} + +.. raw:: html + +

+ Generates y values for corresponding x value +

diff --git a/website/content/SDK/stocks/process_candle/_index.md b/website/content/SDK/stocks/process_candle/_index.md deleted file mode 100644 index 36e641535ec..00000000000 --- a/website/content/SDK/stocks/process_candle/_index.md +++ /dev/null @@ -1,15 +0,0 @@ -## Get underlying data -### stocks.process_candle(data: pandas.core.frame.DataFrame) -> pandas.core.frame.DataFrame - -Process DataFrame into candle style plot. - - Parameters - ---------- - data : DataFrame - Stock dataframe. - - Returns - ------- - DataFrame - A Panda's data frame with columns Open, High, Low, Close, Adj Close, Volume, - date_id, OC-High, OC-Low. diff --git a/website/content/SDK/stocks/process_candle/_index.rst b/website/content/SDK/stocks/process_candle/_index.rst new file mode 100644 index 00000000000..0ed5eaa11d0 --- /dev/null +++ b/website/content/SDK/stocks/process_candle/_index.rst @@ -0,0 +1,35 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.process_candle( + data: pandas.core.frame.DataFrame, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Process DataFrame into candle style plot. +

+ +* **Parameters** + + data : DataFrame + Stock dataframe. + +* **Returns** + + DataFrame + A Panda's data frame with columns Open, High, Low, Close, Adj Close, Volume, + date_id, OC-High, OC-Low. diff --git a/website/content/SDK/stocks/qa/capm_information/_index.md b/website/content/SDK/stocks/qa/capm_information/_index.md deleted file mode 100644 index dc3e7cb1d57..00000000000 --- a/website/content/SDK/stocks/qa/capm_information/_index.md +++ /dev/null @@ -1,16 +0,0 @@ -## Get underlying data -### stocks.qa.capm_information(symbol: str) -> Tuple[float, float] - -Provides information that relates to the CAPM model - - Parameters - ---------- - symbol : str - A ticker symbol in string form - - Returns - ------- - beta : float - The beta for a stock - sys : float - The systematic risk for a stock diff --git a/website/content/SDK/stocks/qa/capm_information/_index.rst b/website/content/SDK/stocks/qa/capm_information/_index.rst new file mode 100644 index 00000000000..31474a67e6f --- /dev/null +++ b/website/content/SDK/stocks/qa/capm_information/_index.rst @@ -0,0 +1,36 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.qa.capm_information( + symbol: str, + chart: bool = False, +) -> Tuple[float, float] +{{< /highlight >}} + +.. raw:: html + +

+ Provides information that relates to the CAPM model +

+ +* **Parameters** + + symbol : str + A ticker symbol in string form + +* **Returns** + + beta : float + The beta for a stock + sys : float + The systematic risk for a stock diff --git a/website/content/SDK/stocks/qa/fama_raw/_index.md b/website/content/SDK/stocks/qa/fama_raw/_index.md deleted file mode 100644 index f625504e63b..00000000000 --- a/website/content/SDK/stocks/qa/fama_raw/_index.md +++ /dev/null @@ -1,9 +0,0 @@ -## Get underlying data -### stocks.qa.fama_raw() -> pandas.core.frame.DataFrame - -Gets base Fama French data to calculate risk - - Returns - ---------- - fama : pd.DataFrame - A data with fama french model information diff --git a/website/content/SDK/stocks/qa/fama_raw/_index.rst b/website/content/SDK/stocks/qa/fama_raw/_index.rst new file mode 100644 index 00000000000..555675788e8 --- /dev/null +++ b/website/content/SDK/stocks/qa/fama_raw/_index.rst @@ -0,0 +1,26 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.qa.fama_raw() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Gets base Fama French data to calculate risk +

+ +* **Returns** + + fama : pd.DataFrame + A data with fama french model information diff --git a/website/content/SDK/stocks/qa/historical_5/_index.md b/website/content/SDK/stocks/qa/historical_5/_index.md deleted file mode 100644 index 59a866f0a5b..00000000000 --- a/website/content/SDK/stocks/qa/historical_5/_index.md +++ /dev/null @@ -1,14 +0,0 @@ -## Get underlying data -### stocks.qa.historical_5(symbol: str) -> pandas.core.frame.DataFrame - -Get 5 year monthly historical performance for a ticker with dividends filtered - - Parameters - ---------- - symbol : str - A ticker symbol in string form - - Returns - ---------- - data : pd.DataFrame - A dataframe with historical information diff --git a/website/content/SDK/stocks/qa/historical_5/_index.rst b/website/content/SDK/stocks/qa/historical_5/_index.rst new file mode 100644 index 00000000000..6d5355ca8e1 --- /dev/null +++ b/website/content/SDK/stocks/qa/historical_5/_index.rst @@ -0,0 +1,34 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.qa.historical_5( + symbol: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get 5 year monthly historical performance for a ticker with dividends filtered +

+ +* **Parameters** + + symbol : str + A ticker symbol in string form + +* **Returns** + + data : pd.DataFrame + A dataframe with historical information diff --git a/website/content/SDK/stocks/quote/_index.md b/website/content/SDK/stocks/quote/_index.md deleted file mode 100644 index 8837975f8f2..00000000000 --- a/website/content/SDK/stocks/quote/_index.md +++ /dev/null @@ -1,9 +0,0 @@ -## Get underlying data -### stocks.quote(symbol: str) -> pandas.core.frame.DataFrame - -Ticker quote. - - Parameters - ---------- - symbol : str - Ticker diff --git a/website/content/SDK/stocks/quote/_index.rst b/website/content/SDK/stocks/quote/_index.rst new file mode 100644 index 00000000000..437ca365448 --- /dev/null +++ b/website/content/SDK/stocks/quote/_index.rst @@ -0,0 +1,29 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.quote( + symbol: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Ticker quote. [Source: YahooFinance] +

+ +* **Parameters** + + symbol : str + Ticker diff --git a/website/content/SDK/stocks/screener/historical/_index.md b/website/content/SDK/stocks/screener/historical/_index.md deleted file mode 100644 index 08174b0ae1d..00000000000 --- a/website/content/SDK/stocks/screener/historical/_index.md +++ /dev/null @@ -1,55 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.screener.historical(preset_loaded: str = 'top_gainers', limit: int = 10, start_date: str = '2022-05-07', type_candle: str = 'a', normalize: bool = True) - -View historical price of stocks that meet preset - - Parameters - ---------- - preset_loaded: str - Preset loaded to filter for tickers - limit: int - Number of stocks to display - start_date: str - Start date to display historical data, in YYYY-MM-DD format - type_candle: str - Type of candle to display - normalize : bool - Boolean to normalize all stock prices using MinMax - - Returns - ------- - pd.DataFrame - Dataframe of the screener - list[str] - List of stocks - bool - Whether some random stock selection due to limitations - -## Getting charts -### stocks.screener.historical(preset_loaded: str = 'top_gainers', limit: int = 10, start_date: str = '2022-05-07', type_candle: str = 'a', normalize: bool = True, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) -> List[str] - -View historical price of stocks that meet preset - - Parameters - ---------- - preset_loaded: str - Preset loaded to filter for tickers - limit: int - Number of stocks to display - start_date: str - Start date to display historical data, in YYYY-MM-DD format - type_candle: str - Type of candle to display - normalize : bool - Boolean to normalize all stock prices using MinMax - export : str - Export dataframe data to csv,json,xlsx file - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None - - Returns - ------- - list[str] - List of stocks diff --git a/website/content/SDK/stocks/screener/historical/_index.rst b/website/content/SDK/stocks/screener/historical/_index.rst new file mode 100644 index 00000000000..33681c2ccd0 --- /dev/null +++ b/website/content/SDK/stocks/screener/historical/_index.rst @@ -0,0 +1,107 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.screener.historical( + preset_loaded: str = 'top_gainers', + limit: int = 10, + start_date: str = '2022-05-12', + type_candle: str = 'a', + normalize: bool = True, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ View historical price of stocks that meet preset +

+ +* **Parameters** + + preset_loaded: str + Preset loaded to filter for tickers + limit: int + Number of stocks to display + start_date: str + Start date to display historical data, in YYYY-MM-DD format + type_candle: str + Type of candle to display + normalize : bool + Boolean to normalize all stock prices using MinMax + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Dataframe of the screener + list[str] + List of stocks + bool + Whether some random stock selection due to limitations + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.screener.historical( + preset_loaded: str = 'top_gainers', + limit: int = 10, + start_date: str = '2022-05-12', + type_candle: str = 'a', + normalize: bool = True, + export: str = '', + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) -> List[str] +{{< /highlight >}} + +.. raw:: html + +

+ View historical price of stocks that meet preset +

+ +* **Parameters** + + preset_loaded: str + Preset loaded to filter for tickers + limit: int + Number of stocks to display + start_date: str + Start date to display historical data, in YYYY-MM-DD format + type_candle: str + Type of candle to display + normalize : bool + Boolean to normalize all stock prices using MinMax + export : str + Export dataframe data to csv,json,xlsx file + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + + +* **Returns** + + list[str] + List of stocks diff --git a/website/content/SDK/stocks/screener/screener_data/_index.md b/website/content/SDK/stocks/screener/screener_data/_index.md deleted file mode 100644 index de34cc5bce9..00000000000 --- a/website/content/SDK/stocks/screener/screener_data/_index.md +++ /dev/null @@ -1,47 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.screener.screener_data(preset_loaded: str = 'top_gainers', data_type: str = 'overview', limit: int = 10, ascend: bool = False) - -Screener Overview - - Parameters - ---------- - preset_loaded : str - Loaded preset filter - data_type : str - Data type between: overview, valuation, financial, ownership, performance, technical - limit : int - Limit of stocks filtered with presets to print - ascend : bool - Ascended order of stocks filtered to print - - Returns - ---------- - pd.DataFrame - Dataframe with loaded filtered stocks - -## Getting charts -### stocks.screener.screener_data(loaded_preset: str = 'top_gainers', data_type: str = 'overview', limit: int = 10, ascend: bool = False, sortby: str = '', export: str = '', chart=True) -> List[str] - -Screener one of the following: overview, valuation, financial, ownership, performance, technical. - - Parameters - ---------- - loaded_preset: str - Preset loaded to filter for tickers - data_type : str - Data type string between: overview, valuation, financial, ownership, performance, technical - limit : int - Limit of stocks to display - ascend : bool - Order of table to ascend or descend - sortby: str - Column to sort table by - export : str - Export dataframe data to csv,json,xlsx file - - Returns - ------- - List[str] - List of stocks that meet preset criteria diff --git a/website/content/SDK/stocks/screener/screener_data/_index.rst b/website/content/SDK/stocks/screener/screener_data/_index.rst new file mode 100644 index 00000000000..ccc7d756bd9 --- /dev/null +++ b/website/content/SDK/stocks/screener/screener_data/_index.rst @@ -0,0 +1,97 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.screener.screener_data( + preset_loaded: str = 'top_gainers', + data_type: str = 'overview', + limit: int = 10, + ascend: bool = False, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Screener Overview +

+ +* **Parameters** + + preset_loaded : str + Loaded preset filter + data_type : str + Data type between: overview, valuation, financial, ownership, performance, technical + limit : int + Limit of stocks filtered with presets to print + ascend : bool + Ascended order of stocks filtered to print + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Dataframe with loaded filtered stocks + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.screener.screener_data( + loaded_preset: str = 'top_gainers', + data_type: str = 'overview', + limit: int = 10, + ascend: bool = False, + sortby: str = '', + export: str = '', + chart: bool = False, +) -> List[str] +{{< /highlight >}} + +.. raw:: html + +

+ Screener one of the following: overview, valuation, financial, ownership, performance, technical. +

+ +* **Parameters** + + loaded_preset: str + Preset loaded to filter for tickers + data_type : str + Data type string between: overview, valuation, financial, ownership, performance, technical + limit : int + Limit of stocks to display + ascend : bool + Order of table to ascend or descend + sortby: str + Column to sort table by + export : str + Export dataframe data to csv,json,xlsx file + chart: *bool* + Flag to display chart + + +* **Returns** + + List[str] + List of stocks that meet preset criteria diff --git a/website/content/SDK/stocks/search/_index.md b/website/content/SDK/stocks/search/_index.rst similarity index 50% rename from website/content/SDK/stocks/search/_index.md rename to website/content/SDK/stocks/search/_index.rst index 96978a2e5f5..56c5d7c21ca 100644 --- a/website/content/SDK/stocks/search/_index.md +++ b/website/content/SDK/stocks/search/_index.rst @@ -1,10 +1,36 @@ -## Get underlying data -### stocks.search(query: str = '', country: str = '', sector: str = '', industry: str = '', exchange_country: str = '', limit: int = 0, export: str = '') -> None +.. role:: python(code) + :language: python + :class: highlight -Search selected query for tickers. +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.search( + query: str = '', + country: str = '', + sector: str = '', + industry: str = '', + exchange_country: str = '', + limit: int = 0, + export: str = '', + chart: bool = False, +) -> None +{{< /highlight >}} + +.. raw:: html + +

+ Search selected query for tickers. +

+ +* **Parameters** - Parameters - ---------- query : str The search term used to find company tickers country: str diff --git a/website/content/SDK/stocks/sia/countries/_index.md b/website/content/SDK/stocks/sia/countries/_index.md deleted file mode 100644 index e963a84476a..00000000000 --- a/website/content/SDK/stocks/sia/countries/_index.md +++ /dev/null @@ -1,16 +0,0 @@ -## Get underlying data -### stocks.sia.countries(industry: str = '', sector: str = '') -> list - -Get all countries in Yahoo Finance data based on sector or industry. [Source: Finance Database] - - Parameters - ---------- - industry : str - Filter retrieved countries by industry - sector : str - Filter retrieved countries by sector - - Returns - ------- - list - List of possible countries diff --git a/website/content/SDK/stocks/sia/countries/_index.rst b/website/content/SDK/stocks/sia/countries/_index.rst new file mode 100644 index 00000000000..8f5c7787336 --- /dev/null +++ b/website/content/SDK/stocks/sia/countries/_index.rst @@ -0,0 +1,37 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.sia.countries( + industry: str = '', + sector: str = '', + chart: bool = False, +) -> list +{{< /highlight >}} + +.. raw:: html + +

+ Get all countries in Yahoo Finance data based on sector or industry. [Source: Finance Database] +

+ +* **Parameters** + + industry : str + Filter retrieved countries by industry + sector : str + Filter retrieved countries by sector + +* **Returns** + + list + List of possible countries diff --git a/website/content/SDK/stocks/sia/cpci/_index.md b/website/content/SDK/stocks/sia/cpci/_index.md deleted file mode 100644 index df17b59f1a1..00000000000 --- a/website/content/SDK/stocks/sia/cpci/_index.md +++ /dev/null @@ -1,45 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.sia.cpci(industry: str = 'Internet Content & Information', mktcap: str = 'Large', exclude_exchanges: bool = True) -> dict - -Get number of companies per country in a specific industry (and specific market cap). - [Source: Finance Database] - - Parameters - ---------- - industry: str - Select industry to get number of companies by each country - mktcap: str - Select market cap of companies to consider from Small, Mid and Large - exclude_exchanges : bool - Exclude international exchanges - - Returns - ------- - dict - Dictionary of countries and number of companies in a specific sector - -## Getting charts -### stocks.sia.cpci(industry: str = 'Internet Content & Information', mktcap: str = 'Large', exclude_exchanges: bool = True, export: str = '', raw: bool = False, max_countries_to_display: int = 15, min_pct_to_display_country: float = 0.015, external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display number of companies per country in a specific industry. [Source: Finance Database] - - Parameters - ---------- - industry: str - Select industry to get number of companies by each country - mktcap: str - Select market cap of companies to consider from Small, Mid and Large - exclude_exchanges : bool - Exclude international exchanges - export: str - Format to export data as - raw: bool - Output all raw data - max_countries_to_display: int - Maximum number of countries to display - min_pct_to_display_country: float - Minimum percentage to display country - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/stocks/sia/cpci/_index.rst b/website/content/SDK/stocks/sia/cpci/_index.rst new file mode 100644 index 00000000000..9c609d422df --- /dev/null +++ b/website/content/SDK/stocks/sia/cpci/_index.rst @@ -0,0 +1,94 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.sia.cpci( + industry: str = 'Internet Content & Information', mktcap: str = 'Large', + exclude_exchanges: bool = True, + chart: bool = False, +) -> dict +{{< /highlight >}} + +.. raw:: html + +

+ Get number of companies per country in a specific industry (and specific market cap). + [Source: Finance Database] +

+ +* **Parameters** + + industry: str + Select industry to get number of companies by each country + mktcap: str + Select market cap of companies to consider from Small, Mid and Large + exclude_exchanges : bool + Exclude international exchanges + chart: *bool* + Flag to display chart + + +* **Returns** + + dict + Dictionary of countries and number of companies in a specific sector + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.sia.cpci( + industry: str = 'Internet Content & Information', mktcap: str = 'Large', + exclude_exchanges: bool = True, + export: str = '', + raw: bool = False, + max_countries_to_display: int = 15, + min_pct_to_display_country: float = 0.015, + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display number of companies per country in a specific industry. [Source: Finance Database] +

+ +* **Parameters** + + industry: str + Select industry to get number of companies by each country + mktcap: str + Select market cap of companies to consider from Small, Mid and Large + exclude_exchanges : bool + Exclude international exchanges + export: str + Format to export data as + raw: bool + Output all raw data + max_countries_to_display: int + Maximum number of countries to display + min_pct_to_display_country: float + Minimum percentage to display country + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/sia/cpcs/_index.md b/website/content/SDK/stocks/sia/cpcs/_index.md deleted file mode 100644 index ac8f9ac62b3..00000000000 --- a/website/content/SDK/stocks/sia/cpcs/_index.md +++ /dev/null @@ -1,45 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.sia.cpcs(sector: str = 'Technology', mktcap: str = 'Large', exclude_exchanges: bool = True) -> dict - -Get number of companies per country in a specific sector (and specific market cap). - [Source: Finance Database] - - Parameters - ---------- - sector: str - Select sector to get number of companies by each country - mktcap: str - Select market cap of companies to consider from Small, Mid and Large - exclude_exchanges : bool - Exclude international exchanges - - Returns - ------- - dict - Dictionary of countries and number of companies in a specific sector - -## Getting charts -### stocks.sia.cpcs(sector: str = 'Technology', mktcap: str = 'Large', exclude_exchanges: bool = True, export: str = '', raw: bool = False, max_countries_to_display: int = 15, min_pct_to_display_country: float = 0.015, external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display number of companies per country in a specific sector. [Source: Finance Database] - - Parameters - ---------- - sector: str - Select sector to get number of companies by each country - mktcap: str - Select market cap of companies to consider from Small, Mid and Large - exclude_exchanges : bool - Exclude international exchanges - export: str - Format to export data as - raw: bool - Output all raw data - max_countries_to_display: int - Maximum number of countries to display - min_pct_to_display_country: float - Minimum percentage to display country - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/stocks/sia/cpcs/_index.rst b/website/content/SDK/stocks/sia/cpcs/_index.rst new file mode 100644 index 00000000000..e8512ec1549 --- /dev/null +++ b/website/content/SDK/stocks/sia/cpcs/_index.rst @@ -0,0 +1,96 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.sia.cpcs( + sector: str = 'Technology', + mktcap: str = 'Large', + exclude_exchanges: bool = True, + chart: bool = False, +) -> dict +{{< /highlight >}} + +.. raw:: html + +

+ Get number of companies per country in a specific sector (and specific market cap). + [Source: Finance Database] +

+ +* **Parameters** + + sector: str + Select sector to get number of companies by each country + mktcap: str + Select market cap of companies to consider from Small, Mid and Large + exclude_exchanges : bool + Exclude international exchanges + chart: *bool* + Flag to display chart + + +* **Returns** + + dict + Dictionary of countries and number of companies in a specific sector + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.sia.cpcs( + sector: str = 'Technology', + mktcap: str = 'Large', + exclude_exchanges: bool = True, + export: str = '', + raw: bool = False, + max_countries_to_display: int = 15, + min_pct_to_display_country: float = 0.015, + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display number of companies per country in a specific sector. [Source: Finance Database] +

+ +* **Parameters** + + sector: str + Select sector to get number of companies by each country + mktcap: str + Select market cap of companies to consider from Small, Mid and Large + exclude_exchanges : bool + Exclude international exchanges + export: str + Format to export data as + raw: bool + Output all raw data + max_countries_to_display: int + Maximum number of countries to display + min_pct_to_display_country: float + Minimum percentage to display country + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/sia/cpic/_index.md b/website/content/SDK/stocks/sia/cpic/_index.md deleted file mode 100644 index baf7d6b27cc..00000000000 --- a/website/content/SDK/stocks/sia/cpic/_index.md +++ /dev/null @@ -1,46 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.sia.cpic(country: str = 'United States', mktcap: str = 'Large', exclude_exchanges: bool = True) - -Get number of companies per industry in a specific country (and specific market cap). - [Source: Finance Database] - - Parameters - ---------- - country: str - Select country to get number of companies by each industry - mktcap: str - Select market cap of companies to consider from Small, Mid and Large - exclude_exchanges : bool - Exclude international exchanges - - Returns - ------- - dict - Dictionary of industries and number of companies in a specific country - -## Getting charts -### stocks.sia.cpic(country: str = 'United States', mktcap: str = 'Large', exclude_exchanges: bool = True, export: str = '', raw: bool = False, max_industries_to_display: int = 15, min_pct_to_display_industry: float = 0.015, external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display number of companies per industry in a specific country. [Source: Finance Database] - - Parameters - ---------- - country: str - Select country to get number of companies by each industry - mktcap: str - Select market cap of companies to consider from Small, Mid and Large - exclude_exchanges : bool - Exclude international exchanges - export: str - Format to export data as - raw: bool - Output all raw data - max_industries_to_display: int - Maximum number of industries to display - min_pct_to_display_industry: float - Minimum percentage to display industry - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None - diff --git a/website/content/SDK/stocks/sia/cpic/_index.rst b/website/content/SDK/stocks/sia/cpic/_index.rst new file mode 100644 index 00000000000..f6daa811236 --- /dev/null +++ b/website/content/SDK/stocks/sia/cpic/_index.rst @@ -0,0 +1,96 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.sia.cpic( + country: str = 'United States', + mktcap: str = 'Large', + exclude_exchanges: bool = True, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Get number of companies per industry in a specific country (and specific market cap). + [Source: Finance Database] +

+ +* **Parameters** + + country: str + Select country to get number of companies by each industry + mktcap: str + Select market cap of companies to consider from Small, Mid and Large + exclude_exchanges : bool + Exclude international exchanges + chart: *bool* + Flag to display chart + + +* **Returns** + + dict + Dictionary of industries and number of companies in a specific country + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.sia.cpic( + country: str = 'United States', + mktcap: str = 'Large', + exclude_exchanges: bool = True, + export: str = '', + raw: bool = False, + max_industries_to_display: int = 15, + min_pct_to_display_industry: float = 0.015, + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display number of companies per industry in a specific country. [Source: Finance Database] +

+ +* **Parameters** + + country: str + Select country to get number of companies by each industry + mktcap: str + Select market cap of companies to consider from Small, Mid and Large + exclude_exchanges : bool + Exclude international exchanges + export: str + Format to export data as + raw: bool + Output all raw data + max_industries_to_display: int + Maximum number of industries to display + min_pct_to_display_industry: float + Minimum percentage to display industry + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/sia/cpis/_index.md b/website/content/SDK/stocks/sia/cpis/_index.md deleted file mode 100644 index b27e0f291fe..00000000000 --- a/website/content/SDK/stocks/sia/cpis/_index.md +++ /dev/null @@ -1,45 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.sia.cpis(sector: str = 'Technology', mktcap: str = 'Large', exclude_exchanges: bool = True) -> dict - -Get number of companies per industry in a specific sector (and specific market cap). - [Source: Finance Database] - - Parameters - ---------- - sector: str - Select sector to get number of companies by each industry - mktcap: str - Select market cap of companies to consider from Small, Mid and Large - exclude_exchanges : bool - Exclude international exchanges - - Returns - ------- - dict - Dictionary of industries and number of companies in a specific sector - -## Getting charts -### stocks.sia.cpis(sector: str = 'Technology', mktcap: str = 'Large', exclude_exchanges: bool = True, export: str = '', raw: bool = False, max_industries_to_display: int = 15, min_pct_to_display_industry: float = 0.015, external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display number of companies per industry in a specific sector. [Source: Finance Database] - - Parameters - ---------- - sector: str - Select sector to get number of companies by each industry - mktcap: str - Select market cap of companies to consider from Small, Mid and Large - exclude_exchanges : bool - Exclude international exchanges - export: str - Format to export data as - raw: bool - Output all raw data - max_industries_to_display: int - Maximum number of industries to display - min_pct_to_display_industry: float - Minimum percentage to display industry - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/stocks/sia/cpis/_index.rst b/website/content/SDK/stocks/sia/cpis/_index.rst new file mode 100644 index 00000000000..02e7d99860a --- /dev/null +++ b/website/content/SDK/stocks/sia/cpis/_index.rst @@ -0,0 +1,96 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.sia.cpis( + sector: str = 'Technology', + mktcap: str = 'Large', + exclude_exchanges: bool = True, + chart: bool = False, +) -> dict +{{< /highlight >}} + +.. raw:: html + +

+ Get number of companies per industry in a specific sector (and specific market cap). + [Source: Finance Database] +

+ +* **Parameters** + + sector: str + Select sector to get number of companies by each industry + mktcap: str + Select market cap of companies to consider from Small, Mid and Large + exclude_exchanges : bool + Exclude international exchanges + chart: *bool* + Flag to display chart + + +* **Returns** + + dict + Dictionary of industries and number of companies in a specific sector + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.sia.cpis( + sector: str = 'Technology', + mktcap: str = 'Large', + exclude_exchanges: bool = True, + export: str = '', + raw: bool = False, + max_industries_to_display: int = 15, + min_pct_to_display_industry: float = 0.015, + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display number of companies per industry in a specific sector. [Source: Finance Database] +

+ +* **Parameters** + + sector: str + Select sector to get number of companies by each industry + mktcap: str + Select market cap of companies to consider from Small, Mid and Large + exclude_exchanges : bool + Exclude international exchanges + export: str + Format to export data as + raw: bool + Output all raw data + max_industries_to_display: int + Maximum number of industries to display + min_pct_to_display_industry: float + Minimum percentage to display industry + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/sia/cps/_index.md b/website/content/SDK/stocks/sia/cps/_index.md deleted file mode 100644 index d6fd60e037d..00000000000 --- a/website/content/SDK/stocks/sia/cps/_index.md +++ /dev/null @@ -1,44 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.sia.cps(country: str = 'United States', mktcap: str = 'Large', exclude_exchanges: bool = True) -> dict - -Get number of companies per sector in a specific country (and specific market cap). [Source: Finance Database] - - Parameters - ---------- - country: str - Select country to get number of companies by each sector - mktcap: str - Select market cap of companies to consider from Small, Mid and Large - exclude_exchanges : bool - Exclude international exchanges - - Returns - ------- - dict - Dictionary of sectors and number of companies in a specific country - -## Getting charts -### stocks.sia.cps(country: str = 'United States', mktcap: str = 'Large', exclude_exchanges: bool = True, export: str = '', raw: bool = False, max_sectors_to_display: int = 15, min_pct_to_display_sector: float = 0.015, external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -Display number of companies per sector in a specific country (and market cap). [Source: Finance Database] - - Parameters - ---------- - country: str - Select country to get number of companies by each sector - mktcap: str - Select market cap of companies to consider from Small, Mid and Large - exclude_exchanges : bool - Exclude international exchanges - export: str - Format to export data as - raw: bool - Output all raw data - max_sectors_to_display: int - Maximum number of sectors to display - min_pct_to_display_sector: float - Minimum percentage to display sector - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/stocks/sia/cps/_index.rst b/website/content/SDK/stocks/sia/cps/_index.rst new file mode 100644 index 00000000000..d455f4fa8d8 --- /dev/null +++ b/website/content/SDK/stocks/sia/cps/_index.rst @@ -0,0 +1,95 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.sia.cps( + country: str = 'United States', + mktcap: str = 'Large', + exclude_exchanges: bool = True, + chart: bool = False, +) -> dict +{{< /highlight >}} + +.. raw:: html + +

+ Get number of companies per sector in a specific country (and specific market cap). [Source: Finance Database] +

+ +* **Parameters** + + country: str + Select country to get number of companies by each sector + mktcap: str + Select market cap of companies to consider from Small, Mid and Large + exclude_exchanges : bool + Exclude international exchanges + chart: *bool* + Flag to display chart + + +* **Returns** + + dict + Dictionary of sectors and number of companies in a specific country + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.sia.cps( + country: str = 'United States', + mktcap: str = 'Large', + exclude_exchanges: bool = True, + export: str = '', + raw: bool = False, + max_sectors_to_display: int = 15, + min_pct_to_display_sector: float = 0.015, + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display number of companies per sector in a specific country (and market cap). [Source: Finance Database] +

+ +* **Parameters** + + country: str + Select country to get number of companies by each sector + mktcap: str + Select market cap of companies to consider from Small, Mid and Large + exclude_exchanges : bool + Exclude international exchanges + export: str + Format to export data as + raw: bool + Output all raw data + max_sectors_to_display: int + Maximum number of sectors to display + min_pct_to_display_sector: float + Minimum percentage to display sector + external_axes : Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/sia/filter_stocks/_index.md b/website/content/SDK/stocks/sia/filter_stocks/_index.md deleted file mode 100644 index 81b761cfcfc..00000000000 --- a/website/content/SDK/stocks/sia/filter_stocks/_index.md +++ /dev/null @@ -1,23 +0,0 @@ -## Get underlying data -### stocks.sia.filter_stocks(country: str = None, sector: str = None, industry: str = None, marketcap: str = '', exclude_exchanges: bool = True) -> list - -Filter stocks based on country, sector, industry, market cap and exclude exchanges. - [Source: Finance Database] - - Parameters - ---------- - country: str - Search by country to find stocks matching the criteria. - sector: str - Search by sector to find stocks matching the criteria. - industry: str - Search by industry to find stocks matching the criteria. - marketcap: str - Select stocks based on the market cap. - exclude_exchanges: bool - When you wish to include different exchanges use this boolean. - - Returns - ------- - list - List of filtered stocks diff --git a/website/content/SDK/stocks/sia/filter_stocks/_index.rst b/website/content/SDK/stocks/sia/filter_stocks/_index.rst new file mode 100644 index 00000000000..ad36f152d19 --- /dev/null +++ b/website/content/SDK/stocks/sia/filter_stocks/_index.rst @@ -0,0 +1,47 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.sia.filter_stocks( + country: str = None, + sector: str = None, + industry: str = None, + marketcap: str = '', + exclude_exchanges: bool = True, + chart: bool = False, +) -> list +{{< /highlight >}} + +.. raw:: html + +

+ Filter stocks based on country, sector, industry, market cap and exclude exchanges. + [Source: Finance Database] +

+ +* **Parameters** + + country: str + Search by country to find stocks matching the criteria. + sector: str + Search by sector to find stocks matching the criteria. + industry: str + Search by industry to find stocks matching the criteria. + marketcap: str + Select stocks based on the market cap. + exclude_exchanges: bool + When you wish to include different exchanges use this boolean. + +* **Returns** + + list + List of filtered stocks diff --git a/website/content/SDK/stocks/sia/industries/_index.md b/website/content/SDK/stocks/sia/industries/_index.md deleted file mode 100644 index b2c88a08f4d..00000000000 --- a/website/content/SDK/stocks/sia/industries/_index.md +++ /dev/null @@ -1,16 +0,0 @@ -## Get underlying data -### stocks.sia.industries(country: str = '', sector: str = '') -> list - -Get all industries in Yahoo Finance data based on country or sector. [Source: Finance Database] - - Parameters - ---------- - country : str - Filter retrieved industries by country - sector : str - Filter retrieved industries by sector - - Returns - ------- - list - List of possible industries diff --git a/website/content/SDK/stocks/sia/industries/_index.rst b/website/content/SDK/stocks/sia/industries/_index.rst new file mode 100644 index 00000000000..b6560edca0f --- /dev/null +++ b/website/content/SDK/stocks/sia/industries/_index.rst @@ -0,0 +1,37 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.sia.industries( + country: str = '', + sector: str = '', + chart: bool = False, +) -> list +{{< /highlight >}} + +.. raw:: html + +

+ Get all industries in Yahoo Finance data based on country or sector. [Source: Finance Database] +

+ +* **Parameters** + + country : str + Filter retrieved industries by country + sector : str + Filter retrieved industries by sector + +* **Returns** + + list + List of possible industries diff --git a/website/content/SDK/stocks/sia/maketcap/_index.md b/website/content/SDK/stocks/sia/maketcap/_index.md deleted file mode 100644 index e1f510698eb..00000000000 --- a/website/content/SDK/stocks/sia/maketcap/_index.md +++ /dev/null @@ -1,9 +0,0 @@ -## Get underlying data -### stocks.sia.maketcap() -> list - -Get all market cap division in Yahoo Finance data. [Source: Finance Database] - - Returns - ------- - list - List of possible market caps diff --git a/website/content/SDK/stocks/sia/maketcap/_index.rst b/website/content/SDK/stocks/sia/maketcap/_index.rst new file mode 100644 index 00000000000..951b8fcd25a --- /dev/null +++ b/website/content/SDK/stocks/sia/maketcap/_index.rst @@ -0,0 +1,26 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.sia.maketcap() -> list +{{< /highlight >}} + +.. raw:: html + +

+ Get all market cap division in Yahoo Finance data. [Source: Finance Database] +

+ +* **Returns** + + list + List of possible market caps diff --git a/website/content/SDK/stocks/sia/sectors/_index.md b/website/content/SDK/stocks/sia/sectors/_index.md deleted file mode 100644 index b496a1c5d23..00000000000 --- a/website/content/SDK/stocks/sia/sectors/_index.md +++ /dev/null @@ -1,16 +0,0 @@ -## Get underlying data -### stocks.sia.sectors(industry: str = '', country: str = '') -> list - -Get all sectors in Yahoo Finance data based on country or industry. [Source: Finance Database] - - Parameters - ---------- - industry : str - Filter retrieved sectors by industry - country : str - Filter retrieved sectors by country - - Returns - ------- - list - List of possible sectors diff --git a/website/content/SDK/stocks/sia/sectors/_index.rst b/website/content/SDK/stocks/sia/sectors/_index.rst new file mode 100644 index 00000000000..b2d359de0c1 --- /dev/null +++ b/website/content/SDK/stocks/sia/sectors/_index.rst @@ -0,0 +1,37 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.sia.sectors( + industry: str = '', + country: str = '', + chart: bool = False, +) -> list +{{< /highlight >}} + +.. raw:: html + +

+ Get all sectors in Yahoo Finance data based on country or industry. [Source: Finance Database] +

+ +* **Parameters** + + industry : str + Filter retrieved sectors by industry + country : str + Filter retrieved sectors by country + +* **Returns** + + list + List of possible sectors diff --git a/website/content/SDK/stocks/sia/stocks_data/_index.md b/website/content/SDK/stocks/sia/stocks_data/_index.rst similarity index 59% rename from website/content/SDK/stocks/sia/stocks_data/_index.md rename to website/content/SDK/stocks/sia/stocks_data/_index.rst index b0cf53eaa61..ab61907692d 100644 --- a/website/content/SDK/stocks/sia/stocks_data/_index.md +++ b/website/content/SDK/stocks/sia/stocks_data/_index.rst @@ -1,11 +1,35 @@ -## Get underlying data -### stocks.sia.stocks_data(symbols: List[str] = None, finance_key: str = 'ncf', stocks_data: dict = None, period: str = 'annual', symbol: str = 'USD') +.. role:: python(code) + :language: python + :class: highlight -Get stocks data based on a list of stocks and the finance key. The function searches for the +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.sia.stocks_data( + symbols: List[str] = None, + finance_key: str = 'ncf', + stocks_data: dict = None, + period: str = 'annual', + symbol: str = 'USD', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Get stocks data based on a list of stocks and the finance key. The function searches for the correct financial statement automatically. [Source: StockAnalysis] +

+ +* **Parameters** - Parameters - ---------- symbols: list A list of tickers that will be used to collect data for. finance_key: str @@ -20,7 +44,7 @@ Get stocks data based on a list of stocks and the finance key. The function sear Choose in what currency you wish to convert each company's financial statement. Default is USD (US Dollars). - Returns - ------- +* **Returns** + dict Dictionary of filtered stocks data separated by financial statement diff --git a/website/content/SDK/stocks/ta/recom/_index.md b/website/content/SDK/stocks/ta/recom/_index.rst similarity index 51% rename from website/content/SDK/stocks/ta/recom/_index.md rename to website/content/SDK/stocks/ta/recom/_index.rst index d2701ad0960..be49ba767b6 100644 --- a/website/content/SDK/stocks/ta/recom/_index.md +++ b/website/content/SDK/stocks/ta/recom/_index.rst @@ -1,12 +1,35 @@ -To obtain charts, make sure to add `chart=True` as the last parameter +.. role:: python(code) + :language: python + :class: highlight -## Get underlying data -### stocks.ta.recom(symbol: str, screener: str = 'america', exchange: str = '', interval: str = '') -> pandas.core.frame.DataFrame +| -Get tradingview recommendation based on technical indicators +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ta.recom( + symbol: str, + screener: str = 'america', + exchange: str = '', + interval: str = '', + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get tradingview recommendation based on technical indicators +

+ +* **Parameters** - Parameters - ---------- symbol : str Ticker symbol to get the recommendation from tradingview based on technical indicators screener : str @@ -15,19 +38,42 @@ Get tradingview recommendation based on technical indicators Exchange based on tradingview docs https://python-tradingview-ta.readthedocs.io/en/latest/usage.html interval: str Interval time to check technical indicators and correspondent recommendation + chart: *bool* + Flag to display chart + + +* **Returns** - Returns - ------- df_recommendation: pd.DataFrame Dataframe of tradingview recommendations based on technical indicators -## Getting charts -### stocks.ta.recom(symbol: str, screener: str = 'america', exchange: str = '', interval: str = '', export: str = '', chart=True) +| -Print tradingview recommendation based on technical indicators +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.ta.recom( + symbol: str, + screener: str = 'america', + exchange: str = '', + interval: str = '', + export: str = '', + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Print tradingview recommendation based on technical indicators +

+ +* **Parameters** - Parameters - ---------- symbol : str Ticker symbol to get tradingview recommendation based on technical indicators screener : str @@ -38,3 +84,6 @@ Print tradingview recommendation based on technical indicators Interval time to check technical indicators and correspondent recommendation export: str Format of export file + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/ta/rsp/_index.md b/website/content/SDK/stocks/ta/rsp/_index.md deleted file mode 100644 index f018e8192f8..00000000000 --- a/website/content/SDK/stocks/ta/rsp/_index.md +++ /dev/null @@ -1,37 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.ta.rsp(s_ticker: str = '') -> Tuple[pandas.core.frame.DataFrame] - -Relative strength percentile [Source: https://github.com/skyte/relative-strength] - Currently takes from https://github.com/soggyomelette/rs-log in order to get desired output - - Parameters - ---------- - s_ticker : str - Stock Ticker - - Returns - ---------- - pd.DataFrame - Dataframe of stock percentile - pd.Dataframe - Dataframe of industry percentile - pd.Dataframe - Raw stock dataframe for export - pd.Dataframe - Raw industry dataframe for export - -## Getting charts -### stocks.ta.rsp(s_ticker: str = '', export: str = '', tickers_show: bool = False, chart=True) - -Display Relative Strength Percentile [Source: https://github.com/skyte/relative-strength] - - Parameters - ---------- - s_ticker : str - Stock ticker - export : str - Format of export file - tickers_show : bool - Boolean to check if tickers in the same industry as the stock should be shown diff --git a/website/content/SDK/stocks/ta/rsp/_index.rst b/website/content/SDK/stocks/ta/rsp/_index.rst new file mode 100644 index 00000000000..0d2bd1601fa --- /dev/null +++ b/website/content/SDK/stocks/ta/rsp/_index.rst @@ -0,0 +1,81 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ta.rsp( + s_ticker: str = '', + chart: bool = False, +) -> Tuple[pandas.core.frame.DataFrame] +{{< /highlight >}} + +.. raw:: html + +

+ Relative strength percentile [Source: https://github.com/skyte/relative-strength] + Currently takes from https://github.com/soggyomelette/rs-log in order to get desired output +

+ +* **Parameters** + + s_ticker : str + Stock Ticker + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Dataframe of stock percentile + pd.Dataframe + Dataframe of industry percentile + pd.Dataframe + Raw stock dataframe for export + pd.Dataframe + Raw industry dataframe for export + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.ta.rsp( + s_ticker: str = '', + export: str = '', + tickers_show: bool = False, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display Relative Strength Percentile [Source: https://github.com/skyte/relative-strength] +

+ +* **Parameters** + + s_ticker : str + Stock ticker + export : str + Format of export file + tickers_show : bool + Boolean to check if tickers in the same industry as the stock should be shown + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/ta/summary/_index.md b/website/content/SDK/stocks/ta/summary/_index.md deleted file mode 100644 index 727ce3f686a..00000000000 --- a/website/content/SDK/stocks/ta/summary/_index.md +++ /dev/null @@ -1,26 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.ta.summary(symbol: str) -> str - -Get technical summary report provided by FinBrain's API - - Parameters - ---------- - symbol : str - Ticker symbol to get the technical summary - - Returns - ------- - report:str - technical summary report - -## Getting charts -### stocks.ta.summary(symbol: str, chart=True) - -Print technical summary report provided by FinBrain's API - - Parameters - ---------- - symbol: str - Ticker symbol to get the technical summary diff --git a/website/content/SDK/stocks/ta/summary/_index.rst b/website/content/SDK/stocks/ta/summary/_index.rst new file mode 100644 index 00000000000..fc9f14ad90e --- /dev/null +++ b/website/content/SDK/stocks/ta/summary/_index.rst @@ -0,0 +1,68 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ta.summary( + symbol: str, + chart: bool = False, +) -> str +{{< /highlight >}} + +.. raw:: html + +

+ Get technical summary report provided by FinBrain's API +

+ +* **Parameters** + + symbol : str + Ticker symbol to get the technical summary + chart: *bool* + Flag to display chart + + +* **Returns** + + report:str + technical summary report + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.ta.summary( + symbol: str, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Print technical summary report provided by FinBrain's API +

+ +* **Parameters** + + symbol: str + Ticker symbol to get the technical summary + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/ta/view/_index.md b/website/content/SDK/stocks/ta/view/_index.md deleted file mode 100644 index ee2108bd7f0..00000000000 --- a/website/content/SDK/stocks/ta/view/_index.md +++ /dev/null @@ -1,28 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.ta.view(symbol: str) -> bytes - -Get finviz image for given ticker - - Parameters - ---------- - symbol: str - Ticker symbol - - Returns - ------- - bytes - Image in byte format - -## Getting charts -### stocks.ta.view(symbol: str, external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True) - -View finviz image for ticker - - Parameters - ---------- - symbol: str - Stock ticker symbol - external_axes: Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None diff --git a/website/content/SDK/stocks/ta/view/_index.rst b/website/content/SDK/stocks/ta/view/_index.rst new file mode 100644 index 00000000000..8a22dad0b15 --- /dev/null +++ b/website/content/SDK/stocks/ta/view/_index.rst @@ -0,0 +1,71 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.ta.view( + symbol: str, + chart: bool = False, +) -> bytes +{{< /highlight >}} + +.. raw:: html + +

+ Get finviz image for given ticker +

+ +* **Parameters** + + symbol: str + Ticker symbol + chart: *bool* + Flag to display chart + + +* **Returns** + + bytes + Image in byte format + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.ta.view( + symbol: str, + external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ View finviz image for ticker +

+ +* **Parameters** + + symbol: str + Stock ticker symbol + external_axes: Optional[List[plt.Axes]], optional + External axes (1 axis is expected in the list), by default None + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/th/all/_index.md b/website/content/SDK/stocks/th/all/_index.md deleted file mode 100644 index 9f848475834..00000000000 --- a/website/content/SDK/stocks/th/all/_index.md +++ /dev/null @@ -1,22 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.th.all() -> pandas.core.frame.DataFrame - -Get all exchanges. - - Parameters - ---------- - - Returns - ------- - pd.DataFrame - All available exchanges - -## Getting charts -### stocks.th.all(, chart=True) - -Display all exchanges. - - Parameters - ---------- diff --git a/website/content/SDK/stocks/th/all/_index.rst b/website/content/SDK/stocks/th/all/_index.rst new file mode 100644 index 00000000000..faa6562e691 --- /dev/null +++ b/website/content/SDK/stocks/th/all/_index.rst @@ -0,0 +1,66 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.th.all() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get all exchanges. + + Parameters + ---------- +

+ +* **Parameters** + + + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + All available exchanges + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.th.all() +{{< /highlight >}} + +.. raw:: html + +

+ Display all exchanges. + + Parameters + ---------- +

+ +* **Parameters** + + + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/th/check_if_open/_index.md b/website/content/SDK/stocks/th/check_if_open/_index.md deleted file mode 100644 index 23d715e2339..00000000000 --- a/website/content/SDK/stocks/th/check_if_open/_index.md +++ /dev/null @@ -1,16 +0,0 @@ -## Get underlying data -### stocks.th.check_if_open(bursa: pandas.core.frame.DataFrame, exchange: str) -> bool - -Check if market open helper function - - Parameters - __________ - bursa : pd.DataFrame - pd.DataFrame of all exchanges - exchange : str - bursa pd.DataFrame index value for exchange - - Returns - _______ - bool - If market is open diff --git a/website/content/SDK/stocks/th/check_if_open/_index.rst b/website/content/SDK/stocks/th/check_if_open/_index.rst new file mode 100644 index 00000000000..b1e42ac72f4 --- /dev/null +++ b/website/content/SDK/stocks/th/check_if_open/_index.rst @@ -0,0 +1,37 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.th.check_if_open( + bursa: pandas.core.frame.DataFrame, + exchange: str, + chart: bool = False, +) -> bool +{{< /highlight >}} + +.. raw:: html + +

+ Check if market open helper function +

+ +* **Parameters** + + bursa : pd.DataFrame + pd.DataFrame of all exchanges + exchange : str + bursa pd.DataFrame index value for exchange + +* **Returns** + + bool + If market is open diff --git a/website/content/SDK/stocks/th/closed/_index.md b/website/content/SDK/stocks/th/closed/_index.md deleted file mode 100644 index fafffaec5e3..00000000000 --- a/website/content/SDK/stocks/th/closed/_index.md +++ /dev/null @@ -1,22 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.th.closed() -> pandas.core.frame.DataFrame - -Get closed exchanges. - - Parameters - ---------- - - Returns - ------- - pd.DataFrame - Currently closed exchanges - -## Getting charts -### stocks.th.closed(, chart=True) - -Display closed exchanges. - - Parameters - ---------- diff --git a/website/content/SDK/stocks/th/closed/_index.rst b/website/content/SDK/stocks/th/closed/_index.rst new file mode 100644 index 00000000000..3b9711fc0c4 --- /dev/null +++ b/website/content/SDK/stocks/th/closed/_index.rst @@ -0,0 +1,66 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.th.closed() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get closed exchanges. + + Parameters + ---------- +

+ +* **Parameters** + + + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Currently closed exchanges + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.th.closed() +{{< /highlight >}} + +.. raw:: html + +

+ Display closed exchanges. + + Parameters + ---------- +

+ +* **Parameters** + + + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/th/exchange/_index.md b/website/content/SDK/stocks/th/exchange/_index.md deleted file mode 100644 index 15fe6f42af5..00000000000 --- a/website/content/SDK/stocks/th/exchange/_index.md +++ /dev/null @@ -1,26 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.th.exchange(symbol: str) -> pandas.core.frame.DataFrame - -Get current exchange open hours. - - Parameters - ---------- - symbol : str - Exchange symbol - - Returns - ------- - pd.DataFrame - Exchange info - -## Getting charts -### stocks.th.exchange(symbol: str, chart=True) - -Display current exchange trading hours. - - Parameters - ---------- - symbol : str - Exchange symbol diff --git a/website/content/SDK/stocks/th/exchange/_index.rst b/website/content/SDK/stocks/th/exchange/_index.rst new file mode 100644 index 00000000000..63626dd0a41 --- /dev/null +++ b/website/content/SDK/stocks/th/exchange/_index.rst @@ -0,0 +1,68 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.th.exchange( + symbol: str, + chart: bool = False, +) -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get current exchange open hours. +

+ +* **Parameters** + + symbol : str + Exchange symbol + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Exchange info + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.th.exchange( + symbol: str, + chart: bool = False, +) +{{< /highlight >}} + +.. raw:: html + +

+ Display current exchange trading hours. +

+ +* **Parameters** + + symbol : str + Exchange symbol + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/th/open/_index.md b/website/content/SDK/stocks/th/open/_index.md deleted file mode 100644 index 5040ef3f7de..00000000000 --- a/website/content/SDK/stocks/th/open/_index.md +++ /dev/null @@ -1,22 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### stocks.th.open() -> pandas.core.frame.DataFrame - -Get open exchanges. - - Parameters - ---------- - - Returns - ------- - pd.DataFrame - Currently open exchanges - -## Getting charts -### stocks.th.open(, chart=True) - -Display open exchanges. - - Parameters - ---------- diff --git a/website/content/SDK/stocks/th/open/_index.rst b/website/content/SDK/stocks/th/open/_index.rst new file mode 100644 index 00000000000..ca8e6f167a4 --- /dev/null +++ b/website/content/SDK/stocks/th/open/_index.rst @@ -0,0 +1,66 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +To obtain charts, make sure to add :python:`chart = True` as the last parameter. + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.th.open() -> pandas.core.frame.DataFrame +{{< /highlight >}} + +.. raw:: html + +

+ Get open exchanges. + + Parameters + ---------- +

+ +* **Parameters** + + + chart: *bool* + Flag to display chart + + +* **Returns** + + pd.DataFrame + Currently open exchanges + +| + +.. raw:: html + +

+ > Getting charts +

+ +{{< highlight python >}} +stocks.th.open() +{{< /highlight >}} + +.. raw:: html + +

+ Display open exchanges. + + Parameters + ---------- +

+ +* **Parameters** + + + chart: *bool* + Flag to display chart + diff --git a/website/content/SDK/stocks/tob/_index.md b/website/content/SDK/stocks/tob/_index.md deleted file mode 100644 index bd0c2967dd8..00000000000 --- a/website/content/SDK/stocks/tob/_index.md +++ /dev/null @@ -1,19 +0,0 @@ -## Get underlying data -### stocks.tob(symbol: str, exchange: str = 'BZX') -> Tuple[pandas.core.frame.DataFrame, pandas.core.frame.DataFrame] - -Get top of book bid and ask for ticker on exchange [CBOE.com] - - Parameters - ---------- - symbol: str - Ticker to get - exchange: str - Exchange to look at. Can be `BZX`,`EDGX`, `BYX`, `EDGA` - - Returns - ------- - pd.DatatFrame - Dataframe of Bids - pd.DataFrame - Dataframe of asks - diff --git a/website/content/SDK/stocks/tob/_index.rst b/website/content/SDK/stocks/tob/_index.rst new file mode 100644 index 00000000000..f1e6837f02b --- /dev/null +++ b/website/content/SDK/stocks/tob/_index.rst @@ -0,0 +1,39 @@ +.. role:: python(code) + :language: python + :class: highlight + +| + +.. raw:: html + +

+ > Getting data +

+ +{{< highlight python >}} +stocks.tob( + symbol: str, + exchange: str = 'BZX', + chart: bool = False, +) -> Tuple[pandas.core.frame.DataFrame, pandas.core.frame.DataFrame] +{{< /highlight >}} + +.. raw:: html + +

+ Get top of book bid and ask for ticker on exchange [CBOE.com] +

+ +* **Parameters** + + symbol: str + Ticker to get + exchange: str + Exchange to look at. Can be `BZX`,`EDGX`, `BYX`, `EDGA` + +* **Returns** + + pd.DatatFrame + Dataframe of Bids + pd.DataFrame + Dataframe of asks diff --git a/website/content/sdk/forecast/plot/_index.md b/website/content/sdk/forecast/plot/_index.md deleted file mode 100644 index cabf4110a4c..00000000000 --- a/website/content/sdk/forecast/plot/_index.md +++ /dev/null @@ -1,31 +0,0 @@ -To obtain charts, make sure to add `chart=True` as the last parameter - -## Get underlying data -### forecast.plot(data: pandas.core.frame.DataFrame, columns: List[str], export: str = '', external_axes: Optional[List[axes]] = None) - -Plot data from a dataset - Parameters - ---------- - data: pd.DataFrame - The dataframe to plot - columns: List[str] - The columns to show - export: str - Format to export image - external_axes:Optional[List[plt.axes]] - External axes to plot on - -## Getting charts -### forecast.plot(data: pandas.core.frame.DataFrame, columns: List[str], export: str = '', external_axes: Optional[List[axes]] = None, chart=True) - -Plot data from a dataset - Parameters - ---------- - data: pd.DataFrame - The dataframe to plot - columns: List[str] - The columns to show - export: str - Format to export image - external_axes:Optional[List[plt.axes]] - External axes to plot on diff --git a/website/data/menu/main.yml b/website/data/menu/main.yml index 1af69e1a2c3..56e809d0099 100644 --- a/website/data/menu/main.yml +++ b/website/data/menu/main.yml @@ -2054,6 +2054,8 @@ main: sub: - name: altindex ref: /SDK/crypto/ov/altindex + - name: btcrb + ref: /SDK/crypto/ov/btcrb - name: cbpairs ref: /SDK/crypto/ov/cbpairs - name: cgcategories @@ -2387,6 +2389,15 @@ main: ref: /SDK/forex/oanda/summary - name: quote ref: /SDK/forex/quote + - name: funds + ref: /SDK/funds + sub: + - name: info + ref: /SDK/funds/info + - name: overview + ref: /SDK/funds/overview + - name: search + ref: /SDK/funds/search - name: futures ref: /SDK/futures sub: diff --git a/website/generate.py b/website/generate.py new file mode 100644 index 00000000000..78243cb0f38 --- /dev/null +++ b/website/generate.py @@ -0,0 +1,462 @@ +import re +from typing import Callable, Any, Optional, List, Tuple, Dict +from inspect import signature +import importlib +import os +from ruamel.yaml import YAML + +from openbb_terminal.sdk import functions + +# NOTE: The main.yml and documentation _index.md files are automaticallty overridden +# every time this is ran. Folder level _index.md files are NOT overridden after creation + +yaml = YAML() +yaml.indent(mapping=2, sequence=4, offset=2) + + +def list_endpoints_info(functions_: dict) -> List[Tuple[str, str, Callable[..., Any]]]: + """Uses the base SDK functions dictionary to get a list of all functions we have linked + in our SDK. + + Returns + ---------- + func_list: List[Tuple[str, str, Callable[..., Any]]] + A list of functions organized as (path_to_func, view/model, the_function) + """ + func_list = [] + for key, sub_dict in functions_.items(): + for sub_key, item_path in sub_dict.items(): + full_path = item_path.split(".") + module_path = ".".join(full_path[:-1]) + module = importlib.import_module(module_path) + target_function = getattr(module, full_path[-1]) + func_list.append((key, sub_key, target_function)) + return func_list + + +def groupby(orig_list: List[Any], index: int) -> Dict[Any, Any]: + """Groups a list of iterable by the index provided + + Parameters + ---------- + orig_list: List[Any] + A list of iterables + index: int + The index to groupby + + Returns + ---------- + grouped: dict[Any, Any] + Group information where keys are the groupby item and values are the iterables + """ + grouped: Dict[Any, Any] = {} + for item in orig_list: + if item[index] in grouped: + grouped[item[index]].append(item) + else: + grouped[item[index]] = [item] + return grouped + + +def write_section( + title: str, start: int, end: int, docstring: str, file, code_snippet: bool = False +): + """Writes text to documentation files. + + Parameters + ---------- + title: str + Section title + start: int + Section start + end: int + Section end + docstring: str + Docstring text + file: + File to write documentation + code_snippet: bool + Format section content as code snippet + """ + + text = docstring[start:end].strip() + + file.write(f"\n* **{title}**\n\n") + + if code_snippet: + file.write(" {{< highlight python >}}\n") + file.write(" " + text) + file.write("{{< /highlight >}}") + else: + file.write(" " + text) + + +def format_docstring(docstring: str): + """Format docstring section titles. + + Parameters + ---------- + docstring: str + Docstring text + """ + + # Wrap argument types around asterisks to .rst interpret them as italic + # docstring = re.sub(r"(: )([a-zA-Z0-9. _]+)(\n)", r": *\2*\n", docstring) + + # Reformat dashes in case there is a size mismatch between title and number of dashes + docstring = re.sub(r"(Parameters\n)(.*)(\n)", r"\1 ----------\n", docstring) + docstring = re.sub(r"(Returns\n)(.*)(\n)", r"\1 -------\n", docstring) + docstring = re.sub(r"(Examples\n)(.*)(\n)", r"\1 --------\n", docstring) + + return docstring + + +def locate_section(title: str, docstring: str) -> Tuple[int, int]: + """Locate section titles. + + Parameters + ---------- + title: str + Title string + docstring: str + Docstring text + + Returns + ------- + Tuple[int, int] + Title start and end positions + """ + + title_start = docstring.find(title) + title_end = title_start + len(title) + + return title_start, title_end + + +def write_summary(bottom: int, docstring: str, file): + """Locate section titles. + + Parameters + ---------- + bottom: int + Summary string bottom position + docstring: str + Docstring text + file: + File to write documentation + """ + + file.write(".. raw:: html\n\n") + file.write("

\n") + summary = " " + docstring[:bottom].strip() + "\n" + file.write(summary) + file.write("

\n") + + +def insert_chart_args(has_parameters: bool, sig: str) -> str: + """Insert chart argument in signature. + + Parameters + ---------- + has_parameters: bool + Flags if function already has parameters or not + sig: str + Function signature + + Returns + ------- + str: + String with chart argument + """ + # TODO: This breaks if there is a ')' inside the function arguments + + chart_args = "chart: bool = False)" + + if not has_parameters: + sig = sig.replace(")", chart_args) + else: + sig = sig.replace(")", ", " + chart_args) + + return sig + + +def format_signature(sig: str) -> str: + """Indent and paragraph each signature argument. + + Parameters + ---------- + sig: str + Function signature + + Returns + ------- + str: + String with formatted signature + """ + + sig = sig.replace("(", "(\n ") + # TODO: This requires type int for args, adds new line after each arg + sig = re.sub( + r"([a-zA-Z0-9_ ]+)(:)([\[\]a-zA-Z0-9_ (,.='-]*)(,)", + r"\1\2\3\4\n ", + sig, + ) + sig = sig.replace(")", ",\n)") + + return sig + + +def write_docstring(name: str, func, file, chart: bool): + + docstring: Optional[str] = func[2].__doc__ if func else None + + if docstring: + formatted_docstring = format_docstring(docstring=docstring) + + parameters_title_start, parameters_title_end = locate_section( + title="Parameters\n ----------\n", docstring=formatted_docstring + ) + + returns_title_start, returns_title_end = locate_section( + title="Returns\n -------\n", docstring=formatted_docstring + ) + + examples_title_start, examples_title_end = locate_section( + title="Examples\n --------\n", docstring=formatted_docstring + ) + + has_parameters = False + if signature(func[2]).parameters: + has_parameters = True + + # Signature + sig = str(signature(func[2])) + + if has_parameters: + sig = insert_chart_args(has_parameters, sig) + sig = format_signature(sig) + + file.write("{{< highlight python >}}\n") + file.write(f"{name}{sig}\n") + file.write("{{< /highlight >}}\n\n") + + # Summary + if has_parameters: + bottom = parameters_title_start + else: + bottom = returns_title_start + + write_summary( + bottom=bottom, + docstring=formatted_docstring.replace("_:", r"\_:"), + file=file, + ) + + # Parameters + if parameters_title_start > 0: + write_section( + title="Parameters", + start=parameters_title_end, + end=returns_title_start, + docstring=formatted_docstring.replace("_:", r"\_:"), + file=file, + ) + if chart: + file.write("\n") + file.write(" chart: *bool*\n") + file.write(" Flag to display chart\n") + file.write("\n") + + # Returns + if returns_title_start > 0: + write_section( + title="Returns", + start=returns_title_end, + end=examples_title_start, + docstring=formatted_docstring.replace("_:", r"\_:"), + file=file, + ) + file.write("\n") + + # Examples + if examples_title_start > 0: + write_section( + title="Examples", + start=examples_title_end, + end=len(formatted_docstring), + docstring=formatted_docstring, + file=file, + code_snippet=True, + ) + file.write("\n") + + +def generate_documentation( + base: str, key: str, value: List[Tuple[str, str, Callable[..., Any]]] +): + + models = list(filter(lambda x: x[1] == "model", value)) + views = list(filter(lambda x: x[1] == "view", value)) + model_type = Optional[Tuple[str, str, Callable[..., Any]]] + model: model_type = models[0] if models else None + view: model_type = views[0] if views else None + for end in key.split("."): + base += f"/{end}" + if not os.path.isdir(base): + os.mkdir(base) + + # Remove .md file if already there + if os.path.exists(f"{base}/_index.md"): + os.remove(f"{base}/_index.md") + + with open(f"{base}/_index.rst", "w") as f: + f.write(".. role:: python(code)\n :language: python\n :class: highlight") + f.write("\n\n|\n\n") + + chart = False + if view: + f.write( + "To obtain charts, make sure to add :python:`chart = True` as the last parameter.\n\n" + ) + chart = True + + if model: + f.write(".. raw:: html\n\n") + f.write("

\n") + f.write(" > Getting data\n") + f.write("

\n\n") + write_docstring(key, model, f, chart) + + if view: + if model: + f.write("\n|\n\n") + + f.write(".. raw:: html\n\n") + f.write("

\n") + f.write(" > Getting charts\n") + f.write("

\n\n") + write_docstring(key, view, f, chart) + + +def find_line(path: str, to_match: str) -> int: + """Returns the file line of a string based on given file path""" + with open(path) as file: + for i, line in enumerate(file): + if to_match in line: + return i + return -1 + + +def delete_lines_after(path: str, start: int): + """Deletes all file lines after a given number""" + + with open(path, "r+") as file: + lines = file.readlines() + file.seek(0) + file.truncate() + + for i, line in enumerate(lines): + if i <= start: + file.write(line) + + +def delete_line(path: str, to_delete: int): + """Deletes single file lines after a given number""" + + with open(path, "r+") as file: + lines = file.readlines() + file.seek(0) + file.truncate() + + for i, line in enumerate(lines): + if i != to_delete: + file.write(line) + + +def crawl_folders(root: str) -> list: + """Crawls created folders to get a list of what has been created""" + target = "website/content/" + ignore_length = root.index(target) + len(target) + return [ + [path[ignore_length:], sorted(dirs)] for path, dirs, _ in os.walk(root) if dirs + ] + + +def filter_dict(sub_dict, target: str): + return sub_dict["name"] == target + + +def set_items(the_dict, path: str, subs): + """Sets the sub items inside dictionaries""" + temp_loc = the_dict["sub"] + new_path = path[4:] + for sub_path in new_path.split("/"): + # pylint: disable=cell-var-from-loop + if "sub" in temp_loc: + temp_filter = filter(lambda x: filter_dict(x, sub_path), temp_loc["sub"]) + else: + temp_filter = filter(lambda x: filter_dict(x, sub_path), temp_loc) + temp_loc = list(temp_filter)[0] + temp_loc["sub"] = [] + for sub in subs: + temp_loc["sub"].append({"name": sub, "ref": f"/{path}/{sub}"}) + return the_dict + + +def generate_dict(paths: List): + """Generates the dictionary that will be saved as YAML""" + final_dict: Dict[str, Any] = {} + added_paths = [] + for path, subs in paths: + if not final_dict and path == "SDK": + final_dict = {"name": "SDK", "ref": "/SDK", "sub": []} + for sub in subs: + final_dict["sub"].append({"name": sub, "ref": f"/{path}/{sub}"}) + added_paths.append("SDK") + if path not in added_paths: + final_dict = set_items(final_dict, path, subs) + added_paths.append(path) + return final_dict + + +def folder_documentation(path: str): + name = path.split("/")[-1] + local_path = os.path.realpath(f"./website/content/{path}") + full_path = local_path + "/_index.md" + if not os.path.exists(full_path): + with open(full_path, "w") as f: + f.write(f"---\ntitle: {name}\n") + f.write('keywords: ""\nexcerpt: ""\n') + f.write("geekdocCollapseSection: true\n") + f.write("---\n") + + +if __name__ == "__main__": + print( + "Warning: files created in same session are not added to the yaml." + " To remedy this run this script twice in a row" + ) + base_folder_path = os.path.realpath("./website/content/SDK") + if not os.path.exists(base_folder_path): + os.mkdir(base_folder_path) + target_path = os.path.realpath("./website/data/menu/main.yml") + main_path = os.path.realpath("./website/content/SDK") + folder_list = crawl_folders(main_path) + for folder_path in [x[0] for x in folder_list]: + folder_documentation(folder_path) + funcs = list_endpoints_info(functions) + grouped_funcs = groupby(funcs, 0) + + # Create the documentation files + for k, v in grouped_funcs.items(): + generate_documentation(base_folder_path, k, v) + + # Delete our old entry to main.yaml + start_line = find_line(target_path, "# CODE BELOW THIS WILL BE DELETED FREQUENTLY") + delete_lines_after(target_path, start_line) + + # Add our new entry to main.yaml + folders_dict = generate_dict(folder_list) + with open(target_path, "a") as fp: + yaml.dump({"ignore": [folders_dict]}, fp) + delete_line(target_path, start_line + 1) diff --git a/website/themes/hugo-geekdoc/layouts/partials/head/others.html b/website/themes/hugo-geekdoc/layouts/partials/head/others.html index 453aebb9f57..ad4dad833fa 100644 --- a/website/themes/hugo-geekdoc/layouts/partials/head/others.html +++ b/website/themes/hugo-geekdoc/layouts/partials/head/others.html @@ -24,8 +24,43 @@ margin-bottom: 35px; } h1, h2, h3, h4, h5, h6 { + margin-top: 5px !important; + margin-bottom: 10px !important; +} + +p.first { margin-top: 10px !important; - margin-bottom: 20px !important; + margin-bottom: 0px !important; +} + +p.first.last { + margin-top: 0px !important; + margin-bottom: 0px !important; +} + +ul { + margin-top: 0px !important; +} + +blockquote { + border-left: 3px solid #ffffff !important; + background-color: #2b2a2a !important; + margin-top: 5px !important; + margin-bottom: 5px !important; + font-size: 13px; +} + +dl { + margin-top: 0px !important; + margin-bottom: 0px !important; +} +dt { + margin-top: -5px !important; + margin-bottom: -5px !important; +} +dd { + margin-top: 0px !important; + margin-bottom: 0px !important; } code { @@ -33,6 +68,13 @@ margin-top: 40px; margin-bottom: 40px; } +code.language-python { +margin-top: 10px; +margin-bottom: 10px; +background-color: #404040 !important; +font-size: 13px !important; +} + body { font-family: 'Fira Code', sans-serif !important; } @@ -64,6 +106,10 @@ a:active { margin-left: 8px; } +ul.gdoc-nav__list ul.gdoc-nav__list > li{ + text-transform: lowercase !important; +} + .gdoc-toc a, .gdoc-toc a:visited { color: white; } @@ -174,7 +220,7 @@ h1 { text-transform: uppercase; font-weight: 700; letter-spacing: 0.1em; - font-size:20px; + font-size:30px; } h2 { @@ -182,10 +228,11 @@ h2 { } h3 { - font-size: 16px; + font-size: 16px !important; } p { + font-size: 14px; color: #EAEAEA !important; } @@ -199,7 +246,7 @@ code, img { background-color: #404040 !important; color: white !important; border-radius: .375rem !important; - border: 1px solid #5a5a5a !important; + border: 0px solid #5a5a5a !important; } .header { padding-left: 1rem; @@ -225,4 +272,4 @@ code, img { {{ end }} -{{ printf "" "Made with Geekdoc theme https://github.com/thegeeklab/hugo-geekdoc" | safeHTML }} \ No newline at end of file +{{ printf "" "Made with Geekdoc theme https://github.com/thegeeklab/hugo-geekdoc" | safeHTML }}