neurostats-API 0.0.6__tar.gz → 0.0.8__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. {neurostats_API-0.0.6 → neurostats_API-0.0.8}/PKG-INFO +139 -190
  2. {neurostats_API-0.0.6 → neurostats_API-0.0.8}/README.md +138 -189
  3. neurostats_API-0.0.8/neurostats_API/__init__.py +1 -0
  4. neurostats_API-0.0.8/neurostats_API/fetchers/__init__.py +7 -0
  5. neurostats_API-0.0.8/neurostats_API/fetchers/balance_sheet.py +135 -0
  6. neurostats_API-0.0.8/neurostats_API/fetchers/cash_flow.py +184 -0
  7. neurostats_API-0.0.8/neurostats_API/fetchers/finance_overview.py +648 -0
  8. neurostats_API-0.0.8/neurostats_API/fetchers/month_revenue.py +92 -0
  9. neurostats_API-0.0.8/neurostats_API/fetchers/profit_lose.py +141 -0
  10. neurostats_API-0.0.8/neurostats_API/tools/balance_sheet.yaml +26 -0
  11. neurostats_API-0.0.8/neurostats_API/tools/cash_flow_percentage.yaml +39 -0
  12. {neurostats_API-0.0.6 → neurostats_API-0.0.8}/neurostats_API/tools/finance_overview_dict.yaml +15 -8
  13. {neurostats_API-0.0.6 → neurostats_API-0.0.8}/neurostats_API/tools/profit_lose.yaml +1 -1
  14. {neurostats_API-0.0.6 → neurostats_API-0.0.8}/neurostats_API/tools/seasonal_data_field_dict.txt +1 -0
  15. neurostats_API-0.0.8/neurostats_API/utils/data_process.py +164 -0
  16. {neurostats_API-0.0.6 → neurostats_API-0.0.8}/neurostats_API.egg-info/PKG-INFO +139 -190
  17. {neurostats_API-0.0.6 → neurostats_API-0.0.8}/neurostats_API.egg-info/SOURCES.txt +3 -0
  18. {neurostats_API-0.0.6 → neurostats_API-0.0.8}/setup.py +1 -1
  19. {neurostats_API-0.0.6 → neurostats_API-0.0.8}/test/test_fetchers.py +52 -15
  20. neurostats_API-0.0.6/neurostats_API/__init__.py +0 -1
  21. neurostats_API-0.0.6/neurostats_API/fetchers/__init__.py +0 -3
  22. neurostats_API-0.0.6/neurostats_API/fetchers/balance_sheet.py +0 -0
  23. neurostats_API-0.0.6/neurostats_API/fetchers/finance_overview.py +0 -499
  24. neurostats_API-0.0.6/neurostats_API/fetchers/month_revenue.py +0 -0
  25. neurostats_API-0.0.6/neurostats_API/fetchers/profit_lose.py +0 -0
  26. neurostats_API-0.0.6/neurostats_API/utils/data_process.py +0 -18
  27. {neurostats_API-0.0.6 → neurostats_API-0.0.8}/MANIFEST.in +0 -0
  28. {neurostats_API-0.0.6 → neurostats_API-0.0.8}/neurostats_API/cli.py +0 -0
  29. {neurostats_API-0.0.6 → neurostats_API-0.0.8}/neurostats_API/fetchers/base.py +0 -0
  30. {neurostats_API-0.0.6 → neurostats_API-0.0.8}/neurostats_API/fetchers/tech.py +0 -0
  31. {neurostats_API-0.0.6 → neurostats_API-0.0.8}/neurostats_API/fetchers/value_invest.py +0 -0
  32. {neurostats_API-0.0.6 → neurostats_API-0.0.8}/neurostats_API/main.py +0 -0
  33. {neurostats_API-0.0.6 → neurostats_API-0.0.8}/neurostats_API/utils/__init__.py +0 -0
  34. {neurostats_API-0.0.6 → neurostats_API-0.0.8}/neurostats_API/utils/datetime.py +0 -0
  35. {neurostats_API-0.0.6 → neurostats_API-0.0.8}/neurostats_API/utils/db_client.py +0 -0
  36. {neurostats_API-0.0.6 → neurostats_API-0.0.8}/neurostats_API/utils/fetcher.py +0 -0
  37. {neurostats_API-0.0.6 → neurostats_API-0.0.8}/neurostats_API.egg-info/dependency_links.txt +0 -0
  38. {neurostats_API-0.0.6 → neurostats_API-0.0.8}/neurostats_API.egg-info/top_level.txt +0 -0
  39. {neurostats_API-0.0.6 → neurostats_API-0.0.8}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: neurostats_API
