Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are the COO managing the operations of a robo-advisor and you need to ensure that all the stock holdings in the portfolios under management

image text in transcribed

You are the COO managing the operations of a robo-advisor and you need to ensure that all the stock holdings in the portfolios under management are kept up to date. Given the following inputs in Figure 1 , evaluate the total number of stocks that are acquired for target pf by quert date import pandas as pd import numpy as np portfolios_fn = "portfolios.csv" price_fn "price_data.csv" target_pf =299 query_date = " 20160930" Figure 1: Python inputs Design and create code that will help you to evaluate the total stock holding of target pf by describes the data format of portfolios.csv and price_data.csv. Print the stock holdings of target of on quex x0 date clearly. Appendix A The robo-advisor will acquire stocks on behalf of the investor every month and the stocks will always be acquired on the last trading date of each month. The stocks and the unit number of stocks to acquire are determined by the portfolio allocation. You are reminded that integer units of stocks can be purchased for each portfolio. For simplicity, you can ignore the remaining cash due to the purchase of integral unit of stocks in your calculations. Appendix B In the portfolios.csv data file, the "id" column is a unique identifier for a portfolio and the portfolio is described by the stock holding and allocation. The maximum number of stocks in a portfolio is assumed to be 7 and the stocks are identified by the columns named x, x2,x7. Each stock will be assigned an allocation and the allocation are identified by the columns w1,w2,w7. The stock name and allocation has a one-to-one correspondence, i.e. the allocation of stock identified by x1 is given by w1. The column "inut amt" will denote the amount of money that is provided by the investor every month to buy all the stocks in the portfolio. The daily stock prices are provided in the price_data.csv data file. The "date" column provides the list of trading dates, and the subsequent columns provide the stock names. Stocks are listed and/or delisted at different

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

Beyond Greed And Fear Understanding Behavioral Finance And The Psychology Of Investing

Authors: Hersh Shefrin

1st Edition

0195161211, 978-0195161212

More Books

Students also viewed these Finance questions