ffdata 0.2.8__tar.gz → 0.2.10__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.8 → ffdata-0.2.10}/PKG-INFO +1 -1
- {ffdata-0.2.8 → ffdata-0.2.10}/pyproject.toml +1 -1
- {ffdata-0.2.8 → ffdata-0.2.10}/src/ffdata/__init__.py +30 -0
- {ffdata-0.2.8 → ffdata-0.2.10}/src/ffdata/client.py +123 -1
- {ffdata-0.2.8 → ffdata-0.2.10}/src/ffdata.egg-info/PKG-INFO +1 -1
- {ffdata-0.2.8 → ffdata-0.2.10}/README.md +0 -0
- {ffdata-0.2.8 → ffdata-0.2.10}/scripts/configure_ffdata.sh +0 -0
- {ffdata-0.2.8 → ffdata-0.2.10}/setup.cfg +0 -0
- {ffdata-0.2.8 → ffdata-0.2.10}/src/ffdata/cli.py +0 -0
- {ffdata-0.2.8 → ffdata-0.2.10}/src/ffdata/datasets/__init__.py +0 -0
- {ffdata-0.2.8 → ffdata-0.2.10}/src/ffdata/datasets/manager.py +0 -0
- {ffdata-0.2.8 → ffdata-0.2.10}/src/ffdata/local/__init__.py +0 -0
- {ffdata-0.2.8 → ffdata-0.2.10}/src/ffdata/local/store.py +0 -0
- {ffdata-0.2.8 → ffdata-0.2.10}/src/ffdata/transport/__init__.py +0 -0
- {ffdata-0.2.8 → ffdata-0.2.10}/src/ffdata/transport/http.py +0 -0
- {ffdata-0.2.8 → ffdata-0.2.10}/src/ffdata.egg-info/SOURCES.txt +0 -0
- {ffdata-0.2.8 → ffdata-0.2.10}/src/ffdata.egg-info/dependency_links.txt +0 -0
- {ffdata-0.2.8 → ffdata-0.2.10}/src/ffdata.egg-info/entry_points.txt +0 -0
- {ffdata-0.2.8 → ffdata-0.2.10}/src/ffdata.egg-info/requires.txt +0 -0
- {ffdata-0.2.8 → ffdata-0.2.10}/src/ffdata.egg-info/top_level.txt +0 -0
- {ffdata-0.2.8 → ffdata-0.2.10}/src/ffdata_common/__init__.py +0 -0
- {ffdata-0.2.8 → ffdata-0.2.10}/src/ffdata_common/codecs/__init__.py +0 -0
- {ffdata-0.2.8 → ffdata-0.2.10}/src/ffdata_common/codecs/arrow.py +0 -0
- {ffdata-0.2.8 → ffdata-0.2.10}/src/ffdata_common/errors.py +0 -0
- {ffdata-0.2.8 → ffdata-0.2.10}/src/ffdata_common/protocol.py +0 -0
- {ffdata-0.2.8 → ffdata-0.2.10}/src/ffdata_common/schemas/__init__.py +0 -0
- {ffdata-0.2.8 → ffdata-0.2.10}/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
|
|
|
@@ -165,6 +180,16 @@ def macro_indicator_data(*args: Any, **kwargs: Any):
|
|
|
165
180
|
return _client().macro_indicator_data(*args, **kwargs)
|
|
166
181
|
|
|
167
182
|
|
|
183
|
+
def intl_macro_indicator_basic(*args: Any, **kwargs: Any):
|
|
184
|
+
"""通过默认客户端查询国际宏观指标基本信息(国家/口径/频率/单位随行返回)。"""
|
|
185
|
+
return _client().intl_macro_indicator_basic(*args, **kwargs)
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
def intl_macro_indicator_data(*args: Any, **kwargs: Any):
|
|
189
|
+
"""通过默认客户端查询国际宏观指标时间序列(含预测值标识)。"""
|
|
190
|
+
return _client().intl_macro_indicator_data(*args, **kwargs)
|
|
191
|
+
|
|
192
|
+
|
|
168
193
|
def trade_cal(*args: Any, **kwargs: Any):
|
|
169
194
|
"""通过默认客户端查询交易日历(8 列,支持沪深/北交所/港股/美股/银行间)。"""
|
|
170
195
|
return _client().trade_cal(*args, **kwargs)
|
|
@@ -196,6 +221,8 @@ __all__ = [
|
|
|
196
221
|
"index_valuation",
|
|
197
222
|
"index_weight",
|
|
198
223
|
"index_industry",
|
|
224
|
+
"intl_macro_indicator_basic",
|
|
225
|
+
"intl_macro_indicator_data",
|
|
199
226
|
"macro_indicator_basic",
|
|
200
227
|
"macro_indicator_data",
|
|
201
228
|
"query",
|
|
@@ -205,6 +232,9 @@ __all__ = [
|
|
|
205
232
|
"stock_adjusting_factor",
|
|
206
233
|
"stock_basic",
|
|
207
234
|
"stock_daily",
|
|
235
|
+
"stock_limit_price_daily",
|
|
236
|
+
"stock_performance_daily",
|
|
208
237
|
"stock_valuation_daily",
|
|
238
|
+
"tail_risk_signal_daily",
|
|
209
239
|
"trade_cal",
|
|
210
240
|
]
|
|
@@ -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],
|
|
@@ -358,10 +418,23 @@ class Client:
|
|
|
358
418
|
*,
|
|
359
419
|
indicator_code: int | list[int] | None = None,
|
|
360
420
|
name: str | None = None,
|
|
421
|
+
state: str = "active",
|
|
422
|
+
limit: int = 20,
|
|
361
423
|
fields: list[str] | None = None,
|
|
362
424
|
) -> pd.DataFrame:
|
|
425
|
+
"""查询宏观指标基本信息(名称 → 指标代码)。
|
|
426
|
+
|
|
427
|
+
``name`` 走全库名称检索(支持空格分词),``state`` 默认 ``active`` 只返回有效
|
|
428
|
+
指标(``all`` 含已终止指标),``limit`` 默认 20、最大 200。返回的
|
|
429
|
+
``indicator_code`` 可直接用于 :meth:`macro_indicator_data`。
|
|
430
|
+
"""
|
|
363
431
|
return self.query(
|
|
364
|
-
"macro_indicator_basic",
|
|
432
|
+
"macro_indicator_basic",
|
|
433
|
+
indicator_code=indicator_code,
|
|
434
|
+
name=name,
|
|
435
|
+
state=state,
|
|
436
|
+
limit=limit,
|
|
437
|
+
fields=fields,
|
|
365
438
|
)
|
|
366
439
|
|
|
367
440
|
def macro_indicator_data(
|
|
@@ -380,6 +453,55 @@ class Client:
|
|
|
380
453
|
fields=fields,
|
|
381
454
|
)
|
|
382
455
|
|
|
456
|
+
def intl_macro_indicator_basic(
|
|
457
|
+
self,
|
|
458
|
+
*,
|
|
459
|
+
name: str | None = None,
|
|
460
|
+
indicator_code: int | list[int] | None = None,
|
|
461
|
+
region: str | list[str] | None = None,
|
|
462
|
+
state: str = "active",
|
|
463
|
+
limit: int = 20,
|
|
464
|
+
fields: list[str] | None = None,
|
|
465
|
+
) -> pd.DataFrame:
|
|
466
|
+
"""查询国际宏观指标基本信息(名称/地区 → 指标代码)。
|
|
467
|
+
|
|
468
|
+
``name`` 同时匹配中文名与英文名(支持空格分词),``region`` 按国家/地区名称
|
|
469
|
+
精确筛选;``state`` 默认 ``active`` 只返回有效指标(``all`` 含已终止指标),
|
|
470
|
+
``limit`` 默认 20、最大 200。返回的 ``indicator_code`` 可直接用于
|
|
471
|
+
:meth:`intl_macro_indicator_data`。
|
|
472
|
+
"""
|
|
473
|
+
return self.query(
|
|
474
|
+
"intl_macro_indicator_basic",
|
|
475
|
+
indicator_code=indicator_code,
|
|
476
|
+
name=name,
|
|
477
|
+
region=region,
|
|
478
|
+
state=state,
|
|
479
|
+
limit=limit,
|
|
480
|
+
fields=fields,
|
|
481
|
+
)
|
|
482
|
+
|
|
483
|
+
def intl_macro_indicator_data(
|
|
484
|
+
self,
|
|
485
|
+
indicator_code: int | list[int],
|
|
486
|
+
*,
|
|
487
|
+
start_date: Any = None,
|
|
488
|
+
end_date: Any = None,
|
|
489
|
+
fields: list[str] | None = None,
|
|
490
|
+
) -> pd.DataFrame:
|
|
491
|
+
"""查询国际宏观指标时间序列(指标代码 → 指标数据)。
|
|
492
|
+
|
|
493
|
+
``indicator_code`` 取自 :meth:`intl_macro_indicator_basic`;``start_date`` /
|
|
494
|
+
``end_date`` 可只给一端,都不给表示返回全部可用数据。返回行含单位/频率与
|
|
495
|
+
``data_disclosure_type``(``2401`` 表示预测值,空表示实际值),数值不做换算。
|
|
496
|
+
"""
|
|
497
|
+
return self.query(
|
|
498
|
+
"intl_macro_indicator_data",
|
|
499
|
+
indicator_code=indicator_code,
|
|
500
|
+
start_date=start_date,
|
|
501
|
+
end_date=end_date,
|
|
502
|
+
fields=fields,
|
|
503
|
+
)
|
|
504
|
+
|
|
383
505
|
def stock_basic(
|
|
384
506
|
self,
|
|
385
507
|
*,
|
|
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
|