3
- Version: 0.0.6
3
+ Version: 0.0.8
4
4
  Summary: The service of NeuroStats website
5
5
  Home-page: https://github.com/NeurowattStats/NeuroStats_API.git
6
6
  Author: JasonWang@Neurowatt
@@ -30,10 +30,15 @@ Description-Content-Type: text/markdown
30
30
  │   ├── fetchers
31
31
  │   │   ├── __init__.py
32
32
  │   │   ├── base.py
33
+ │   │   ├── balance_sheet.py
34
+ │   │   ├── cash_flow.py
33
35
  │   │   ├── finance_overview.py
36
+ │   │   ├── profit_lose.py
34
37
  │   │   ├── tech.py
35
- │   │   └── value_invest.py
38
+ │   │   ├── value_invest.py
36
39
  │   ├── tools
40
+ │   │   ├── balance_sheet.yaml
41
+ │   │   ├── cash_flow_percentage.yaml
37
42
  │   │   ├── finance_overview_dict.yaml
38
43
  │   │   ├── profit_lose.yaml
39
44
  │   │   └── seasonal_data_field_dict.txt
@@ -73,14 +78,15 @@ pip install neurostats-API
73
78
  ```Python
74
79
  >>> import neurostats_API
75
80
  >>> print(neurostats_API.__version__)
76
- 0.0.5
81
+ 0.0.8
77
82
  ```
78
83
 
79
84
  ### 得到最新一期的評價資料與歷年評價
80
85
  ``` Python
81
- from neurostats_API.fetchers import ValueFetcher
82
- ticker = 2330 # 換成tw50內任意ticker
83
- fetcher = ValueFetcher(ticker)
86
+ from neurostats_API.utils import ValueFetcher, DBClient
87
+ db_client = DBClient("<連接的DB位置>").get_client()
88
+ ticker = "2330" # 換成tw50內任意ticker
89
+ fetcher = ValueFetcher(ticker, db_client)
84
90
  data = stats_fetcher.query_data()
85
91
  ```
86
92
 
@@ -118,43 +124,42 @@ data = stats_fetcher.query_data()
118
124
 
119
125
  ### 回傳月營收表
120
126
  ``` Python
121
- from neurostats_API.utils import StatsFetcher, DBClient
127
+ from neurostats_API.fetchers import MonthRevenueFetcher, DBClient
122
128
  db_client = DBClient("<連接的DB位置>").get_client()
123
- ticker = 2330 # 換成tw50內任意ticker
124
- fetcher = StatsFetcher(db_client)
125
- data = stats_fetcher.get_month_revenue_sheet(ticker)
129
+ ticker = "2330" # 換成tw50內任意ticker
130
+ fetcher = MonthRevenueFetcherFetcher(ticker, db_client)
131
+ data = fetcher.query_data()
126
132
  ```
127
133
 
128
134
  #### 回傳
