Convert Figma logo to code with AI

OpenBB-finance logoOpenBB

Investment Research for Everyone, Everywhere.

29,878
2,786
29,878
43

Top Related Projects

12,935

Download market data from Yahoo! Finance's API

15,147

Qlib is an AI-oriented quantitative investment platform that aims to realize the potential, empower research, and create value using AI technologies in quantitative investment, from exploring ideas to implementing productions. Qlib supports diverse machine learning modeling paradigms. including supervised learning, market dynamics modeling, and RL.

9,430

Lean Algorithmic Trading Engine by QuantConnect (Python, C#)

An open source reinforcement learning framework for training, evaluating, and deploying robust trading agents.

Python library for backtesting trading strategies & analyzing financial markets (formerly pythalesians)

Quick Overview

OpenBB is an open-source investment research platform that provides users with a comprehensive suite of financial analysis tools. It offers a command-line interface and a terminal application for accessing market data, performing technical analysis, and conducting fundamental research across various asset classes.

Pros

  • Extensive collection of financial data sources and analysis tools
  • Free and open-source, allowing for community contributions and customization
  • Supports multiple asset classes, including stocks, cryptocurrencies, and forex
  • Provides both command-line and graphical user interfaces for flexibility

Cons

  • Steep learning curve for users not familiar with command-line interfaces
  • Some advanced features may require additional setup or API keys
  • Documentation can be overwhelming due to the vast number of features
  • Performance may vary depending on the user's hardware and internet connection

Code Examples

  1. Fetching stock data:
from openbb_terminal.sdk import openbb

# Get daily stock data for Apple
aapl_data = openbb.stocks.load("AAPL")
print(aapl_data.head())
  1. Performing technical analysis:
from openbb_terminal.sdk import openbb

# Calculate and plot Moving Average Convergence Divergence (MACD)
openbb.ta.macd(data=aapl_data['Close'], fast=12, slow=26, signal=9, symbol="AAPL")
  1. Retrieving company financials:
from openbb_terminal.sdk import openbb

# Get income statement for Microsoft
msft_income = openbb.stocks.fa.income("MSFT")
print(msft_income)

Getting Started

To get started with OpenBB, follow these steps:

  1. Install OpenBB using pip:

    pip install openbb
    
  2. Import the OpenBB SDK in your Python script:

    from openbb_terminal.sdk import openbb
    
  3. Start using OpenBB functions, for example:

    # Load stock data
    stock_data = openbb.stocks.load("TSLA")
    
    # Display stock information
    openbb.stocks.info("TSLA")
    
    # Plot stock price chart
    openbb.stocks.candle(stock_data, symbol="TSLA")
    

For more detailed instructions and advanced usage, refer to the official OpenBB documentation.

Competitor Comparisons

12,935

Download market data from Yahoo! Finance's API

Pros of yfinance

  • Lightweight and focused solely on Yahoo Finance data retrieval
  • Simple to use with minimal setup required
  • Actively maintained with frequent updates

Cons of yfinance

  • Limited to Yahoo Finance as the sole data source
  • Lacks advanced financial analysis tools and visualizations
  • Prone to occasional issues due to changes in Yahoo Finance's structure

Code Comparison

yfinance

import yfinance as yf

ticker = yf.Ticker("AAPL")
hist = ticker.history(period="1mo")
print(hist.tail())

OpenBB

from openbb_terminal.sdk import openbb

aapl_data = openbb.stocks.load("AAPL")
hist = openbb.stocks.hist(aapl_data, start_date="2023-01-01")
print(hist.tail())

Summary

yfinance is a lightweight library focused on retrieving data from Yahoo Finance, making it easy to use for simple tasks. However, it lacks the comprehensive features and multiple data sources offered by OpenBB. OpenBB provides a more robust platform for financial analysis, including advanced tools and visualizations, but may require more setup and learning curve compared to yfinance's simplicity.

15,147

Qlib is an AI-oriented quantitative investment platform that aims to realize the potential, empower research, and create value using AI technologies in quantitative investment, from exploring ideas to implementing productions. Qlib supports diverse machine learning modeling paradigms. including supervised learning, market dynamics modeling, and RL.

Pros of Qlib

  • More focused on AI-driven quantitative investment strategies
  • Extensive documentation and research papers supporting its methodologies
  • Stronger emphasis on model training and backtesting capabilities

Cons of Qlib

  • Steeper learning curve for users without a strong background in machine learning
  • Less comprehensive in terms of general financial analysis tools
  • More limited in terms of data sources and asset classes covered

Code Comparison

OpenBB:

from openbb_terminal.sdk import openbb

# Fetch stock data
aapl_data = openbb.stocks.load("AAPL")

# Perform technical analysis
rsi = openbb.ta.rsi(aapl_data["Adj Close"])

Qlib:

from qlib.contrib.model.gbdt import LGBModel
from qlib.contrib.data.handler import Alpha158

# Initialize data handler
handler = Alpha158()

# Train model
model = LGBModel()
model.fit(handler)

Both repositories offer powerful tools for financial analysis, but they cater to different user needs. OpenBB provides a more comprehensive suite of financial tools accessible to a wider range of users, while Qlib focuses on advanced quantitative strategies using AI and machine learning techniques.

9,430

Lean Algorithmic Trading Engine by QuantConnect (Python, C#)

Pros of Lean

  • More comprehensive backtesting and live trading capabilities
  • Supports multiple asset classes (stocks, forex, crypto, options)
  • Larger community and ecosystem with extensive documentation

Cons of Lean

  • Steeper learning curve for beginners
  • Less focus on fundamental data and analysis tools
  • Requires more setup and configuration for local use

Code Comparison

OpenBB:

from openbb_terminal.sdk import openbb

# Fetch stock data
aapl_data = openbb.stocks.load("AAPL")

# Plot stock price
openbb.stocks.candle(data=aapl_data)

Lean:

public class MyAlgorithm : QCAlgorithm
{
    public override void Initialize()
    {
        SetStartDate(2020, 1, 1);
        SetCash(100000);
        AddEquity("AAPL", Resolution.Daily);
    }

    public override void OnData(Slice data)
    {
        if (!Portfolio.Invested)
        {
            SetHoldings("AAPL", 1);
        }
    }
}

OpenBB focuses on providing a user-friendly interface for financial data analysis and visualization, while Lean is geared towards algorithmic trading and backtesting. OpenBB is more accessible for beginners and offers a wide range of data sources, whereas Lean provides a more robust framework for developing and testing trading strategies across multiple asset classes.

An open source reinforcement learning framework for training, evaluating, and deploying robust trading agents.

Pros of TensorTrade

  • Focused specifically on reinforcement learning for algorithmic trading
  • Modular architecture allows for easy customization of trading environments
  • Integrates well with popular RL libraries like OpenAI Gym

Cons of TensorTrade

  • Less comprehensive in terms of general financial analysis tools
  • Smaller community and fewer contributors compared to OpenBB
  • More specialized, which may limit its use cases for broader financial applications

Code Comparison

TensorTrade example:

from tensortrade.env import TradingEnvironment
from tensortrade.feed import CSVFeed
from tensortrade.oms import instruments

environment = TradingEnvironment(
    feed=CSVFeed(data_frame=df),
    portfolio=Portfolio(USD=10000),
    action_scheme="managed-risk",
    reward_scheme="risk-adjusted",
    window_size=20
)

OpenBB example:

from openbb import obb

# Fetch stock data
stock_data = obb.stocks.load("AAPL", start_date="2022-01-01")

# Perform technical analysis
sma = obb.ta.sma(stock_data["Close"], 20)
rsi = obb.ta.rsi(stock_data["Close"])

The code examples highlight the different focus areas of each project. TensorTrade is geared towards creating trading environments for reinforcement learning, while OpenBB provides a broader set of financial analysis tools and data retrieval functions.

Python library for backtesting trading strategies & analyzing financial markets (formerly pythalesians)

Pros of finmarketpy

  • Focused specifically on financial market analysis and trading strategies
  • Includes advanced features like backtesting and market microstructure analysis
  • Lightweight and modular design for easy integration into existing workflows

Cons of finmarketpy

  • Smaller community and less frequent updates compared to OpenBB
  • More limited scope in terms of data sources and financial instruments covered
  • Less comprehensive documentation and tutorials for beginners

Code Comparison

finmarketpy:

from finmarketpy.backtest import Backtest
from finmarketpy.economics import Calculator

backtest = Backtest(start_date='2010-01-01', finish_date='2020-12-31')
calculator = Calculator()
sharpe = calculator.calculate_sharpe_ratio(backtest.returns)

OpenBB:

from openbb_terminal.sdk import openbb

aapl_data = openbb.stocks.load("AAPL")
ma = openbb.ta.ma(aapl_data["Adj Close"], 50, 200)
rsi = openbb.ta.rsi(aapl_data["Adj Close"])

The code examples showcase the different focus areas of each library. finmarketpy emphasizes backtesting and financial calculations, while OpenBB provides a broader range of financial data retrieval and analysis tools.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README


OpenBB Terminal logo OpenBB Terminal logo

Twitter Discord Shield Open in Dev Containers Open In Colab PyPI

The first financial Platform that is free and fully open source.

Offers access to equity, options, crypto, forex, macro economy, fixed income, and more while also offering a broad range of extensions to enhance the user experience according to their needs.

Sign up to the OpenBB Hub to get the most out of the OpenBB ecosystem.

We have also open source an AI financial analyst agent that can access all the data within OpenBB, and that repo can be found here.


If you are looking for the first AI financial terminal for professionals, the OpenBB Terminal Pro can be found at pro.openbb.co

Logo

Table of Contents

  1. Installation
  2. Contributing
  3. License
  4. Disclaimer
  5. Contacts
  6. Star History
  7. Contributors

1. Installation

The OpenBB Platform can be installed as a PyPI package by running pip install openbb

or by cloning the repository directly with git clone https://github.com/OpenBB-finance/OpenBB.git.

Please find more about the installation process in the OpenBB Documentation.

OpenBB Platform CLI installation

The OpenBB Platform CLI is a command-line interface that allows you to access the OpenBB Platform directly from your terminal.

It can be installed by running pip install openbb-cli

or by cloning the repository directly with git clone https://github.com/OpenBB-finance/OpenBB.git.

Please find more about the installation process in the OpenBB Documentation.

The OpenBB Platform CLI offers an alternative to the former OpenBB Terminal as it has the same look and feel while offering the functionalities and extendability of the OpenBB Platform.

2. Contributing

There are three main ways of contributing to this project. (Hopefully you have starred the project by now ⭐️)

Become a Contributor

Create a GitHub ticket

Before creating a ticket make sure the one you are creating doesn't exist already here

Provide feedback

We are most active on our Discord, but feel free to reach out to us in any of our social media for feedback.

3. License

Distributed under the AGPLv3 License. See LICENSE for more information.

4. Disclaimer

Trading in financial instruments involves high risks including the risk of losing some, or all, of your investment amount, and may not be suitable for all investors.

Before deciding to trade in a financial instrument you should be fully informed of the risks and costs associated with trading the financial markets, carefully consider your investment objectives, level of experience, and risk appetite, and seek professional advice where needed.

The data contained in the OpenBBTerminal is not necessarily accurate.

OpenBB and any provider of the data contained in this website will not accept liability for any loss or damage as a result of your trading, or your reliance on the information displayed.

All names, logos, and brands of third parties that may be referenced in our sites, products or documentation are trademarks of their respective owners. Unless otherwise specified, OpenBB and its products and services are not endorsed by, sponsored by, or affiliated with these third parties. Our use of these names, logos, and brands is for identification purposes only, and does not imply any such endorsement, sponsorship, or affiliation.

5. Contacts

If you have any questions about the terminal or anything OpenBB, feel free to email us at support@openbb.co

If you want to say hi, or are interested in partnering with us, feel free to reach us at hello@openbb.co

Any of our social media platforms: openbb.co/links

6. Star History

This is a proxy of our growth and that we are just getting started.

But for more metrics important to us check openbb.co/open.

Star History Chart

7. Contributors

OpenBB wouldn't be OpenBB without you. If we are going to disrupt financial industry, every contribution counts. Thank you for being part of this journey.