Question: You are a technology analyst automating the reporting process in an asset management company. You are tasked to build a reporting engine that will automate

 You are a technology analyst automating the reporting process in an

asset management company. You are tasked to build a reporting engine that

You are a technology analyst automating the reporting process in an asset management company. You are tasked to build a reporting engine that will automate the entire process of month-end reporting. The setup of your reporting engine will be the daily closing prices of the stock universe for a selected period. import numpy as np import matplotlib.pyplot as plt start_dt - np.datetime 64('2018-01-01') end_dt = np.datetime64(2021-81-31') stock_universe - ['WMT', 'G', 'XOM', AAPL', IBM, 'X', 'CAT', 'MSFT', 'ERK.B', 'PM'] Figure 1: The setup of the reporting engine where the stock universe (stock_universe) is provided and the start date (start_dt) and end date (end_dt) of the selected period are defined. Question 3 Your reporting engine is used to calculate the monthly retum of selected stocks for a selected period. The monthly return of a stock at month i, nis defined as S; ri= Si-1 where Si and Si-a are the month-end stock prices at month i and i 1 respectively. The month- end stock price at month i is defined as the stock price on the last business date of month i. To use your reporting engine, the user needs to specify the following inputs: 1 selected stocks = ['a', 'PM'] reporting_start_ct = np.datetime64('2820-81-81) reporting_end_dt - np.datetime64(2028-02-29) Figure 3: User's inputs to reporting engine. The user must specify the selected stocks and the reporting period. Create a user defined function to obtain the last business date for every month specified by the date range reporting_start_dt and reporting_end_dt. Hence, apply your function and print clearly, the last business date for the first two (2) months of 2020. (15 marks) Create a user defined function that evaluate the monthly return of selected_ stocks in the reporting period. Hence, apply your function and print clearly, corrected to two (2) decimal points, the retums of GS and JPM in the first two (2) months of 2020. (20 marks) (6) You are a technology analyst automating the reporting process in an asset management company. You are tasked to build a reporting engine that will automate the entire process of month-end reporting. The setup of your reporting engine will be the daily closing prices of the stock universe for a selected period. import numpy as np import matplotlib.pyplot as plt start_dt - np.datetime 64('2018-01-01') end_dt = np.datetime64(2021-81-31') stock_universe - ['WMT', 'G', 'XOM', AAPL', IBM, 'X', 'CAT', 'MSFT', 'ERK.B', 'PM'] Figure 1: The setup of the reporting engine where the stock universe (stock_universe) is provided and the start date (start_dt) and end date (end_dt) of the selected period are defined. Question 3 Your reporting engine is used to calculate the monthly retum of selected stocks for a selected period. The monthly return of a stock at month i, nis defined as S; ri= Si-1 where Si and Si-a are the month-end stock prices at month i and i 1 respectively. The month- end stock price at month i is defined as the stock price on the last business date of month i. To use your reporting engine, the user needs to specify the following inputs: 1 selected stocks = ['a', 'PM'] reporting_start_ct = np.datetime64('2820-81-81) reporting_end_dt - np.datetime64(2028-02-29) Figure 3: User's inputs to reporting engine. The user must specify the selected stocks and the reporting period. Create a user defined function to obtain the last business date for every month specified by the date range reporting_start_dt and reporting_end_dt. Hence, apply your function and print clearly, the last business date for the first two (2) months of 2020. (15 marks) Create a user defined function that evaluate the monthly return of selected_ stocks in the reporting period. Hence, apply your function and print clearly, corrected to two (2) decimal points, the retums of GS and JPM in the first two (2) months of 2020. (20 marks) (6)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!