開始使用免費開始

不同專案年限下計算 IRR 與 NPV

既然你已經計算出 WACC,就可以計算並比較各專案的 IRR 與 NPV。

雖然 IRR 在不同專案間具有一定可比性,但 NPV 就不那麼容易比較了,因為專案 1 多了一年的期間。

幸好,在下一個練習中,我們會介紹另一種比較各專案 NPV 的方法;不過在此之前,我們需要先照前面的方式把 NPV 算出來。

專案 1 與專案 2 的現金流分別已提供為 cf_project1cf_project2

本練習屬於課程

Python 金融概念入門

檢視課程

練習說明

  • 計算並印出每個專案的 IRR。
  • 將 WACC 設為 12.9%。
  • 計算並印出每個專案的 NPV。

動手互動練習

試著完成這個範例程式碼,體驗一下這個練習。

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)))
編輯並執行程式碼