Allows the user to see multiple stocks on one plot.

plot_multiple_stocks(tickers, from_date = NULL, to_date = NULL)

Arguments

tickers

A vector of stock tickers to be plotted.

from_date

The starting date of the plot, formatted as MM/DD/YYYY.

to_date

The ending date of the plot, formatted as MM/DD/YYYY.

Value

A plot showing stock prices and a table with percentage changes over the specified time period.

Examples

plot_multiple_stocks(c("PAR", "MSFT", "BA", "AAPL"), from_date = "01/05/2023", to_date = "01/01/2024")
#> 
#> Percentage Change for each stock:
#> 
#> 
#> |symbol |start_date |end_date   |pct_change |
#> |:------|:----------|:----------|:----------|
#> |MSFT   |2023-01-05 |2023-12-29 |70.65%     |
#> |AAPL   |2023-01-05 |2023-12-29 |54.86%     |
#> |PAR    |2023-01-05 |2023-12-29 |54.78%     |
#> |BA     |2023-01-05 |2023-12-29 |27.16%     |