tea-bond 0.3.14__cp38-abi3-manylinux_2_28_x86_64.whl → 0.3.15__cp38-abi3-manylinux_2_28_x86_64.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
- # TODO(Teamon): 实现向量化根据净价反推ytm的函数
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.abi3.so CHANGED
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tea-bond
3
- Version: 0.3.14
3
+ Version: 0.3.15
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -18,11 +18,11 @@ pybond/nb/nb_duration.py,sha256=FSX1y2JbHB_SJn-hcVe-7Zf2v0xpQKKZ1MfWBY7d7IQ,1639
18
18
  pybond/nb/nb_evaluators.py,sha256=fCYxcvW717_1E4qY9AV8R5Pv8eTvWqKk3Zj-zMU1kiw,14987
19
19
  pybond/nb/nb_time.py,sha256=LaqXfcNvmYD_lZ2u108MwrxCXoVCBX3cr3oOnPp3c1g,8649
20
20
  pybond/pd.py,sha256=3m6rpBW5-E2mG967Fb_hF4FjGoSXUQz0kBev9X104f8,13760
21
- pybond/pl.py,sha256=tMTNmb68rw7oHx-8AHALLIOeTsHKFhjj78quKv_SxG0,14337
21
+ pybond/pl.py,sha256=sS3fk8AFcWskKPBUFAsnmSQetMlxub2cY3RWiAOimMo,15051
22
22
  pybond/pnl.py,sha256=fv-5LIcMhNJPgnzVb3z1rXkgdNtooCnppXLywfP7m1A,3521
23
23
  pybond/polars_utils.py,sha256=u14yoK9Qx4TC2oPq-zVk7d1XOLY8nGc1H8Nf9jt0R6c,2599
24
- pybond/pybond.abi3.so,sha256=WB5zygNeCkiNskDp66wQ3dZfB3GD7Cbl5WziKNK-NHk,30728809
24
+ pybond/pybond.abi3.so,sha256=VYbsre68mc1Cn1eGaZXwO1s5Dp-qpsTRo2MS1_5C9Mw,30728897
25
25
  pybond/pybond.pyi,sha256=xME119HJzVNqNCJ9FapVaQg1amxbNHlbd-qfFyiuhL4,11230
26
- tea_bond-0.3.14.dist-info/METADATA,sha256=pyYrjVnz2Oweg6SfVp5iaXUbHUGl6L4EHe2DM5Oy3OY,258
27
- tea_bond-0.3.14.dist-info/WHEEL,sha256=aOjTN5bAUkIqIK1JFnJz3vA_KyYjKKgPFflJ6PJ2YX0,106
28
- tea_bond-0.3.14.dist-info/RECORD,,
26
+ tea_bond-0.3.15.dist-info/METADATA,sha256=9cTi1yfiJF8hF_FGLOr8Vfc_ygYABorV5xsihSTnrec,258
27
+ tea_bond-0.3.15.dist-info/WHEEL,sha256=aOjTN5bAUkIqIK1JFnJz3vA_KyYjKKgPFflJ6PJ2YX0,106
28
+ tea_bond-0.3.15.dist-info/RECORD,,