Skip to main content

Comparison Analysis

The CA module provides programmatic access to the commands from within the OpenBB Terminal menu. 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.ca

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 functions available within the module:

PathTypeDescription
openbb.stocks.ca.balanceFunctionBalance Financials Comparison
openbb.stocks.ca.cashflowFunctionCashflow Financials Comparison
openbb.stocks.ca.hcorrFunctionHistorical Price Correlation
openbb.stocks.ca.histFunctionHistorical Price Data Comparison
openbb.stocks.ca.incomeFunctionIncome Financials Comparison
openbb.stocks.ca.scorrFunctionSentiment Correlation
openbb.stocks.ca.screenerFunctionScreener Overview
openbb.stocks.ca.sentimentFunctionSentiment Analysis Comparison
openbb.stocks.ca.similarFunctionGet a List of Similar Companies
openbb.stocks.ca.volumeFunctionHistorical Volume Data Comparison

Alternatively, the contents of the menu is printed with:

help(openbb.stocks.ca)

Examples

Balance

openbb.stocks.ca.balance compares the balance sheets for a list of companies.

openbb.stocks.ca.balance(["TSLA","F", "GE"], timeframe = '2021')
ItemTSLAFGE
Cash & Short Term Investments18.05B49.59B28.07B
Cash & Short Term Investments Growth-8.00%-0.74%-35.99%
Cash Only17.92B20.54B15.77B
Short-Term Investments---
Cash & ST Investments / Total Assets29.05%19.29%14.11%
Total Accounts Receivable1.91B44.04B20.5B
Total Accounts Receivable Growth1.43%-16.24%-8.70%
Accounts Receivables, Net1.91B43.91B20.5B
Accounts Receivables, Gross1.91B44.28B21.58B
Bad Debt/Doubtful Accounts-(366M)(1.07B)
Other Receivable---
Accounts Receivable Turnover28.143.103.62
Inventories5.76B12.07B15.85B
Finished Goods1.28B6.28B4.93B
Work in Progress1.09B--
Raw Materials3.39B5.79B8.71B
Progress Payments & Other--2.21B
Other Current Assets1.38B3.3B1.93B
Miscellaneous Current Assets1.38B3.3B1.93B
Total Current Assets27.1B109B66.35B
Net Property, Plant & Equipment31.18B64.84B15.61B
Property, Plant & Equipment - Gross39.87B101.99B31.9B
Buildings4.68B12.44B8.31B
Land & Improvements-450M585M
Computer Software and Equipment1.41B4.6B-
Other Property, Plant & Equipment18.73B11.4B-
Accumulated Depreciation8.69B37.16B16.3B
Total Investments and Advances223M5.64B42.21B
Other Long-Term Investments223M197M42.21B
Long-Term Note Receivables299M51.26B-
Intangible Assets1.72B619M35.51B
Net Goodwill200M619M26.18B
Net Other Intangibles---
Other Assets1.62B11.89B28.34B
Total Assets62.13B257.04B198.87B
Total Assets Growth19.14%-3.83%-22.38%

Sentiment

Social sentiment over time, for a list of tickers:

openbb.stocks.ca.sentiment(["tsla", "f", "ge"])
TSLAFGE
2022-11-08-0.0280.3820.328
2022-11-090.2090.1990.242
2022-11-10-0.0250.1780.112
2022-11-110.0270.0860.056
2022-11-14-0.4020.1050.104
2022-11-15-0.1220.0810.075
2022-11-16-0.350.1790.086
2022-11-170.1560.3870.025
2022-11-180.2160.0930.019
2022-11-21-0.0710.0690.01

Screener

Show a high-level overview of company information for tickers in a given list

openbb.stocks.ca.screener(["f", "ge", "tsla"])
TickerCompanySectorIndustryCountryMarket CapP/EPriceChangeVolume
0FFord Motor CompanyConsumer CyclicalAuto ManufacturersUSA5.577e+106.3113.95-0.00293.40871e+07
1GEGeneral Electric CompanyIndustrialsSpecialty Industrial MachineryUSA9.375e+10nan85.890.00483.26976e+06
2TSLATesla, Inc.Consumer CyclicalAuto ManufacturersUSA5.3886e+1151.72167.87-0.06849.28827e+07

HCorr

Calculates the historical price (or returns) correlation for a list of tickers, over a specified window.

correlation,historical = (
openbb.stocks.ca.hcorr(similar = openbb.stocks.ca.similar('TSLA', source = 'Polygon'),
candle_type = 'R',
start_date = '2018-11-01'
)
)
correlation
HMCTMFGM
HMC10.744250.5961820.62178
TM0.7442510.5325890.539333
F0.5961820.53258910.787406
GM0.621780.5393330.7874061