FinMind 2.0.4__tar.gz → 2.0.6__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.
Files changed (59) hide show
  1. {finmind-2.0.4 → finmind-2.0.6}/FinMind/data/data_loader.py +175 -0
  2. {finmind-2.0.4 → finmind-2.0.6}/FinMind/schema/data.py +5 -0
  3. {finmind-2.0.4/finmind.egg-info → finmind-2.0.6}/PKG-INFO +1 -1
  4. {finmind-2.0.4 → finmind-2.0.6/finmind.egg-info}/PKG-INFO +1 -1
  5. {finmind-2.0.4 → finmind-2.0.6}/FinMind/__init__.py +0 -0
  6. {finmind-2.0.4 → finmind-2.0.6}/FinMind/_version.py +0 -0
  7. {finmind-2.0.4 → finmind-2.0.6}/FinMind/crawler/__init__.py +0 -0
  8. {finmind-2.0.4 → finmind-2.0.6}/FinMind/crawler/base.py +0 -0
  9. {finmind-2.0.4 → finmind-2.0.6}/FinMind/crawler/commodities.py +0 -0
  10. {finmind-2.0.4 → finmind-2.0.6}/FinMind/crawler/demo.py +0 -0
  11. {finmind-2.0.4 → finmind-2.0.6}/FinMind/crawler/government_bonds.py +0 -0
  12. {finmind-2.0.4 → finmind-2.0.6}/FinMind/data/__init__.py +0 -0
  13. {finmind-2.0.4 → finmind-2.0.6}/FinMind/data/data_subscriber.py +0 -0
  14. {finmind-2.0.4 → finmind-2.0.6}/FinMind/data/finmind_api.py +0 -0
  15. {finmind-2.0.4 → finmind-2.0.6}/FinMind/indicators/__init__.py +0 -0
  16. {finmind-2.0.4 → finmind-2.0.6}/FinMind/indicators/bias.py +0 -0
  17. {finmind-2.0.4 → finmind-2.0.6}/FinMind/indicators/continue_holding.py +0 -0
  18. {finmind-2.0.4 → finmind-2.0.6}/FinMind/indicators/institutional_investors_follower.py +0 -0
  19. {finmind-2.0.4 → finmind-2.0.6}/FinMind/indicators/institutional_investors_over_buy.py +0 -0
  20. {finmind-2.0.4 → finmind-2.0.6}/FinMind/indicators/kd.py +0 -0
  21. {finmind-2.0.4 → finmind-2.0.6}/FinMind/indicators/kd_crossover.py +0 -0
  22. {finmind-2.0.4 → finmind-2.0.6}/FinMind/indicators/ma_cross_orver.py +0 -0
  23. {finmind-2.0.4 → finmind-2.0.6}/FinMind/indicators/short_sale_margin_purchase_ratio.py +0 -0
  24. {finmind-2.0.4 → finmind-2.0.6}/FinMind/plotting/__init__.py +0 -0
  25. {finmind-2.0.4 → finmind-2.0.6}/FinMind/plotting/bar.py +0 -0
  26. {finmind-2.0.4 → finmind-2.0.6}/FinMind/plotting/kline.py +0 -0
  27. {finmind-2.0.4 → finmind-2.0.6}/FinMind/plotting/line.py +0 -0
  28. {finmind-2.0.4 → finmind-2.0.6}/FinMind/plotting/pie.py +0 -0
  29. {finmind-2.0.4 → finmind-2.0.6}/FinMind/schema/__init__.py +0 -0
  30. {finmind-2.0.4 → finmind-2.0.6}/FinMind/schema/indicators.py +0 -0
  31. {finmind-2.0.4 → finmind-2.0.6}/FinMind/schema/info.py +0 -0
  32. {finmind-2.0.4 → finmind-2.0.6}/FinMind/schema/plot.py +0 -0
  33. {finmind-2.0.4 → finmind-2.0.6}/FinMind/schema/rule.py +0 -0
  34. {finmind-2.0.4 → finmind-2.0.6}/FinMind/strategies/__init__.py +0 -0
  35. {finmind-2.0.4 → finmind-2.0.6}/FinMind/strategies/base.py +0 -0
  36. {finmind-2.0.4 → finmind-2.0.6}/FinMind/strategies/bias.py +0 -0
  37. {finmind-2.0.4 → finmind-2.0.6}/FinMind/strategies/continue_holding.py +0 -0
  38. {finmind-2.0.4 → finmind-2.0.6}/FinMind/strategies/institutional_investors_follower.py +0 -0
  39. {finmind-2.0.4 → finmind-2.0.6}/FinMind/strategies/kd.py +0 -0
  40. {finmind-2.0.4 → finmind-2.0.6}/FinMind/strategies/kd_crossover.py +0 -0
  41. {finmind-2.0.4 → finmind-2.0.6}/FinMind/strategies/ma_crossover.py +0 -0
  42. {finmind-2.0.4 → finmind-2.0.6}/FinMind/strategies/macd_crossover.py +0 -0
  43. {finmind-2.0.4 → finmind-2.0.6}/FinMind/strategies/max_min_period_bias.py +0 -0
  44. {finmind-2.0.4 → finmind-2.0.6}/FinMind/strategies/naive_kd.py +0 -0
  45. {finmind-2.0.4 → finmind-2.0.6}/FinMind/strategies/short_sale_margin_purchase_ratio.py +0 -0
  46. {finmind-2.0.4 → finmind-2.0.6}/FinMind/strategies/utils.py +0 -0
  47. {finmind-2.0.4 → finmind-2.0.6}/FinMind/templates/post.html +0 -0
  48. {finmind-2.0.4 → finmind-2.0.6}/FinMind/utility/__init__.py +0 -0
  49. {finmind-2.0.4 → finmind-2.0.6}/FinMind/utility/request.py +0 -0
  50. {finmind-2.0.4 → finmind-2.0.6}/FinMind/utility/rule.py +0 -0
  51. {finmind-2.0.4 → finmind-2.0.6}/LICENSE +0 -0
  52. {finmind-2.0.4 → finmind-2.0.6}/README.md +0 -0
  53. {finmind-2.0.4 → finmind-2.0.6}/finmind.egg-info/SOURCES.txt +0 -0
  54. {finmind-2.0.4 → finmind-2.0.6}/finmind.egg-info/dependency_links.txt +0 -0
  55. {finmind-2.0.4 → finmind-2.0.6}/finmind.egg-info/requires.txt +0 -0
  56. {finmind-2.0.4 → finmind-2.0.6}/finmind.egg-info/top_level.txt +0 -0
  57. {finmind-2.0.4 → finmind-2.0.6}/pyproject.toml +0 -0
  58. {finmind-2.0.4 → finmind-2.0.6}/setup.cfg +0 -0
  59. {finmind-2.0.4 → finmind-2.0.6}/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 = "",
