knox a révisé ce gist . Aller à la révision
1 file changed, 12 insertions
yfinance-9.py(fichier créé)
@@ -0,0 +1,12 @@ | |||
1 | + | import yfinance as yf | |
2 | + | ||
3 | + | # Ticker to Sector and Industry | |
4 | + | msft = yf.Ticker('MSFT') | |
5 | + | tech = yf.Sector(msft.info.get('sectorKey')) | |
6 | + | software = yf.Industry(msft.info.get('industryKey')) | |
7 | + | ||
8 | + | # Sector and Industry to Ticker | |
9 | + | tech_ticker = tech.ticker | |
10 | + | tech_ticker.info | |
11 | + | software_ticker = software.ticker | |
12 | + | software_ticker.history() |
Plus récent
Plus ancien