PYield 0.12.2__tar.gz → 0.12.3__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.12.2 → pyield-0.12.3}/PKG-INFO +1 -1
- pyield-0.12.3/pyield/__about__.py +1 -0
- {pyield-0.12.2 → pyield-0.12.3}/pyield/bonds/ntnf.py +5 -3
- {pyield-0.12.2 → pyield-0.12.3}/pyproject.toml +1 -1
- pyield-0.12.2/pyield/__about__.py +0 -1
- {pyield-0.12.2 → pyield-0.12.3}/LICENSE +0 -0
- {pyield-0.12.2 → pyield-0.12.3}/README.md +0 -0
- {pyield-0.12.2 → pyield-0.12.3}/pyield/__init__.py +0 -0
- {pyield-0.12.2 → pyield-0.12.3}/pyield/bday.py +0 -0
- {pyield-0.12.2 → pyield-0.12.3}/pyield/bonds/__init__.py +0 -0
- {pyield-0.12.2 → pyield-0.12.3}/pyield/bonds/lft.py +0 -0
- {pyield-0.12.2 → pyield-0.12.3}/pyield/bonds/ltn.py +0 -0
- {pyield-0.12.2 → pyield-0.12.3}/pyield/bonds/ntnb.py +0 -0
- {pyield-0.12.2 → pyield-0.12.3}/pyield/bonds/utils.py +0 -0
- {pyield-0.12.2 → pyield-0.12.3}/pyield/date_converter.py +0 -0
- {pyield-0.12.2 → pyield-0.12.3}/pyield/di.py +0 -0
- {pyield-0.12.2 → pyield-0.12.3}/pyield/fetchers/__init__.py +0 -0
- {pyield-0.12.2 → pyield-0.12.3}/pyield/fetchers/anbima.py +0 -0
- {pyield-0.12.2 → pyield-0.12.3}/pyield/fetchers/futures_data/__init__.py +0 -0
- {pyield-0.12.2 → pyield-0.12.3}/pyield/fetchers/futures_data/common.py +0 -0
- {pyield-0.12.2 → pyield-0.12.3}/pyield/fetchers/futures_data/historical.py +0 -0
- {pyield-0.12.2 → pyield-0.12.3}/pyield/fetchers/futures_data/intraday.py +0 -0
- {pyield-0.12.2 → pyield-0.12.3}/pyield/fetchers/futures_data/xml.py +0 -0
- {pyield-0.12.2 → pyield-0.12.3}/pyield/fetchers/indicators.py +0 -0
- {pyield-0.12.2 → pyield-0.12.3}/pyield/fetchers/projections.py +0 -0
- {pyield-0.12.2 → pyield-0.12.3}/pyield/holidays/__init__.py +0 -0
- {pyield-0.12.2 → pyield-0.12.3}/pyield/holidays/br_holidays_new.txt +0 -0
- {pyield-0.12.2 → pyield-0.12.3}/pyield/holidays/br_holidays_old.txt +0 -0
- {pyield-0.12.2 → pyield-0.12.3}/pyield/holidays/holidays_manager.py +0 -0
- {pyield-0.12.2 → pyield-0.12.3}/pyield/interpolator.py +0 -0
- {pyield-0.12.2 → pyield-0.12.3}/pyield/py.typed +0 -0
- {pyield-0.12.2 → pyield-0.12.3}/tests/__init__.py +0 -0
- {pyield-0.12.2 → pyield-0.12.3}/tests/data/SPRD231222.zip +0 -0
- {pyield-0.12.2 → pyield-0.12.3}/tests/data/SPRD240426.zip +0 -0
- {pyield-0.12.2 → pyield-0.12.3}/tests/test_bday.py +0 -0
- {pyield-0.12.2 → pyield-0.12.3}/tests/test_futures.py +0 -0
- {pyield-0.12.2 → pyield-0.12.3}/tests/test_futures_xml.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.12.3"
|
|
@@ -297,7 +297,7 @@ def spot_rates(
|
|
|
297
297
|
return df_spot
|
|
298
298
|
|
|
299
299
|
|
|
300
|
-
def
|
|
300
|
+
def di_gross_spreads(reference_date: str | pd.Timestamp) -> pd.Series:
|
|
301
301
|
"""
|
|
302
302
|
Calculates the DI spread for the NTN-F based on ANBIMA's indicative rates.
|
|
303
303
|
|
|
@@ -321,7 +321,7 @@ def gross_di_spreads(reference_date: str | pd.Timestamp) -> pd.Series:
|
|
|
321
321
|
return df["DISpread"]
|
|
322
322
|
|
|
323
323
|
|
|
324
|
-
def
|
|
324
|
+
def di_net_spread( # noqa
|
|
325
325
|
settlement_date: str | pd.Timestamp,
|
|
326
326
|
maturity_date: str | pd.Timestamp,
|
|
327
327
|
ytm: float,
|
|
@@ -367,9 +367,11 @@ def net_di_spread( # noqa
|
|
|
367
367
|
di_rates,
|
|
368
368
|
)
|
|
369
369
|
|
|
370
|
-
# Ensure the DI
|
|
370
|
+
# Ensure the DI data is valid
|
|
371
371
|
if len(di_rates) != len(di_expirations):
|
|
372
372
|
raise ValueError("di_rates and di_expirations must have the same length.")
|
|
373
|
+
if len(di_rates) == 0:
|
|
374
|
+
return float("nan")
|
|
373
375
|
|
|
374
376
|
# Calculate cash flows and business days between settlement and payment dates
|
|
375
377
|
df = cash_flows(settlement_date, maturity_date).reset_index()
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.12.2"
|
|
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
|