pyield 0.58.1__tar.gz → 0.58.2__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.
Files changed (83) hide show
  1. {pyield-0.58.1 → pyield-0.58.2}/PKG-INFO +1 -1
  2. {pyield-0.58.1 → pyield-0.58.2}/pyield/vna/_consulta.py +0 -3
  3. {pyield-0.58.1 → pyield-0.58.2}/pyield/vna/_lft.py +7 -4
  4. {pyield-0.58.1 → pyield-0.58.2}/pyproject.toml +1 -1
  5. {pyield-0.58.1 → pyield-0.58.2}/pyproject.toml.orig +1 -1
  6. {pyield-0.58.1 → pyield-0.58.2}/LICENSE +0 -0
  7. {pyield-0.58.1 → pyield-0.58.2}/README.md +0 -0
  8. {pyield-0.58.1 → pyield-0.58.2}/pyield/__init__.py +0 -0
  9. {pyield-0.58.1 → pyield-0.58.2}/pyield/_internal/__init__.py +0 -0
  10. {pyield-0.58.1 → pyield-0.58.2}/pyield/_internal/br_numbers.py +0 -0
  11. {pyield-0.58.1 → pyield-0.58.2}/pyield/_internal/cache.py +0 -0
  12. {pyield-0.58.1 → pyield-0.58.2}/pyield/_internal/converters.py +0 -0
  13. {pyield-0.58.1 → pyield-0.58.2}/pyield/_internal/data_cache.py +0 -0
  14. {pyield-0.58.1 → pyield-0.58.2}/pyield/_internal/excel.py +0 -0
  15. {pyield-0.58.1 → pyield-0.58.2}/pyield/_internal/numbers.py +0 -0
  16. {pyield-0.58.1 → pyield-0.58.2}/pyield/_internal/retry.py +0 -0
  17. {pyield-0.58.1 → pyield-0.58.2}/pyield/_internal/types.py +0 -0
  18. {pyield-0.58.1 → pyield-0.58.2}/pyield/anbima/__init__.py +0 -0
  19. {pyield-0.58.1 → pyield-0.58.2}/pyield/anbima/imaq.py +0 -0
  20. {pyield-0.58.1 → pyield-0.58.2}/pyield/anbima/taxas.py +0 -0
  21. {pyield-0.58.1 → pyield-0.58.2}/pyield/b3/__init__.py +0 -0
  22. {pyield-0.58.1 → pyield-0.58.2}/pyield/b3/_contratos.py +0 -0
  23. {pyield-0.58.1 → pyield-0.58.2}/pyield/b3/_validar_pregao.py +0 -0
  24. {pyield-0.58.1 → pyield-0.58.2}/pyield/b3/boletim.py +0 -0
  25. {pyield-0.58.1 → pyield-0.58.2}/pyield/b3/derivativos_intradia.py +0 -0
  26. {pyield-0.58.1 → pyield-0.58.2}/pyield/b3/di_over.py +0 -0
  27. {pyield-0.58.1 → pyield-0.58.2}/pyield/bc/__init__.py +0 -0
  28. {pyield-0.58.1 → pyield-0.58.2}/pyield/bc/_olinda.py +0 -0
  29. {pyield-0.58.1 → pyield-0.58.2}/pyield/bc/leiloes.py +0 -0
  30. {pyield-0.58.1 → pyield-0.58.2}/pyield/bc/sgs.py +0 -0
  31. {pyield-0.58.1 → pyield-0.58.2}/pyield/compromissada.py +0 -0
  32. {pyield-0.58.1 → pyield-0.58.2}/pyield/copom/__init__.py +0 -0
  33. {pyield-0.58.1 → pyield-0.58.2}/pyield/copom/_calendario.py +0 -0
  34. {pyield-0.58.1 → pyield-0.58.2}/pyield/cpm/__init__.py +0 -0
  35. {pyield-0.58.1 → pyield-0.58.2}/pyield/cpm/probabilidades.py +0 -0
  36. {pyield-0.58.1 → pyield-0.58.2}/pyield/du/__init__.py +0 -0
  37. {pyield-0.58.1 → pyield-0.58.2}/pyield/du/core.py +0 -0
  38. {pyield-0.58.1 → pyield-0.58.2}/pyield/du/feriados_br/__init__.py +0 -0
  39. {pyield-0.58.1 → pyield-0.58.2}/pyield/du/feriados_br/anteriores.txt +0 -0
  40. {pyield-0.58.1 → pyield-0.58.2}/pyield/du/feriados_br/atuais.txt +0 -0
  41. {pyield-0.58.1 → pyield-0.58.2}/pyield/futuro/__init__.py +0 -0
  42. {pyield-0.58.1 → pyield-0.58.2}/pyield/futuro/contratos.py +0 -0
  43. {pyield-0.58.1 → pyield-0.58.2}/pyield/futuro/di1.py +0 -0
  44. {pyield-0.58.1 → pyield-0.58.2}/pyield/futuro/historico.py +0 -0
  45. {pyield-0.58.1 → pyield-0.58.2}/pyield/futuro/intradia.py +0 -0
  46. {pyield-0.58.1 → pyield-0.58.2}/pyield/fwd.py +0 -0
  47. {pyield-0.58.1 → pyield-0.58.2}/pyield/interpolador.py +0 -0
  48. {pyield-0.58.1 → pyield-0.58.2}/pyield/ipca/__init__.py +0 -0
  49. {pyield-0.58.1 → pyield-0.58.2}/pyield/ipca/historico.py +0 -0
  50. {pyield-0.58.1 → pyield-0.58.2}/pyield/ipca/projetado.py +0 -0
  51. {pyield-0.58.1 → pyield-0.58.2}/pyield/py.typed +0 -0
  52. {pyield-0.58.1 → pyield-0.58.2}/pyield/relogio.py +0 -0
  53. {pyield-0.58.1 → pyield-0.58.2}/pyield/rmd/__init__.py +0 -0
  54. {pyield-0.58.1 → pyield-0.58.2}/pyield/rmd/_aba_1_3.py +0 -0
  55. {pyield-0.58.1 → pyield-0.58.2}/pyield/rmd/_aba_2_1.py +0 -0
  56. {pyield-0.58.1 → pyield-0.58.2}/pyield/rmd/_common.py +0 -0
  57. {pyield-0.58.1 → pyield-0.58.2}/pyield/rmd/_download.py +0 -0
  58. {pyield-0.58.1 → pyield-0.58.2}/pyield/selic/__init__.py +0 -0
  59. {pyield-0.58.1 → pyield-0.58.2}/pyield/tpf/__init__.py +0 -0
  60. {pyield-0.58.1 → pyield-0.58.2}/pyield/tpf/_taxas.py +0 -0
  61. {pyield-0.58.1 → pyield-0.58.2}/pyield/tpf/benchmark.py +0 -0
  62. {pyield-0.58.1 → pyield-0.58.2}/pyield/tpf/dealers.py +0 -0
  63. {pyield-0.58.1 → pyield-0.58.2}/pyield/tpf/leiloes.py +0 -0
  64. {pyield-0.58.1 → pyield-0.58.2}/pyield/tpf/secundario/__init__.py +0 -0
  65. {pyield-0.58.1 → pyield-0.58.2}/pyield/tpf/secundario/_intradia.py +0 -0
  66. {pyield-0.58.1 → pyield-0.58.2}/pyield/tpf/secundario/_mensal.py +0 -0
  67. {pyield-0.58.1 → pyield-0.58.2}/pyield/tpf/titulos/__init__.py +0 -0
  68. {pyield-0.58.1 → pyield-0.58.2}/pyield/tpf/titulos/_ntnb_bootstrap.py +0 -0
  69. {pyield-0.58.1 → pyield-0.58.2}/pyield/tpf/titulos/_ntnf_bootstrap.py +0 -0
  70. {pyield-0.58.1 → pyield-0.58.2}/pyield/tpf/titulos/_utils.py +0 -0
  71. {pyield-0.58.1 → pyield-0.58.2}/pyield/tpf/titulos/lft.py +0 -0
  72. {pyield-0.58.1 → pyield-0.58.2}/pyield/tpf/titulos/ltn.py +0 -0
  73. {pyield-0.58.1 → pyield-0.58.2}/pyield/tpf/titulos/ntnb.py +0 -0
  74. {pyield-0.58.1 → pyield-0.58.2}/pyield/tpf/titulos/ntnb1.py +0 -0
  75. {pyield-0.58.1 → pyield-0.58.2}/pyield/tpf/titulos/ntnbp.py +0 -0
  76. {pyield-0.58.1 → pyield-0.58.2}/pyield/tpf/titulos/ntnc.py +0 -0
  77. {pyield-0.58.1 → pyield-0.58.2}/pyield/tpf/titulos/ntnf.py +0 -0
  78. {pyield-0.58.1 → pyield-0.58.2}/pyield/tpf/titulos/pre.py +0 -0
  79. {pyield-0.58.1 → pyield-0.58.2}/pyield/vna/__init__.py +0 -0
  80. {pyield-0.58.1 → pyield-0.58.2}/pyield/vna/_calculo.py +0 -0
  81. {pyield-0.58.1 → pyield-0.58.2}/pyield/vna/_download.py +0 -0
  82. {pyield-0.58.1 → pyield-0.58.2}/pyield/vna/_ntnb.py +0 -0
  83. {pyield-0.58.1 → pyield-0.58.2}/pyield/vna/_ntnc.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyield
