^^。

verify-tagB3 Stock Market Data: Unveiling Brazilian Trading

brazilfinancepcainvesting

6

已售 0
889.65MB

数据标识:D17171428476685383

发布时间:2024/05/31

以下为卖家选择提供的数据验证报告:

数据描述

Description

The "B3 Stock Market Dataset: Brazilian Stock Exchange Data" is a comprehensive collection of stock trading data from the B3 (Bolsa de Valores, Mercadorias e Futuros de São Paulo) exchange in Brazil. This dataset provides a detailed record of trading activities for various assets, offering insights into stock market trends and behaviors.

> The Python algorithm provided is essential for transforming the raw data into an organized DataFrame for analysis. Please make sure to follow the provided algorithm instructions to process and analyze the B3 stock market data effectively.

The algorithm is at the end of the description

Features

  • TIPREG: Type of record.
  • DATPRE: Trading date.
  • CODNEG: Asset's trading code.
  • NOMRES: Abbreviated name of the issuing company.
  • ESPECI: Specification of the type of share or asset.
  • PREABE: Opening price.
  • PREMAX: Highest price during the trading session.
  • PREMIN: Lowest price during the trading session.
  • PREMED: Average price during the trading session.
  • PREULT: Closing price.
  • PREOFC: Best bid price.
  • PREOFV: Best ask price.
  • QUATOT: Total quantity of traded securities.
  • VOLTOT: Total trading volume in currency units.
  • CODISI: ISIN code of the asset.
  • DISMES: Number of working days in the month.

Usage of Algorithm

The provided algorithm is mandatory for data processing and analysis in tabular format. It ensures that the data is properly organized and processed according to the specified attributes.

def tratamento(caminho_arquivo): # File Path ( TXT )     # Lista para armazenar os dados organizados     ordem = []      # Leitura do arquivo de dados brutos     with open(caminho_arquivo, 'r') as arquivo:         linhas = arquivo.readlines()      # Configuração da barra de carregamento     with tqdm(total=len(linhas), desc='Processando', bar_format='{l_bar}{bar}| {n_fmt}/{total_fmt}') as pbar:         # Iteração pelas linhas do arquivo         for linha in linhas:              if linhas == '':                 continue              # Extrai as informações de cada campo             tipreg = int(linha[0:2])             datpre = pd.to_datetime(linha[2:10], format='%Y%m%d', errors='coerce')             if pd.isnull(datpre):                 continue             codneg = linha[12:24].strip()             nomres = linha[27:39].strip()             especi = linha[39:49].strip()             preabe = float(linha[56:69]) / 100             premax = float(linha[69:82]) / 100             premin = float(linha[82:95]) / 100             premed = float(linha[95:108]) / 100             preult = float(linha[108:121]) / 100             preofc = float(linha[121:134]) / 100             preofv = float(linha[134:147]) / 100             quatot = int(linha[152:170])             voltot = float(linha[170:188]) / 100             codisi = linha[245:257].strip()             dismes = int(linha[257:260]) if linha[257:260].strip() else 0              # Adiciona os dados à lista             ordem.append([tipreg, datpre, codneg, nomres, especi, preabe, premax, premin,                                       premed, preult, preofc, preofv, quatot, voltot, codisi, dismes])              # Atualiza a barra de carregamento             pbar.update(1)      # Criação do DataFrame com os dados organizados     df = pd.DataFrame(ordem, columns=['TIPREG', 'DATPRE', 'CODNEG', 'NOMRES', 'ESPECI',                                                    'PREABE', 'PREMAX', 'PREMIN', 'PREMED', 'PREULT',                                                    'PREOFC', 'PREOFV', 'QUATOT', 'VOLTOT', 'CODISI', 'DISMES'])      df_dict = {         'TIPREG': 'Tipo de registro',         'DATPRE': 'Data de pregão',         'CODNEG': 'Código de negociação do ativo',         'NOMRES': 'Nome resumido da empresa emissora do ativo',         'ESPECI': 'Especificação do tipo de ação ou ativo',         'PREABE': 'Preço de abertura',         'PREMAX': 'Preço máximo',         'PREMIN': 'Preço mínimo',         'PREMED': 'Preço médio',         'PREULT': 'Preço de fechamento',         'PREOFC': 'Preço da melhor oferta de compra',         'PREOFV': 'Preço da melhor oferta de venda',         'QUATOT': 'Quantidade total de títulos negociados',         'VOLTOT': 'Volume total de títulos negociados',         'CODISI': 'Código ISIN do ativo',         'DISMES': 'Número de dias úteis do mês'     }      df.rename(columns=df_dict)      # Exibe o DataFrame     return df 
data icon
B3 Stock Market Data: Unveiling Brazilian Trading
6
已售 0
889.65MB
申请报告