@@ -2980,6 +3079,82 @@ class DataLoader(FinMindApi):
2980
3079
  )
2981
3080
  return taiwan_option_vix
2982
3081
 
3082
+ def taiwan_asset_swap_fixed_income_daily(
3083
+ self,
3084
+ stock_id: str = "",
3085
+ start_date: str = "",
3086
+ end_date: str = "",
3087
+ timeout: int = None,
3088
+ use_async: bool = False,
3089
+ stock_id_list: typing.List[str] = None,
3090
+ ) -> pd.DataFrame:
3091
+ """get 資產交換固定收益日成交資訊
3092
+ :param stock_id: 股票代號("17172")
3093
+ :param start_date (str): 起始日期("2025-01-01")
3094
+ :param end_date (str): 結束日期("2025-12-31")
3095
+ :param timeout (int): timeout seconds, default None
3096
+
3097
+ :return: 資產交換固定收益日成交資訊 TaiwanAssetSwapFixedIncomeDaily
3098
+ :rtype pd.DataFrame
3099
+ :rtype column date (str): 日期
3100
+ :rtype column stock_id (str): 股票代碼
3101
+ :rtype column stock_name (str): 股票名稱
3102
+ :rtype column notional_amount (int): 名目本金
3103
+ :rtype column number_of_transactions (int): 成交筆數
3104
+ :rtype column rate_lowest (float): 最低利率
3105
+ :rtype column rate_highest (float): 最高利率
3106
+ :rtype column rate_average (float): 平均利率
3107
+ :rtype column contract_term_years (float): 合約期間(年)
3108
+ """
3109
+ data = self.get_data(
3110
+ dataset=Dataset.TaiwanAssetSwapFixedIncomeDaily,
3111
+ data_id=stock_id,
3112
+ start_date=start_date,
3113
+ end_date=end_date,
3114
+ timeout=timeout,
3115
+ use_async=use_async,
3116
+ data_id_list=stock_id_list,
3117
+ )
3118
+ return data
3119
+
3120
+ def taiwan_asset_swap_option_daily(
3121
+ self,
3122
+ stock_id: str = "",
3123
+ start_date: str = "",
3124
+ end_date: str = "",
3125
+ timeout: int = None,
3126
+ use_async: bool = False,
3127
+ stock_id_list: typing.List[str] = None,
3128
+ ) -> pd.DataFrame:
3129
+ """get 資產交換選擇權日成交資訊
3130
+ :param stock_id: 股票代號("17172")
3131
+ :param start_date (str): 起始日期("2025-01-01")
3132
+ :param end_date (str): 結束日期("2025-12-31")
3133
+ :param timeout (int): timeout seconds, default None
3134
+
3135
+ :return: 資產交換選擇權日成交資訊 TaiwanAssetSwapOptionDaily
3136
+ :rtype pd.DataFrame
3137
+ :rtype column date (str): 日期
3138
+ :rtype column stock_id (str): 股票代碼
3139
+ :rtype column stock_name (str): 股票名稱
3140
+ :rtype column notional_amount (int): 名目本金
3141
+ :rtype column number_of_transactions (int): 成交筆數
3142
+ :rtype column premium_lowest (float): 最低權利金
3143
+ :rtype column premium_highest (float): 最高權利金
3144
+ :rtype column premium_average (float): 平均權利金
3145
+ :rtype column contract_term_years (float): 合約期間(年)
3146
+ """
3147
+ data = self.get_data(
3148
+ dataset=Dataset.TaiwanAssetSwapOptionDaily,
3149
+ data_id=stock_id,
3150
+ start_date=start_date,
3151
+ end_date=end_date,
3152
+ timeout=timeout,
3153
+ use_async=use_async,
3154
+ data_id_list=stock_id_list,
3155
+ )
3156
+ return data
3157
+
2983
3158
  def _get_stock_id_list(
2984
3159
  self, date: str, timeout: int = None
2985
3160
  ) -> 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,10 +138,14 @@ class Dataset(str, Enum):
