subject

Pythonalmost there. now that you have functions to read the various files and add all the data into data structures you are ready compute the final value of the portfolio. paste your code from the previous two parts of this prelab as you will need to call those functions to complete this part. reminder of the data formats: the input file will be a csv file with each row in the format "buy_or_sell, quantity, ticker, date" where buy_or_sell is either the string "buy" or "sell", quantity is an integer representing the number of shares traded, ticker is a string representing the ticker symbol being traded, and date is the date of the trade in the format -mm-dd. you may assume there are files named .csv for each ticker symbol that the company trades. each row of these csv files will be in the format "date, price, volume" where date is in the format -mm-dd, the price is a float, and volume is an integer representing the number of shares that were traded on that day by all traders (you will not need the trading volume for this prelab)part 3: write a function named "portfolio_value" that takes one parameter that is a string representing a filename that contains all the trades made by your company throughout the year and returns the total value of the portfolio on the date "2015-12-31". the total value is the sum of all the quantities of stock owned times the price for that stock at the end of the year.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:10
When you reach a yield sign, yield to cross traffic and before you enter the intersection. a. flash your headlights b. wait for a signal c. wait five seconds d. wait for a safe gap
Answers: 1
question
Computers and Technology, 22.06.2019 16:30
Corey set up his presentation for delivery to his team.the information he had to convey was critical to their job performance.he knew he would need a lot of time to explain each point
Answers: 3
question
Computers and Technology, 22.06.2019 23:30
What are listed in the vertical columns across the top of the event editor? a. file names b. conditions c. check marks d. action types
Answers: 1
question
Computers and Technology, 23.06.2019 01:50
Create a class named majors that includes an enumeration for the six majors offered by a college as follows: acc, chem, cis, eng, his, phys. display the enumeration values for the user, then prompt the user to enter a major. display the college division in which the major falls. acc and cis are in the business division, chem and phys are in the science division, and eng and his are in the humanities division. save the file as majors.java.
Answers: 2
You know the right answer?
Pythonalmost there. now that you have functions to read the various files and add all the data into...
Questions
question
Mathematics, 19.05.2021 04:10
question
Physics, 19.05.2021 04:10
question
Biology, 19.05.2021 04:10
question
Physics, 19.05.2021 04:10
question
Mathematics, 19.05.2021 04:10
question
Mathematics, 19.05.2021 04:10
question
Mathematics, 19.05.2021 04:10
Questions on the website: 13722362