* Many improvements to the documentation * Remove redundant guides * details * Add guide backin * linting * Update FAQs * Match it up with SDK * add po to sdk * Add PO in * adding discovery * adding BA and FA to sdk * Add in Troubleshooting page * quick fix on forecast * onemore quickie * fix sdk * updates to troubleshooting * Add in ticker to codespel so it doesn't whine Co-authored-by: Jeroen Bouma <jeroenbouma@Jeroens-MacBook-Pro.local> Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com> Co-authored-by: martinb-bb <105685594+martinb-bb@users.noreply.github.com> Co-authored-by: james <jmaslek11@gmail.com>
6.0 KiB
Vendored
title, keywords, excerpt
| title | keywords | excerpt | ||||||
|---|---|---|---|---|---|---|---|---|
| Behavioral Analysis |
|
This guide introduces the BA menu in the context of the OpenBB SDK. |
The BA module provides programmatic access to the commands from within the OpenBB Terminal. Import the OpenBB SDK module, and then access the functions similarly to how the Terminal menus are navigated. The code completion will be activated upon entering ., after, openbb.ba
How to Use
The examples provided below will assume that the following import block is included at the beginning of the Python script or Notebook file:
from openbb_terminal.sdk import openbb
A brief description below highlights the main Functions and Modules available in the BA SDK
| Path | Type | Description |
|---|---|---|
| openbb.ba.bullbear | Function | Estimate Quick Sentiment |
| openbb.ba.headlines | Function | Sentiment from 15+ News Headlines |
| openbb.ba.spacc | Function | Shows SPAC announcements from SPAC subreddit |
| openbb.ba.watchlist | Function | Show Other User's Watchlists |
| openbb.ba.messages | Function | Output last 30 messages on the board |
| openbb.ba.mentions | Function | Interest Over Time Based on Mentions |
| openbb.ba.hist | Function | Plot Historical RHI and AHI |
| openbb.ba.snews | Function | Stock Price Plotted Over Sentiment |
| openbb.ba.redditsent | Function | Search for Tickers and Find Sentiment |
| openbb.ba.popular | Function | Show Popular Tickers |
| openbb.ba.spac | Function | Shows Other User's SPAC Announcements |
| openbb.ba.getdd | Function | Get Due Diligence |
| openbb.ba.regions | Function | Regions Showing the Highest Interest |
| openbb.ba.trending | Function | Trending Stocks |
| openbb.ba.wsb | Function | Highlights from WSB Subreddit |
| openbb.ba.queries | Function | Top Related Queries |
| openbb.ba.sentiment | Function | Stock Sentiment Prediction from Last Tweets |
| openbb.ba.infer | Function | Stock Sentiment from Last Tweets |
| openbb.ba.stalker | Function | Stocktwit's last messages |
| openbb.ba.rise | Function | Top Rising Related Queries |
Alteratively you can print the contents of the BA SDK with:
help(openbb.ba)
Examples
headlines
Sentiment from over 15 news headlines for each day. This data can be used for further analysis of the stock
openbb.stocks.ba.headlines("TSLA")
| date | Sentiment Analysis |
|---|---|
| 2022-11-09 00:00:00 | 0.209 |
| 2022-11-10 00:00:00 | -0.025 |
| 2022-11-11 00:00:00 | 0.027 |
| 2022-11-14 00:00:00 | -0.402 |
| 2022-11-15 00:00:00 | -0.122 |
| 2022-11-16 00:00:00 | -0.35 |
| 2022-11-17 00:00:00 | 0.156 |
| 2022-11-18 00:00:00 | 0.216 |
| 2022-11-21 00:00:00 | -0.071 |
| 2022-11-22 00:00:00 | -0.003 |
regions
See the top regions where a stock is searched
openbb.stocks.ba.regions("TSLA")
| geoName | TSLA |
|---|---|
| Canada | 100 |
| United States | 95 |
| Singapore | 94 |
| Estonia | 51 |
| Taiwan | 50 |
| Slovenia | 40 |
| Switzerland | 36 |
| Denmark | 36 |
| New Zealand | 33 |
| Sweden | 31 |
| Finland | 24 |
| Australia | 24 |
| Belgium | 22 |
| Czechia | 20 |
| Bulgaria | 18 |
| United Arab Emirates | 17 |
| United Kingdom | 15 |
| Portugal | 12 |
| Austria | 11 |
| Romania | 10 |
| South Africa | 7 |
| Saudi Arabia | 7 |
| Germany | 7 |
| Argentina | 6 |
| Spain | 6 |
| France | 4 |
| Colombia | 4 |
| Philippines | 4 |
| Brazil | 4 |
| Thailand | 4 |
| Poland | 3 |
| Vietnam | 2 |
| Russia | 2 |
| Turkey | 2 |
| Pakistan | 0 |
rise
See which search queries are popular right now
openbb.stocks.ba.rise("AAPL")
| query | value | |
|---|---|---|
| 0 | nio | 220300 |
| 1 | nio stock | 106650 |
| 2 | pltr stock | 64750 |
| 3 | mrna stock | 59750 |
| 4 | nio stock price | 53450 |
| 5 | zm stock | 49500 |
| 6 | bynd | 44850 |
| 7 | pltr | 41000 |
| 8 | spce | 37350 |
| 9 | zm | 31650 |