137
138
  TaiwanOptionFinalSettlementPrice = "TaiwanOptionFinalSettlementPrice"
138
139
  TaiwanStockBlockTrade = "TaiwanStockBlockTrade"
139
140
  TaiwanStockLoanCollateralBalance = "TaiwanStockLoanCollateralBalance"
141
+ TaiwanStockActiveETFHolding = "TaiwanStockActiveETFHolding"
142
+ TaiwanStockActiveETFHoldingChange = "TaiwanStockActiveETFHoldingChange"
140
143
  TaiwanStockConvertibleBondMonthlyAnalysis = (
141
144
  "TaiwanStockConvertibleBondMonthlyAnalysis"
142
145
  )
143
146
  TaiwanOptionVix = "TaiwanOptionVix"
147
+ TaiwanAssetSwapFixedIncomeDaily = "TaiwanAssetSwapFixedIncomeDaily"
148
+ TaiwanAssetSwapOptionDaily = "TaiwanAssetSwapOptionDaily"
144
149
 
145
150
 
146
151
  class Version(str, Enum):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: finmind
3
- Version: 2.0.4
3
+ Version: 2.0.6
4
4
  Summary: financial mining
5
5
  Author-email: linsam <finmind.tw@gmail.com>
6
6
  License: Apache License
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: finmind
3
- Version: 2.0.4
3
+ Version: 2.0.6
4
4
  Summary: financial mining
5
5
  Author-email: linsam <finmind.tw@gmail.com>
6
6
  License: Apache License
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