Files
OpenBB/website/content/sdk/data-available/stocks/behavioral-analysis.md
DidierRLopes 4ad995fdd0 Docs/terminalpro and improvement (#5622)
* add first iteration of content for Terminal Pro

* Update index.md

* Update dashboards.md

* Update folders.md

* Update grouping.md

* Update report.md

* Update templates.md

* Update quick-start.md

* Update index.md

* Update index.md

* Update home.md

* Update news.md

* Update index.md

* Update index.md

* Update index.md

* Update data-provider.md

* Update chat-with-widget.md

* Update data-manipulation.md

* Update forecasting.md

* fix: images self closing tags

* fix: only pro visitors can see pro

* inter font

* improve SEO content and restructuring

* add new package for toggle on tutorials

* move folder around

* improve main page of each prod

* small updates and improvements

* fix logo above

* small improvement in headtitle for portfolio funcs

* fix typos from OpenAI's GPT-4

* fix _category_ json

* remove generic SEO words

* add script that generates SEO for documentation

* add missing file

* remove sdk warning message

* fix links for andrew

---------

Co-authored-by: jose-donato <zmcdonato@gmail.com>
Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com>
Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com>
2023-10-30 21:01:29 +00:00

6.7 KiB
Vendored
Raw Blame History

title, description, keywords
title description keywords
Behavioral Analysis This page provides insightful information on how to use the BA module within the OpenBB Terminal. It gives detailed examples of utilizing various functions in Python for stock sentiment analysis, region-based popularity, trending queries, and more.
BA module
Stock sentiment analysis
Region-based popularity
Trending queries
Stocktwit's messages
stock due diligence
function and modules
stock market
sentiment prediction
programming
code completion

import HeadTitle from '@site/src/components/General/HeadTitle.tsx';

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.stocks.ba.bullbear Function Estimate Quick Sentiment
openbb.stocks.ba.headlines Function Sentiment from 15+ News Headlines
openbb.stocks.ba.spacc Function Shows SPAC announcements from SPAC subreddit
openbb.stocks.ba.watchlist Function Show Other User's Watchlists
openbb.stocks.ba.messages Function Output last 30 messages on the board
openbb.stocks.ba.mentions Function Interest Over Time Based on Mentions
openbb.stocks.ba.hist Function Plot Historical RHI and AHI
openbb.stocks.ba.snews Function Stock Price Plotted Over Sentiment
openbb.stocks.ba.redditsent Function Search for Tickers and Find Sentiment
openbb.stocks.ba.popular Function Show Popular Tickers
openbb.stocks.ba.spac Function Shows Other User's SPAC Announcements
openbb.stocks.ba.getdd Function Get Due Diligence
openbb.stocks.ba.regions Function Regions Showing the Highest Interest
openbb.stocks.ba.trending Function Trending Stocks
openbb.stocks.ba.wsb Function Highlights from WSB Subreddit
openbb.stocks.ba.queries Function Top Related Queries
openbb.stocks.ba.sentiment Function Stock Sentiment Prediction from Last Tweets
openbb.stocks.ba.infer Function Stock Sentiment from Last Tweets
openbb.stocks.ba.stalker Function Stocktwit's last messages
openbb.stocks.ba.rise Function Top Rising Related Queries

Alternatively you can print the contents of the BA SDK with:

help(openbb.stocks.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