Write function rel_std(stock_data) which receives the stock data downloaded from a web site, and returns...

60.1K

Verified Solution

Question

Finance

Write function rel_std(stock_data) which receives the stock data downloaded from a web site, and returns a relative standard deviation (which is standard deviation of the stock close values divided by the stock close value average and multiplied by 100).

Function main():

Downloads stock data for year 2022 for 8 Dow Jones companies:

Boeing, Coca-Cola, Exxon Mobil, General Electric, JPMorgan Chase, Nike, Pfizer, Verizon

Calls rel_std(stock_data) to collect relative standard deviation for the companies.

Stores relative standard deviations in a dictionary, with company stock symbol as a key and relative standard deviation as value.

Print the company names and corresponding relative standard deviations. It is not important if the order of the companies is not the same as when you inserted them into the dictionary.

Print all numbers rounded to two decimal places.

Sample output:

Program that calculates relative standard deviation

for eight Dow Jones companies.

Company Relative std deviation

---------------------------------------------

Boeing 16.55

Coca Cola 4.08

Exxon Mobil 12.71

General Electric 14.17

JP Morgan 11.36

Nike 15.19

Pfeizer 6.52

Verizon 13.69

Answer & Explanation Solved by verified expert
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students