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, 21.06.2019 21:40
Which is a benefit of getting information from a government website? a. the information will be easy to understand. ob. the information will be the most current. oc. the information can be trusted.
Answers: 1
question
Computers and Technology, 22.06.2019 10:50
Using least squares fitting, you are to fit the data sets to the following models and solve for the parameters ai , where i is the index of the parameter. the input/output data for the systems are linked in the bblearn site. for each of the systems use matlab to plot the supplied data vs. the model fit on one plot. include your code in the solutions. (a) linear fit "lineardata.mat" y=a1x^3 + a2x^2 + a3x + a4 (b) plant fit "plantdata.mat g(s) = a1/(s + a2)
Answers: 1
question
Computers and Technology, 23.06.2019 02:30
These factors limit the ability to attach files to e-mail messages. location of sender recipient's ability to open file size of file type of operating system used
Answers: 2
question
Computers and Technology, 23.06.2019 06:10
The head restraint should be adjusted so that it reaches a.the top of your ears b.the base of your skull c.the top of the head
Answers: 1
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
English, 31.01.2020 10:01
question
Social Studies, 31.01.2020 10:01
question
English, 31.01.2020 10:01
question
Mathematics, 31.01.2020 10:01
question
Mathematics, 31.01.2020 10:01
question
History, 31.01.2020 10:01
Questions on the website: 13722359