129
135
  ```Python
130
136
  {
131
- "_id": 671b776dd834afbfbeb9adb3
132
- "ticker": 2330
133
- "company_name":台積電
137
+ "ticker": "2330",
138
+ "company_name": "台積電",
134
139
  "month_revenue":
135
- 2014 2015 ... 2023 2024
136
- 1 51,429,993 87,120,068 ... 200,050,544 215,785,127
137
- 2 46,829,051 62,645,075 ... 163,174,097 181,648,270
138
- ... ... ... ... ... ...
139
- 12 69,510,190 58,347,005 ... 176,299,866 None
140
- grand_total None 639,978,805 ... 1,536,206,985 2,025,846,521
140
+ year 2024 ... 2014
141
+ month ...
142
+ grand_total 2.025847e+09 ... NaN
143
+ 12 NaN ... 69510190.0
144
+ ... ... ... ...
145
+ 2 1.816483e+08 ... 46829051.0
146
+ 1 2.157851e+08 ... 51429993.0
141
147
 
142
148
  "this_month_revenue_over_years":
143
- 2015 2016 ... 2023 2024
144
- revenue 64,514,083 89,702,807 ... 180,430,282 251,872,717
145
- MoM None None ... None None
146
- ... ... ... ... ... ...
147
- YoY_5 None None ... None None
148
- YoY_10 None None ... None None
149
-
149
+ year 2024 ... 2015
150
+ revenue 2.518727e+08 ... 64514083.0
151
+ revenue_increment_ratio 3.960000e+01 ... -13.8
152
+ ... ... ... ...
153
+ YoY_5 1.465200e+02 ... NaN
154
+ YoY_10 NaN ... NaN
150
155
 
151
156
  "grand_total_over_years":
152
- 2015 2016 ... 2023 2024
153
- revenue 639,978,805 685,711,092 ... 1,536,206,985 2,025,846,521
154
- MoM None None ... None None
155
- ... ... ... ... ... ...
156
- YoY_5 None None ... None None
157
- YoY_10 None None ... None None
157
+ year 2024 ... 2015
158
+ grand_total 2.025847e+09 ... 6.399788e+08
159
+ grand_total_increment_ratio 3.187000e+01 ... 1.845000e+01
160
+ ... ... ... ...
161
+ grand_total_YoY_5 1.691300e+02 ... NaN
162
+ grand_total_YoY_10 NaN ... NaN
158
163
 
159
164
 
160
165
  }
@@ -171,7 +176,7 @@ YoY_10 None None ... None None
171
176
  ### 財務分析: 重要指標
172
177
  對應https://ifa.ai/tw-stock/2330/finance-overview
173
178
  ```Python
174
- from neurostats_API.utils import StatsFetcher, DBClient
179
+ from neurostats_API.fetchers import FinanceOverviewFetcher, DBClient
175
180
  db_client = DBClient("<連接的DB位置>").get_client()
176
181
  ticker = "2330"
177
182
  fetcher = FinanceOverviewFetcher(ticker = "2330", db_client = db_client)
@@ -194,6 +199,7 @@ markdown
194
199
  複製程式碼
195
200
  | 英文 | 中文 |
196
201
  |-----------------------------------|-----------------------------|
202
+ |**財務概況**|
197
203
  | revenue | 營業收入 |
198
204
  | gross_profit | 營業毛利 |
199
205
  | operating_income | 營業利益 |
@@ -201,6 +207,7 @@ markdown
201
207
  | operating_cash_flow | 營業活動之現金流 |
202
208
  | invest_cash_flow | 投資活動之淨現金流 |
203
209
  | financing_cash_flow | 籌資活動之淨現金流 |
210
+ |**每股財務狀況**|
204
211
  | revenue_per_share | 每股營收 |
205
212
  | gross_per_share | 每股營業毛利 |
206
213
  | operating_income_per_share | 每股營業利益 |
@@ -209,6 +216,7 @@ markdown
209
216
  | fcf_per_share | 每股自由現金流 |
210
217
  | debt_to_operating_cash_flow | 每股有息負債 |
211
218
  | equity | 每股淨值 |
219
+ |**獲利能力**|
212
220
  | roa | 資產報酬率 |
213
221
  | roe | 股東權益報酬率 |
214
222
  | gross_over_asset | 營業毛利÷總資產 |
@@ -217,10 +225,12 @@ markdown
217
225
  | operation_profit_rate | 營業利益率 |
218
226
  | net_income_rate | 淨利率 |
219
227
  | operating_cash_flow_profit_rate | 營業現金流利潤率 |
228
+ |**成長動能**|
220
229
  | revenue_YoY | 營收年成長率 |
221
230
  | gross_prof_YoY | 營業毛利年成長率 |
222
231
  | operating_income_YoY | 營業利益年成長率 |
223
232
  | net_income_YoY | 淨利年成長率 |
233
+ |**營運指標**|
224
234
  | dso | 應收帳款收現天數 |
225
235
  | account_receive_over_revenue | 應收帳款佔營收比率 |
226
236
  | dio | 平均售貨天數 |
@@ -229,6 +239,7 @@ markdown
229
239
  | cash_of_conversion_cycle | 現金循環週期 |
230
240
  | asset_turnover | 總資產週轉率 |
231
241
  | applcation_turnover | 不動產、廠房及設備週轉率 |
242
+ |**財務韌性**|
232
243
  | current_ratio | 流動比率 |
