This tutorial spans a range of financial topics, each delving into how OpenBB can be harnessed effectively for distinct financial domains. From installation tips and activating environments to navigating the terminal and harnessing its power in stocks, fixed income, macroeconomic research, foreign exchange, and cryptocurrency analysis, I'll provide you with insightful examples and practical installation guidance.
OpenBB is an innovative and modern financial tool which I’ve been using since its inception back in 2021. I’m excited to guide you through the intricacies of utilizing OpenBB in various finance applications.
Table of Contents
- Installation of OpenBB
- Using environments
- Starting OpenBB
- Using OpenBB for stocks
- Using OpenBB for fixed income
- Using OpenBB for macroeconomic research
- Using OpenBB for FX
- Using OpenBB for crypto
- Bonus: Non-Fungible Tokens
- Summary
Installation of OpenBB
Installation of OpenBB may appear slightly more complicated than usual but it’s nothing to be scared of if you make sure to install the necessary packages for your operating system. We have outlined a few below. For example, if you are on Windows, you might need to install C++ libraries (links below) or if you are on MacOS, you might need to install LibOMP and Rosetta if they’re not already installed. If you try to install OpenBB directly, it might still work but if it doesn’t start properly it’s most often because necessary software packages are missing in the system.
Once you install those libraries OpenBB runs seamlessly. You can choose the route that's needed for your computer’s OS in the section below. I recommend installing all of them to have a smooth experience and to ensure all the components are functioning properly.
Python, Git and Miniconda installations are necessary regardless of your OS. Once you have them installed you can proceed with the installations below:
Windows: Microsoft C++
Linux: GTK Toolchains
Finally, once you have Python, Git, Miniconda and OS-specific dependencies installed you can Install OpenBB.
The reason these dependencies exist for OpenBB installation is because it’s a robust Financial Data Terminal comparable to industry giants like Reuters Eikon and the Bloomberg Terminal. It's common for such software to work in a larger environment than usual.
Using environments
Conda is an open-source package management and environment management system commonly used in the Python programming language. It helps developers and data scientists manage software dependencies, create isolated environments for different projects, and easily install, update, and uninstall packages and libraries. Conda command will be available after installing Miniconda which is a free minimalist installer solution for Conda.
With Conda, you can activate the obb environment that's setup while installing OpenBB by running this command:
conda activate miniconda/envs/obb
The benefit of this approach is that all of OpenBB-related packages stay in an isolated environment and in case you need to reinstall or uninstall something in the future, you can do so without messing up delicate system components. It can also be useful to manage versions of packages in some cases.
Starting OpenBB
Once you have necessary installations done, running OpenBB Terminal is quite straightforward.
Just navigate to the installation folder of OpenBB and run the following command with Python.
Start command: python terminal.py
Using OpenBB for stocks
Stocks are the most comprehensive compartment of the open source terminal OpenBB. You can find tons of valuable features for not only stocks trading but also equity research, credit analysis, private equity and hedge fund related tasks as well.
There are a few main categories for exploring stock-related features of OpenBB. Those can be listed as:
- Quantitative Analysis
- Fundamental Analysis
- Technical Analysis
- Behavioral Analysis
- Comparison Analysis
- Options
- Backtesting
Additionally, the stocks section of OpenBB will provide some experimental features such as trending stock discovery, insider trading data and screener stocks.
These sections all open to a world of their own. For example options will provide option chains based on stocks as well as option greeks and advanced volatility calculations. Quantitative analysis is packed with amazing features including sharpe ratio, VaR, skewness, kurtosis and cumulative distribution functions. The best thing is you can view/import everything with a single command from your OpenBB Terminal.
Let’s make a few examples to provide guidance on OpenBB's stock-related features.
We will launch OpenBB terminal by running python terminal.py and then navigate to the stocks section. After loading Palantir, we can run the candle command to retrieve a candle chart of the Palantir stock.
Data source: OpenBB stocks / load PLTR / candle
If we then run the news command, we can also get breaking news about Palantir shares and they can be very insightful as well. For example, in this particular instance we see unusual put option trade in PLTR stocks which can be a bearish sign.
PyFi Blog has an article related to options and derivatives which takes a closer look at OpenBB’s option-related stock features and the underlying mathematical formula used in option price calculations Black and Scholes.
Let’s take a look at some of the quantitative analysis features. Under stocks, I will run the qa command to access quantitative analysis features. When we run the skew command, we get a chart showing the swings in the returns of the stock. Skew can be used to determine the risk involved with the asset and it’s a highly useful indicator.
If we run cdf, we can see the cumulative distribution function.
We can navigate back to the stocks root directory by using two dots .. We can then jump to fa (fundamental analysis) and run shrs to see who owns Palantir shares. Here are the results:
If you run rating, you will get analyst ratings for the loaded asset and again this is incredibly convenient. You don’t have to fish all the analyst rankings from individual resources and it’s a great overview of what Wall Street is thinking about the particular asset at a particular time.
You can also access income statements, balance sheet, cash flow, growth and even fraud-related data as well as other SEC filings. If you have FinancialModelingPrep API then it’s possible to access fundamental analysis ratios as well.
Finally, I’d like to show an interesting function I’ve found under OpenBB’s comparison analysis section. The tsne command will use a machine learning clustering algorithm named t-distributed stochastic neighbor embedding (t-SNE) to map the whole S&P 500 and show the stocks that are closest to the loaded asset based on return profiles. In the Palantir case we see Tesla stock is the closest asset in resemblance which is interesting given the founders of both companies are old friends and co-founders of Paypal. Here is the map.
Data source: OpenBB stocks/load PLTR/ca/tsne
Using OpenBB for fixed income
I particularly enjoy the fixed income features of OpenBB and have friends who work at bank treasuries that use it on a daily basis. It's packed with rich fixed income data that's very convenient to retrieve. You can access a range of reference rates, central bank rates, government and corporate bond data, as well as various spreads, OpenBB becomes an invaluable resource for examining fixed income markets. Researchers and analysts can efficiently track and evaluate crucial interest rates, yield curves, bond indices, and spreads. Whether it's exploring government bonds, corporate bonds, or assessing yield curve dynamics.
Here's a summarized list of available fixed income indices, reference rates, central bank rates, government bonds, corporate bonds, and spreads from the provided data:
Indices Available for Analysis:
- ICE BofA Corporate Indices
- Moody's AAA and BAA Corporate Indices
- Short-term, promissory notes issued by corporations
- Spot rates ranging from 1 year to 100 years
- The High Quality Market (HQM) corporate yield curve
Spreads Available for Analysis:
- ICESpread
- TMC (10-Year Treasury Minus Selected Treasury)
- FFRMC (Selected Treasury Minus Federal Funds Rate)
- TBFRR (Selected Treasury Bill Minus Federal Funds Rate)
Reference Rates:
- ESTR (Euro Short-Term Rate)
- SOFR (Secured Overnight Financing Rate)
- SONIA (Sterling Overnight Index Average)
- Ameribor (American Interbank Offered Rate)
Central Bank Rates:
- Fed (Effective Federal Funds Rate)
- Projection (Federal Reserve's Projection of Federal Funds Rate)
- IORB (Interest Rate on Reserve Balances)
- DWPCR (Discount Window Primary Credit Rate)
- ECB (Key ECB Interest Rates)
Government Bonds:
- Treasury Rates (Including Forecast)
- USRates (U.S. Secondary Market, Constant Maturity, or Inflation Protected Treasuries)
- YCRV (Yield Curve Based on Constant Maturity U.S. Treasuries)
- ECBYCRV (Yield Curve Based on Euro Area Treasuries)
Corporate Bonds:
- ICEBofA (ICE BofA Corporate Indices)
- Moody (Moody's AAA and BAA Corporate Indices)
- CP (Short-Term, Promissory Notes Issued by Corporations)
- Spot (Spot Rates Ranging from 1 Year to 100 Years)
- HQM (High Quality Market Corporate Yield Curve)
Majority of fixed income data points use FRED and you need a FRED API key to access the fixed income data.
Using OpenBB for macroeconomic research
OpenBB presents a powerful toolset for conducting macroeconomic research. Its capabilities enable researchers to delve deep into economic trends, analyze data, and draw valuable insights.
You can access a number of economic data. I particularly like that both realized and forecasted values are available for some of them such as GDP. Here is a curated list of what's already available at OpenBB terminal.
- GDP (Nominal Gross Domestic Product)
- RGDP (Real Gross Domestic Product)
- FGDP (Forecasts of Nominal and Real Gross Domestic Product)
- Debt (Government Debt-to-GDP Ratio)
- CPI (Consumer Price Index)
- CCPI (Components of the CPI including Food, Energy, and Total)
- Balance (Government Deficit or Surplus in Capital Income and Expenditures)
- Revenue (Government Revenue Based on Tax Income)
- Spending (Government Spending as an Indicator of Size of Government)
- Trust (Government Trust Based on Surveys Regarding Confidence in the Government)
Additionally, you can dive deeper and even conduct searches at the sector level which includes Utilities, Technology, Real Estate, Industrials, Healthcare, Financial, Energy, Consumer Defensive, Consumer Cyclical, Communication Services, Basic Materials, and more.
Using OpenBB for FX
On the forex side of things OpenBB offers a simple yet highly efficient toolset. You can select from a satisfying selection of foreign currency pairs and load the one you desire. Then you can get the latest quote and historical data as well as the pair's forward rates.
Data source: OpenBB forex/ load -t EURUSD
Above, we are using the forex module and loading the Euro / USD currency pair. Then we can simply run the quote command to get the most recent quote for the pair.
And we can also run the candle command to get a candlestick chart of the prices like below.
Using OpenBB for Crypto
Cryptocurrency trading has emerged as a dynamic and highly lucrative field within the financial landscape. With the rapid growth and adoption of cryptocurrencies, the importance of having access to a reliable and comprehensive data terminal like OpenBB cannot be overstated. Let's look at the various sections under crypto features of OpenBB.
Discovery tools: Under discovery for crypto, you can see top coins by market cap and their trading volumes, top gainers in the markets as well as top losers and top trending. Being able to access this data so conveniently from a Python script or OpenBB terminal makes it very useful to stay on top of ever-evolving crypto markets.
Some examples to discovery tools:
Data source: OpenBB crypto/disc/top
Data table above shows the top crypto assets by market cap. Below we will run the trending command to get the trending cryptos on CoinGecko using the OpenBB terminal.
Data source: OpenBB crypto/disc/trending
You can also try gainers and losers to get insights into the cryptocurrencies that have experienced significant price increases and decreases.
Overview tools: When we look at the overview tools they are even more impressive as crypto data is aggregated to present overall stats of the global crypto markets which can give insight into the trading health or direction of the crypto industry in general. Furthermore, under overview tools we can see category-specific data about stables and defi and check out the crypto exchange activities. Finally, there are quite a few features to explore under the crypto overview section but I particularly enjoy using news and crypto hacks to find out new information that's related to big events or cybersecurity.
Data source: OpenBB crypto/ov/global
Data source: OpenBB crypto/ov/ch
The Ch command can be used to list the famous crypto hacks.
Onchain Analysis: For savvy crypto traders or hedge funds who specialize in crypto assets, onchain analysis offers insight to transactions happening on various chains as well as Bitcoin hash rates, ETH fees or whale activities.
Decentralized Finance: OpenBB provides an array of essential features that empower users with invaluable insights and data about defi category. Among its diverse offerings are features like the "Newsletter," which keeps users informed about recent DeFi-related newsletters, and the "Vaults" section that enables exploration of top DeFi Vaults across various blockchains. The "Tokens" feature provides information on tokens available for trading on Uniswap, while "Stats" delivers essential base statistics about Uniswap's performance. You can also keep track of the latest "Pairs" added to Uniswap, analyze "Pools" based on their volume, and stay updated on recent "Swaps" executed on the platform. With historical data at your fingertips, you can delve into trends like the historical sum of Total Value Locked (TVL).
Bonus: Non-Fungible Tokens
Additionally, if you are interested in trading NFTs, OpenBB has a dedicated NFT section under crypto which offers valuable trading insights. For example, you can use fp to see the floor price of an NFT collection blended with the sales volume. This can give an accurate indication to the liquidity of the collection and how healthy the sales are looking. Here is an example:
Data source: OpenBB crypto/nft/fp -s cryptopunks
We are using the fp command for floor price for slug “cryptopunks”. The result is a great chart that shows the price overlaid on the sales activity of the famous cryptopunks collection.
Summary
In this comprehensive blog post, we've explored some of the functionalities and capabilities of OpenBB, a powerful Financial Data Terminal that can be an alternative to standard financial data tools used in the industry. We've examined various aspects of utilizing OpenBB for different finance applications, providing you with a comprehensive understanding of its features and we have demonstrated various examples and installation tips that can help finance professionals save time in getting started with this powerful new tool.
In conclusion, OpenBB stands as a versatile and comprehensive tool that's more than just a financial data source. It's a powerhouse for conducting sophisticated financial analysis, research, and trend exploration across various domains. Whether you're an equity trader, fixed income analyst, macroeconomic researcher, FX analyst or even a crypto trader, OpenBB empowers you to make data-driven decisions in the world of financial markets. As you embark on your finance journey, you'll discover the immense value of streamlining your financial analysis, enhancing your insights, and ultimately contributing to more informed and successful investment decisions.
Written by Umut Sagir, MSc Finance