Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using an indefinite while loop until your guess is close enough # Set rate to be mid-point of low and high # Compute the pv

Using an indefinite while loop until your guess is close enough # Set rate to be mid-point of low and high # Compute the pv of cfs using the given rate # If the absolute value of the difference between pv and 0 is less than 0.0001, then break out of the loop # else update the high or the low depending on the value of pv [You have to think about this.]

Screenshot 2022-12-20 at 6.26.49 PM.png


Screenshot 2022-12-20 at 6.27.01 PM.png  

1.1.3 infer the discount rate: Might not be easy for some of you In [5] # Write code to infer the discount rate # low = the lower bound of the discount rate # set low to 0 low = 0 # high = the upper bound of the discount rate set high to 5 (which means 500%) high 5 # Create a numpy array named cfs that is the numpy version of cash_flows = cfs np.array(cash flows) # Print cfs to match the output below print (cfs) [1000 200-300 -150 -123 -350] In [6] # Set yrs to be a numpy array that ranges from 0 to years # Match the output below = yrs np.arange(0, years) print (yrs) [0 1 2 3 4 5]

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_2

Step: 3

blur-text-image_3

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

International Marketing And Export Management

Authors: Gerald Albaum , Alexander Josiassen , Edwin Duerr

8th Edition

1292016922, 978-1292016924

More Books

Students also viewed these Algorithms questions

Question

What did Tolman mean by intervening variable?

Answered: 1 week ago