3
- Version: 0.58.1
3
+ Version: 0.58.2
4
4
  Summary: Polars-powered toolkit for Brazilian fixed income analysis
5
5
  Keywords: fixed-income,brazil,finance,analysis,bonds
6
6
  Author: Carlos Carvalho
@@ -238,9 +238,6 @@ def projetado(
238
238
  data_base = du.deslocar(data_convertida, -1, ajuste="anterior")
239
239
  else:
240
240
  data_base = du.deslocar(data_convertida, 0, ajuste="anterior")
241
- dias_uteis = du.contar(data_base, data)
242
- if dias_uteis != 1:
243
- raise ValueError("A projeção da LFT deve avançar um dia útil.")
244
241
  return _lft.projetado_lft(data_base, data, vna_base, selic)
245
242
  if selic is not None:
246
243
  raise ValueError("selic aplica-se apenas à projeção da LFT.")
@@ -16,6 +16,7 @@ valores e retorna o VNA único.
16
16
  """
17
17
 
18
18
  import datetime as dt
19
+ import logging
19
20
  from decimal import Decimal, localcontext
20
21
 
21
22
  import requests
@@ -29,6 +30,7 @@ from pyield._internal.types import DateLike, any_is_empty
29
30
  from pyield.tpf.titulos._utils import converter_taxa
30
31
 
31
32
  CODIGO_LFT = "210100"
33
+ _LOGGER = logging.getLogger(__name__)
32
34
 
33
35
 
34
36
  def projetado_lft(
@@ -72,9 +74,8 @@ def projetado_lft(
72
74
  taxa pode ser negativa, desde que maior que -100%.
73
75
 
74
76
  Raises:
75
- ValueError: Data final anterior à base ou distante mais de um dia útil,
76
- VNA não positivo ou não finito, taxa não finita ou menor ou igual a
77
- -100%, ou data malformada.
77
+ ValueError: Data final anterior à base, VNA não positivo ou não finito,
78
+ taxa não finita ou menor ou igual a -100%, ou data malformada.
78
79
 
79
80
  Examples:
80
81
  >>> from decimal import Decimal
@@ -94,7 +95,9 @@ def projetado_lft(
94
95
  raise ValueError("A data de projeção não pode ser anterior à data-base.")
95
96
  dias_uteis = du.contar(inicio, fim)
96
97
  if dias_uteis != 1:
97
- raise ValueError("A projeção da LFT deve avançar um dia útil.")
98
+ _LOGGER.warning(
99
+ "A projeção da LFT avançou uma quantidade diferente de um dia útil.",
100
+ )
98
101
  base = vna_base if isinstance(vna_base, Decimal) else Decimal(str(vna_base))
99
102
  taxa_anual = converter_taxa(taxa_anual)
100
103
  taxa = taxa_anual if isinstance(taxa_anual, Decimal) else Decimal(str(taxa_anual))
@@ -25,7 +25,7 @@ dependencies = [
25
25
  "fastexcel>=0.19.0",
26
26
  "tzdata>=2024.1; platform_system == 'Windows'",
27
27
  ]
28
- version = "0.58.1"
28
+ version = "0.58.2"
29
29
 
30
30
  [[project.authors]]
31
31
  name = "Carlos Carvalho"
@@ -20,7 +20,7 @@ dependencies = [
20
20
  "fastexcel>=0.19.0",
21
21
  "tzdata>=2024.1; platform_system == 'Windows'",
22
22
  ]
23
- version = "0.58.1"
23
+ version = "0.58.2"
24
24
 
25
25
  [project.urls]
26
26
  Homepage = "https://github.com/crdcj/PYield"
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