PYield 0.37.7__tar.gz → 0.37.8__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.37.7 → pyield-0.37.8}/PKG-INFO +1 -1
- pyield-0.37.8/pyield/__about__.py +1 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/anbima/imaq.py +6 -4
- pyield-0.37.7/pyield/__about__.py +0 -1
- {pyield-0.37.7 → pyield-0.37.8}/.gitignore +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/LICENSE +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/README.md +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/__init__.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/anbima/__init__.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/anbima/ettj.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/anbima/ima.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/anbima/ipca.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/anbima/tpf.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/b3/__init__.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/b3/di1.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/b3/di_over.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/b3/futures/__init__.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/b3/futures/common.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/b3/futures/historical.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/b3/futures/intraday.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/b3/futures/xml.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/bc/__init__.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/bc/auction.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/bc/ptax_api.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/bc/rates.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/bc/repo.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/bc/trades_intraday.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/bc/trades_monthly.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/bc/vna.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/bday.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/conftest.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/data_cache.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/date_converter.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/fwd.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/holidays/__init__.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/holidays/br_holidays_new.txt +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/holidays/br_holidays_old.txt +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/holidays/brholidays.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/ibge/__init__.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/ibge/ipca.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/interpolator.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/py.typed +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/retry.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/tn/__init__.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/tn/benchmark.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/tn/lft.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/tn/ltn.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/tn/ntnb.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/tn/ntnc.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/tn/ntnf.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/tn/pre.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyield/tn/tools.py +0 -0
- {pyield-0.37.7 → pyield-0.37.8}/pyproject.toml +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.37.8"
|
|
@@ -14,7 +14,7 @@ from pyield.date_converter import DateScalar
|
|
|
14
14
|
# Configura o logger do módulo
|
|
15
15
|
logger = logging.getLogger(__name__)
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
# --- Configurações Centralizadas ---
|
|
18
18
|
IMA_URL = "https://www.anbima.com.br/informacoes/ima/ima-quantidade-mercado.asp"
|
|
19
19
|
COLUMN_MAPPING = {
|
|
20
20
|
"Data Referência": "Date",
|
|
@@ -115,13 +115,15 @@ def _process_df(df: pd.DataFrame) -> pd.DataFrame:
|
|
|
115
115
|
|
|
116
116
|
|
|
117
117
|
def _add_dv01(df: pd.DataFrame) -> pd.DataFrame:
|
|
118
|
-
|
|
119
|
-
df_anbima = tpf_data(
|
|
118
|
+
target_date = df["Date"].min()
|
|
119
|
+
df_anbima = tpf_data(target_date)
|
|
120
|
+
target_cols = ["ReferenceDate", "BondType", "MaturityDate", "DV01", "DV01USD"]
|
|
121
|
+
df_anbima = df_anbima[target_cols].rename(columns={"ReferenceDate": "Date"})
|
|
120
122
|
# Guard clause for missing columns
|
|
121
123
|
if "DV01" not in df_anbima.columns or "DV01USD" not in df_anbima.columns:
|
|
122
124
|
return df
|
|
123
125
|
|
|
124
|
-
df = df.merge(df_anbima, on="MaturityDate", how="left")
|
|
126
|
+
df = df.merge(df_anbima, on=["Date", "BondType", "MaturityDate"], how="left")
|
|
125
127
|
# Calcular os estoques
|
|
126
128
|
df["MarketDV01"] = df["DV01"] * df["MarketQuantity"]
|
|
127
129
|
df["MarketDV01USD"] = df["DV01USD"] * df["MarketQuantity"]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.37.7"
|
|
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
|