tea-bond 0.3.13__cp38-abi3-manylinux_2_28_x86_64.whl → 0.3.14__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
|
@@ -280,7 +280,15 @@ class TfEvaluators:
|
|
|
280
280
|
Returns:
|
|
281
281
|
Polars expression for bond remaining year
|
|
282
282
|
"""
|
|
283
|
-
return self._call_plugin("
|
|
283
|
+
return self._call_plugin("bonds_remain_year")
|
|
284
|
+
|
|
285
|
+
@property
|
|
286
|
+
def carry_date(self):
|
|
287
|
+
return self._call_plugin("bonds_carry_date")
|
|
288
|
+
|
|
289
|
+
@property
|
|
290
|
+
def maturity_date(self):
|
|
291
|
+
return self._call_plugin("bonds_maturity_date")
|
|
284
292
|
|
|
285
293
|
|
|
286
294
|
class Bonds:
|
|
@@ -329,6 +337,12 @@ class Bonds:
|
|
|
329
337
|
"""
|
|
330
338
|
return self._evaluator(date=date).remain_year
|
|
331
339
|
|
|
340
|
+
def carry_date(self):
|
|
341
|
+
return self._evaluator().carry_date
|
|
342
|
+
|
|
343
|
+
def maturity_date(self):
|
|
344
|
+
return self._evaluator().maturity_date
|
|
345
|
+
|
|
332
346
|
def accrued_interest(self, date: IntoExpr = "date"):
|
|
333
347
|
"""
|
|
334
348
|
Calculate accrued interest for the bond (应计利息).
|
pybond/pnl.py
CHANGED
|
@@ -115,7 +115,7 @@ def trading_from_pos(
|
|
|
115
115
|
pos: IntoExpr,
|
|
116
116
|
open: IntoExpr,
|
|
117
117
|
finish_price: IntoExpr | None = None,
|
|
118
|
-
cash:
|
|
118
|
+
cash: IntoExpr = 1e8,
|
|
119
119
|
multiplier: float = 1,
|
|
120
120
|
qty_tick: float = 1.0,
|
|
121
121
|
*,
|
|
@@ -125,15 +125,16 @@ def trading_from_pos(
|
|
|
125
125
|
pos = parse_into_expr(pos)
|
|
126
126
|
open = parse_into_expr(open)
|
|
127
127
|
finish_price = parse_into_expr(finish_price)
|
|
128
|
+
cash = parse_into_expr(cash)
|
|
128
129
|
kwargs = {
|
|
129
|
-
"cash":
|
|
130
|
-
"multiplier": multiplier,
|
|
131
|
-
"qty_tick": qty_tick,
|
|
130
|
+
"cash": None,
|
|
131
|
+
"multiplier": float(multiplier),
|
|
132
|
+
"qty_tick": float(qty_tick),
|
|
132
133
|
"stop_on_finish": stop_on_finish,
|
|
133
134
|
"finish_price": None,
|
|
134
135
|
}
|
|
135
136
|
return register_plugin(
|
|
136
|
-
args=[time, pos, open, finish_price],
|
|
137
|
+
args=[time, pos, open, finish_price, cash],
|
|
137
138
|
kwargs=kwargs,
|
|
138
139
|
symbol="trading_from_pos",
|
|
139
140
|
is_elementwise=False,
|
pybond/pybond.abi3.so
CHANGED
|
Binary file
|
|
@@ -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=
|
|
22
|
-
pybond/pnl.py,sha256=
|
|
21
|
+
pybond/pl.py,sha256=tMTNmb68rw7oHx-8AHALLIOeTsHKFhjj78quKv_SxG0,14337
|
|
22
|
+
pybond/pnl.py,sha256=fv-5LIcMhNJPgnzVb3z1rXkgdNtooCnppXLywfP7m1A,3521
|
|
23
23
|
pybond/polars_utils.py,sha256=u14yoK9Qx4TC2oPq-zVk7d1XOLY8nGc1H8Nf9jt0R6c,2599
|
|
24
|
-
pybond/pybond.abi3.so,sha256=
|
|
24
|
+
pybond/pybond.abi3.so,sha256=WB5zygNeCkiNskDp66wQ3dZfB3GD7Cbl5WziKNK-NHk,30728809
|
|
25
25
|
pybond/pybond.pyi,sha256=xME119HJzVNqNCJ9FapVaQg1amxbNHlbd-qfFyiuhL4,11230
|
|
26
|
-
tea_bond-0.3.
|
|
27
|
-
tea_bond-0.3.
|
|
28
|
-
tea_bond-0.3.
|
|
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,,
|
|
File without changes
|