non_bbg_data_updater.md¶
title: non_bbg_data_updater.py¶
non_bbg_data_updater.py¶
Cria hist_non_bbg_px_last.parquet com séries personalizadas (IPCA+7, Hawker…).
create_fixed_index(non_bbg_base, annual_return, index_ticker)
¶
Cria um indicador com valor fixo de rendimento colocando direto na tabela de ativos nao bbg.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
non_bbg_base
|
DataFrame
|
base historica de ativos nao bbg. |
required |
annual_return
|
float
|
valor fixo de retorno. |
required |
index_ticker
|
str
|
ticker que sera usado para busca de precos. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
_type_ |
description |
Source code in source_bases/scripts/non_bbg_data_updater.py
505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 | |
create_loan_usdeur_index(query_mngr, non_bbg_base, annual_return, loan_date, index_ticker)
¶
Cria um indicador com valor fixo de rendimento com variacao do cambio usdeur colocando direto na tabela de ativos nao bbg.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
non_bbg_base
|
DataFrame
|
base historica de ativos nao bbg. |
required |
annual_return
|
float
|
valor fixo de retorno. |
required |
index_ticker
|
str
|
ticker que sera usado para busca de precos. |
required |
Returns:
| Type | Description |
|---|---|
|
pd.DataFrame: non_bbg_base |
Source code in source_bases/scripts/non_bbg_data_updater.py
528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 | |
create_variable_index(non_bbg_base, new_index_ticker, query_mngr, index_ticker_variable, fixed_return)
¶
Metodo padronizado para criacao de um index que possui uma parte variavel e uma fixa. A parte variavel precisa estar ho historico de precos da luxor_db. Args: non_bbg_base (pd.DataFrame): base historica de ativos nao bbg. new_index_ticker (str): ticker do novo index. query_mngr (LuxorQuery): referencia ao modulo de consulta a luxor_db. index_ticker_variable (str): ticker do index variavel. fixed_return (float): retorno fixo na base anual.
Source code in source_bases/scripts/non_bbg_data_updater.py
570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 | |
set_df_index(data, index_col, persist_cols=None)
¶
Defines a new index to a dataframe and removes index_col
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dataframe
|
|
required |
index_col
|
string
|
name of the column to use as index |
required |
persist_cols
|
list
|
list of column names to keep in the dataframe |
None
|
Source code in source_bases/scripts/non_bbg_data_updater.py
486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 | |