233
244
  | quick_ratio | 速動比率 |
234
245
  | debt_to_equity_ratio | 負債權益比率 |
@@ -237,6 +248,7 @@ markdown
237
248
  | debt_to_operating_cash_flow | 有息負債÷營業活動現金流 |
238
249
  | debt_to_free_cash_flow | 有息負債÷自由現金流 |
239
250
  | cash_flow_ratio | 現金流量比率 |
251
+ |**資產負債表**|
240
252
  | current_assets | 流動資產 |
241
253
  | current_liabilities | 流動負債 |
242
254
  | non_current_assets | 非流動資產 |
@@ -248,18 +260,19 @@ markdown
248
260
  #### 以下數值未在回傳資料中,待資料庫更新
249
261
  |英文|中文|
250
262
  |---|----|
251
- | operating_cash_flow_YoY (not in list, inferred) | 營業現金流年成長率 |
252
- | fcf_YoY (not in list, inferred) | 自由現金流年成長率 |
253
- | operating_cash_flow_per_share_YoY (not in list, inferred) | 每股營業現金流年成長率 |
254
- | fcf_per_share_YoY (not in list, inferred) | 每股自由現金流年成長率 |
263
+ |**成長動能**|
264
+ | operating_cash_flow_YoY | 營業現金流年成長率 |
265
+ | fcf_YoY | 自由現金流年成長率 |
266
+ | operating_cash_flow_per_share_YoY | 每股營業現金流年成長率 |
267
+ | fcf_per_share_YoY | 每股自由現金流年成長率 |
255
268
 
256
269
  ### 損益表
257
270
  ```Python
258
- from neurostats_API.utils import StatsFetcher, DBClient
271
+ from neurostats_API.fetchers import ProfitLoseFetcher, DBClient
259
272
  db_client = DBClient("<連接的DB位置>").get_client()
260
- fetcher = StatsFetcher(db_client)
261
- ticker = 2330 # 換成tw50內任意ticker
262
- data = fetcher.get_profit_lose(ticker)
273
+ fetcher = ProfitLoseFetcher(db_client)
274
+ ticker = "2330" # 換成tw50內任意ticker
275
+ data = fetcher.query_data()
263
276
  ```
264
277
 
265
278
  #### 回傳
@@ -272,83 +285,85 @@ data = fetcher.get_profit_lose(ticker)
272
285
  "profit_lose": #損益表,
273
286
  "grand_total_profit_lose": #今年度累計損益表,
274
287
  # 營業收入
275
- "revenue":
276
- "grand_total_revenue":
288
+ "revenue": # 營收成長率
289
+ "grand_total_revenue": # 營收累計成場濾
277
290
  # 毛利
278
- "gross_profit":
279
- "grand_total_gross_profit":
280
- "gross_profit_percentage":
281
- "grand_total_gross_profit_percentage"
291
+ "gross_profit": # 毛利成長率
292
+ "grand_total_gross_profit": # 累計毛利成長率
293
+ "gross_profit_percentage": # 毛利率
294
+ "grand_total_gross_profit_percentage" # 累計毛利率
282
295
  # 營利
283
- "operating_income":
284
- "grand_total_operating_income":
285
- "operating_income_percentage":
286
- "grand_total_operating_income_percentage":
296
+ "operating_income": # 營利成長率
297
+ "grand_total_operating_income": # 累計營利成長率
298
+ "operating_income_percentage": # 營利率
299
+ "grand_total_operating_income_percentage": # 累計營利率
287
300
  # 稅前淨利
288
- "net_income_before_tax":
289
- "grand_total_net_income_before_tax":
290
- "net_income_before_tax_percentage":
291
- "grand_total_net_income_before_tax_percentage":
301
+ "net_income_before_tax": # 稅前淨利成長率
302
+ "grand_total_net_income_before_tax": # 累計稅前淨利成長率
303
+ "net_income_before_tax_percentage": # 稅前淨利率
304
+ "grand_total_net_income_before_tax_percentage": # 累計稅前淨利率
292
305
  # 本期淨利
293
- "net_income":
294
- "grand_total_net_income":
295
- "net_income_percentage":
296
- "grand_total_income_percentage":
306
+ "net_income": # 本期淨利成長率
307
+ "grand_total_net_income": # 累計本期淨利成長率
308
+ "net_income_percentage": # 本期淨利率
309
+ "grand_total_income_percentage": # 累計本期淨利率
297
310
  # EPS
