PYield 0.27.3__tar.gz → 0.27.4__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 (39) hide show
  1. {pyield-0.27.3 → pyield-0.27.4}/PKG-INFO +1 -1
  2. pyield-0.27.4/pyield/__about__.py +1 -0
  3. {pyield-0.27.3 → pyield-0.27.4}/pyield/anbima/ima.py +26 -19
  4. pyield-0.27.3/pyield/__about__.py +0 -1
  5. {pyield-0.27.3 → pyield-0.27.4}/.gitignore +0 -0
  6. {pyield-0.27.3 → pyield-0.27.4}/LICENSE +0 -0
  7. {pyield-0.27.3 → pyield-0.27.4}/README.md +0 -0
  8. {pyield-0.27.3 → pyield-0.27.4}/pyield/__init__.py +0 -0
  9. {pyield-0.27.3 → pyield-0.27.4}/pyield/anbima/__init__.py +0 -0
  10. {pyield-0.27.3 → pyield-0.27.4}/pyield/anbima/imaq.py +0 -0
  11. {pyield-0.27.3 → pyield-0.27.4}/pyield/anbima/tpf.py +0 -0
  12. {pyield-0.27.3 → pyield-0.27.4}/pyield/b3_futures/__init__.py +0 -0
  13. {pyield-0.27.3 → pyield-0.27.4}/pyield/b3_futures/common.py +0 -0
  14. {pyield-0.27.3 → pyield-0.27.4}/pyield/b3_futures/di.py +0 -0
  15. {pyield-0.27.3 → pyield-0.27.4}/pyield/b3_futures/historical.py +0 -0
  16. {pyield-0.27.3 → pyield-0.27.4}/pyield/b3_futures/intraday.py +0 -0
  17. {pyield-0.27.3 → pyield-0.27.4}/pyield/b3_futures/xml.py +0 -0
  18. {pyield-0.27.3 → pyield-0.27.4}/pyield/bc/auction.py +0 -0
  19. {pyield-0.27.3 → pyield-0.27.4}/pyield/bc/repos.py +0 -0
  20. {pyield-0.27.3 → pyield-0.27.4}/pyield/bday.py +0 -0
  21. {pyield-0.27.3 → pyield-0.27.4}/pyield/conftest.py +0 -0
  22. {pyield-0.27.3 → pyield-0.27.4}/pyield/data_cache.py +0 -0
  23. {pyield-0.27.3 → pyield-0.27.4}/pyield/date_converter.py +0 -0
  24. {pyield-0.27.3 → pyield-0.27.4}/pyield/holidays/__init__.py +0 -0
  25. {pyield-0.27.3 → pyield-0.27.4}/pyield/holidays/br_holidays_new.txt +0 -0
  26. {pyield-0.27.3 → pyield-0.27.4}/pyield/holidays/br_holidays_old.txt +0 -0
  27. {pyield-0.27.3 → pyield-0.27.4}/pyield/holidays/brholidays.py +0 -0
  28. {pyield-0.27.3 → pyield-0.27.4}/pyield/indicators.py +0 -0
  29. {pyield-0.27.3 → pyield-0.27.4}/pyield/interpolator.py +0 -0
  30. {pyield-0.27.3 → pyield-0.27.4}/pyield/projections.py +0 -0
  31. {pyield-0.27.3 → pyield-0.27.4}/pyield/py.typed +0 -0
  32. {pyield-0.27.3 → pyield-0.27.4}/pyield/tools.py +0 -0
  33. {pyield-0.27.3 → pyield-0.27.4}/pyield/tpf/__init__.py +0 -0
  34. {pyield-0.27.3 → pyield-0.27.4}/pyield/tpf/lft.py +0 -0
  35. {pyield-0.27.3 → pyield-0.27.4}/pyield/tpf/ltn.py +0 -0
  36. {pyield-0.27.3 → pyield-0.27.4}/pyield/tpf/ntnb.py +0 -0
  37. {pyield-0.27.3 → pyield-0.27.4}/pyield/tpf/ntnf.py +0 -0
  38. {pyield-0.27.3 → pyield-0.27.4}/pyield/tpf/tools.py +0 -0
  39. {pyield-0.27.3 → pyield-0.27.4}/pyproject.toml +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PYield
3
- Version: 0.27.3
3
+ Version: 0.27.4
4
4
  Summary: A Python library for analysis of fixed income instruments in Brazil
5
5
  Project-URL: Source, https://github.com/crdcj/PYield
6
6
  Author-email: Carlos Carvalho <cr.cj@outlook.com>
@@ -0,0 +1 @@
1
+ __version__ = "0.27.4"
@@ -19,7 +19,7 @@ ima_types = Literal[
19
19
  "IMA-GERAL",
20
20
  ]
21
21
 
