FinMind 2.0.3__tar.gz → 2.0.5__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.3 → finmind-2.0.5}/FinMind/data/data_loader.py +161 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/schema/data.py +7 -0
- {finmind-2.0.3/finmind.egg-info → finmind-2.0.5}/PKG-INFO +1 -1
- {finmind-2.0.3 → finmind-2.0.5/finmind.egg-info}/PKG-INFO +1 -1
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/__init__.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/_version.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/crawler/__init__.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/crawler/base.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/crawler/commodities.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/crawler/demo.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/crawler/government_bonds.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/data/__init__.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/data/data_subscriber.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/data/finmind_api.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/indicators/__init__.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/indicators/bias.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/indicators/continue_holding.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/indicators/institutional_investors_follower.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/indicators/institutional_investors_over_buy.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/indicators/kd.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/indicators/kd_crossover.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/indicators/ma_cross_orver.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/indicators/short_sale_margin_purchase_ratio.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/plotting/__init__.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/plotting/bar.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/plotting/kline.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/plotting/line.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/plotting/pie.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/schema/__init__.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/schema/indicators.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/schema/info.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/schema/plot.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/schema/rule.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/strategies/__init__.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/strategies/base.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/strategies/bias.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/strategies/continue_holding.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/strategies/institutional_investors_follower.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/strategies/kd.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/strategies/kd_crossover.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/strategies/ma_crossover.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/strategies/macd_crossover.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/strategies/max_min_period_bias.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/strategies/naive_kd.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/strategies/short_sale_margin_purchase_ratio.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/strategies/utils.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/templates/post.html +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/utility/__init__.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/utility/request.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/FinMind/utility/rule.py +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/LICENSE +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/README.md +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/finmind.egg-info/SOURCES.txt +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/finmind.egg-info/dependency_links.txt +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/finmind.egg-info/requires.txt +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/finmind.egg-info/top_level.txt +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/pyproject.toml +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/setup.cfg +0 -0
- {finmind-2.0.3 → finmind-2.0.5}/setup.py +0 -0
|
@@ -46,6 +46,23 @@ class DataLoader(FinMindApi):
|
|
|
46
46
|
)
|
|
47
47
|
return stock_info
|
|
48
48
|
|
|
49
|
+
def taiwan_stock_active_etf_info(self, timeout: int = None) -> pd.DataFrame:
|
|
50
|
+
"""get 主動式ETF清單(台灣掛牌主動式ETF 代號/名稱/分類/市場別)
|
|
51
|
+
:param timeout (int): timeout seconds, default None
|
|
52
|
+
|
|
53
|
+
:return: 主動式ETF清單 TaiwanStockActiveETFInfo
|
|
54
|
+
:rtype pd.DataFrame
|
|
55
|
+
:rtype column date (str): 日期
|
|
56
|
+
:rtype column stock_id (str): ETF 代碼
|
|
57
|
+
:rtype column stock_name (str): ETF 名稱
|
|
58
|
+
:rtype column category (str): 分類
|
|
59
|
+
:rtype column type (str): 市場別
|
|
60
|
+
"""
|
|
61
|
+
stock_info = self.get_data(
|
|
62
|
+
dataset=Dataset.TaiwanStockActiveETFInfo, timeout=timeout
|
|
63
|
+
)
|
|
64
|
+
return stock_info
|
|
65
|
+
|
|
49
66
|
def taiwan_securities_trader_info(
|
|
50
67
|
self, timeout: int = None
|
|
51
68
|
) -> pd.DataFrame:
|
|
@@ -404,6 +421,88 @@ class DataLoader(FinMindApi):
|
|
|
404
421
|
)
|
|
405
422
|
return stock_loan_collateral_balance
|
|
406
423
|
|
|
424
|
+
def taiwan_stock_active_etf_holding(
|
|
425
|
+
self,
|
|
426
|
+
stock_id: str = "",
|
|
427
|
+
start_date: str = "",
|
|
428
|
+
end_date: str = "",
|
|
429
|
+
timeout: int = None,
|
|
430
|
+
use_async: bool = False,
|
|
431
|
+
stock_id_list: typing.List[str] = None,
|
|
432
|
+
) -> pd.DataFrame:
|
|
433
|
+
"""get 主動式ETF每日持股明細(Sponsor)
|
|
434
|
+
|
|
435
|
+
台灣掛牌主動式ETF(上市 + 上櫃)每日完整投資組合,包含成份標的、
|
|
436
|
+
股數、權重、市值、幣別;買賣標的可由相鄰交易日持股差分取得。
|
|
437
|
+
|
|
438
|
+
:param stock_id (str): ETF 代號("00980A");空字串則取當日全部主動式ETF
|
|
439
|
+
:param start_date (str): 起始日期("2025-05-05")
|
|
440
|
+
:param end_date (str): 結束日期("2025-05-31")
|
|
441
|
+
:param timeout (int): timeout seconds, default None
|
|
442
|
+
|
|
443
|
+
:return: 主動式ETF每日持股明細 TaiwanStockActiveETFHolding
|
|
444
|
+
:rtype pd.DataFrame
|
|
445
|
+
:rtype column date (str): 日期(持股基準日)
|
|
446
|
+
:rtype column stock_id (str): ETF 代號
|
|
447
|
+
:rtype column component_stock_id (str): 成份標的代號
|
|
448
|
+
:rtype column component_stock_name (str): 成份標的名稱
|
|
449
|
+
:rtype column asset_type (str): 資產類別
|
|
450
|
+
:rtype column shares (float): 股數
|
|
451
|
+
:rtype column weight (float): 權重(%)
|
|
452
|
+
:rtype column market_value (float): 市值
|
|
453
|
+
:rtype column currency (str): 幣別
|
|
454
|
+
"""
|
|
455
|
+
stock_active_etf_holding = self.get_data(
|
|
456
|
+
dataset=Dataset.TaiwanStockActiveETFHolding,
|
|
457
|
+
data_id=stock_id,
|
|
458
|
+
start_date=start_date,
|
|
459
|
+
end_date=end_date,
|
|
460
|
+
timeout=timeout,
|
|
461
|
+
use_async=use_async,
|
|
462
|
+
data_id_list=stock_id_list,
|
|
463
|
+
)
|
|
464
|
+
return stock_active_etf_holding
|
|
465
|
+
|
|
466
|
+
def taiwan_stock_active_etf_holding_change(
|
|
467
|
+
self,
|
|
468
|
+
stock_id: str = "",
|
|
469
|
+
start_date: str = "",
|
|
470
|
+
end_date: str = "",
|
|
471
|
+
timeout: int = None,
|
|
472
|
+
use_async: bool = False,
|
|
473
|
+
stock_id_list: typing.List[str] = None,
|
|
474
|
+
) -> pd.DataFrame:
|
|
475
|
+
"""get 主動式ETF每日持股異動/買賣(Sponsor)
|
|
476
|
+
|
|
477
|
+
台灣掛牌主動式ETF(上市 + 上櫃)每日持股異動,由相鄰交易日持股
|
|
478
|
+
差分推導出的買賣標的,包含成份標的、當日買進股數 buy、當日賣出股數
|
|
479
|
+
sell(皆為整數),每一列僅有 buy/sell 其一為非零值。
|
|
480
|
+
|
|
481
|
+
:param stock_id (str): ETF 代號("00980A");空字串則取當日全部主動式ETF
|
|
482
|
+
:param start_date (str): 起始日期("2025-05-05")
|
|
483
|
+
:param end_date (str): 結束日期("2025-05-31")
|
|
484
|
+
:param timeout (int): timeout seconds, default None
|
|
485
|
+
|
|
486
|
+
:return: 主動式ETF每日持股異動 TaiwanStockActiveETFHoldingChange
|
|
487
|
+
:rtype pd.DataFrame
|
|
488
|
+
:rtype column date (str): 日期(異動基準日)
|
|
489
|
+
:rtype column stock_id (str): ETF 代號
|
|
490
|
+
:rtype column component_stock_id (str): 成份標的代號
|
|
491
|
+
:rtype column component_stock_name (str): 成份標的名稱
|
|
492
|
+
:rtype column buy (int): 當日買進股數
|
|
493
|
+
:rtype column sell (int): 當日賣出股數(正值)
|
|
494
|
+
"""
|
|
495
|
+
stock_active_etf_holding_change = self.get_data(
|
|
496
|
+
dataset=Dataset.TaiwanStockActiveETFHoldingChange,
|
|
497
|
+
data_id=stock_id,
|
|
498
|
+
start_date=start_date,
|
|
499
|
+
end_date=end_date,
|
|
500
|
+
timeout=timeout,
|
|
501
|
+
use_async=use_async,
|
|
502
|
+
data_id_list=stock_id_list,
|
|
503
|
+
)
|
|
504
|
+
return stock_active_etf_holding_change
|
|
505
|
+
|
|
407
506
|
def taiwan_stock_margin_purchase_short_sale(
|
|
408
507
|
self,
|
|
409
508
|
stock_id: str = "",
|
|
@@ -2918,6 +3017,68 @@ class DataLoader(FinMindApi):
|
|
|
2918
3017
|
)
|
|
2919
3018
|
return taiwan_stock_day_trading_borrowing_fee_rate
|
|
2920
3019
|
|
|
3020
|
+
def taiwan_stock_convertible_bond_monthly_analysis(
|
|
3021
|
+
self,
|
|
3022
|
+
cb_id: str = "",
|
|
3023
|
+
start_date: str = "",
|
|
3024
|
+
end_date: str = "",
|
|
3025
|
+
timeout: int = None,
|
|
3026
|
+
) -> pd.DataFrame:
|
|
3027
|
+
"""get 可轉換公司債月份分析表
|
|
3028
|
+
:param cb_id (str): 可轉債代號("11011")
|
|
3029
|
+
:param start_date (str): 起始日期("2026-05-01")
|
|
3030
|
+
:param end_date (str): 結束日期("2026-05-02")
|
|
3031
|
+
:param timeout (int): timeout seconds, default None
|
|
3032
|
+
|
|
3033
|
+
:return: 可轉換公司債月份分析表 TaiwanStockConvertibleBondMonthlyAnalysis
|
|
3034
|
+
:rtype pd.DataFrame
|
|
3035
|
+
:rtype column cb_id (str): 可轉債代號
|
|
3036
|
+
:rtype column cb_name (str): 可轉債名稱
|
|
3037
|
+
:rtype column cb_name_en (str): 可轉債英文名稱
|
|
3038
|
+
:rtype column custody_balance (int): 保管餘額
|
|
3039
|
+
:rtype column last_month_balance (int): 上月餘額
|
|
3040
|
+
:rtype column change (int): 增減
|
|
3041
|
+
:rtype column change_percent (float): 增減百分比
|
|
3042
|
+
:rtype column issued_units (int): 發行單位數
|
|
3043
|
+
:rtype column custody_accounts (int): 保管戶數
|
|
3044
|
+
:rtype column pledged_units (int): 設質單位數
|
|
3045
|
+
:rtype column date (str): 日期
|
|
3046
|
+
"""
|
|
3047
|
+
taiwan_stock_convertible_bond_monthly_analysis = self.get_data(
|
|
3048
|
+
dataset=Dataset.TaiwanStockConvertibleBondMonthlyAnalysis,
|
|
3049
|
+
data_id=cb_id,
|
|
3050
|
+
start_date=start_date,
|
|
3051
|
+
end_date=end_date,
|
|
3052
|
+
timeout=timeout,
|
|
3053
|
+
)
|
|
3054
|
+
return taiwan_stock_convertible_bond_monthly_analysis
|
|
3055
|
+
|
|
3056
|
+
def taiwan_option_vix(
|
|
3057
|
+
self,
|
|
3058
|
+
start_date: str = "",
|
|
3059
|
+
end_date: str = "",
|
|
3060
|
+
timeout: int = None,
|
|
3061
|
+
) -> pd.DataFrame:
|
|
3062
|
+
"""get 臺指選擇權波動率指數
|
|
3063
|
+
:param start_date (str): 起始日期("2024-01-01")
|
|
3064
|
+
:param end_date (str): 結束日期("2024-12-31")
|
|
3065
|
+
:param timeout (int): timeout seconds, default None
|
|
3066
|
+
|
|
3067
|
+
:return: 臺指選擇權波動率指數 TaiwanOptionVix
|
|
3068
|
+
:rtype pd.DataFrame
|
|
3069
|
+
:rtype column date (str): 日期
|
|
3070
|
+
:rtype column time (str): 時間
|
|
3071
|
+
:rtype column vix (float): 波動率指數
|
|
3072
|
+
"""
|
|
3073
|
+
taiwan_option_vix = self.get_data(
|
|
3074
|
+
dataset=Dataset.TaiwanOptionVix,
|
|
3075
|
+
data_id="",
|
|
3076
|
+
start_date=start_date,
|
|
3077
|
+
end_date=end_date,
|
|
3078
|
+
timeout=timeout,
|
|
3079
|
+
)
|
|
3080
|
+
return taiwan_option_vix
|
|
3081
|
+
|
|
2921
3082
|
def _get_stock_id_list(
|
|
2922
3083
|
self, date: str, timeout: int = None
|
|
2923
3084
|
) -> typing.List[str]:
|
|
@@ -37,6 +37,7 @@ class Dataset(str, Enum):
|
|
|
37
37
|
TaiwanStockDividendResult = "TaiwanStockDividendResult"
|
|
38
38
|
TaiwanStockInfo = "TaiwanStockInfo"
|
|
39
39
|
TaiwanStockInfoWithWarrant = "TaiwanStockInfoWithWarrant"
|
|
40
|
+
TaiwanStockActiveETFInfo = "TaiwanStockActiveETFInfo"
|
|
40
41
|
TaiwanStockSecuritiesLending = "TaiwanStockSecuritiesLending"
|
|
41
42
|
TaiwanFutOptTickInfo = "TaiwanFutOptTickInfo"
|
|
42
43
|
TaiwanFutOptDailyInfo = "TaiwanFutOptDailyInfo"
|
|
@@ -137,6 +138,12 @@ class Dataset(str, Enum):
|
|
|
137
138
|
TaiwanOptionFinalSettlementPrice = "TaiwanOptionFinalSettlementPrice"
|
|
138
139
|
TaiwanStockBlockTrade = "TaiwanStockBlockTrade"
|
|
139
140
|
TaiwanStockLoanCollateralBalance = "TaiwanStockLoanCollateralBalance"
|
|
141
|
+
TaiwanStockActiveETFHolding = "TaiwanStockActiveETFHolding"
|
|
142
|
+
TaiwanStockActiveETFHoldingChange = "TaiwanStockActiveETFHoldingChange"
|
|
143
|
+
TaiwanStockConvertibleBondMonthlyAnalysis = (
|
|
144
|
+
"TaiwanStockConvertibleBondMonthlyAnalysis"
|
|
145
|
+
)
|
|
146
|
+
TaiwanOptionVix = "TaiwanOptionVix"
|
|
140
147
|
|
|
141
148
|
|
|
142
149
|
class Version(str, Enum):
|
|
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
|
|
File without changes
|
|
File without changes
|