298
- "EPS":
299
- "EPS_growth":
300
- "grand_total_EPS":
301
- "grand_total_EPS_growth":
311
+ "EPS": # EPS
312
+ "EPS_growth": # EPS成長率
313
+ "grand_total_EPS": # 累計EPS
314
+ "grand_total_EPS_growth": # 累計EPS成長率
302
315
  }
303
316
  ```
304
317
 
305
318
  ### 資產負債表
306
319
  ``` Python
307
- from neurostats_API.utils import StatsFetcher, DBClient
320
+ from neurostats_API.fetchers import BalanceSheetFetcher, DBClient
308
321
  db_client = DBClient("<連接的DB位置>").get_client()
309
- fetcher = StatsFetcher(db_client)
310
- ticker = 2330 # 換成tw50內任意ticker
311
- stats_fetcher.get_balance_sheet(ticker)
322
+ ticker = "2330" # 換成tw50內任意ticker
323
+ fetcher = BalanceSheetFetcher(ticker, db_client)
324
+
325
+ stats_fetcher.query_data()
312
326
  ```
313
327
 
314
328
  #### 回傳
315
329
  ```Python
316
330
  {
317
331
  "ticker": "2330"
318
- "company_name": "台積電"
332
+ "company_name":"台積電"
319
333
  "balance_sheet":
320
- 2018Q2_value 2018Q2_percentage ... 2024Q2_value 2024Q2_percentage
321
- 流動資產 NaN NaN ... NaN NaN
322
- 現金及約當現金 632229880.0 30.79 ... 1.799127e+09 30.07
323
- ... ... ... ... ... ... ...
324
- 按攤銷後成本衡量之金融資產-非流動 NaN NaN ... 8.868079e+07 1.48
325
- 其他權益 NaN NaN ... NaN NaN
334
+ 2024Q2_value ... 2018Q2_percentage
335
+ 流動資產 NaN ... NaN
336
+ 現金及約當現金 1.799127e+09 ... 30.79
337
+ ... ... ... ...
338
+ 避險之衍生金融負債-流動 NaN ... 0.00
339
+ 負債準備-流動 NaN ... 0.00
326
340
 
327
341
  "total_asset":
328
- 2018Q2_value 2018Q2_percentage ... 2024Q2_value 2024Q2_percentage
329
- total_asset 2.053413e+09 100.00 ... 5.982364e+09 100.00
330
- total_debt 5.627777e+08 27.41 ... 2.162216e+09 36.14
331
- total_equity 1.490635e+09 72.59 ... 3.820148e+09 63.86
342
+ 2024Q2_value ... 2018Q2_percentage
343
+ 資產總額 5.982364e+09 ... 100.00
344
+ 負債總額 2.162216e+09 ... 27.41
345
+ 權益總額 3.820148e+09 ... 72.59
346
+
332
347
 
333
348
  "current_asset":
334
- 2018Q2_value 2018Q2_percentage ... 2024Q2_value 2024Q2_percentage
335
- current_asset 959042679.0 46.7 ... 2.591658e+09 43.32
349
+ 2024Q2_value ... 2018Q2_percentage
350
+ 流動資產合計 2.591658e+09 ... 46.7
336
351
 
337
352
  "non_current_asset":
338
- 2018Q2_value 2018Q2_percentage ... 2024Q2_value 2024Q2_percentage
339
- non_current_asset 1.094370e+09 53.3 ... 3.390706e+09 56.68
353
+ 2024Q2_value ... 2018Q2_percentage
354
+ 非流動資產合計 3.390706e+09 ... 53.3
340
355
 
341
356
  "current_debt":
342
- 2018Q2_value 2018Q2_percentage ... 2024Q2_value 2024Q2_percentage
343
- current_debt 1.094370e+09 53.3 ... 3.390706e+09 56.68
357
+ 2024Q2_value ... 2018Q2_percentage
358
+ 流動負債合計 1.048916e+09 ... 22.55
344
359
 
345
360
  "non_current_debt":
346
- 2018Q2_value 2018Q2_percentage ... 2024Q2_value 2024Q2_percentage
347
- non_current_debt 1.094370e+09 53.3 ... 3.390706e+09 56.68
361
+ 2024Q2_value ... 2018Q2_percentage
362
+ 非流動負債合計 1.113300e+09 ... 4.86
348
363
 
349
364
  "equity":
350
- 2018Q2_value 2018Q2_percentage ... 2024Q2_value 2024Q2_percentage
351
- equity 1.094370e+09 53.3 ... 3.390706e+09 56.68
365
+ 2024Q2_value ... 2018Q2_percentage
366
+ 權益總額 3.820148e+09 ... 72.59
352
367
 
353
368
  }
