Ultima attività 1730172603

knox ha revisionato questo gist 1730172603. Vai alla revisione

1 file changed, 77 insertions

yfinance-3.py(file creato)

@@ -0,0 +1,77 @@
1 + import yfinance as yf
2 +
3 + msft = yf.Ticker("MSFT")
4 +
5 + # get all stock info
6 + msft.info
7 +
8 + # get historical market data
9 + hist = msft.history(period="1mo")
10 +
11 + # show meta information about the history (requires history() to be called first)
12 + msft.history_metadata
13 +
14 + # show actions (dividends, splits, capital gains)
15 + msft.actions
16 + msft.dividends
17 + msft.splits
18 + msft.capital_gains # only for mutual funds & etfs
19 +
20 + # show share count
21 + msft.get_shares_full(start="2022-01-01", end=None)
22 +
23 + # show financials:
24 + msft.calendar
25 + msft.sec_filings
26 + # - income statement
27 + msft.income_stmt
28 + msft.quarterly_income_stmt
29 + # - balance sheet
30 + msft.balance_sheet
31 + msft.quarterly_balance_sheet
32 + # - cash flow statement
33 + msft.cashflow
34 + msft.quarterly_cashflow
35 + # see `Ticker.get_income_stmt()` for more options
36 +
37 + # show holders
38 + msft.major_holders
39 + msft.institutional_holders
40 + msft.mutualfund_holders
41 + msft.insider_transactions
42 + msft.insider_purchases
43 + msft.insider_roster_holders
44 +
45 + msft.sustainability
46 +
47 + # show recommendations
48 + msft.recommendations
49 + msft.recommendations_summary
50 + msft.upgrades_downgrades
51 +
52 + # show analysts data
53 + msft.analyst_price_targets
54 + msft.earnings_estimate
55 + msft.revenue_estimate
56 + msft.earnings_history
57 + msft.eps_trend
58 + msft.eps_revisions
59 + msft.growth_estimates
60 +
61 + # Show future and historic earnings dates, returns at most next 4 quarters and last 8 quarters by default.
62 + # Note: If more are needed use msft.get_earnings_dates(limit=XX) with increased limit argument.
63 + msft.earnings_dates
64 +
65 + # show ISIN code - *experimental*
66 + # ISIN = International Securities Identification Number
67 + msft.isin
68 +
69 + # show options expirations
70 + msft.options
71 +
72 + # show news
73 + msft.news
74 +
75 + # get option chain for specific expiration
76 + opt = msft.option_chain('YYYY-MM-DD')
77 + # data available via: opt.calls, opt.puts
Più nuovi Più vecchi