ffdata 0.2.9__tar.gz → 0.2.11__tar.gz
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.
- {ffdata-0.2.9 → ffdata-0.2.11}/PKG-INFO +1 -1
- {ffdata-0.2.9 → ffdata-0.2.11}/pyproject.toml +1 -1
- {ffdata-0.2.9 → ffdata-0.2.11}/src/ffdata/__init__.py +24 -0
- {ffdata-0.2.9 → ffdata-0.2.11}/src/ffdata/client.py +86 -0
- {ffdata-0.2.9 → ffdata-0.2.11}/src/ffdata.egg-info/PKG-INFO +1 -1
- {ffdata-0.2.9 → ffdata-0.2.11}/README.md +0 -0
- {ffdata-0.2.9 → ffdata-0.2.11}/scripts/configure_ffdata.sh +0 -0
- {ffdata-0.2.9 → ffdata-0.2.11}/setup.cfg +0 -0
- {ffdata-0.2.9 → ffdata-0.2.11}/src/ffdata/cli.py +0 -0
- {ffdata-0.2.9 → ffdata-0.2.11}/src/ffdata/datasets/__init__.py +0 -0
- {ffdata-0.2.9 → ffdata-0.2.11}/src/ffdata/datasets/manager.py +0 -0
- {ffdata-0.2.9 → ffdata-0.2.11}/src/ffdata/local/__init__.py +0 -0
- {ffdata-0.2.9 → ffdata-0.2.11}/src/ffdata/local/store.py +0 -0
- {ffdata-0.2.9 → ffdata-0.2.11}/src/ffdata/transport/__init__.py +0 -0
- {ffdata-0.2.9 → ffdata-0.2.11}/src/ffdata/transport/http.py +0 -0
- {ffdata-0.2.9 → ffdata-0.2.11}/src/ffdata.egg-info/SOURCES.txt +0 -0
- {ffdata-0.2.9 → ffdata-0.2.11}/src/ffdata.egg-info/dependency_links.txt +0 -0
- {ffdata-0.2.9 → ffdata-0.2.11}/src/ffdata.egg-info/entry_points.txt +0 -0
- {ffdata-0.2.9 → ffdata-0.2.11}/src/ffdata.egg-info/requires.txt +0 -0
- {ffdata-0.2.9 → ffdata-0.2.11}/src/ffdata.egg-info/top_level.txt +0 -0
- {ffdata-0.2.9 → ffdata-0.2.11}/src/ffdata_common/__init__.py +0 -0
- {ffdata-0.2.9 → ffdata-0.2.11}/src/ffdata_common/codecs/__init__.py +0 -0
- {ffdata-0.2.9 → ffdata-0.2.11}/src/ffdata_common/codecs/arrow.py +0 -0
- {ffdata-0.2.9 → ffdata-0.2.11}/src/ffdata_common/errors.py +0 -0
- {ffdata-0.2.9 → ffdata-0.2.11}/src/ffdata_common/protocol.py +0 -0
- {ffdata-0.2.9 → ffdata-0.2.11}/src/ffdata_common/schemas/__init__.py +0 -0
- {ffdata-0.2.9 → ffdata-0.2.11}/src/ffdata_common/schemas/manifest.py +0 -0
|
@@ -63,6 +63,21 @@ def stock_valuation_daily(*args: Any, **kwargs: Any):
|
|
|
63
63
|
return _client().stock_valuation_daily(*args, **kwargs)
|
|
64
64
|
|
|
65
65
|
|
|
66
|
+
def stock_performance_daily(*args: Any, **kwargs: Any):
|
|
67
|
+
"""通过默认客户端查询股票日行情表现(特色指标:连涨跌天数、破发破净、涨跌停、区间新高新低)。"""
|
|
68
|
+
return _client().stock_performance_daily(*args, **kwargs)
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def stock_limit_price_daily(*args: Any, **kwargs: Any):
|
|
72
|
+
"""通过默认客户端查询 A 股每日涨跌停价(Tushare ``stk_limit`` 复刻)。"""
|
|
73
|
+
return _client().stock_limit_price_daily(*args, **kwargs)
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def tail_risk_signal_daily(*args: Any, **kwargs: Any):
|
|
77
|
+
"""通过默认客户端查询尾部风险控制信号(沪深300 / 纳斯达克100)。"""
|
|
78
|
+
return _client().tail_risk_signal_daily(*args, **kwargs)
|
|
79
|
+
|
|
80
|
+
|
|
66
81
|
def index_daily(*args: Any, **kwargs: Any):
|
|
67
82
|
return _client().index_daily(*args, **kwargs)
|
|
68
83
|
|
|
@@ -82,6 +97,11 @@ def index_industry(*args: Any, **kwargs: Any):
|
|
|
82
97
|
return _client().index_industry(*args, **kwargs)
|
|
83
98
|
|
|
84
99
|
|
|
100
|
+
def index_relation(*args: Any, **kwargs: Any):
|
|
101
|
+
"""通过默认客户端查询指数代码的关联指数(如全收益/净收益指数)。"""
|
|
102
|
+
return _client().index_relation(*args, **kwargs)
|
|
103
|
+
|
|
104
|
+
|
|
85
105
|
def index_performance(*args: Any, **kwargs: Any):
|
|
86
106
|
"""通过默认客户端查询指数区间行情表现(12 个区间,120 列)。"""
|
|
87
107
|
return _client().index_performance(*args, **kwargs)
|
|
@@ -206,6 +226,7 @@ __all__ = [
|
|
|
206
226
|
"index_valuation",
|
|
207
227
|
"index_weight",
|
|
208
228
|
"index_industry",
|
|
229
|
+
"index_relation",
|
|
209
230
|
"intl_macro_indicator_basic",
|
|
210
231
|
"intl_macro_indicator_data",
|
|
211
232
|
"macro_indicator_basic",
|
|
@@ -217,6 +238,9 @@ __all__ = [
|
|
|
217
238
|
"stock_adjusting_factor",
|
|
218
239
|
"stock_basic",
|
|
219
240
|
"stock_daily",
|
|
241
|
+
"stock_limit_price_daily",
|
|
242
|
+
"stock_performance_daily",
|
|
220
243
|
"stock_valuation_daily",
|
|
244
|
+
"tail_risk_signal_daily",
|
|
221
245
|
"trade_cal",
|
|
222
246
|
]
|
|
@@ -179,6 +179,66 @@ class Client:
|
|
|
179
179
|
fields=fields,
|
|
180
180
|
)
|
|
181
181
|
|
|
182
|
+
def stock_performance_daily(
|
|
183
|
+
self,
|
|
184
|
+
ts_code: str | list[str] | None = None,
|
|
185
|
+
*,
|
|
186
|
+
trade_date: Any = None,
|
|
187
|
+
start_date: Any = None,
|
|
188
|
+
end_date: Any = None,
|
|
189
|
+
source: Source = "auto",
|
|
190
|
+
fields: list[str] | None = None,
|
|
191
|
+
) -> pd.DataFrame:
|
|
192
|
+
return self.query(
|
|
193
|
+
"stock_performance_daily",
|
|
194
|
+
ts_code=ts_code,
|
|
195
|
+
trade_date=trade_date,
|
|
196
|
+
start_date=start_date,
|
|
197
|
+
end_date=end_date,
|
|
198
|
+
source=source,
|
|
199
|
+
fields=fields,
|
|
200
|
+
)
|
|
201
|
+
|
|
202
|
+
def stock_limit_price_daily(
|
|
203
|
+
self,
|
|
204
|
+
ts_code: str | list[str] | None = None,
|
|
205
|
+
*,
|
|
206
|
+
trade_date: Any = None,
|
|
207
|
+
start_date: Any = None,
|
|
208
|
+
end_date: Any = None,
|
|
209
|
+
source: Source = "auto",
|
|
210
|
+
fields: list[str] | None = None,
|
|
211
|
+
) -> pd.DataFrame:
|
|
212
|
+
return self.query(
|
|
213
|
+
"stock_limit_price_daily",
|
|
214
|
+
ts_code=ts_code,
|
|
215
|
+
trade_date=trade_date,
|
|
216
|
+
start_date=start_date,
|
|
217
|
+
end_date=end_date,
|
|
218
|
+
source=source,
|
|
219
|
+
fields=fields,
|
|
220
|
+
)
|
|
221
|
+
|
|
222
|
+
def tail_risk_signal_daily(
|
|
223
|
+
self,
|
|
224
|
+
index_code: str | None = None,
|
|
225
|
+
*,
|
|
226
|
+
trade_date: Any = None,
|
|
227
|
+
start_date: Any = None,
|
|
228
|
+
end_date: Any = None,
|
|
229
|
+
source: Source = "auto",
|
|
230
|
+
fields: list[str] | None = None,
|
|
231
|
+
) -> pd.DataFrame:
|
|
232
|
+
return self.query(
|
|
233
|
+
"tail_risk_signal_daily",
|
|
234
|
+
index_code=index_code,
|
|
235
|
+
trade_date=trade_date,
|
|
236
|
+
start_date=start_date,
|
|
237
|
+
end_date=end_date,
|
|
238
|
+
source=source,
|
|
239
|
+
fields=fields,
|
|
240
|
+
)
|
|
241
|
+
|
|
182
242
|
def index_daily(
|
|
183
243
|
self,
|
|
184
244
|
ts_code: str | list[str],
|
|
@@ -274,6 +334,32 @@ class Client:
|
|
|
274
334
|
fields=fields,
|
|
275
335
|
)
|
|
276
336
|
|
|
337
|
+
def index_relation(
|
|
338
|
+
self,
|
|
339
|
+
index_code: str | list[str],
|
|
340
|
+
*,
|
|
341
|
+
direction: str = "both",
|
|
342
|
+
code_define: int | list[int] | None = None,
|
|
343
|
+
if_effected: int | None = None,
|
|
344
|
+
fields: list[str] | None = None,
|
|
345
|
+
) -> pd.DataFrame:
|
|
346
|
+
"""查询一个指数代码的关联指数(如价格指数与全收益指数)。
|
|
347
|
+
|
|
348
|
+
``index_code`` 必填,可带发布机构后缀或裸代码(港股用 ``HSI.HI``/``HSI``),
|
|
349
|
+
支持列表与逗号分隔。``direction`` 取 ``both``(默认)/``primary``/``related``,
|
|
350
|
+
决定查询代码落在源表哪一侧;``code_define`` 为关联方式码值(如 ``2``
|
|
351
|
+
= 分红规则不同,全收益通常在此);``if_effected`` 为 ``1`` 有效 / ``2`` 失效。
|
|
352
|
+
返回 13 列;本接口仅支持远程查询。
|
|
353
|
+
"""
|
|
354
|
+
return self.query(
|
|
355
|
+
"index_relation",
|
|
356
|
+
index_code=index_code,
|
|
357
|
+
direction=direction,
|
|
358
|
+
code_define=code_define,
|
|
359
|
+
if_effected=if_effected,
|
|
360
|
+
fields=fields,
|
|
361
|
+
)
|
|
362
|
+
|
|
277
363
|
def index_performance(
|
|
278
364
|
self,
|
|
279
365
|
ts_code: str | list[str] | None = None,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|