354
369
  ```
@@ -364,77 +379,49 @@ equity 1.094370e+09 53.3 ... 3.390706e+09 56.68
364
379
 
365
380
  ### 現金流量表
366
381
  ``` Python
367
- from neurostats_API.utils import StatsFetcher, DBClient
382
+ from neurostats_API.fetchers import CashFlowFetcher
368
383
  db_client = DBClient("<連接的DB位置>").get_client()
369
- fetcher = StatsFetcher(db_client)
370
384
  ticker = 2330 # 換成tw50內任意ticker
371
- stats_fetcher.get_cash_flow(ticker)
385
+ fetcher = StatsFetcher(ticker, db_client)
386
+
387
+ stats_fetcher.query()
372
388
  ```
373
389
  #### 回傳
374
390
  ```Python
375
391
  {
376
- "ticker":2330
377
- "company_name":台積電
392
+ "ticker": "2330"
393
+ "company_name": "台積電"
378
394
  "cash_flow":
379
- 2018Q2_value 2018Q2_percentage ... 2024Q2_value \
380
- 營業活動之現金流量-間接法 NaN NaN ... NaN
381
- 繼續營業單位稅前淨利(淨損) 187531229.0 0.645548 ... 572853779.0
382
- ... ... ... ... ...
383
- 存出保證金增加 NaN NaN ... -122271.0
384
- 收取之股利 NaN NaN ... 895503.0
385
-
386
- 2024Q2_percentage
387
- 營業活動之現金流量-間接法 NaN
388
- 繼續營業單位稅前淨利(淨損) 0.703769
389
- ... ...
390
- 存出保證金增加 0.000755
391
- 收取之股利 -0.005530
392
-
393
- "CASHO":
394
- 2018Q2_value 2018Q2_percentage ... 2024Q2_value \
395
- 營業活動之現金流量-間接法 NaN NaN ... NaN
396
- 繼續營業單位稅前淨利(淨損) 187531229.0 0.645548 ... 572853779.0
397
- ... ... ... ... ...
398
- 退還(支付)之所得稅 -31709079.0 -0.109154 ... -89154446.0
399
- 營業活動之淨現金流入(流出) 290499278.0 1.000000 ... 813979318.0
400
-
401
- 2024Q2_percentage
402
- 營業活動之現金流量-間接法 NaN
403
- 繼續營業單位稅前淨利(淨損) 0.703769
404
- ... ...
405
- 退還(支付)之所得稅 -0.109529
406
- 營業活動之淨現金流入(流出) 1.000000
407
-
408
- "CASHI":
409
- 2018Q2_value 2018Q2_percentage ... 2024Q2_value \
410
- 投資活動之現金流量 NaN NaN ... NaN
411
- 取得透過其他綜合損益按公允價值衡量之金融資產 -47523622.0 0.355889 ... -43780180.0
412
- ... ... ... ... ...
413
- 其他投資活動 -149104.0 0.001117 ... 7956680.0
414
- 投資活動之淨現金流入(流出) -133534789.0 1.000000 ... -357414321.0
415
-
416
- 2024Q2_percentage
417
- 投資活動之現金流量 NaN
418
- 取得透過其他綜合損益按公允價值衡量之金融資產 0.122491
419
- ... ...
420
- 其他投資活動 -0.022262
421
- 投資活動之淨現金流入(流出) 1.000000
422
-
423
- "CASHF":
424
- 2018Q2_value 2018Q2_percentage ... 2024Q2_value \
425
- 籌資活動之現金流量 NaN NaN ... NaN
426
- 短期借款減少 -33743725.0 0.387977 ... NaN
427
- ... ... ... ... ...
428
- 存出保證金增加 NaN NaN ... -122271.0
429
- 收取之股利 NaN NaN ... 895503.0
430
-
431
- 2024Q2_percentage
432
- 籌資活動之現金流量 NaN
433
- 短期借款減少 NaN
434
- ... ...
435
- 存出保證金增加 0.000755
436
- 收取之股利 -0.005530
437
-
395
+ 2023Q3_value ... 2018Q3_percentage
396
+ 營業活動之現金流量-間接法 NaN ... NaN
397
+ 繼續營業單位稅前淨利(淨損) 700890335.0 ... 0.744778
398
+ ... ... ... ...
399
+ 以成本衡量之金融資產減資退回股款 NaN ... NaN
400
+ 除列避險之金融負債∕避險 之衍生金融負債 NaN ... -0.000770
401
+
402
+ "CASHO":
403
+ 2023Q3_value ... 2018Q3_percentage
404
+ 營業活動之現金流量-間接法 NaN ... NaN
405
+ 繼續營業單位稅前淨利(淨損) 700890335.0 ... 0.744778
406
+ ... ... ... ...
407
+ 持有供交易之金融資產(增加)減少 NaN ... 0.001664
408
+ 負債準備增加(減少) NaN ... NaN
409
+
410
+ "CASHI":
411
+ 2023Q3_value ... 2018Q3_percentage
412
+ 投資活動之現金流量 NaN ... NaN
413
+ 取得透過其他綜合損益按公允價值衡量之金融資產 -54832622.0 ... 0.367413
414
+ ... ... ... ...
415
+ 持有至到期日金融資產到期還本 NaN ... NaN
416
+ 取得以成本衡量之金融資產 NaN ... NaN
417
+
418
+ "CASHF":
419
+ 2023Q3_value ... 2018Q3_percentage
420
+ 籌資活動之現金流量 NaN ... NaN
421
+ 短期借款減少 0.0 ... NaN
422
+ ... ... ... ...
423
+ 以成本衡量之金融資產減資退回股款 NaN ... NaN
424
+ 除列避險之金融負債∕避險 之衍生金融負債 NaN ... -0.00077
438
425
  }
