Beta
Table of Contents
The outline of your notebook will show up here. You can include headings in any text cell by starting a line with #
, ##
, ###
, etc., depending on the desired title hierarchy.
# Importing necessary libraries
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import plotly.express as px
import yfinance as yf
from datetime import datetime
# Define the list of consumer technology companies
companies = ['AAPL', 'MSFT', 'GOOGL', 'AMZN', 'FB']
# Define the start and end dates for the data
start_date = '2010-01-01'
end_date = datetime.today().strftime('%Y-%m-%d')
# Download the stock data for the companies
data = yf.download(companies, start=start_date, end=end_date)
# Plot the stock prices
fig = px.line(data, x=data.index, y='Close', title='Stock Prices of Consumer Technology Companies')
fig.show()