Prepare a python script as reflected in Table 1.
I’m studying for my Python class and don’t understand how to answer this. Can you help me study?
Prepare a Python script that create and deliver information displayed in the format given in Table 1. The first three columns report the names, allocation and prices of the stocks in the portfolio on Report Date. The Units column reports the total units of the stocks held in the portfolio on the Report Date and the Invt ($) column prints the total amount of money used to acquire the respective stocks. The Mkt Value ($) column reports the market value of the stocks on Report Date while the Return (%) column prints the return of stock in the portfolio.
Given the following inputs to your Python script in Figure 1, and together with your Python script, generate the performance of portfolios with ID = 30 and 4502 on 31-Dec-2015 in the format given in Table 1. Hence, report the ID and return of the portfolio that has the highest return on the 31-Dec-2015.
TO BE SUBMITTED IN JUPYTER NOTEBOOK (.ipynb)
Dataset can be retrieved at