22
- LAST_IMA_COL_MAPPING = {
22
+ IMA_COL_MAPPING = {
23
23
  # "2",
24
24
  "Data de Referência": "Date",
25
25
  "INDICE": "IMAType",
@@ -29,17 +29,17 @@ LAST_IMA_COL_MAPPING = {
29
29
  "Código ISIN": "ISIN",
30
30
  "Taxa Indicativa (% a.a.)": "IndicativeRate",
31
31
  "PU (R$)": "Price",
32
- # "PU de Juros (R$)": "InterestPrice",
32
+ "PU de Juros (R$)": "InterestPrice",
33
33
  "Quantidade (1.000 títulos)": "MarketQuantity",
34
34
  "Quantidade Teórica (1.000 títulos)": "TheoreticalQuantity",
35
35
  "Carteira a Mercado (R$ mil)": "MarketValue",
36
36
  "Peso (%)": "Weight",
37
37
  "Prazo (d.u.)": "BDToMat",
38
38
  "Duration (d.u.)": "Duration",
39
- # "Número de Operações *": "NumberOfOperations",
40
- # "Quant. Negociada (1.000 títulos) *": "NegotiatedQuantity",
41
- # "Valor Negociado (R$ mil) *": "NegotiatedValue",
42
- "PMR": "PMR", # Prazmo médio de repactuação
39
+ "Número de Operações *": "NumberOfOperations",
40
+ "Quant. Negociada (1.000 títulos) *": "NegotiatedQuantity",
41
+ "Valor Negociado (R$ mil) *": "NegotiatedValue",
42
+ "PMR": "PMR", # Prazo médio de repactuação
43
43
  "Convexidade": "Convexity",
44
44
  }
45
45
 
@@ -66,7 +66,7 @@ def _fetch_last_ima() -> pd.DataFrame:
66
66
 
67
67
 
68
68
  def _process_last_ima(df: pd.DataFrame) -> pd.DataFrame:
69
- df = df.rename(columns=LAST_IMA_COL_MAPPING)[LAST_IMA_COL_MAPPING.values()]
69
+ df = df.rename(columns=IMA_COL_MAPPING)[IMA_COL_MAPPING.values()]
70
70
  df["IndicativeRate"] = (df["IndicativeRate"] / 100).round(6)
71
71
  df["Date"] = pd.to_datetime(df["Date"], format="%d/%m/%Y")
72
72
  df["Maturity"] = pd.to_datetime(df["Maturity"], format="%d/%m/%Y")
@@ -93,15 +93,19 @@ def _reorder_last_ima(df: pd.DataFrame) -> pd.DataFrame:
93
93
  "Maturity",
94
94
  "SelicCode",
95
95
  "ISIN",
96
- "Weight",
97
- "TheoreticalQuantity",
98
- "PMR",
99
- "Convexity",
100
96
  "BDToMat",
101
97
  "Duration",
102
98
  "IndicativeRate",
103
99
  "Price",
100
+ "InterestPrice",
104
101
  "DV01",
102
+ "PMR",
103
+ "Weight",
104
+ "Convexity",
105
+ "TheoreticalQuantity",
106
+ "NumberOfOperations",
107
+ "NegotiatedQuantity",
108
+ "NegotiatedValue",
105
109
  "MarketDV01",
106
110
  "MarketQuantity",
107
111
  "MarketValue",
@@ -130,23 +134,26 @@ def last_ima(ima_type: ima_types | None = None) -> pd.DataFrame:
130
134
  - Maturity: bond maturity date.
131
135
  - SelicCode: bond code in the SELIC system.
132
136
  - ISIN: international Securities Identification Number.
133
- - Weight: weight of the bond in the index.
134
- - TheoreticalQuantity: theoretical quantity.
135
- - PMR: average repurchase term.
136
- - Convexity: convexity of the bond.
137
137
  - BDToMat: business days to maturity.
138
- - Duration: duration of the bond in years.
139
- - IndicativeRate: indicative rate in percentage
138
+ - Duration: duration of the bond in business years (252 days/year).
139
+ - IndicativeRate: indicative rate.
140
140
  - Price: bond price.
141
+ - InterestPrice: interest price.
141
142
  - DV01: DV01 in R$.
142
- - MarketDV01: market DV01 in R$.
143
+ - PMR: average repurchase term.
144
+ - Weight: weight of the bond in the index.
145
+ - Convexity: convexity of the bond.
146
+ - TheoreticalQuantity: theoretical quantity.
147
+ - NumberOfOperations: number of operations.
148
+ - NegotiatedQuantity: negotiated quantity.
149
+ - NegotiatedValue: negotiated value.
143
150
  - MarketQuantity: market quantity.
151
+ - MarketDV01: market DV01 in R$.
144
152
  - MarketValue: market value in R$.
145
153
 
146
154
  Raises:
147
155
  Exception: Logs error and returns an empty DataFrame if any error occurs during
148
156
  fetching or processing.
149
-
150
157
  """
151
158
  try:
152
159
  df = _fetch_last_ima()
@@ -1 +0,0 @@
1
- __version__ = "0.27.3"
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