Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1) Use the file vpn2.csv, it contains future cash flows for an investment. There are 120 monthly flows (10 years). Use an annual rate of

1) Use the file vpn2.csv, it contains future cash flows for an investment. There are 120 monthly flows (10 years). Use an annual rate of 10% to calculate the Net Present Value of these flows. Print the VPN.

2) To perform the following exercise, use the csv file containing the tickers for the S&P 500 index. Download the corresponding data and calculate the daily returns of each asset during the current year, that is, from January 2023.

Notes: use the encoding parameter in read_csv to correctly read the file: pd.read_csv('sp500.csv', encoding='ISO-8859-1'). Remember that yfinance can receive the assets as a list.

Once the daily returns are obtained, answer the following questions:

A) Which of all the assets had the highest year-to-date gain and what was the percentage return obtained?

B) What was the highest daily return obtained this year, on what day was it recorded and to which asset does that return belong?

3) Use the same csv file to download the data and to estimate the YTD 2023 average return for each sector.

The result should look something like this:

'Health Care': -0.66, 'Information Technology': 11.02

Graph the results.

4) Program a code that receives how much your position would be worth if you bought P dollars of asset A every certain interval of days D at the historical market price from date F until today. You should be limited to not downloading data beyond today, obviously.

Example: You receive: P=500, A=MSFT, I=7, F=1 January 2022. And you return: If you had bought 500 dollars of MSFT every 7 days since January 1, 2022, you would have invested 22,500 dollars, and that today would be worth 23,911.09 dollars.

Add a graph that shows the money invested and the value of the position over time.

The csv look like this: sp500.csv:

image text in transcribedvpn2.csv:

image text in transcribed

000L0001000L000L000L000LD001000000L000L0008Dog.000L000L0001000L000l000L000L000L000.000L000800SL000LD001000L000LDOOL000L000L000l000LDoOL0008- rin 000L0001000L000L000L000LD001000000L000L0008Dog.000L000L0001000L000l000L000L000L000.000L000800SL000LD001000L000LDOOL000L000L000l000LDoOL0008- rin

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

Finance For Non Financial Managers

Authors: Pierre Bergeron

6th Edition

0176501630, 9780176501631

More Books

Students also viewed these Finance questions