tea-bond 0.3.8__cp310-abi3-manylinux_2_34_x86_64.whl → 0.3.9__cp310-abi3-manylinux_2_34_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/pd.py CHANGED
@@ -24,9 +24,9 @@ class TfEvaluators:
24
24
  future: str | pd.Series,
25
25
  bond: str | pd.Series,
26
26
  date: str | pd.Series,
27
- future_price: pd.Series,
28
- bond_ytm: pd.Series,
29
- capital_rate: float | pd.Series,
27
+ future_price: pd.Series | None = None,
28
+ bond_ytm: pd.Series | None = None,
29
+ capital_rate: float | pd.Series | None = None,
30
30
  reinvest_rate: float | None = None,
31
31
  ):
32
32
  """
@@ -51,7 +51,12 @@ class TfEvaluators:
51
51
  "capital_rate": capital_rate,
52
52
  }
53
53
  )
54
- self._evaluators = PlTfEvaluators(reinvest_rate=reinvest_rate)
54
+ self._evaluators = PlTfEvaluators(
55
+ future_price="future_price",
56
+ bond_ytm="bond_ytm",
57
+ capital_rate="capital_rate",
58
+ reinvest_rate=reinvest_rate,
59
+ )
55
60
 
56
61
  @property
57
62
  def net_basis_spread(self):
pybond/pl.py CHANGED
@@ -19,9 +19,9 @@ class TfEvaluators:
19
19
  future: IntoExpr = "future",
20
20
  bond: IntoExpr = "bond",
21
21
  date: IntoExpr = "date",
22
- future_price: IntoExpr = "future_price",
23
- bond_ytm: IntoExpr = "bond_ytm",
24
- capital_rate: IntoExpr = "capital_rate",
22
+ future_price: IntoExpr = None,
23
+ bond_ytm: IntoExpr = None,
24
+ capital_rate: IntoExpr = None,
25
25
  reinvest_rate=None,
26
26
  ):
27
27
  """
@@ -36,16 +36,24 @@ class TfEvaluators:
36
36
  capital_rate: Capital cost rate column expression
37
37
  reinvest_rate: Reinvestment rate (optional)
38
38
  """
39
- if future is None:
40
- future = pl.lit(None).cast(str)
41
- if bond is None:
42
- bond = pl.lit(None).cast(str)
43
- self.future = parse_into_expr(future)
44
- self.bond = parse_into_expr(bond)
45
- self.date = parse_into_expr(date)
46
- self.future_price = parse_into_expr(future_price)
47
- self.bond_ytm = parse_into_expr(bond_ytm)
48
- self.capital_rate = parse_into_expr(capital_rate)
39
+ self.future = parse_into_expr(
40
+ future if future is not None else pl.lit(None).cast(str)
41
+ )
42
+ self.bond = parse_into_expr(
43
+ bond if bond is not None else pl.lit(None).cast(str)
44
+ )
45
+ self.date = parse_into_expr(
46
+ date if date is not None else pl.lit(None).cast(pl.Date)
47
+ )
48
+ self.future_price = parse_into_expr(
49
+ future_price if future_price is not None else pl.lit(None)
50
+ )
51
+ self.bond_ytm = parse_into_expr(
52
+ bond_ytm if bond_ytm is not None else pl.lit(None)
53
+ )
54
+ self.capital_rate = parse_into_expr(
55
+ capital_rate if capital_rate is not None else pl.lit(None)
56
+ )
49
57
  self.reinvest_rate = reinvest_rate
50
58
 
51
59
  def _call_plugin(self, symbol: str):
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.8
3
+ Version: 0.3.9
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -17,12 +17,12 @@ pybond/nb/nb_datetime.py,sha256=9fLD9rnfpHQ-cvX4H6PoFh_O3jgk475ZKrG8q_UxT34,1026
17
17
  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
- pybond/pd.py,sha256=yDEurCNedu5Q821XFbqsHBAblv9hBDwc3Z3hwdt_lyo,13122
21
- pybond/pl.py,sha256=7HTX2Eu6hDccy4WJpxej2_UjKQXk6KvWdISt54lqGSk,13234
20
+ pybond/pd.py,sha256=u37c9_CYTopUm8Z5OZUPDLlhzAcNUCVL79yOpdj3U30,13302
21
+ pybond/pl.py,sha256=eXu_rcggdBKXLuzyLj65StIw45Jfu44EmTNi06WOBbo,13486
22
22
  pybond/pnl.py,sha256=zDHDShaU5Cpp47JELb3u9xURSkm-1NUiZ5aFdwtwWf4,2644
23
23
  pybond/polars_utils.py,sha256=A8D5T0x08oMCndWiQ5DPhLsuWp8s4OPgqvAnK36d8yY,2567
24
- pybond/pybond.abi3.so,sha256=gYg8tqhCAXdorc3H9TY_yAgOD_pyfooW-PkyUhiloN4,30589305
24
+ pybond/pybond.abi3.so,sha256=cl2CK9zz2ZkBFNhsWJwPZfuiGkl3OPj1Y5cnEpuI8No,30605689
25
25
  pybond/pybond.pyi,sha256=xME119HJzVNqNCJ9FapVaQg1amxbNHlbd-qfFyiuhL4,11230
26
- tea_bond-0.3.8.dist-info/METADATA,sha256=iFDD8dsw7ptVOSC_aR1cOepgVmUCQVxGKW423JB2BKU,258
27
- tea_bond-0.3.8.dist-info/WHEEL,sha256=QUqTgYGwY2EWSp2nZb9WOq7FyV4zGcx0XCx5wrEnnjI,107
28
- tea_bond-0.3.8.dist-info/RECORD,,
26
+ tea_bond-0.3.9.dist-info/METADATA,sha256=NTcEhk7-WT_aWbCc5fmxZbZecfzQa6O3PB0tozeRyhs,258
27
+ tea_bond-0.3.9.dist-info/WHEEL,sha256=QUqTgYGwY2EWSp2nZb9WOq7FyV4zGcx0XCx5wrEnnjI,107
28
+ tea_bond-0.3.9.dist-info/RECORD,,