Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python Coding Question. See Yahoo Finance for CSV files for use in this code. Thank you so much! You need to process daily stock prices

Python Coding Question. See Yahoo Finance for CSV files for use in this code. Thank you so much!

image text in transcribed

You need to process daily stock prices that are stored in CSV files. Each stock is stored in a CSV file named after the stock's ticker symbol. For example, the stock prices for Alphabet, Inc are stored in a file named G00G.csy Solution Description Write a module named stocks that includes two classes Company with the following instance attributes o symbol: str -the official stock ticker symbol o name str -the company's name o sector: str - the company's sector, as defined by Yahoo Finance o stock_data: dict[datetime, StockData] -a dictionary mapping datetime objects to StockData objects and the following instance methods: -which takes arguments that are used to initialize the values of the instance attribute listed above(except stock-data), in the order listed above. Only the -init symbol must be provided when creating a Company instance, the other instance attributes (except stock_data) should have the value None if not provided as arguments to _initwhen creating a Company object. * o a method which is automatically called whenever a Company object is printed or converted to a str and returns a string with the company's name and stock symbol in parentheses, e.g., Alphabet (EooG) o a method which is automatically called by the Python REPL to print the value of a Company object to the console and returns a string with the class name and all the name-Alphabet, attributes (except stock-data) between angle brackets, e.g.,

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Put Your Data To Work 52 Tips And Techniques For Effectively Managing Your Database

Authors: Wes Trochlil

1st Edition

0880343079, 978-0880343077

More Books

Students also viewed these Databases questions

Question

Explain the market segmentation.

Answered: 1 week ago

Question

Mention the bases on which consumer market can be segmented.

Answered: 1 week ago