<jupyter_start><jupyter_text>Valuing a 6-month software development project  Net Present Value (NPV) methodNPV is used extensively in corporations worldwide to value projects. Once you have forecasted the free cash flows of the project (FCF), you need to discount them back to the present at the appropriate risk adjusted discount rate (R). FCF equals cash from operations minus capital expenditures. The NPV formula is:NPV = FCF0 + FCF1/(1+R) + FCF2/(1+R)^2 + ...+ FCFn/(1+R)^n<jupyter_code>#Import modules
import numpy as np
from numpy import random as npr
import pandas as pd
import matplotlib.pyplot as plt
plt.style.use('seaborn')
#Specify model constants
daily_rate = 400
technology_charges = 1500
overhead_charges = 2000
tax_rate = 0.15

#Specify model uncertainties
n = 1000
fte = npr.uniform(low=4, high=10, size=n)
duration = npr.uniform(low=120, high=240, size=n)
price = npr.normal(loc=100, scale=50, size=n)
units = npr.normal(loc=10000, scale=5000, size=n)
discount_rate = npr.uniform(low=0.06, high=0.10, size=n)

#Specify risk factors and how they affect one another
labor_costs = fte * daily_rate * duration
technology_costs = fte * technology_charges
overhead_costs = fte * overhead_charges
revenues = price * units

#Specify target_value
free_cash_flow = (revenues - labor_costs - technology_costs - overhead_costs) * (1 - tax_rate)

#Simulate projects NPV assuming initial FCF=0
npv = free_cash_flow/(1 + discount_rate)

#Convert numpy array to pandas dataframe for easier analysis
NPV = pd.DataFrame(npv, columns=['NPV'])
NPV.describe()
#Plot histogram of NPV distribution
plt.hist(NPV['NPV'], bins=10), plt.title ('Distribution of Project NPV'), plt.xlabel('Project NPV'), plt.ylabel('Frequency'), plt.show();<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1033503691084611, 'fraction_numerical': 0.034071550255536626, 'mean_word_length': 5.7251908396946565, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '460302', 'license': 'Apache-2.0', 'n_tokens_mistral': 638, 'n_tokens_neox': 579, 'n_words': 190, 'path': 'Applying_MCS_in_Finance_Valuing_projects.ipynb', 'repo_name': 'rp775/data-science-ipython-notebooks', 'size': '1761'}