“Obtenga datos de stock en Python” Código de respuesta

Python Get Data Stock

import yfinance as yf
import matplotlib.pyplot as plt
# Get the data for the stock Apple by specifying the stock ticker, start date, and end date
data = yf.download('AAPL','2016-01-01','2018-01-01') 
# Plot the close prices
data.Close.plot()
plt.show()
MathNerd1O1

Obtenga datos de stock en Python

# First run 'python -m pip install yahoofinancials'

from yahoofinancials import YahooFinancials

yf = YahooFinancials('WFC')
print(yf.get_current_price())
print(yf.get_prev_close_price())
Stormy Spider

Respuestas similares a “Obtenga datos de stock en Python”

Preguntas similares a “Obtenga datos de stock en Python”

Más respuestas relacionadas con “Obtenga datos de stock en Python” en Python

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código