Tuesday, March 18, 2025

Getting financial data in Python using the OpenBB SDK

The OpenBB SDK (also known as OpenBB Platform) is developed as open-source (the code is available on https://github.com/OpenBB-finance/OpenBB) by the company Open BB. It provides programmatic access to a wide range of financial data sources from one place in a standard way. 

By default, the OpenBB platform will attempt to download data from free sources such as Yahoo Finance but OpenBB SDK integrates with multiple data sources (Yahoo Finance, Alpha Vantage, FRED,FMP,SEC,etc ...). In most OpenBB API platform calls, you can indicate a different source - some of them free others requiring a separate subscription - allowing you to pull equities, options, crypto, forex and macroeconomic data using a single SDK. 



Since you can access both historical and real-time market data, OpenBB is ideal for backtesting and live trading strategies. The SDK is compatible with Jupyter Notebooks, Python scripts, and automated trading systems. I recently tested the OpenBB SDK as an alternative to Pandas_DataReader in Jupyter Notebooks, and it worked flawlessly.

I shared this Jupyter notebook on my Github repo:

https://github.com/jorisp/tradingnotebooks/blob/master/openbbdemo.ipynb

Please note that many of the code samples found in various articles and posts are no longer functional due to significant changes in the codebase. The shared Jupyter notebook has been tested with OpenBB 4.3.5 and Python 3.12.8.

Quick tip: command prompt shortcut for PAC development tools

Last year, I blogged about how you can use PAC to start the Plugin Registration Tool and Configuration Tool  (see Start CRM development tools from command prompt with Power Platform CLI). 

Remember that you quite easily create a shortcut for this as well by using "C:\Windows\System32\cmd.exe /k pac tool prt" as input for the shortcut.



Quick Tip: installing Azure Service Bus Explorer with Chocolatey

 Recently I had to reinstall Azure Service Bus Explorer on a new laptop and it seems that you now need to use Chocolatey (a package manager for Windows) to install Azure Service Bus Explorer. 

Installing Chocolatey, is quite straightforward, - you need to follow the steps outlined on Install Chocolatey for individual use - I installed Chocolatey using PowerShell prompt (with elevated privileges) and did not encounter any issues. 

Next you can simply install Azure Service Bus Explorer from command prompt using "choco install servicebusexplorer". By default it will install into this folder C:\ProgramData\chocolatey\lib\ServiceBusExplorer\tools\ServiceBusExplorer.exe . No issues encountered with version 6.0.3