summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Radovanovic <74266147+IgorWounds@users.noreply.github.com>2023-11-27 15:47:19 +0100
committerIgor Radovanovic <74266147+IgorWounds@users.noreply.github.com>2023-11-27 15:47:19 +0100
commit7d8c544f173005a469d60831bc6c6b6ea9781a99 (patch)
tree2cdad5bb79f05b370f10d581ba74779fba361a3f
parentbc8d51e0e1e9ed0130537bd0d31c715e780fe442 (diff)
Cleanup docs. with @the-praxs
-rw-r--r--examples/README.md22
-rw-r--r--examples/financialStatements.ipynb33
-rw-r--r--examples/findSymbols.ipynb26
-rw-r--r--examples/loadHistoricalPriceData.ipynb34
-rw-r--r--examples/v3/README.md1
-rw-r--r--website/content/platform/development/contributor-guidelines/sharing_extensions.md7
-rw-r--r--website/content/platform/development/contributor-guidelines/write_code_commit.md5
-rw-r--r--website/content/platform/development/dependency_management.md2
-rw-r--r--website/content/platform/development/developer-guidelines/add_data_point.md3
-rw-r--r--website/content/platform/development/developer-guidelines/architectural_considerations.md33
-rw-r--r--website/content/platform/development/developer-guidelines/build_openbb_extensions.md2
-rw-r--r--website/content/platform/development/developer-guidelines/devtools.md2
-rw-r--r--website/content/platform/development/developer-guidelines/obbject.md19
-rw-r--r--website/content/platform/extensions/data_extensions.md10
-rw-r--r--website/content/platform/extensions/index.md6
-rw-r--r--website/content/platform/extensions/toolkit_extensions.md10
-rw-r--r--website/content/platform/installation.md17
-rw-r--r--website/content/platform/usage/basic_syntax.md20
-rw-r--r--website/content/platform/usage/commitment_of_traders.md16
-rw-r--r--website/content/platform/usage/financial_statements.md20
-rw-r--r--website/content/platform/usage/find_symbols.md16
-rw-r--r--website/content/platform/usage/historical_prices.md18
-rw-r--r--website/content/platform/usage/index.md20
-rw-r--r--website/content/platform/usage/market_calendars.md28
24 files changed, 194 insertions, 176 deletions
diff --git a/examples/README.md b/examples/README.md
index d3e798c0ba6..ce31c292a3f 100644
--- a/examples/README.md
+++ b/examples/README.md
@@ -1,6 +1,6 @@
# Jupyter Notebook Examples Using the OpenBB Platform
-This folder is a collection of example notebooks that demonstrate some of the ways to get started using the OpenBB Platform. To run them, ensure that the active kernel selected is the same Python virtual environment where OpenBB was installed.
+This folder is a collection of example notebooks that demonstrate some of the ways to get started with using the OpenBB Platform. To run them, ensure that the active kernel selected is the same Python virtual environment where OpenBB was installed.
## Table of Contents
@@ -9,23 +9,23 @@ This folder is a collection of example notebooks that demonstrate some of the wa
This notebook provides an introduction to discovering, finding, and searching ticker symbols.
- Search
-- Find company and institutional filings.
-- Screen stocks by region and metrics.
+- Find company and institutional filings
+- Screen stocks by region and metrics
### loadHistoricalPriceData
This notebook walks through collecting historical price data, at different intervals, using a variety of sources.
-- Loading data with different intervals, and changing sources.
-- A brief explanation of ticker symbology.
-- Resampling a time series index.
-- Some differences between providers, and comparing outputs.
+- Loading data with different intervals, and changing sources
+- A brief explanation of ticker symbology
+- Resampling a time series index
+- Some differences between providers, and comparing outputs
### financialStatements
This set of examples introduces financial statements in the OpenBB Platform and compares the free cash flow yields of large-cap retail industry companies.
-- Fnancial statements.
-- What to expect with data from different sources.
-- Financial attributes.
-- Ratios and other metrics.
+- Financial statements
+- What to expect with data from different sources
+- Financial attributes
+- Ratios and other metrics
diff --git a/examples/financialStatements.ipynb b/examples/financialStatements.ipynb
index 7d0bfb49878..12db7e4874c 100644
--- a/examples/financialStatements.ipynb
+++ b/examples/financialStatements.ipynb
@@ -6,7 +6,7 @@
"source": [
"# Financial Statements in the OpenBB Platform\n",
"\n",
- "OpenBB Platform data extensions provide access to financial statements as quarterly or annual. There are also endpoints for ratios and other common non-GAAP metrics. Most data providers require a subscription to access all data, refer to the website of a specific provider for details on entitlements and coverage.\n",
+ "OpenBB Platform data extensions provide access to financial statements as quarterly or annual. There are also endpoints for ratios and other common non-GAAP metrics. Most data providers require a subscription to access all data. Refer to the website of a specific provider for details on entitlements and coverage.\n",
"\n",
"Financial statement functions are grouped under the `obb.equity.fundamental` module.\n",
"\n",
@@ -20,13 +20,13 @@
"\n",
"The main parameters are:\n",
"\n",
- "- `symbol`: The company's ticker symbol.\n",
- "- `period`: 'annual' or 'quarter'. Default is 'annual'.\n",
- "- `limit`: Limit the number of results returned, from the latest. Default is 5. For perspective, 150 will go back to 1985. The amount of historical records varies by provider.\n",
+ "- `symbol`: The company's symbol.\n",
+ "- `period`: 'annual' or 'quarter'. Default is 'annual'.\n",
+ "- `limit`: Limit the number of results returned, from the latest. Default is 5. For perspective, 150 will go back to 1985. The amount of historical records varies by provider.\n",
"\n",
"### Field Names\n",
"\n",
- "Some considerations to keep in mind when working with financial statements data:\n",
+ "Some considerations to keep in mind when working with financial statements data are:\n",
"\n",
"- Every data provider has their own way of parsing and organizing the three financial statements.\n",
"- Items within each statement will vary by source and by the type of company reporting.\n",
@@ -140,7 +140,7 @@
" .to_df()[\"total_assets\"].convert_dtypes().reset_index(drop=True)\n",
")\n",
"\n",
- "df"
+ "df\n"
]
},
{
@@ -149,7 +149,7 @@
"source": [
"### Weighted Average Shares Outstanding\n",
"\n",
- "This key metric will be found under the income statement. It might also be called, 'basic', and the numbers do not include authorized but unissued shares. A declining count over time is a sign that the company is returning capital to shareholders in the form of buy backs. Under ideal circumstances, it is more capital-efficient, for both company and shareholders, because distributions are double-taxed. The company pays income tax on dividends paid, and the beneficiary pays income tax again on receipt.\n",
+ "This key metric will be found under the income statement. It might also be called, 'basic', and the numbers do not include authorized but unissued shares. A declining count over time is a sign that the company is returning capital to shareholders in the form of buy backs. Under ideal circumstances, it is more capital-efficient, for both company and shareholders, because distributions are double-taxed. The company pays income tax on paid dividends, and the beneficiary pays income tax again on receipt.\n",
"\n",
"A company will disclose how many shares are outstanding at the end of the period as a weighted average over the reporting period - three months.\n",
"\n",
@@ -194,7 +194,7 @@
"\n",
"display(shares.head(1))\n",
"\n",
- "display(shares.tail(1))"
+ "display(shares.tail(1))\n"
]
},
{
@@ -263,7 +263,7 @@
" .to_df()\n",
")\n",
"\n",
- "round((price[\"close\"].mean()*1300000)/1000000, 2)"
+ "round((price[\"close\"].mean()*1300000)/1000000, 2)\n"
]
},
{
@@ -305,7 +305,7 @@
"dividends[\"shares\"] = data[\"weighted_average_shares_outstanding\"]\n",
"dividends[\"div_per_share\"] = dividends[\"dividends_paid\"]/dividends[\"shares\"]\n",
"\n",
- "dividends[\"div_per_share\"].tail(4)"
+ "dividends[\"div_per_share\"].tail(4)\n"
]
},
{
@@ -341,7 +341,7 @@
" obb.equity.fundamental.dividends(\"TGT\", provider=\"fmp\")\n",
" .to_df()[\"dividend\"]\n",
" .loc[\"2022-11-15\":\"2023-08-15\"]\n",
- ")"
+ ")\n"
]
},
{
@@ -623,7 +623,7 @@
"(\n",
" obb.equity.fundamental.search_financial_attributes(\"marketcap\")\n",
" .to_df()\n",
- ")"
+ ")\n"
]
},
{
@@ -712,7 +712,7 @@
" .to_df()\n",
")\n",
"\n",
- "marketcap.tail(5)"
+ "marketcap.tail(5)\n"
]
},
{
@@ -741,7 +741,7 @@
"source": [
"(\n",
" (marketcap.loc[\"2023-09-30\"] - marketcap.loc[\"2022-12-31\"])/marketcap.loc[\"2022-12-31\"]\n",
- ").value"
+ ").value\n"
]
},
{
@@ -790,7 +790,7 @@
")\n",
"\n",
"display(f\"Current Quick Ratio: {round(ratios['quick_ratio'].iloc[-1], 4)}\")\n",
- "display(f\"Median Quick Ratio: {round(ratios['quick_ratio'].median(), 4)}\")"
+ "display(f\"Median Quick Ratio: {round(ratios['quick_ratio'].median(), 4)}\")\n"
]
},
{
@@ -1007,6 +1007,7 @@
"source": [
"# List of other retail chains\n",
"tickers = [\"COST\", \"BJ\", \"DLTR\", \"DG\", \"WMT\", \"BIG\", \"M\", \"KSS\", \"TJX\"]\n",
+ "\n",
"# Create a dictionary of tickers and company names.\n",
"names = {\n",
" ticker: obb.equity.fundamental.overview(ticker, provider=\"fmp\").results.company_name\n",
@@ -1023,7 +1024,7 @@
" .sort_index(ascending=False)\n",
" [\"free_cash_flow_yield\"]\n",
" )\n",
- "fcf_yield.transpose()"
+ "fcf_yield.transpose()\n"
]
},
{
diff --git a/examples/findSymbols.ipynb b/examples/findSymbols.ipynb
index 7dcdffe15f3..1a4eeb196fd 100644
--- a/examples/findSymbols.ipynb
+++ b/examples/findSymbols.ipynb
@@ -20,7 +20,7 @@
"metadata": {},
"outputs": [],
"source": [
- "from openbb import obb"
+ "from openbb import obb\n"
]
},
{
@@ -57,7 +57,7 @@
"source": [
"all_companies = obb.equity.search(\"\", provider=\"sec\")\n",
"\n",
- "len(all_companies.results)"
+ "len(all_companies.results)\n"
]
},
{
@@ -183,7 +183,7 @@
}
],
"source": [
- "all_companies.to_df().head(10)"
+ "all_companies.to_df().head(10)\n"
]
},
{
@@ -289,7 +289,7 @@
],
"source": [
"instututions = obb.regulators.sec.institutions_search(\"Berkshire Hathaway\").to_df()\n",
- "instututions"
+ "instututions\n"
]
},
{
@@ -336,7 +336,7 @@
"source": [
"homestate_filings = obb.equity.fundamental.filings(cik=\"0000829771\", provider=\"sec\")\n",
"\n",
- "homestate_filings.to_df().iloc[-1]"
+ "homestate_filings.to_df().iloc[-1]\n"
]
},
{
@@ -381,7 +381,7 @@
"source": [
"aapl_filings = obb.equity.fundamental.filings(\"AAPL\", type=\"4\", provider=\"sec\")\n",
"\n",
- "aapl_filings.to_df().iloc[-1]"
+ "aapl_filings.to_df().iloc[-1]\n"
]
},
{
@@ -574,7 +574,7 @@
"source": [
"results = obb.equity.screener(country=\"IN\", provider=\"fmp\").to_df()\n",
"display(len(results))\n",
- "results.head(5).convert_dtypes()"
+ "results.head(5).convert_dtypes()\n"
]
},
{
@@ -763,7 +763,7 @@
"source": [
"sector_results = obb.equity.screener(country=\"IN\", sector=\"Financial Services\", provider=\"fmp\").to_df()\n",
"display(len(sector_results))\n",
- "sector_results.head(5).convert_dtypes()"
+ "sector_results.head(5).convert_dtypes()\n"
]
},
{
@@ -952,7 +952,7 @@
"source": [
"industry_results = obb.equity.screener(country=\"IN\", industry=\"manufacturing\").to_df()\n",
"display(len(industry_results))\n",
- "industry_results.head(5).convert_dtypes()"
+ "industry_results.head(5).convert_dtypes()\n"
]
},
{
@@ -1111,7 +1111,7 @@
"source": [
"exchange_results = obb.equity.screener(exchange=\"amex\", country=\"CN\").to_df()\n",
"display(len(exchange_results))\n",
- "exchange_results.convert_dtypes()"
+ "exchange_results.convert_dtypes()\n"
]
},
{
@@ -1140,7 +1140,7 @@
],
"source": [
"indices = obb.index.available(provider=\"yfinance\").to_df()\n",
- "display(len(indices))"
+ "display(len(indices))\n"
]
},
{
@@ -1302,7 +1302,7 @@
}
],
"source": [
- "indices[indices[\"name\"].str.contains(\"ASX 200\")]"
+ "indices[indices[\"name\"].str.contains(\"ASX 200\")]\n"
]
},
{
@@ -1381,7 +1381,7 @@
"(\n",
" obb.index.market(\"au_utilities\", provider=\"yfinance\").to_df().tail(1)\n",
" == obb.index.market(\"^AXUJ\", provider=\"yfinance\").to_df().tail(1)\n",
- ")"
+ ")\n"
]
}
],
diff --git a/examples/loadHistoricalPriceData.ipynb b/examples/loadHistoricalPriceData.ipynb
index ef7223e1c3c..08f361e8dcd 100644
--- a/examples/loadHistoricalPriceData.ipynb
+++ b/examples/loadHistoricalPriceData.ipynb
@@ -45,9 +45,7 @@
"\n",
"- The depth of historical data and choices for granularity will vary by provider and subscription status. Refer to the website and documentation of each source understand your specific entitlements.\n",
"\n",
- "- Despite being in the `equity` module, it's might be possible to get other asset types, like currencies or crypto, from the same endpoint.\n",
- "\n",
- "- For demonstration purposes, we will use the `openbb-yfinance` data extension.\n"
+ "- For demonstration purposes, we will use the `openbb-yfinance` data extension."
]
},
{
@@ -130,7 +128,7 @@
],
"source": [
"df_daily = obb.equity.price.historical(symbol = \"spy\", provider=\"yfinance\")\n",
- "df_daily.to_df().head(1)"
+ "df_daily.to_df().head(1)\n"
]
},
{
@@ -221,7 +219,7 @@
],
"source": [
"df_daily = obb.equity.price.historical(symbol = \"spy\", start_date = \"1990-01-01\", provider=\"yfinance\").to_df()\n",
- "df_daily.head(1)"
+ "df_daily.head(1)\n"
]
},
{
@@ -334,7 +332,7 @@
],
"source": [
"df_monthly = obb.equity.price.historical(\"spy\", start_date=\"1990-01-01\", interval=\"1M\", provider=\"yfinance\").to_df()\n",
- "df_monthly.tail(2)"
+ "df_monthly.tail(2)\n"
]
},
{
@@ -511,7 +509,7 @@
" .agg(\n",
" {\"open\": \"first\", \"high\": \"max\", \"low\": \"min\", \"close\": \"last\", \"volume\": \"sum\"}\n",
" )\n",
- ")"
+ ")\n"
]
},
{
@@ -668,7 +666,7 @@
"\n",
"prices = load_historical(\"spy\")\n",
"display(prices.__dict__.keys())\n",
- "prices.weekly.tail(2)"
+ "prices.weekly.tail(2)\n"
]
},
{
@@ -828,7 +826,7 @@
"compare[\"Intrinio Volume\"] = intrinio[\"volume\"].tail(10)\n",
"compare[\"Yahoo Volume\"] = yahoo[\"volume\"].tail(10)\n",
"\n",
- "compare"
+ "compare\n"
]
},
{
@@ -856,11 +854,11 @@
"obb.equity.price.historical(\"brk-b\", provider=\"fmp\")\n",
"```\n",
"\n",
- "While some providers handle the different formats on their end, others do not. This is something to consider when no results are returned from one source. Some may even use a combination, or accept multiple variations. Sometimes there is no real logic behind the additional characters, `GOOGL` vs. `GOOG`. These are known unknown variables of ticker symbology, what's good for one source may return errors from another. \n",
+ "While some providers handle the different formats on their end, others do not. This is something to consider when no results are returned from one source. Some may even use a combination, or accept multiple variations. Sometimes there is no real logic behind the additional characters, `GOOGL` vs. `GOOG`. These are known unknown variables of ticker symbology, what's good for one source may return errors from another. \n",
"\n",
"### Regional Identifiers\n",
"\n",
- "With providers supporting market data from multiple jurisdictions, the most common method for requesting data outside of US-listings is to append a suffix to the ticker symbol (e.g., `RELIANCE.NS`). Formats may be unique to a provider, so it is best to review the source's documentation for an overview of their specific conventions. [This page](https://help.yahoo.com/kb/SLN2310.html) on Yahoo describes how they format symbols, which many others follow to some degree.\n",
+ "With providers supporting market data from multiple jurisdictions, the most common method for requesting data outside of US-listings is to append a suffix to the ticker symbol (e.g., `RELIANCE.NS` for Indian equities). Formats may be unique to a provider, so it is best to review the source's documentation for an overview of their specific conventions. [This page](https://help.yahoo.com/kb/SLN2310.html) on Yahoo describes how they format symbols, which many others follow to some degree.\n",
"\n",
"### Indexes\n",
"\n",
@@ -877,7 +875,7 @@
"- Polygon: `C:EURUSD`\n",
"- AlphaVantage/FMP: `EURUSD`\n",
"\n",
- "**The symbol prefixes are handled internally when `obb.currency.price.historical()` is used, enter as a pair with no extra characters.**\n",
+ "**The symbol prefixes are handled internally when `obb.currency.price.historical()` is used to enter a pair with no extra characters.**\n",
"\n",
"### Crypto\n",
"\n",
@@ -887,7 +885,7 @@
"- Polygon: `X:BTCUSD`\n",
"- AlphaVantage/FMP: `BTCUSD`\n",
"\n",
- "**The symbol prefixes are handled internally when `obb.crypto.price.historical()` is used, enter as a pair with no extra characters and placing the fiat currency second.**\n",
+ "**The symbol prefixes are handled internally when `obb.crypto.price.historical()` is used to enter a pair with no extra characters and placing the fiat currency second.**\n",
"\n",
"### Futures\n",
"\n",
@@ -1100,7 +1098,7 @@
}
],
"source": [
- "obb.equity.price.historical(\"SPY241220P00400000\", provider=\"yfinance\").to_df()"
+ "obb.equity.price.historical(\"SPY241220P00400000\", provider=\"yfinance\").to_df()\n"
]
},
{
@@ -1262,7 +1260,7 @@
}
],
"source": [
- "obb.equity.price.historical(\"^RUT\", provider=\"cboe\").to_df()"
+ "obb.equity.price.historical(\"^RUT\", provider=\"cboe\").to_df()\n"
]
},
{
@@ -1543,7 +1541,7 @@
}
],
"source": [
- "obb.equity.price.historical(\"^RUT\", provider=\"fmp\").to_df()"
+ "obb.equity.price.historical(\"^RUT\", provider=\"fmp\").to_df()\n"
]
},
{
@@ -1731,7 +1729,7 @@
}
],
"source": [
- "obb.equity.price.historical(\"CLZ24.NYM\", provider=\"yfinance\").to_df()"
+ "obb.equity.price.historical(\"CLZ24.NYM\", provider=\"yfinance\").to_df()\n"
]
},
{
@@ -2012,7 +2010,7 @@
}
],
"source": [
- "obb.equity.price.historical(\"CL=F\", provider=\"fmp\").to_df()"
+ "obb.equity.price.historical(\"CL=F\", provider=\"fmp\").to_df()\n"
]
}
],
diff --git a/examples/v3/README.md b/examples/v3/README.md
index cb5f7d45f32..01b69fad0c5 100644
--- a/examples/v3/README.md
+++ b/examples/v3/README.md
@@ -68,7 +68,6 @@ This notebook demonstrates how to fetch and work with options chains data.
This notebook demonstrates how to install the OpenBB SDK within Google Colab.
-
### volumeAtPrice
Volume-at-price is a chart used by technical analysts as a visual gauge to where the trading levels are concentrated, relative to price and volume. In short, it is the sum of volume at different price levels. This notebook utilizes individual components of the OpenBB SDK and combines them to build a new view.
diff --git a/website/content/platform/development/contributor-guidelines/sharing_extensions.md b/website/content/platform/development/contributor-guidelines/sharing_extensions.md
index b991605ba81..0f99dab13f1 100644
--- a/website/content/platform/development/contributor-guidelines/sharing_extensions.md
+++ b/website/content/platform/development/contributor-guidelines/sharing_extensions.md
@@ -23,7 +23,8 @@ To publish your extension to PyPI, you'll need to have a PyPI account and a PyPI
### Setup
Create an account and get an API token from <https://pypi.org/manage/account/token/>
-Store the token with
+
+Store the token with:
```bash
poetry config pypi-token.pypi pypi-YYYYYYYY
@@ -31,7 +32,7 @@ poetry config pypi-token.pypi pypi-YYYYYYYY
### Release
-`cd` into the directory where your extension `pyproject.toml` lives and make sure that the `pyproject.toml` specifies the version tag you want to release and run.
+`cd` into the directory where your extension `pyproject.toml` lives and make sure that the `pyproject.toml` specifies the version tag you want to release and run:
```bash
poetry build
@@ -39,7 +40,7 @@ poetry build
This will create a `/dist` folder in the directory, which will contain the `.whl` and `tar.gz` files matching the version to release.
-If you want to test your package locally you can do it with
+If you want to test your package locally you can do it with:
```bash
pip install dist/openbb_[FILE_NAME].whl
diff --git a/website/content/platform/development/contributor-guidelines/write_code_commit.md b/website/content/platform/development/contributor-guidelines/write_code_commit.md
index 06c3568be50..3534ace2bc2 100644
--- a/website/content/platform/development/contributor-guidelines/write_code_commit.md
+++ b/website/content/platform/development/contributor-guidelines/write_code_commit.md
@@ -131,10 +131,7 @@ This is the main directory for the OpenBB package, containing the core functiona
### `platform`
-This directory hosts the core platform functionalities, divided into:
-
-- Core (`core`): The central part of the OpenBB Platform application.
-- Provider (`provider`): Manages provider-specific functionalities.
+This directory hosts the core platform functionalities (`core`) which is the central part of the OpenBB Platform application.
### Root Directory Files
diff --git a/website/content/platform/development/dependency_management.md b/website/content/platform/development/dependency_management.md
index d2c0781994b..8cb721d3d90 100644
--- a/website/content/platform/development/dependency_management.md
+++ b/website/content/platform/development/dependency_management.md
@@ -40,7 +40,7 @@ Ensure you're in a fresh conda environment before adjusting dependencies.
## Core and Extensions
-### Installation
+### Dev Installation
For development setup, use the provided script to install all extensions and their dependencies:
diff --git a/website/content/platform/development/developer-guidelines/add_data_point.md b/website/content/platform/development/developer-guidelines/add_data_point.md
index 3fab27e91aa..60fe210fcc5 100644
--- a/website/content/platform/development/developer-guidelines/add_data_point.md
+++ b/website/content/platform/development/developer-guidelines/add_data_point.md
@@ -77,7 +77,8 @@ class <ProviderName>EquityHistoricalData(EquityHistoricalData):
### Build the Fetcher
-The `Fetcher` class is responsible for processing the Query and turning that into an API request and finally returning the Data model. Each fetcher contains three methods that are implemented by the core (see below for a link to the contributing guidelines):
+The `Fetcher` class is responsible for processing the Query and turning that into an API request and finally returning the Data model. Each fetcher contains three methods that are implemented by the core (see below for a link to the contributing guidelines):
+
- `transform_query`
- Convert a standard query into a provider-specific query
- `extract_data`
diff --git a/website/content/platform/development/developer-guidelines/architectural_considerations.md b/website/content/platform/development/developer-guidelines/architectural_considerations.md
index 47a4e29816c..1f52baad160 100644
--- a/website/content/platform/development/developer-guidelines/architect