Skip to main content

tradingcomdados

Introduction

Trading com Dados Library for quantitative finance

The library consists of a collection of methods that can be used in order to help Data Scientists, Quantitative Analysts and data professionals during the development of quantitative finance applications. One of the main objectives of the library is to provide methods to connect to Trading com dados' data provider services.

Library Motivation and Description

Trading com dados is an Edtech that provides educational content for people who want to know quantitative finance and in order to obtain that knowlegde, we need quality data, thus this library and our API service was created to solve that.

How to install

pip install tradingcomdados

Alternative Data

You can obtain alternative data from the Brazilian stock exchange (B3) and major U.S. stock exchanges such as NASDAQ, AMEX, and NYSE using this module. The goal is to facilitate data acquisition from sources like CVM, NASDAQ, B3, and others.

Features:

  • Updated Brazilian index compositions, such as IBOV, IFIX, IBRA, IDIV, SMLL, and BDRX.
  • Updated S&P 500 index composition.
  • Economic sector classifications for companies listed on the Brazilian stock exchange and major U.S. stock exchanges.
  • Active symbols of equities listed on B3 (stocks and BDRs) or investment funds such as Brazilian real estate investment funds (FII) and investment funds in agro-industrial productive chains (FIAGRO).
  • Historical cryptocurrency data from Binance.

Example Usage

from tradingcomdados import alternative_data as ad

# Obtaining the index composition:
ad.index_composition('ibov')
ad.index_composition('sp500')

# Returns the entire DataFrame from B3. You can also pass a list of desired symbols to get their composition:
ad.index_composition('ibov', assets=['RRRP3', 'ABEV3'])
ad.index_composition('sp500', assets=['MMM', 'AAPL'])

# You can use the parameter `mode` to return a list of the index composition symbols:
ad.index_composition('ibov', mode = 'list')
ad.index_composition('sp500', mode = 'list')

# Obtaining economic and sector classifications for companies listed on NASDAQ, NYSE, AMEX, or the Brazilian stock exchange (B3):
ad.get_sectors('B3')
ad.get_sectors('NASDAQ')

# Obtaining sector classification for specific companies listed on B3:
ad.get_sectors(stock_exchange='B3', symbols=['VALE3', 'PETR4'])

# Note: The function supports language options only for B3 data ('pt' for Portuguese; default is 'eng'):
ad.get_sectors(stock_exchange='B3', symbols=['VALE3', 'PETR4'], B3_language='pt')

# Obtaining sector classification for specific companies listed on major U.S. stock exchanges:
ad.get_sectors(stock_exchange='AMEX', symbols=['ZOM', 'AAMC'])
ad.get_sectors(stock_exchange='NASDAQ', symbols=['AAPL', 'META', 'TSLA', 'MSFT'])

# Obtaining a DataFrame of active symbols for a specific asset class listed on the Brazilian stock exchange (B3):
ad.get_symbols('STOCK')
ad.get_symbols('FII')
ad.get_symbols('BDR')

# You can use the parameter `mode` to return a list of symbols. Defaults to 'df' (DataFrame):
ad.get_symbols('BDR', mode='list')

# Retrieving historical cryptocurrency data from Binance: 
ad.get_histdata_binance('BTCUSDT', '5m', '2024-01-01', '2024-03-01')

Funds Data

Fetches data of investment funds from the Brazilian Securities and Exchange Commission (CVM)

from tradingcomdados import funds_data as fd

# Fetching daily data containing information such as quote value, number of investors, and so on

# It is mandatory to specify start and end dates.

# Example with a specific CNPJ:
fd.get_fund_data(start='2024-07-01', end='2024-07-10', cnpj='07.593.972/0001-86')

# Example without specifying a CNPJ (fetches data for all funds within the date range):
fd.get_fund_data(start='2024-07-01', end='2024-07-10')

# Fetch the registration data of investment funds

# This function can be called with or without specifying a CNPJ.

# Example with a specific CNPJ:
fd.get_funds_info('07.593.972/0001-86')

# Example without specifying a CNPJ (fetches data for all funds):
fd.get_funds_info()

Machine Learning

This library has a few machine learning models that you can use in your daily activities.

With our lib, you can easily implement machine learning models to your daily activities in the financial market.

from tradingcomdados import unsupervised_learning as ul

ul.clustering_pipeline()

Metadata

Release files for tradingcomdados 1.4.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for tradingcomdados 1.4.10
File Interpreter ABI Platform
tradingcomdados-1.4.10-py3-none-any.whl Python 3 none any Details

Release files / tradingcomdados-1.4.10-py3-none-any.whl

Download URL tradingcomdados-1.4.10-py3-none-any.whl
Size 29.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
06ae476b11505d765a400ef1e28fd99e6f1db7f5f575c833a19fb3ef9c2870fd
BLAKE2b-256 checksum
How to use checksums
abba9c9e2907ec6b70b7a7ce5da2de8ef00bbf75b9fb59497e55d9c546d5328f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.7

Release history Release notifications | RSS feed

This release

1.4.10 This release

1 release file

1.4.9

1 release file

1.4.8

1 release file

1.4.7

1 release file

1.4.6

1 release file

1.4.5

1 release file

1.4.4

1 release file

1.4.3

1 release file

1.4.2

1 release file

1.4.1

1 release file

1.4.0

2 release files

1.3.7

2 release files

1.3.6

2 release files

1.3.5

2 release files

1.3.4

2 release files

1.3.3

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.5

1 release file

1.2.4

1 release file

1.2.3

1 release file

1.2.2

1 release file

1.2.1

1 release file

1.1.1

1 release file

1.1.0

1 release file

1.0.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page