tea-bond 0.3.10__cp38-abi3-win_amd64.whl → 0.3.11__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/__init__.py
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
from .bond import Bond
|
|
4
|
-
from .pybond import Future, Ib, Sse
|
|
4
|
+
from .pybond import Future, Ib, Sse, get_version
|
|
5
5
|
from .pybond import TfEvaluator as _TfEvaluatorRS
|
|
6
6
|
|
|
7
|
+
__version__ = get_version()
|
|
8
|
+
|
|
7
9
|
|
|
8
10
|
class TfEvaluator(_TfEvaluatorRS):
|
|
9
11
|
def __new__(cls, future, bond, *args, **kwargs):
|
|
@@ -13,4 +15,4 @@ class TfEvaluator(_TfEvaluatorRS):
|
|
|
13
15
|
return super().__new__(cls, future, bond, *args, **kwargs)
|
|
14
16
|
|
|
15
17
|
|
|
16
|
-
__all__ = ["Bond", "Future", "Ib", "Sse", "TfEvaluator"]
|
|
18
|
+
__all__ = ["Bond", "Future", "Ib", "Sse", "TfEvaluator", "__version__"]
|
pybond/pnl.py
CHANGED
|
@@ -56,11 +56,12 @@ class PercentFee(Fee):
|
|
|
56
56
|
|
|
57
57
|
|
|
58
58
|
def calc_bond_trade_pnl(
|
|
59
|
+
symbol: IntoExpr,
|
|
59
60
|
settle_time: IntoExpr,
|
|
60
61
|
qty: IntoExpr,
|
|
61
62
|
clean_price: IntoExpr,
|
|
62
63
|
clean_close: IntoExpr,
|
|
63
|
-
symbol: str = "",
|
|
64
|
+
# symbol: str = "",
|
|
64
65
|
bond_info_path: str | None = None,
|
|
65
66
|
multiplier: float = 1,
|
|
66
67
|
fee: str | Fee = "",
|
|
@@ -70,6 +71,7 @@ def calc_bond_trade_pnl(
|
|
|
70
71
|
) -> pl.Expr:
|
|
71
72
|
if isinstance(fee, Fee):
|
|
72
73
|
fee = fee.str
|
|
74
|
+
symbol = parse_into_expr(symbol)
|
|
73
75
|
settle_time = parse_into_expr(settle_time)
|
|
74
76
|
qty = parse_into_expr(qty)
|
|
75
77
|
clean_price = parse_into_expr(clean_price)
|
|
@@ -92,7 +94,7 @@ def calc_bond_trade_pnl(
|
|
|
92
94
|
"fee": 0,
|
|
93
95
|
}
|
|
94
96
|
kwargs = {
|
|
95
|
-
"symbol": symbol,
|
|
97
|
+
# "symbol": symbol,
|
|
96
98
|
"multiplier": multiplier,
|
|
97
99
|
"fee": fee,
|
|
98
100
|
"borrowing_cost": borrowing_cost,
|
|
@@ -101,7 +103,7 @@ def calc_bond_trade_pnl(
|
|
|
101
103
|
"bond_info_path": bond_info_path,
|
|
102
104
|
}
|
|
103
105
|
return register_plugin(
|
|
104
|
-
args=[settle_time, qty, clean_price, clean_close],
|
|
106
|
+
args=[symbol, settle_time, qty, clean_price, clean_close],
|
|
105
107
|
kwargs=kwargs,
|
|
106
108
|
symbol="calc_bond_trade_pnl",
|
|
107
109
|
is_elementwise=False,
|
pybond/pybond.pyd
CHANGED
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
pybond/__init__.py,sha256=
|
|
1
|
+
pybond/__init__.py,sha256=ocuh95mkVrcU3cps2zC-kgK7VMV7BZIcOK-mXo7oYg0,563
|
|
2
2
|
pybond/bond.py,sha256=tXXPBNQQ6ve2trmHkJpfOv_2FBue4hcekZVEVmlqs0s,6758
|
|
3
3
|
pybond/download.py,sha256=l_YbDIh7wyNLK6B0Ac2ZdSAAD0o8VhR4NbXwbRH13Hw,4369
|
|
4
4
|
pybond/ffi/__init__.py,sha256=AKhddxYYqfOkujr9FGKo-FOPk3DDi42SOfk5mbc0zWE,98
|
|
@@ -17,10 +17,10 @@ pybond/nb/nb_evaluators.py,sha256=GBsW3UuGf8iVUWr2DTISXzdYoGV5ITEOVFJivBNmWkc,15
|
|
|
17
17
|
pybond/nb/nb_time.py,sha256=5KNrWYcPwZUHoxvZKvh3qdhjB0DjRkxbUzONSv6OfhY,8928
|
|
18
18
|
pybond/pd.py,sha256=gXUV6d069jC94Ej04njrgQCW16UdYx0Rh9y2IVMc068,13760
|
|
19
19
|
pybond/pl.py,sha256=WhiBv6IOs5-jxK78xd75KXZSogoFyJ0XJ-v23Gjp_ho,13966
|
|
20
|
-
pybond/pnl.py,sha256=
|
|
20
|
+
pybond/pnl.py,sha256=7jyXx8Hx6nwWgvN5oXhY2mH9-5IRIPfKGUVJXj0dIzA,2825
|
|
21
21
|
pybond/polars_utils.py,sha256=020Dy-l6v_NF-y7LXcKyJmWGAgH59NAxWKvjfnJO1tY,2663
|
|
22
|
-
pybond/pybond.pyd,sha256=
|
|
22
|
+
pybond/pybond.pyd,sha256=cbfO49LF8POlCkk3ORiaqKcQFqix5CTdDWTrNIINa4w,23687168
|
|
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.11.dist-info/METADATA,sha256=35GSxnFUR6G_rywqWsozuRtPVrk9dnHuTWiQdsowNuc,258
|
|
25
|
+
tea_bond-0.3.11.dist-info/WHEEL,sha256=7bfl5v0wbVhXZba613g0x-n2obNNfpQuN8I1cQ4oaU8,94
|
|
26
|
+
tea_bond-0.3.11.dist-info/RECORD,,
|