PYield 0.46.4__tar.gz → 0.46.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyield-0.46.4 → pyield-0.46.6}/PKG-INFO +1 -1
- pyield-0.46.6/pyield/__about__.py +1 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/b3/futures/historical.py +14 -12
- pyield-0.46.4/pyield/__about__.py +0 -1
- {pyield-0.46.4 → pyield-0.46.6}/.gitignore +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/LICENSE +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/README.md +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/__init__.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/_internal/__init__.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/_internal/br_numbers.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/_internal/cache.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/_internal/converters.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/_internal/data_cache.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/_internal/retry.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/_internal/types.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/anbima/__init__.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/anbima/difusao.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/anbima/ettj_intraday.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/anbima/ettj_last.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/anbima/ima.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/anbima/imaq.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/anbima/tpf.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/b3/__init__.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/b3/_contracts.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/b3/_validar_pregao.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/b3/di1.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/b3/di_over.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/b3/futures/__init__.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/b3/futures/common.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/b3/futures/intraday.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/b3/intraday_derivatives.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/b3/price_report.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/bc/__init__.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/bc/auction.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/bc/copom.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/bc/ptax_api.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/bc/rates.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/bc/repo.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/bc/trades_intraday.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/bc/trades_monthly.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/bc/vna.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/bday/__init__.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/bday/core.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/bday/holidays/br_holidays_new.txt +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/bday/holidays/br_holidays_old.txt +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/bday/holidays/brholidays.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/clock.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/fwd.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/interpolator.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/ipca/__init__.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/ipca/historical.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/ipca/projected.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/py.typed +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/rmd.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/selic/__init__.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/selic/cpm.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/selic/probabilities.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/tn/__init__.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/tn/auctions.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/tn/benchmark.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/tn/lft.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/tn/ltn.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/tn/ntnb.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/tn/ntnb1.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/tn/ntnbprinc.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/tn/ntnc.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/tn/ntnf.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/tn/pre.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyield/tn/utils.py +0 -0
- {pyield-0.46.4 → pyield-0.46.6}/pyproject.toml +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyield
|
|
3
|
-
Version: 0.46.
|
|
3
|
+
Version: 0.46.6
|
|
4
4
|
Summary: A Python library for analysis of fixed income instruments in Brazil
|
|
5
5
|
Project-URL: Homepage, https://github.com/crdcj/PYield
|
|
6
6
|
Project-URL: Documentation, https://crdcj.github.io/PYield
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.46.6"
|
|
@@ -14,14 +14,16 @@ from pyield.fwd import forwards
|
|
|
14
14
|
CONTRATOS_TAXA = {"DI1", "DAP", "DDI", "FRC", "FRO"}
|
|
15
15
|
|
|
16
16
|
# Renomeação preco_* → taxa_* para contratos cotados por taxa.
|
|
17
|
+
# Bid/Ask são invertidos: BestBidPric (bid em PU) = menor taxa = venda de taxa;
|
|
18
|
+
# BestAskPric (ask em PU) = maior taxa = compra de taxa.
|
|
17
19
|
_PRECO_PARA_TAXA = {
|
|
18
20
|
"preco_abertura": "taxa_abertura",
|
|
19
21
|
"preco_minimo": "taxa_minima",
|
|
20
22
|
"preco_maximo": "taxa_maxima",
|
|
21
23
|
"preco_medio": "taxa_media",
|
|
22
24
|
"preco_fechamento": "taxa_fechamento",
|
|
23
|
-
"preco_ultima_oferta_compra": "
|
|
24
|
-
"preco_ultima_oferta_venda": "
|
|
25
|
+
"preco_ultima_oferta_compra": "taxa_ultima_oferta_venda",
|
|
26
|
+
"preco_ultima_oferta_venda": "taxa_ultima_oferta_compra",
|
|
25
27
|
"preco_limite_minimo": "taxa_limite_minimo",
|
|
26
28
|
"preco_limite_maximo": "taxa_limite_maximo",
|
|
27
29
|
}
|
|
@@ -30,10 +32,10 @@ _PRECO_PARA_TAXA = {
|
|
|
30
32
|
_RENOMEAR_COLUNAS_PR = {
|
|
31
33
|
"TradDt": "data_referencia",
|
|
32
34
|
"TckrSymb": "codigo_negociacao",
|
|
33
|
-
"TradQty": "numero_negocios",
|
|
34
|
-
"NtlFinVol": "volume_financeiro",
|
|
35
35
|
"OpnIntrst": "contratos_abertos",
|
|
36
|
+
"TradQty": "numero_negocios",
|
|
36
37
|
"FinInstrmQty": "volume_negociado",
|
|
38
|
+
"NtlFinVol": "volume_financeiro",
|
|
37
39
|
"BestBidPric": "preco_ultima_oferta_compra",
|
|
38
40
|
"BestAskPric": "preco_ultima_oferta_venda",
|
|
39
41
|
"FrstPric": "preco_abertura",
|
|
@@ -43,7 +45,6 @@ _RENOMEAR_COLUNAS_PR = {
|
|
|
43
45
|
"LastPric": "preco_fechamento",
|
|
44
46
|
"AdjstdQt": "preco_ajuste",
|
|
45
47
|
"AdjstdQtTax": "taxa_ajuste",
|
|
46
|
-
"AdjstdValCtrct": "valor_contrato_ajustado",
|
|
47
48
|
"MaxTradLmt": "preco_limite_maximo",
|
|
48
49
|
"MinTradLmt": "preco_limite_minimo",
|
|
49
50
|
}
|
|
@@ -87,7 +88,6 @@ def historical(
|
|
|
87
88
|
* numero_negocios (Int64): número de negócios.
|
|
88
89
|
* volume_negociado (Int64): quantidade de contratos negociados.
|
|
89
90
|
* volume_financeiro (Float64): volume financeiro bruto.
|
|
90
|
-
* valor_contrato_ajustado (Float64): valor do contrato ajustado.
|
|
91
91
|
* preco_limite_minimo (Float64): limite mínimo de variação (preço).
|
|
92
92
|
* preco_limite_maximo (Float64): limite máximo de variação (preço).
|
|
93
93
|
* preco_abertura (Float64): preço de abertura.
|
|
@@ -107,10 +107,10 @@ def historical(
|
|
|
107
107
|
* taxa_maxima (Float64): taxa máxima negociada.
|
|
108
108
|
* taxa_media (Float64): taxa média negociada.
|
|
109
109
|
* taxa_fechamento (Float64): última taxa negociada (last).
|
|
110
|
-
* taxa_ultima_oferta_compra (Float64): melhor taxa de compra
|
|
111
|
-
(bid) no fim do pregão.
|
|
112
110
|
* taxa_ultima_oferta_venda (Float64): melhor taxa de venda
|
|
113
|
-
(
|
|
111
|
+
(dar; bid em PU) no fim do pregão.
|
|
112
|
+
* taxa_ultima_oferta_compra (Float64): melhor taxa de compra
|
|
113
|
+
(tomar; ask em PU) no fim do pregão.
|
|
114
114
|
* taxa_ajuste (Float64): taxa de ajuste.
|
|
115
115
|
* taxa_forward (Float64): taxa a termo (apenas DI1/DAP).
|
|
116
116
|
|
|
@@ -122,7 +122,10 @@ def historical(
|
|
|
122
122
|
|
|
123
123
|
``*_fechamento`` é o último negócio realizado (last trade).
|
|
124
124
|
``*_ultima_oferta_*`` é o bid/ask ao fim do pregão — não
|
|
125
|
-
representa negócio realizado e pode ser nulo.
|
|
125
|
+
representa negócio realizado e pode ser nulo. Para contratos de
|
|
126
|
+
taxa (DI1, DAP, etc.), bid/ask são invertidos em relação ao PU:
|
|
127
|
+
``taxa_ultima_oferta_compra`` = maior taxa (ask em PU),
|
|
128
|
+
``taxa_ultima_oferta_venda`` = menor taxa (bid em PU).
|
|
126
129
|
"""
|
|
127
130
|
codigos = normalizar_codigos_contrato(codigo_contrato)
|
|
128
131
|
if not codigos:
|
|
@@ -278,7 +281,6 @@ def _selecionar_colunas_saida(df: pl.DataFrame) -> pl.DataFrame:
|
|
|
278
281
|
"numero_negocios",
|
|
279
282
|
"volume_negociado",
|
|
280
283
|
"volume_financeiro",
|
|
281
|
-
"valor_contrato_ajustado",
|
|
282
284
|
"preco_limite_minimo",
|
|
283
285
|
"preco_limite_maximo",
|
|
284
286
|
"preco_abertura",
|
|
@@ -296,8 +298,8 @@ def _selecionar_colunas_saida(df: pl.DataFrame) -> pl.DataFrame:
|
|
|
296
298
|
"taxa_maxima",
|
|
297
299
|
"taxa_media",
|
|
298
300
|
"taxa_fechamento",
|
|
299
|
-
"taxa_ultima_oferta_compra",
|
|
300
301
|
"taxa_ultima_oferta_venda",
|
|
302
|
+
"taxa_ultima_oferta_compra",
|
|
301
303
|
"taxa_ajuste",
|
|
302
304
|
"taxa_forward",
|
|
303
305
|
]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.46.4"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|