Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make adjustments to the guides #4477

Merged
merged 8 commits into from
Mar 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions openbb_terminal/terminal_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,49 +136,49 @@ def open_openbb_documentation(
path = "/quickstart/api-keys"
command = ""
elif "settings" in path:
path = "/guides/advanced/customizing-the-terminal"
path = "/usage/guides/customizing-the-terminal"
command = ""
elif "featflags" in path:
path = "/guides/advanced/customizing-the-terminal"
path = "/usage/guides/customizing-the-terminal"
command = ""
elif "sources" in path:
path = "/guides/advanced/changing-sources"
path = "/usage/guides/changing-sources"
command = ""
elif "params" in path:
path = "/guides/intros/portfolio/po"
path = "/usage/intros/portfolio/po"
command = ""
else:
if arg_type == "command": # user passed a command name
path = f"/reference/{path}"
elif arg_type == "menu": # user passed a menu name
if command in ["ta", "ba", "qa"]:
menu = path.split("/")[-2]
path = f"/guides/intros/common/{menu}"
path = f"/usage/intros/common/{menu}"
elif command == "forecast":
command = ""
path = "/guides/intros/forecast"
path = "/usage/intros/forecast"
else:
path = f"/guides/intros/{path}"
path = f"/usage/intros/{path}"
else: # user didn't pass argument and is in a menu
menu = path.split("/")[-2]
path = (
f"/guides/intros/common/{menu}"
f"/usage/intros/common/{menu}"
if menu in ["ta", "ba", "qa"]
else f"/guides/intros/{path}"
else f"/usage/intros/{path}"
)

if command:
if command == "keys":
path = "/quickstart/api-keys"
command = ""
elif "settings" in path or "featflags" in path:
path = "/guides/advanced/customizing-the-terminal"
path = "/usage/guides/customizing-the-terminal"
command = ""
elif "sources" in path:
path = "/guides/advanced/changing-sources"
path = "/usage/guides/changing-sources"
command = ""
elif command in ["record", "stop", "exe"]:
path = "/guides/advanced/scripts-and-routines"
path = "/usage/guides/scripts-and-routines"
command = ""
elif command in [
"intro",
Expand All @@ -192,7 +192,7 @@ def open_openbb_documentation(
path = ""
command = ""
elif command in ["ta", "ba", "qa"]:
path = f"/guides/intros/common/{command}"
path = f"/usage/intros/common/{command}"
command = ""

path += command
Expand Down
2 changes: 1 addition & 1 deletion website/content/sdk/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ Files can be formatted as either `.csv` or `.xlsx` files, and the required colum

`[Date,Type,Ticker,Side,Price,Quantity,Fees,Investment,Currency,Sector,Industry,Country,Region]`

See the guide [here](https://docs.openbb.co/sdk/guides/intros/portfolio) for more information.
See the guide [here](https://docs.openbb.co/sdk/usage/intros/portfolio) for more information.

</details>

Expand Down
4 changes: 0 additions & 4 deletions website/content/sdk/guides/advanced/_category_.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ dia_valuation.head(5)

### Displaying Charts

The OpenBB SDK has built-in charting libraries for Matplotlib, for any chart available from the Terminal. User style sheets can be added to the folder (more on this in [Importing and Exporting Data](/sdk/guides/advanced/data)), `~/OpenBBUserData/styles/user`. Styles are shared properties between the OpenBB Terminal and the SDK.
The OpenBB SDK has built-in charting libraries for Matplotlib, for any chart available from the Terminal. User style sheets can be added to the folder (more on this in [Importing and Exporting Data](/sdk/usage/advanceddata)), `~/OpenBBUserData/styles/user`. Styles are shared properties between the OpenBB Terminal and the SDK.

:::note Displaying charts in Jupyter Notebooks requires an additional line of code. You can either render a static image with `%matplotlib inline` or add in pan/zoom functionality with `%matplotlib widget`.
:::
Expand Down Expand Up @@ -191,4 +191,4 @@ openbb.futures.curve_chart('GE')

![openbb.futures.curve](https://user-images.githubusercontent.com/85772166/201583945-18364efa-c305-4c1a-a032-f779e28894c8.png "openbb.futures.curve")

The intros section for each module explore further functionality and provide sample code snippets. For example, an introduction to Stocks can be found [here](/sdk/guides/intros/stocks).
The intros section for each module explore further functionality and provide sample code snippets. For example, an introduction to Stocks can be found [here](/sdk/usage/intros/stocks).
4 changes: 4 additions & 0 deletions website/content/sdk/usage/guides/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Guides",
"position": 2
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Adjusting Chart Style
title: Chart Styling
sidebar_position: 4
keywords: [export, import, data, excel, xlsx, csv, json, png, pdf, jpg, openbbuserdata, where is data exported, market data, financial data, free, openbb sdk, chart, styling]
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Importing and Exporting Data
title: Exporting and Importing Datasets
sidebar_position: 2
description: The OpenBBUserData folder's default location is the home of the system user account. By default this will be the following paths. Within the folder you can find files that you have exported as well as files that you wish to import directly into the OpenBB Terminal. For example, this could be an orderbook which you can store in OpenBBUserData/portfolio/holdings.
keywords: [export, import, data, excel, xlsx, csv, json, png, pdf, jpg, openbbuserdata, where is data exported, market data, financial data, free, openbb sdk]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords: [econometrics, statistics, regression, panel data, time series, resear
description: The Econometrics menu's purpose is to provide the user the ability to perform statistical research on custom datasets. The menu allows the user to load in his/her own dataset(s), modify the data by (for example) adding columns or setting indices, apply statistical tests (Breusch-Godfrey autocorrelation tests) as well as OLS regressions and Panel regressions (Random Effects and Fixed Effects)
---

The capabilities of the [Econometrics menu](/terminal/guides/intros/econometrics) from the OpenBB Terminal are wrapped into a powerful SDK, enabling users to work with the data in a flexible environment that can be fully customized to meet the needs of any user. The Econometrics menu's purpose is to provide the user the ability to perform statistical research on custom datasets. The menu allows the user to load in his/her own dataset(s), modify the data by adding columns or setting indices, apply statistical tests (e.g. <a href="https://en.wikipedia.org/wiki/Breusch%E2%80%93Godfrey_test" target="_blank" rel="noreferrer noopener">Breusch-Godfrey autocorrelation tests</a>) as well as OLS regressions and Panel regressions (e.g. <a href="https://en.wikipedia.org/wiki/Random_effects_model" target="_blank" rel="noreferrer noopener">Random Effects</a> and <a href="https://en.wikipedia.org/wiki/Fixed_effects_model" target="_blank" rel="noreferrer noopener">Fixed Effects</a>)
The capabilities of the [Econometrics menu](/terminal/usage/intros/econometrics) from the OpenBB Terminal are wrapped into a powerful SDK, enabling users to work with the data in a flexible environment that can be fully customized to meet the needs of any user. The Econometrics menu's purpose is to provide the user the ability to perform statistical research on custom datasets. The menu allows the user to load in his/her own dataset(s), modify the data by adding columns or setting indices, apply statistical tests (e.g. <a href="https://en.wikipedia.org/wiki/Breusch%E2%80%93Godfrey_test" target="_blank" rel="noreferrer noopener">Breusch-Godfrey autocorrelation tests</a>) as well as OLS regressions and Panel regressions (e.g. <a href="https://en.wikipedia.org/wiki/Random_effects_model" target="_blank" rel="noreferrer noopener">Random Effects</a> and <a href="https://en.wikipedia.org/wiki/Fixed_effects_model" target="_blank" rel="noreferrer noopener">Fixed Effects</a>)

## How to use

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords: [portfolio, attribution, optimization, pnl, benchmark, return, volatil
description: The Portfolio menu, and its sub-menus, are dedicated to properly explaining and optimizing your own portfolio. With features to load your own orderbook (transactions) it is possible to compare your results to that of a benchmark. For example, you are able to load both your portfolio and a benchmark (load and bench), then have the option to look into the performance compared to the benchmark asking the question "What if I invested all my money in the benchmark instead?" (perf) as well as see a wide variety of statistics and metrics (rsharpe, distr, var and metric). Next to that, with these findings you can apply optimization techniques to your portfolio through the Portfolio Optimization menu.
---

The [Portfolio menu](/terminal/guides/intros/portfolio), from the OpenBB Terminal, is wrapped into a Python SDK layer, enabling users to programmatically work with the data in a flexible environment, fully customizable for the needs of any user. This guide will introduce the functions within the main Portfolio module, and walk through examples demonstrating how to work with a portfolio file and object.
The [Portfolio menu](/terminal/usage/intros/portfolio), from the OpenBB Terminal, is wrapped into a Python SDK layer, enabling users to programmatically work with the data in a flexible environment, fully customizable for the needs of any user. This guide will introduce the functions within the main Portfolio module, and walk through examples demonstrating how to work with a portfolio file and object.

## How to Use

Expand Down Expand Up @@ -49,7 +49,7 @@ Portfolio files are spreadsheets (xlsx or csv files) containing historical trade

:::note If you wish to load in your own Excel holdings file, please follow the following steps:
1. Download the Excel file that can be used as a template [here](https://www.dropbox.com/s/03wjjf1lfkqjmtn/holdings_example.xlsx?dl=0).
2. Move the file inside the `portfolio/holdings` folder within the [OpenBBUserData](https://docs.openbb.co/terminal/guides/advanced/data) folder and, optionally, adjust the name to your liking.
2. Move the file inside the `portfolio/holdings` folder within the [OpenBBUserData](https://docs.openbb.co/terminal/usage/advanceddata) folder and, optionally, adjust the name to your liking.
3. Open the Excel file and remove, edit or add to the values as you desire (e.g. your own orders). This is the default template that is also loaded in with `load --example`.
4. Open up the OpenBB Terminal, go to `portfolio` and type `load --file`. Your Excel file should then be one of the options.
:::
Expand Down Expand Up @@ -300,4 +300,4 @@ print(returns.tail(5))
| 2022-11-24 | 0.00 | 0.00 |
| 2022-11-25 | -0.01 | 0.00 |

Read the [Portfolio Optimization Intro](https://docs.openbb.co/sdk/guides/intros/portfolio/po) to learn about the optimization features, and the parameters preset template.
Read the [Portfolio Optimization Intro](https://docs.openbb.co/sdk/usage/intros/portfolio/po) to learn about the optimization features, and the parameters preset template.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: The Portfolio Optimization menu allows the user to apply advanced o
---
The Portfolio Optimization menu allows the user to apply advanced optimization techniques to a portfolio of any type and of any size. It does so by introducing a multitude of optimization techniques ranging from <a href="https://www.investopedia.com/terms/m/meanvariance-analysis.asp" target="_blank" rel="noreferrer noopener">mean-variance optimization</a> to <a href="https://www.investopedia.com/terms/r/risk-parity.asp" target="_blank" rel="noreferrer noopener">risk parity models</a> and <a href="https://www.investopedia.com/terms/c/cluster_analysis.asp" target="_blank" rel="noreferrer noopener">hierarchical clustering models</a>. By providing Excel templates, the user can make sense of the vast array of parameters that each command has. E.g. think of the historic period you wish to use or which of the more than 10 risk measures and covariance methods should be used? These are questions the templates make easier to answer.

The capabilities of the [Portfolio Optiminzation menu](/terminal/guides/intros/portfolio/po) from the OpenBB Terminal are wrapped into a powerful SDK, enabling users to work with the data in a flexible environment that can be fully customized to meet the needs of any user. These functionalities allow the user to apply advanced optimization techniques to a portfolio of any type and of any size. It does so by introducing a multitude of optimization techniques ranging from <a href="https://www.investopedia.com/terms/m/meanvariance-analysis.asp" target="_blank" rel="noreferrer noopener">mean-variance optimization</a> to <a href="https://www.investopedia.com/terms/r/risk-parity.asp" target="_blank" rel="noreferrer noopener">risk parity models</a> and <a href="https://www.investopedia.com/terms/c/cluster_analysis.asp" target="_blank" rel="noreferrer noopener">hierarchical clustering models</a>. By providing Excel templates, the user can make sense of the vast array of parameters that each command has. E.g. think of the historic period you wish to use or which of the more than 10 risk measures and covariance methods should be used? These are questions the templates make easier to answer.
The capabilities of the [Portfolio Optiminzation menu](/terminal/usage/intros/portfolio/po) from the OpenBB Terminal are wrapped into a powerful SDK, enabling users to work with the data in a flexible environment that can be fully customized to meet the needs of any user. These functionalities allow the user to apply advanced optimization techniques to a portfolio of any type and of any size. It does so by introducing a multitude of optimization techniques ranging from <a href="https://www.investopedia.com/terms/m/meanvariance-analysis.asp" target="_blank" rel="noreferrer noopener">mean-variance optimization</a> to <a href="https://www.investopedia.com/terms/r/risk-parity.asp" target="_blank" rel="noreferrer noopener">risk parity models</a> and <a href="https://www.investopedia.com/terms/c/cluster_analysis.asp" target="_blank" rel="noreferrer noopener">hierarchical clustering models</a>. By providing Excel templates, the user can make sense of the vast array of parameters that each command has. E.g. think of the historic period you wish to use or which of the more than 10 risk measures and covariance methods should be used? These are questions the templates make easier to answer.

## How to use
Start a Python script or Notebook file by importing the module:
Expand All @@ -18,7 +18,7 @@ This menu requires the usage of the Excel templates to work properly. As there i

:::note If you wish to load in your own Excel allocation file, please follow the following steps:
1. Download the Excel file that can be used as a template [here](https://www.dropbox.com/s/wp1lcq86exyngjy/allocation_example.xlsx?dl=0).
2. Move the file inside the `portfolio/allocation` folder within the [OpenBBUserData](https://docs.openbb.co/terminal/guides/advanced/data) folder and, optionally, adjust the name to your liking.
2. Move the file inside the `portfolio/allocation` folder within the [OpenBBUserData](https://docs.openbb.co/terminal/usage/guides///data) folder and, optionally, adjust the name to your liking.
3. Open the Excel file and remove, edit or add to the values as you desire (e.g. your own allocation). This is the default template that is also loaded in with `load --example`.
4. The file can now be used by following the guide.
:::
Expand All @@ -27,7 +27,7 @@ Furthermore, given the amount of options you can choose from in each command and

:::note If you wish to load in your own Excel or ini parameter file, please follow the following steps:
1. Download the file that can be used as a template: [xlsx](https://www.dropbox.com/s/qfhd7ntj7mlwsuc/parameters_template.xlsx?dl=0) (recommended) or [ini](https://www.dropbox.com/s/3ehwg3hiwm89hgo/parameters_template.ini?dl=0) (advanced).
2. Move the file inside the `portfolio/optimization` folder within the [OpenBBUserData](https://docs.openbb.co/terminal/guides/advanced/data) folder and, optionally, adjust the name to your liking.
2. Move the file inside the `portfolio/optimization` folder within the [OpenBBUserData](https://docs.openbb.co/terminal/usage/guides/data) folder and, optionally, adjust the name to your liking.
3. Open the file and set parameters as you wish.
4. Open up the OpenBB Terminal, go to `portfolio/po` and type `file --file`. The file should then be one of the options.
:::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords: [darkpools, dps, dark, pools, dp, short, shorts, naked, selling, sales
description: The Introduction to Dark Pools & Short Data, within the Stocks menu, which explains how to use the menu and provides a brief explanation of the features.
---

The `DPS` sub-module contains the commands from the [Dark Pools and Short Data menu](https://docs.openbb.co/terminal/guides/intros/stocks/dark-pool-shorts) within the OpenBB Terminal. These functions are meant to supplement other research on technical trading factors, settlement schedules, market flow, and volume dynamics. Commands are specifically for US-listed equities, and the data is reported to [FINRA](https://www.finra.org/#/) on a lagging schedule. Some will also have a `_chart` companion.
The `DPS` sub-module contains the commands from the [Dark Pools and Short Data menu](https://docs.openbb.co/terminal/usage/intros/stocks/dark-pool-shorts) within the OpenBB Terminal. These functions are meant to supplement other research on technical trading factors, settlement schedules, market flow, and volume dynamics. Commands are specifically for US-listed equities, and the data is reported to [FINRA](https://www.finra.org/#/) on a lagging schedule. Some will also have a `_chart` companion.

## How to Use

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords: [government, house, senate, politician, lobby, lobbyist, contract, con
description: This guide introduces the Government submenu, within the Stocks menu, by briefly explaining the features and how to use them, showing examples in context.
---

The Government module provides programmatic access to the same functions from the [OpenBB Terminal](https://docs.openbb.co/terminal/guides/intros/stocks/gov). They provide an excellent supplement to fundamental and macroeconomic research. Please note that this module will only return data from the USA.
The Government module provides programmatic access to the same functions from the [OpenBB Terminal](https://docs.openbb.co/terminal/usage/intros/stocks/gov). They provide an excellent supplement to fundamental and macroeconomic research. Please note that this module will only return data from the USA.

## How to Use

Expand Down
Loading