439
426
  ```
440
427
  - `'ticker'`: 股票代碼
@@ -447,44 +434,6 @@ stats_fetcher.get_cash_flow(ticker)
447
434
  > 大部分資料缺失是因為尚未計算,僅先填上已經有的資料
448
435
 
449
436
 
450
-
451
-
452
- ## cli 範例輸入
453
- ```
454
- python ./cli.py --ticker 1101
455
- ```
456
-
457
- ### cli 輸出
458
- ```Python
459
- _id
460
- ObjectId('67219e046104872ef7490cd3')
461
- ticker
462
- '1101'
463
- company_name
464
- '台泥'
465
- yearly_data
466
- year P_E P_FCF P_B P_S EV_OPI EV_EBIT EV_EBITDA EV_S
467
- 0 107 9.78 66.346637 1.07 1.963814 16.061211 14.807325 32.858903 3.685025
468
- 1 108 10.76 23.532308 1.35 3.296749 21.995948 19.877169 44.395187 5.338454
469
- 2 109 10.29 -26.134468 1.32 4.282560 26.353871 23.417022 46.269197 6.908155
470
- 3 110 14.08 22.345215 1.50 5.558267 42.034804 32.290621 77.139298 7.973839
471
- 4 111 28.04 -63.248928 1.16 4.595606 -136332.740038 149.169022 -756.781156 7.324556
472
- 5 112 29.53 -18.313377 1.15 5.301801 98.225453 65.598234 321.991608 8.582981
473
- 6 過去4季 NaN -24.929987 NaN 4.300817 83.102921 55.788996 -1073.037084 7.436656
474
- daily_data
475
- { 'EV_EBIT': 55.78899626851681,
476
- 'EV_EBITDA': -1073.037084015388,
477
- 'EV_OPI': 83.10292101832388,
478
- 'EV_S': 7.436656083243897,
479
- 'P_B': None,
480
- 'P_E': None,
481
- 'P_FCF': -24.92998660989962,
482
- 'P_S': 4.300817175744059,
483
- 'close': 32.150001525878906,
484
- }
485
- ```
486
- > 這裡有Nan是因為本益比與P/B等資料沒有爬到最新的時間
487
-
488
437
  ## TODO
489
438
  - 將utils/fetcher.py中的功能切分到fetchers資料夾中
490
439