Aan de slagGa gratis aan de slag

Internal Rate of Return

Now that you have the cash flow projections ready to go for each project, you want to compare the internal rate of return (IRR) of each project to help you decide which project would be most beneficial for your company in terms of yield (rate of return). In this exercise, you will calculate the internal rate of return for each project using np.irr(values).

The cash flows for projects 1 and 2 are available as cf_project1 and cf_project2.

Deze oefening maakt deel uit van de cursus

Introduction to Financial Concepts in Python

Cursus bekijken

Oefeninstructies

  • Set the internal rate of return for Project 1 equal to irr_project1.
  • Set the internal rate of return for Project 2 equal to irr_project2.

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

import numpy as np

# Calculate the internal rate of return for Project 1
irr_project1 = ____
print("Project 1 IRR: " + str(round(100*irr_project1, 2)) + "%")

# Calculate the internal rate of return for Project 2
irr_project2 = ____
print("Project 2 IRR: " + str(round(100*irr_project2, 2)) + "%")
Code bewerken en uitvoeren