-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTester.py
More file actions
24 lines (17 loc) · 805 Bytes
/
Copy pathTester.py
File metadata and controls
24 lines (17 loc) · 805 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import matplotlib.pyplot as plt
from datetime import date
import yfinance as yf
import pandas as pd
from yahoo_fin import stock_info as si
import mplcursors
symbol1 = "AAPL"
stockOne = yf.Ticker(symbol1)
dailyData = pd.DataFrame(stockOne.history(period="1d", interval="1m"))['Open']
dailyData.index = dailyData.index.strftime("%H:%M:%S")
gainers = pd.DataFrame(si.get_day_gainers())[['Price (Intraday)', '% Change']]
gainers.index = pd.DataFrame(si.get_day_gainers())['Symbol']
losers = pd.DataFrame(si.get_day_losers())[['Price (Intraday)', '% Change']]
losers.index = pd.DataFrame(si.get_day_losers())['Symbol']
active = pd.DataFrame(si.get_day_most_active())[['Price (Intraday)', '% Change']]
active.index = pd.DataFrame(si.get_day_most_active())['Symbol']
print(pd.DataFrame(si.tickers_dow()))