Posts

Showing posts from June, 2021
 Exploring TESLA stock with yahoo finance... This code explores different methods available in the Python library YFinance. Available for any questions import yfinance as yf In [21]: yf . pdr_override () In [22]: data_sym = input ( 'what symbol are you looking for:? ' ) #start_date = input('What date you want to start use YYYY-MM-DD:? ') #end_date = input('What date do you want o end at:? -- use YYYY-MM-DD ') what symbol are you looking for:? TSLA In [23]: # df_data = pdr.get_data_yahoo(data_sym, start=start_date, end=end_date) data = yf . Ticker ( data_sym ) In [24]: data Out[24]: yfinance.Ticker object <TSLA> In [25]: data . info Out[25]: {'zip': '94304', 'sector': 'Consumer Cyclical', 'fullTimeEmployees': 70757, 'longBusinessSummary': 'Tesla, Inc. designs, develops, manufactures, leases, and sells electric vehicles, and energy generation and storage systems in the United States, Chin...