FinMind 2.0.1__tar.gz → 2.0.2__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.
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/data/data_loader.py +11 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/schema/plot.py +15 -19
- {finmind-2.0.1/finmind.egg-info → finmind-2.0.2}/PKG-INFO +4 -5
- {finmind-2.0.1 → finmind-2.0.2/finmind.egg-info}/PKG-INFO +4 -5
- {finmind-2.0.1 → finmind-2.0.2}/finmind.egg-info/requires.txt +3 -4
- {finmind-2.0.1 → finmind-2.0.2}/pyproject.toml +3 -4
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/__init__.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/_version.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/crawler/__init__.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/crawler/base.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/crawler/commodities.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/crawler/demo.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/crawler/government_bonds.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/data/__init__.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/data/data_subscriber.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/data/finmind_api.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/indicators/__init__.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/indicators/bias.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/indicators/continue_holding.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/indicators/institutional_investors_follower.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/indicators/institutional_investors_over_buy.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/indicators/kd.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/indicators/kd_crossover.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/indicators/ma_cross_orver.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/indicators/short_sale_margin_purchase_ratio.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/plotting/__init__.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/plotting/bar.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/plotting/kline.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/plotting/line.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/plotting/pie.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/schema/__init__.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/schema/data.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/schema/indicators.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/schema/info.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/schema/rule.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/strategies/__init__.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/strategies/base.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/strategies/bias.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/strategies/continue_holding.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/strategies/institutional_investors_follower.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/strategies/kd.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/strategies/kd_crossover.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/strategies/ma_crossover.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/strategies/macd_crossover.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/strategies/max_min_period_bias.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/strategies/naive_kd.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/strategies/short_sale_margin_purchase_ratio.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/strategies/utils.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/templates/post.html +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/utility/__init__.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/utility/request.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/FinMind/utility/rule.py +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/LICENSE +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/README.md +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/finmind.egg-info/SOURCES.txt +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/finmind.egg-info/dependency_links.txt +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/finmind.egg-info/top_level.txt +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/setup.cfg +0 -0
- {finmind-2.0.1 → finmind-2.0.2}/setup.py +0 -0
|
@@ -2489,12 +2489,17 @@ class DataLoader(FinMindApi):
|
|
|
2489
2489
|
date: str = "",
|
|
2490
2490
|
timeout: int = None,
|
|
2491
2491
|
use_async: bool = False,
|
|
2492
|
+
use_object: bool = False,
|
|
2492
2493
|
) -> pd.DataFrame:
|
|
2493
2494
|
"""get 當日權證卷商分點表
|
|
2494
2495
|
:param stock_id (str): 股票代號("2330")
|
|
2495
2496
|
:param securities_trader_id (str): 卷商代號("1020")
|
|
2496
2497
|
:param date (str): 日期("2018-01-01")
|
|
2497
2498
|
:param timeout (int): timeout seconds, default None
|
|
2499
|
+
:param use_async (bool): 是否使用非同步下載, default False
|
|
2500
|
+
:param use_object (bool): 是否透過 signed URL 下載整日 parquet 資料物件,
|
|
2501
|
+
設為 True 時忽略 stock_id, securities_trader_id, stock_id_list,
|
|
2502
|
+
use_async 參數, default False
|
|
2498
2503
|
|
|
2499
2504
|
:return: 當日權證卷商分點表 TaiwanStockWarrantTradingDailyReport
|
|
2500
2505
|
:rtype pd.DataFrame
|
|
@@ -2506,6 +2511,12 @@ class DataLoader(FinMindApi):
|
|
|
2506
2511
|
:rtype column stock_id (str): 股票代碼
|
|
2507
2512
|
:rtype column date (str): 日期
|
|
2508
2513
|
"""
|
|
2514
|
+
if use_object:
|
|
2515
|
+
return self.get_object(
|
|
2516
|
+
dataset=Dataset.TaiwanStockWarrantTradingDailyReport,
|
|
2517
|
+
date=date,
|
|
2518
|
+
timeout=timeout,
|
|
2519
|
+
)
|
|
2509
2520
|
stock_trading_daily_report = self.get_data(
|
|
2510
2521
|
dataset=Dataset.TaiwanStockWarrantTradingDailyReport,
|
|
2511
2522
|
data_id=stock_id,
|
|
@@ -1,38 +1,34 @@
|
|
|
1
1
|
import typing
|
|
2
2
|
|
|
3
3
|
import pandas as pd
|
|
4
|
-
from pydantic import BaseModel,
|
|
4
|
+
from pydantic import BaseModel, field_validator
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
class Labels(BaseModel):
|
|
8
8
|
labels: typing.List[typing.Union[str, int]]
|
|
9
9
|
|
|
10
|
-
@
|
|
10
|
+
@field_validator("labels")
|
|
11
|
+
@classmethod
|
|
11
12
|
def valid(cls, value):
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
raise Exception(
|
|
18
|
-
"the type of labels must be list[int] for list[str]."
|
|
19
|
-
)
|
|
13
|
+
for item in value:
|
|
14
|
+
if not isinstance(item, (str, int)):
|
|
15
|
+
raise Exception(
|
|
16
|
+
"the type of labels must be list[int] for list[str]."
|
|
17
|
+
)
|
|
20
18
|
return value
|
|
21
19
|
|
|
22
20
|
|
|
23
21
|
class Series(BaseModel):
|
|
24
22
|
series: typing.List[typing.Union[int, float]]
|
|
25
23
|
|
|
26
|
-
@
|
|
24
|
+
@field_validator("series")
|
|
25
|
+
@classmethod
|
|
27
26
|
def valid(cls, value):
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
raise Exception(
|
|
34
|
-
"the type of series must be list[int] for list[str]."
|
|
35
|
-
)
|
|
27
|
+
for item in value:
|
|
28
|
+
if not isinstance(item, (int, float)):
|
|
29
|
+
raise Exception(
|
|
30
|
+
"the type of series must be list[int] for list[str]."
|
|
31
|
+
)
|
|
36
32
|
return value
|
|
37
33
|
|
|
38
34
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: finmind
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.2
|
|
4
4
|
Summary: financial mining
|
|
5
5
|
Author-email: linsam <finmind.tw@gmail.com>
|
|
6
6
|
License: Apache License
|
|
@@ -219,17 +219,16 @@ Requires-Python: >=3.8
|
|
|
219
219
|
Description-Content-Type: text/markdown
|
|
220
220
|
License-File: LICENSE
|
|
221
221
|
Requires-Dist: pandas<3.0.0,>=2.0.0
|
|
222
|
-
Requires-Dist: numpy<
|
|
222
|
+
Requires-Dist: numpy<3.0.0,>=1.19.5
|
|
223
223
|
Requires-Dist: requests<3.0.0,>=2.23.0
|
|
224
|
-
Requires-Dist: pydantic<
|
|
224
|
+
Requires-Dist: pydantic<3.0.0,>=2.0.0
|
|
225
225
|
Requires-Dist: ta<1.0.0,>=0.11.0
|
|
226
226
|
Requires-Dist: lxml<5.0.0,>=4.6.3
|
|
227
227
|
Requires-Dist: pyecharts<2.0.0,>=1.9.0
|
|
228
228
|
Requires-Dist: ipython<8.0.0,>=7.16.1
|
|
229
229
|
Requires-Dist: loguru<1.0.0,>=0.5.3
|
|
230
230
|
Requires-Dist: aiohttp<4.0.0,>=3.7.4.post0
|
|
231
|
-
Requires-Dist: importlib-metadata<
|
|
232
|
-
Requires-Dist: Flask<3.0.0,>=2.0.2
|
|
231
|
+
Requires-Dist: importlib-metadata<9.0.0,>=4.8.1
|
|
233
232
|
Requires-Dist: typing-extensions<5.0.0,>=4.0.0
|
|
234
233
|
Requires-Dist: tqdm
|
|
235
234
|
Requires-Dist: nest-asyncio==1.6.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: finmind
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.2
|
|
4
4
|
Summary: financial mining
|
|
5
5
|
Author-email: linsam <finmind.tw@gmail.com>
|
|
6
6
|
License: Apache License
|
|
@@ -219,17 +219,16 @@ Requires-Python: >=3.8
|
|
|
219
219
|
Description-Content-Type: text/markdown
|
|
220
220
|
License-File: LICENSE
|
|
221
221
|
Requires-Dist: pandas<3.0.0,>=2.0.0
|
|
222
|
-
Requires-Dist: numpy<
|
|
222
|
+
Requires-Dist: numpy<3.0.0,>=1.19.5
|
|
223
223
|
Requires-Dist: requests<3.0.0,>=2.23.0
|
|
224
|
-
Requires-Dist: pydantic<
|
|
224
|
+
Requires-Dist: pydantic<3.0.0,>=2.0.0
|
|
225
225
|
Requires-Dist: ta<1.0.0,>=0.11.0
|
|
226
226
|
Requires-Dist: lxml<5.0.0,>=4.6.3
|
|
227
227
|
Requires-Dist: pyecharts<2.0.0,>=1.9.0
|
|
228
228
|
Requires-Dist: ipython<8.0.0,>=7.16.1
|
|
229
229
|
Requires-Dist: loguru<1.0.0,>=0.5.3
|
|
230
230
|
Requires-Dist: aiohttp<4.0.0,>=3.7.4.post0
|
|
231
|
-
Requires-Dist: importlib-metadata<
|
|
232
|
-
Requires-Dist: Flask<3.0.0,>=2.0.2
|
|
231
|
+
Requires-Dist: importlib-metadata<9.0.0,>=4.8.1
|
|
233
232
|
Requires-Dist: typing-extensions<5.0.0,>=4.0.0
|
|
234
233
|
Requires-Dist: tqdm
|
|
235
234
|
Requires-Dist: nest-asyncio==1.6.0
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
pandas<3.0.0,>=2.0.0
|
|
2
|
-
numpy<
|
|
2
|
+
numpy<3.0.0,>=1.19.5
|
|
3
3
|
requests<3.0.0,>=2.23.0
|
|
4
|
-
pydantic<
|
|
4
|
+
pydantic<3.0.0,>=2.0.0
|
|
5
5
|
ta<1.0.0,>=0.11.0
|
|
6
6
|
lxml<5.0.0,>=4.6.3
|
|
7
7
|
pyecharts<2.0.0,>=1.9.0
|
|
8
8
|
ipython<8.0.0,>=7.16.1
|
|
9
9
|
loguru<1.0.0,>=0.5.3
|
|
10
10
|
aiohttp<4.0.0,>=3.7.4.post0
|
|
11
|
-
importlib-metadata<
|
|
12
|
-
Flask<3.0.0,>=2.0.2
|
|
11
|
+
importlib-metadata<9.0.0,>=4.8.1
|
|
13
12
|
typing-extensions<5.0.0,>=4.0.0
|
|
14
13
|
tqdm
|
|
15
14
|
nest-asyncio==1.6.0
|
|
@@ -24,17 +24,16 @@ classifiers = [
|
|
|
24
24
|
dynamic = ["version"]
|
|
25
25
|
dependencies = [
|
|
26
26
|
"pandas>=2.0.0,<3.0.0",
|
|
27
|
-
"numpy>=1.19.5,<
|
|
27
|
+
"numpy>=1.19.5,<3.0.0",
|
|
28
28
|
"requests>=2.23.0,<3.0.0",
|
|
29
|
-
"pydantic>=
|
|
29
|
+
"pydantic>=2.0.0,<3.0.0",
|
|
30
30
|
"ta>=0.11.0,<1.0.0",
|
|
31
31
|
"lxml>=4.6.3,<5.0.0",
|
|
32
32
|
"pyecharts>=1.9.0,<2.0.0",
|
|
33
33
|
"ipython>=7.16.1,<8.0.0",
|
|
34
34
|
"loguru>=0.5.3,<1.0.0",
|
|
35
35
|
"aiohttp>=3.7.4.post0,<4.0.0",
|
|
36
|
-
"importlib-metadata>=4.8.1,<
|
|
37
|
-
"Flask>=2.0.2,<3.0.0",
|
|
36
|
+
"importlib-metadata>=4.8.1,<9.0.0",
|
|
38
37
|
"typing-extensions>=4.0.0,<5.0.0",
|
|
39
38
|
"tqdm",
|
|
40
39
|
"nest-asyncio==1.6.0",
|
|
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
|
|
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
|
|
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
|