FinMind 2.0.7__tar.gz → 2.0.9__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.7 → finmind-2.0.9}/FinMind/strategies/base.py +18 -11
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/strategies/utils.py +11 -2
- {finmind-2.0.7/finmind.egg-info → finmind-2.0.9}/PKG-INFO +16 -8
- {finmind-2.0.7 → finmind-2.0.9}/README.md +12 -6
- {finmind-2.0.7 → finmind-2.0.9/finmind.egg-info}/PKG-INFO +16 -8
- {finmind-2.0.7 → finmind-2.0.9}/finmind.egg-info/requires.txt +1 -1
- {finmind-2.0.7 → finmind-2.0.9}/pyproject.toml +9 -4
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/__init__.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/_version.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/crawler/__init__.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/crawler/base.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/crawler/commodities.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/crawler/demo.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/crawler/government_bonds.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/data/__init__.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/data/data_loader.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/data/data_subscriber.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/data/finmind_api.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/indicators/__init__.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/indicators/bias.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/indicators/continue_holding.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/indicators/institutional_investors_follower.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/indicators/institutional_investors_over_buy.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/indicators/kd.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/indicators/kd_crossover.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/indicators/ma_cross_orver.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/indicators/short_sale_margin_purchase_ratio.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/plotting/__init__.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/plotting/bar.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/plotting/kline.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/plotting/line.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/plotting/pie.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/schema/__init__.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/schema/data.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/schema/indicators.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/schema/info.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/schema/plot.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/schema/rule.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/strategies/__init__.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/strategies/bias.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/strategies/continue_holding.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/strategies/institutional_investors_follower.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/strategies/kd.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/strategies/kd_crossover.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/strategies/ma_crossover.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/strategies/macd_crossover.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/strategies/max_min_period_bias.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/strategies/naive_kd.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/strategies/short_sale_margin_purchase_ratio.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/templates/post.html +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/utility/__init__.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/utility/request.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/FinMind/utility/rule.py +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/LICENSE +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/finmind.egg-info/SOURCES.txt +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/finmind.egg-info/dependency_links.txt +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/finmind.egg-info/top_level.txt +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/setup.cfg +0 -0
- {finmind-2.0.7 → finmind-2.0.9}/setup.py +0 -0
|
@@ -116,11 +116,12 @@ class Trader:
|
|
|
116
116
|
self.UnrealizedProfit = capital_gains - sell_fee - sell_tax
|
|
117
117
|
self.EverytimeProfit = self.UnrealizedProfit + self.RealizedProfit
|
|
118
118
|
|
|
119
|
-
@staticmethod
|
|
120
119
|
def __have_enough_money(
|
|
121
|
-
trader_fund: int, trade_price: float, trade_volume: float
|
|
120
|
+
self, trader_fund: int, trade_price: float, trade_volume: float
|
|
122
121
|
) -> bool:
|
|
123
|
-
|
|
122
|
+
buy_price = trade_price * trade_volume
|
|
123
|
+
buy_fee = max(20.0, buy_price * self.fee)
|
|
124
|
+
return trader_fund >= (buy_price + buy_fee)
|
|
124
125
|
|
|
125
126
|
@staticmethod
|
|
126
127
|
def __have_enough_volume(hold_volume: float, trade_volume: float) -> bool:
|
|
@@ -266,7 +267,7 @@ class BackTest:
|
|
|
266
267
|
indicators_info: typing.Union[IndicatorsInfo, typing.Dict[str, str]],
|
|
267
268
|
):
|
|
268
269
|
indicators_info = (
|
|
269
|
-
indicators_info.
|
|
270
|
+
indicators_info.model_dump()
|
|
270
271
|
if isinstance(indicators_info, IndicatorsInfo)
|
|
271
272
|
else indicators_info
|
|
272
273
|
)
|
|
@@ -323,7 +324,7 @@ class BackTest:
|
|
|
323
324
|
],
|
|
324
325
|
):
|
|
325
326
|
return [
|
|
326
|
-
rule.
|
|
327
|
+
rule.model_dump() if isinstance(rule, AddBuySellRule) else rule
|
|
327
328
|
for rule in rule_list
|
|
328
329
|
]
|
|
329
330
|
|
|
@@ -584,11 +585,15 @@ class BackTest:
|
|
|
584
585
|
gain_cash = (
|
|
585
586
|
cash_div * trader.hold_volume + gain_stock_frac * 10
|
|
586
587
|
) # 將小數部分加進 gain_cash
|
|
588
|
+
# 配股「除權」不是一筆交易,總持有成本不會改變,
|
|
589
|
+
# 只是同一筆成本攤到更多股數上(每股成本被稀釋)。
|
|
590
|
+
# 因此 origin_cost 必須在 hold_volume 增加「之前」計算,
|
|
591
|
+
# 否則總成本會憑空跟著配股一起變大。
|
|
592
|
+
origin_cost = trader.hold_cost * trader.hold_volume
|
|
587
593
|
trader.hold_volume += gain_stock_div
|
|
588
594
|
# 在 UnrealizedProfit & RealizedProfit
|
|
589
595
|
# 避免重複計算 gain_cash
|
|
590
|
-
|
|
591
|
-
# 持有成本不變,將配息歸類在,已實現損益
|
|
596
|
+
# 現金股利不調整持有成本,改歸類在已實現損益
|
|
592
597
|
# new_cost = origin_cost - gain_cash
|
|
593
598
|
trader.hold_cost = (
|
|
594
599
|
origin_cost / trader.hold_volume if trader.hold_volume != 0 else 0
|
|
@@ -698,7 +703,7 @@ class BackTest:
|
|
|
698
703
|
@property
|
|
699
704
|
def final_stats(self) -> pd.Series:
|
|
700
705
|
self._final_stats = pd.Series(
|
|
701
|
-
FinalStats(**self._final_stats.to_dict()).
|
|
706
|
+
FinalStats(**self._final_stats.to_dict()).model_dump()
|
|
702
707
|
)
|
|
703
708
|
return self._final_stats
|
|
704
709
|
|
|
@@ -706,7 +711,7 @@ class BackTest:
|
|
|
706
711
|
def trade_detail(self) -> pd.DataFrame:
|
|
707
712
|
self._trade_detail = pd.DataFrame(
|
|
708
713
|
[
|
|
709
|
-
TradeDetail(**row_dict).
|
|
714
|
+
TradeDetail(**row_dict).model_dump()
|
|
710
715
|
for row_dict in self._trade_detail.to_dict("records")
|
|
711
716
|
]
|
|
712
717
|
)
|
|
@@ -716,7 +721,7 @@ class BackTest:
|
|
|
716
721
|
def compare_market_detail(self) -> pd.DataFrame:
|
|
717
722
|
self._compare_market_detail = pd.DataFrame(
|
|
718
723
|
[
|
|
719
|
-
CompareMarketDetail(**row_dict).
|
|
724
|
+
CompareMarketDetail(**row_dict).model_dump()
|
|
720
725
|
for row_dict in self._compare_market_detail.to_dict("records")
|
|
721
726
|
]
|
|
722
727
|
)
|
|
@@ -725,7 +730,9 @@ class BackTest:
|
|
|
725
730
|
@property
|
|
726
731
|
def compare_market_stats(self) -> pd.Series:
|
|
727
732
|
self._compare_market_stats = pd.Series(
|
|
728
|
-
CompareMarketStats(
|
|
733
|
+
CompareMarketStats(
|
|
734
|
+
**self._compare_market_stats.to_dict()
|
|
735
|
+
).model_dump()
|
|
729
736
|
)
|
|
730
737
|
return self._compare_market_stats
|
|
731
738
|
|
|
@@ -35,9 +35,18 @@ def get_asset_underlying_type(stock_id: str, data_loader: DataLoader) -> str:
|
|
|
35
35
|
return sorted(industry_category.values)[0]
|
|
36
36
|
|
|
37
37
|
|
|
38
|
+
# ETF 的證交稅是 0.1%,一般股票是 0.3%。TaiwanStockInfo 對上櫃 ETF 的
|
|
39
|
+
# industry_category 有「上櫃指數股票型基金(ETF)」與「上櫃ETF」兩種寫法,
|
|
40
|
+
# 同一檔可能只出現其中一種,兩種都要對應到 ETF 稅率。
|
|
41
|
+
UNDERLYING_TRADING_TAX = {
|
|
42
|
+
"ETF": 0.001,
|
|
43
|
+
"上櫃指數股票型基金(ETF)": 0.001,
|
|
44
|
+
"上櫃ETF": 0.001,
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
|
|
38
48
|
def get_underlying_trading_tax(underlying_type: str) -> float:
|
|
39
|
-
|
|
40
|
-
return mapping.get(underlying_type, 0.003)
|
|
49
|
+
return UNDERLYING_TRADING_TAX.get(underlying_type, 0.003)
|
|
41
50
|
|
|
42
51
|
|
|
43
52
|
def calculate_datenbr(day1: str, day2: str) -> int:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: finmind
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.9
|
|
4
4
|
Summary: financial mining
|
|
5
5
|
Author-email: linsam <finmind.tw@gmail.com>
|
|
6
6
|
License: Apache License
|
|
@@ -215,6 +215,8 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
215
215
|
Classifier: Programming Language :: Python :: 3.10
|
|
216
216
|
Classifier: Programming Language :: Python :: 3.11
|
|
217
217
|
Classifier: Programming Language :: Python :: 3.12
|
|
218
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
219
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
218
220
|
Requires-Python: >=3.8
|
|
219
221
|
Description-Content-Type: text/markdown
|
|
220
222
|
License-File: LICENSE
|
|
@@ -223,7 +225,7 @@ Requires-Dist: numpy<3.0.0,>=1.19.5
|
|
|
223
225
|
Requires-Dist: requests<3.0.0,>=2.23.0
|
|
224
226
|
Requires-Dist: pydantic<3.0.0,>=2.0.0
|
|
225
227
|
Requires-Dist: ta<1.0.0,>=0.11.0
|
|
226
|
-
Requires-Dist: lxml<
|
|
228
|
+
Requires-Dist: lxml<7.0.0,>=4.6.3
|
|
227
229
|
Requires-Dist: pyecharts<2.0.0,>=1.9.0
|
|
228
230
|
Requires-Dist: ipython<8.0.0,>=7.16.1
|
|
229
231
|
Requires-Dist: loguru<1.0.0,>=0.5.3
|
|
@@ -243,8 +245,8 @@ Dynamic: license-file
|
|
|
243
245
|
</p>
|
|
244
246
|
|
|
245
247
|
<p align="center">
|
|
246
|
-
<a href="https://
|
|
247
|
-
<a href="https://github.com/
|
|
248
|
+
<a href="https://github.com/FinMind/FinMind/actions/workflows/python-package.yml"><img src="https://github.com/FinMind/FinMind/actions/workflows/python-package.yml/badge.svg?branch=master" alt="Build Status"></a>
|
|
249
|
+
<a href="https://github.com/FinMind/FinMind/blob/master/LICENSE"><img src="https://img.shields.io/github/license/FinMind/FinMind" alt="license"></a>
|
|
248
250
|
<a href="https://finmind.github.io/"><img src="https://readthedocs.org/projects/finminddoc/badge/?version=latest" alt="Documentation Status"></a>
|
|
249
251
|
<a href="https://gitter.im/FinMindTW/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge"><img src="https://badges.gitter.im/FinMindTW/community.svg" alt="Gitter"></a>
|
|
250
252
|
<a href="https://badge.fury.io/py/FinMind"><img src="https://badge.fury.io/py/FinMind.svg" alt="PyPI version"></a>
|
|
@@ -283,7 +285,7 @@ pip install FinMind
|
|
|
283
285
|
|
|
284
286
|
## 這是什麼?
|
|
285
287
|
|
|
286
|
-
**FinMind**
|
|
288
|
+
**FinMind** 提供台灣與國際市場的金融開源數據,完整資料集清單請見[官方文件](https://finmind.github.io/)。
|
|
287
289
|
包含
|
|
288
290
|
|
|
289
291
|
* 技術面 : 台股股價 daily、即時報價、歷史 tick、PER、PBR、每5秒委託成交統計、加權指數、當日沖銷交易標的及成交量值。
|
|
@@ -297,8 +299,9 @@ pip install FinMind
|
|
|
297
299
|
|
|
298
300
|
## What is this?
|
|
299
301
|
|
|
300
|
-
**FinMind**
|
|
301
|
-
|
|
302
|
+
**FinMind** provides open financial datasets for Taiwan and international
|
|
303
|
+
markets. See the [official documentation](https://finmind.github.io/) for the
|
|
304
|
+
current dataset list, including
|
|
302
305
|
|
|
303
306
|
Taiwan stock trade data daily, Taiwan stock trade data (5 seconds) (2019-05-29 ~
|
|
304
307
|
now, more than 30 million data in total), Financial Statements, Balance Sheet,
|
|
@@ -319,7 +322,7 @@ without having to collect the data by yourself.
|
|
|
319
322
|
|
|
320
323
|
## License
|
|
321
324
|
|
|
322
|
-
- [License Detail](https://github.com/
|
|
325
|
+
- [License Detail](https://github.com/FinMind/FinMind/blob/master/LICENSE)
|
|
323
326
|
|
|
324
327
|
- 本專案提供的所有內容均用於教育、非商業用途。資料僅供參考,使用者依本資料交易發生交易損失需自行負責,本專案不對資料內容錯誤、更新延誤或傳輸中斷負任何責任。
|
|
325
328
|
|
|
@@ -388,6 +391,11 @@ Email: FinMind.TW@gmail.com
|
|
|
388
391
|
|
|
389
392
|
每週日早上零點至早上七點為維護時間,不提供服務。
|
|
390
393
|
|
|
394
|
+
## Contributing
|
|
395
|
+
|
|
396
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for the development setup, test commands,
|
|
397
|
+
and pull request checklist.
|
|
398
|
+
|
|
391
399
|
## Note
|
|
392
400
|
|
|
393
401
|
+ 未來預計新增更多功能,包含個人化回測分析、chatbot 監控策略,
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<p align="center">
|
|
6
|
-
<a href="https://
|
|
7
|
-
<a href="https://github.com/
|
|
6
|
+
<a href="https://github.com/FinMind/FinMind/actions/workflows/python-package.yml"><img src="https://github.com/FinMind/FinMind/actions/workflows/python-package.yml/badge.svg?branch=master" alt="Build Status"></a>
|
|
7
|
+
<a href="https://github.com/FinMind/FinMind/blob/master/LICENSE"><img src="https://img.shields.io/github/license/FinMind/FinMind" alt="license"></a>
|
|
8
8
|
<a href="https://finmind.github.io/"><img src="https://readthedocs.org/projects/finminddoc/badge/?version=latest" alt="Documentation Status"></a>
|
|
9
9
|
<a href="https://gitter.im/FinMindTW/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge"><img src="https://badges.gitter.im/FinMindTW/community.svg" alt="Gitter"></a>
|
|
10
10
|
<a href="https://badge.fury.io/py/FinMind"><img src="https://badge.fury.io/py/FinMind.svg" alt="PyPI version"></a>
|
|
@@ -43,7 +43,7 @@ pip install FinMind
|
|
|
43
43
|
|
|
44
44
|
## 這是什麼?
|
|
45
45
|
|
|
46
|
-
**FinMind**
|
|
46
|
+
**FinMind** 提供台灣與國際市場的金融開源數據,完整資料集清單請見[官方文件](https://finmind.github.io/)。
|
|
47
47
|
包含
|
|
48
48
|
|
|
49
49
|
* 技術面 : 台股股價 daily、即時報價、歷史 tick、PER、PBR、每5秒委託成交統計、加權指數、當日沖銷交易標的及成交量值。
|
|
@@ -57,8 +57,9 @@ pip install FinMind
|
|
|
57
57
|
|
|
58
58
|
## What is this?
|
|
59
59
|
|
|
60
|
-
**FinMind**
|
|
61
|
-
|
|
60
|
+
**FinMind** provides open financial datasets for Taiwan and international
|
|
61
|
+
markets. See the [official documentation](https://finmind.github.io/) for the
|
|
62
|
+
current dataset list, including
|
|
62
63
|
|
|
63
64
|
Taiwan stock trade data daily, Taiwan stock trade data (5 seconds) (2019-05-29 ~
|
|
64
65
|
now, more than 30 million data in total), Financial Statements, Balance Sheet,
|
|
@@ -79,7 +80,7 @@ without having to collect the data by yourself.
|
|
|
79
80
|
|
|
80
81
|
## License
|
|
81
82
|
|
|
82
|
-
- [License Detail](https://github.com/
|
|
83
|
+
- [License Detail](https://github.com/FinMind/FinMind/blob/master/LICENSE)
|
|
83
84
|
|
|
84
85
|
- 本專案提供的所有內容均用於教育、非商業用途。資料僅供參考,使用者依本資料交易發生交易損失需自行負責,本專案不對資料內容錯誤、更新延誤或傳輸中斷負任何責任。
|
|
85
86
|
|
|
@@ -148,6 +149,11 @@ Email: FinMind.TW@gmail.com
|
|
|
148
149
|
|
|
149
150
|
每週日早上零點至早上七點為維護時間,不提供服務。
|
|
150
151
|
|
|
152
|
+
## Contributing
|
|
153
|
+
|
|
154
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for the development setup, test commands,
|
|
155
|
+
and pull request checklist.
|
|
156
|
+
|
|
151
157
|
## Note
|
|
152
158
|
|
|
153
159
|
+ 未來預計新增更多功能,包含個人化回測分析、chatbot 監控策略,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: finmind
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.9
|
|
4
4
|
Summary: financial mining
|
|
5
5
|
Author-email: linsam <finmind.tw@gmail.com>
|
|
6
6
|
License: Apache License
|
|
@@ -215,6 +215,8 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
215
215
|
Classifier: Programming Language :: Python :: 3.10
|
|
216
216
|
Classifier: Programming Language :: Python :: 3.11
|
|
217
217
|
Classifier: Programming Language :: Python :: 3.12
|
|
218
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
219
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
218
220
|
Requires-Python: >=3.8
|
|
219
221
|
Description-Content-Type: text/markdown
|
|
220
222
|
License-File: LICENSE
|
|
@@ -223,7 +225,7 @@ Requires-Dist: numpy<3.0.0,>=1.19.5
|
|
|
223
225
|
Requires-Dist: requests<3.0.0,>=2.23.0
|
|
224
226
|
Requires-Dist: pydantic<3.0.0,>=2.0.0
|
|
225
227
|
Requires-Dist: ta<1.0.0,>=0.11.0
|
|
226
|
-
Requires-Dist: lxml<
|
|
228
|
+
Requires-Dist: lxml<7.0.0,>=4.6.3
|
|
227
229
|
Requires-Dist: pyecharts<2.0.0,>=1.9.0
|
|
228
230
|
Requires-Dist: ipython<8.0.0,>=7.16.1
|
|
229
231
|
Requires-Dist: loguru<1.0.0,>=0.5.3
|
|
@@ -243,8 +245,8 @@ Dynamic: license-file
|
|
|
243
245
|
</p>
|
|
244
246
|
|
|
245
247
|
<p align="center">
|
|
246
|
-
<a href="https://
|
|
247
|
-
<a href="https://github.com/
|
|
248
|
+
<a href="https://github.com/FinMind/FinMind/actions/workflows/python-package.yml"><img src="https://github.com/FinMind/FinMind/actions/workflows/python-package.yml/badge.svg?branch=master" alt="Build Status"></a>
|
|
249
|
+
<a href="https://github.com/FinMind/FinMind/blob/master/LICENSE"><img src="https://img.shields.io/github/license/FinMind/FinMind" alt="license"></a>
|
|
248
250
|
<a href="https://finmind.github.io/"><img src="https://readthedocs.org/projects/finminddoc/badge/?version=latest" alt="Documentation Status"></a>
|
|
249
251
|
<a href="https://gitter.im/FinMindTW/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge"><img src="https://badges.gitter.im/FinMindTW/community.svg" alt="Gitter"></a>
|
|
250
252
|
<a href="https://badge.fury.io/py/FinMind"><img src="https://badge.fury.io/py/FinMind.svg" alt="PyPI version"></a>
|
|
@@ -283,7 +285,7 @@ pip install FinMind
|
|
|
283
285
|
|
|
284
286
|
## 這是什麼?
|
|
285
287
|
|
|
286
|
-
**FinMind**
|
|
288
|
+
**FinMind** 提供台灣與國際市場的金融開源數據,完整資料集清單請見[官方文件](https://finmind.github.io/)。
|
|
287
289
|
包含
|
|
288
290
|
|
|
289
291
|
* 技術面 : 台股股價 daily、即時報價、歷史 tick、PER、PBR、每5秒委託成交統計、加權指數、當日沖銷交易標的及成交量值。
|
|
@@ -297,8 +299,9 @@ pip install FinMind
|
|
|
297
299
|
|
|
298
300
|
## What is this?
|
|
299
301
|
|
|
300
|
-
**FinMind**
|
|
301
|
-
|
|
302
|
+
**FinMind** provides open financial datasets for Taiwan and international
|
|
303
|
+
markets. See the [official documentation](https://finmind.github.io/) for the
|
|
304
|
+
current dataset list, including
|
|
302
305
|
|
|
303
306
|
Taiwan stock trade data daily, Taiwan stock trade data (5 seconds) (2019-05-29 ~
|
|
304
307
|
now, more than 30 million data in total), Financial Statements, Balance Sheet,
|
|
@@ -319,7 +322,7 @@ without having to collect the data by yourself.
|
|
|
319
322
|
|
|
320
323
|
## License
|
|
321
324
|
|
|
322
|
-
- [License Detail](https://github.com/
|
|
325
|
+
- [License Detail](https://github.com/FinMind/FinMind/blob/master/LICENSE)
|
|
323
326
|
|
|
324
327
|
- 本專案提供的所有內容均用於教育、非商業用途。資料僅供參考,使用者依本資料交易發生交易損失需自行負責,本專案不對資料內容錯誤、更新延誤或傳輸中斷負任何責任。
|
|
325
328
|
|
|
@@ -388,6 +391,11 @@ Email: FinMind.TW@gmail.com
|
|
|
388
391
|
|
|
389
392
|
每週日早上零點至早上七點為維護時間,不提供服務。
|
|
390
393
|
|
|
394
|
+
## Contributing
|
|
395
|
+
|
|
396
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for the development setup, test commands,
|
|
397
|
+
and pull request checklist.
|
|
398
|
+
|
|
391
399
|
## Note
|
|
392
400
|
|
|
393
401
|
+ 未來預計新增更多功能,包含個人化回測分析、chatbot 監控策略,
|
|
@@ -20,6 +20,8 @@ classifiers = [
|
|
|
20
20
|
"Programming Language :: Python :: 3.10",
|
|
21
21
|
"Programming Language :: Python :: 3.11",
|
|
22
22
|
"Programming Language :: Python :: 3.12",
|
|
23
|
+
"Programming Language :: Python :: 3.13",
|
|
24
|
+
"Programming Language :: Python :: 3.14",
|
|
23
25
|
]
|
|
24
26
|
dynamic = ["version"]
|
|
25
27
|
dependencies = [
|
|
@@ -28,7 +30,7 @@ dependencies = [
|
|
|
28
30
|
"requests>=2.23.0,<3.0.0",
|
|
29
31
|
"pydantic>=2.0.0,<3.0.0",
|
|
30
32
|
"ta>=0.11.0,<1.0.0",
|
|
31
|
-
"lxml>=4.6.3,<
|
|
33
|
+
"lxml>=4.6.3,<7.0.0",
|
|
32
34
|
"pyecharts>=1.9.0,<2.0.0",
|
|
33
35
|
"ipython>=7.16.1,<8.0.0",
|
|
34
36
|
"loguru>=0.5.3,<1.0.0",
|
|
@@ -49,9 +51,12 @@ Source = "https://github.com/FinMind/FinMind"
|
|
|
49
51
|
|
|
50
52
|
[dependency-groups]
|
|
51
53
|
dev = [
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
# Ranges, not exact pins: pytest 6.2.5 cannot run on Python 3.14
|
|
55
|
+
# (it uses ast.Str, removed in 3.14), so the resolver needs room to pick
|
|
56
|
+
# a newer pytest on newer interpreters while keeping 3.8 installable.
|
|
57
|
+
"pytest>=6.2.5",
|
|
58
|
+
"pytest-mock>=3.6.1",
|
|
59
|
+
"pytest-cov>=3.0.0",
|
|
55
60
|
"pytest-xdist",
|
|
56
61
|
"black==24.8.0",
|
|
57
62
|
]
|
|
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
|