tea-bond 0.3.14__cp38-abi3-win_amd64.whl → 0.3.15__cp38-abi3-win_amd64.whl
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.
Potentially problematic release.
This version of tea-bond might be problematic. Click here for more details.
pybond/pl.py
CHANGED
|
@@ -406,7 +406,27 @@ class Bonds:
|
|
|
406
406
|
"""
|
|
407
407
|
return self._evaluator(date=date).remain_cp_num
|
|
408
408
|
|
|
409
|
-
|
|
409
|
+
def calc_ytm_with_price(
|
|
410
|
+
self,
|
|
411
|
+
date: IntoExpr = "date",
|
|
412
|
+
dirty_price: IntoExpr = "dirty_price",
|
|
413
|
+
clean_price: IntoExpr | None = None,
|
|
414
|
+
):
|
|
415
|
+
bond = parse_into_expr(self.bond)
|
|
416
|
+
date = parse_into_expr(date)
|
|
417
|
+
if clean_price is None:
|
|
418
|
+
dirty_price = parse_into_expr(dirty_price)
|
|
419
|
+
else:
|
|
420
|
+
assert dirty_price == "dirty_price", (
|
|
421
|
+
"should not set dirty_price when clean_price is set"
|
|
422
|
+
)
|
|
423
|
+
clean_price = parse_into_expr(clean_price)
|
|
424
|
+
dirty_price = clean_price + self.accrued_interest(date)
|
|
425
|
+
return register_plugin(
|
|
426
|
+
args=[bond, date, dirty_price],
|
|
427
|
+
symbol="bonds_calc_ytm_with_price",
|
|
428
|
+
is_elementwise=False,
|
|
429
|
+
)
|
|
410
430
|
|
|
411
431
|
|
|
412
432
|
class Futures:
|
pybond/pybond.pyd
CHANGED
|
Binary file
|
|
@@ -16,11 +16,11 @@ pybond/nb/nb_duration.py,sha256=bndVSHdG_yV0_vEWeAHd9Lq_UQ-8nkPnEC9cN2A2ca4,1709
|
|
|
16
16
|
pybond/nb/nb_evaluators.py,sha256=GBsW3UuGf8iVUWr2DTISXzdYoGV5ITEOVFJivBNmWkc,15544
|
|
17
17
|
pybond/nb/nb_time.py,sha256=5KNrWYcPwZUHoxvZKvh3qdhjB0DjRkxbUzONSv6OfhY,8928
|
|
18
18
|
pybond/pd.py,sha256=ghqoO9-wB0f3yjpYf5BMbz0Mu8Z1BVTbngcf1G4_Y9Y,14234
|
|
19
|
-
pybond/pl.py,sha256=
|
|
19
|
+
pybond/pl.py,sha256=1soVbfKvFppFZv_WiKTTMMlXpRzOYMAORQ21JuPaOhM,15584
|
|
20
20
|
pybond/pnl.py,sha256=gIrKG-okNwDiMdfCy8Kz8wE7jgnVAGYCstFvxIncCwk,3662
|
|
21
21
|
pybond/polars_utils.py,sha256=XJ7DXpBfMEm3DilAun7E8S_6ShqQxi--ZSFV8CyRCxA,2697
|
|
22
|
-
pybond/pybond.pyd,sha256=
|
|
22
|
+
pybond/pybond.pyd,sha256=ZsI7G8727cdIIVdCVEt9BKr47AF15c9ZFC2bCCe2amQ,23736320
|
|
23
23
|
pybond/pybond.pyi,sha256=qzOfqoysuUW7rnZYxEmGEJXK_UrCjMvQ29Y_mJOBN1Y,11621
|
|
24
|
-
tea_bond-0.3.
|
|
25
|
-
tea_bond-0.3.
|
|
26
|
-
tea_bond-0.3.
|
|
24
|
+
tea_bond-0.3.15.dist-info/METADATA,sha256=9cTi1yfiJF8hF_FGLOr8Vfc_ygYABorV5xsihSTnrec,258
|
|
25
|
+
tea_bond-0.3.15.dist-info/WHEEL,sha256=CG8OzNtm0LMpJ2zhrjswlO8N-965OeMLklsQAG-nMvQ,94
|
|
26
|
+
tea_bond-0.3.15.dist-info/RECORD,,
|
|
File without changes
|