ComenzarEmpieza gratis

Calculating IRR and NPV with different project lifespans

Now that you calculated the WACC, you can calculate and compare the IRRs and NPVs of each project.

While the IRR remains relatively comparable across projects, the NPV, on the other hand, will be much more difficult to compare given the additional year required for project 1.

Luckily, in the next exercise, we will introduce another method to compare the NPVs of the projects, but we will first need to compute the NPVs as before.

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

Este ejercicio forma parte del curso

Introduction to Financial Concepts in Python

Ver curso

Instrucciones del ejercicio

  • Compute and print the IRR of each project.
  • Set the WACC equal to 12.9%
  • Compute and print the NPV of each project.

Ejercicio interactivo práctico

Prueba este ejercicio y completa el código de muestra.

import numpy as np

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

# Calculate the IRR for Project 2
irr_project2 = ____
print("Project 2 IRR: " + str(round(100*irr_project2, 2)) + "%")

# Set the wacc equal to 12.9%
wacc = ____

# Calculate the NPV for Project 1
npv_project1 = ____
print("Project 1 NPV: " + str(round(npv_project1, 2)))

# Calculate the NPV for Project 2
npv_project2 = ____
print("Project 2 NPV: " + str(round(npv_project2, 2)))
Editar y ejecutar código