Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Description Write a program that determines whether you should accept or reject a project using Net Present Value ( NPV ) and Internal Rate of

Description
Write a program that determines whether you should accept or reject a project using Net Present Value
(NPV) and Internal Rate of Return (IRR). Use the following formulas for NPV and IRR, respectively.
NPV=i=0NCFi(1+r)i
NPV=0=i=0NCFi(1+IRR)i
Requirements
Functions
NPV and IRR calculations should be implemented as functions. At a minimum, the NPV function
should accept a list of cash flows and a discount rate, and the IRR function should accept a list
of cash flows and a guess at the IRR.
Accept/Reject Logic
Implement code to automatically determine if a project should be accepted or rejected.
Tests
You should provide sample code that tests the various endpoints of your code, including a projects
that are accepted and rejected, positive and negative NPVs, and various IRRs.
Correctness
Your code must provide the correct answer, both on whether or not to accept or reject the project
and the calculation of NPV and IRR.
Readability
Your code must be readable and easy to follow, using comments when necessary.
Bonus
MIRR Function (T)
Implement a function to calculate MIRR.
image text in transcribed

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

Routledge Handbook Of Financial Technology And Law

Authors: Iris Chiu, Gudula Deipenbrock

1st Edition

0367344149, 978-0367344146

More Books

Students also viewed these Finance questions

Question

What are the margin requirements for a CFD contract?

Answered: 1 week ago