With the given stock, conduct the Bollinger Bands analysis by answering the questions below.

Q1 Calculate 20-day moving averages and 20-day running standard deviation. Save the result under stock and print it.

Q2 Calculate the Bollinger Bands. Save the result under stock and print it.

Q3 Select variables to build the Bollinger Bands. Save the result under stock_selected and print it.

Q4 Transform data to long form from wide form for graphing.Save the result under stock_long and print it.

Q5 Visualize data.

Hint: Take stock_selected and pipe it to ggplot(). Map date to the x-axis, price to the y-axis, and type to color in the line chart.

## Warning: Removed 57 row(s) containing missing values (geom_path).

Q6 If you had invested $1 million on the day of the first buying point and sold all the shares on the following selling point, how much would you have won or lost?

2020-03-12: Buy point at $1,676.61 2020-04-13: Sell point at $2,168.87 If you invested a million at the first buying point and sold it at the first selling point, your total gains would add up to $293,604.

Q7 An analyst may tinker with the width of the Bollinger Bands depending the volatility of the stock. Which of the following scenarios would have yield the largest profit? Elaborate your answer.

The Second scenario would be more porfitable. the first scenario had a total profit per share of $492.26 and the second had a total profit per share of $606.71.

Q8 Hide the messages, the code, and its results on the webpage.

Q9 Display the title and your name correctly at the top of the webpage.

Q10 Use the correct slug.