Skip to content

Commit

Permalink
Merge pull request #6 from tamilselvanarjun/tamil/growthfactorissue
Browse files Browse the repository at this point in the history
The correct discount factor for a DCF model should be (1 + growth_rate) instead of 1 / (1 + growth_rate)
  • Loading branch information
tamilselvanarjun authored Mar 17, 2024
2 parents 06d3a9e + 4e19c7d commit acba9ef
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions build/lib/finmodels/ipo.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def __init__(self, initial_valuation, funds_raised, operating_income, growth_rat

def calculate_ipo_valuation(self):
# Calculate the IPO valuation using a simple discounted cash flow (DCF) model
discount_factor = 1 / (1 + self.growth_rate)
discount_factor = 1 + self.growth_rate
future_cash_flows = [self.operating_income * (discount_factor ** year) for year in range(1, self.years + 1)]
total_cash_flows = sum(future_cash_flows)
ipo_valuation = self.initial_valuation + total_cash_flows + self.funds_raised
Expand All @@ -18,7 +18,6 @@ def print_summary(self):
ipo_valuation = self.calculate_ipo_valuation()
print(f"IPO Valuation after {self.years} years: ${ipo_valuation:,.2f}")


# Example usage
#initial_valuation = 500000000 # Initial company valuation before IPO
#funds_raised = 100000000 # Funds raised during the IPO
Expand Down
Binary file removed dist/finmodels-2.0.2-py3-none-any.whl
Binary file not shown.
Binary file removed dist/finmodels-2.0.2.tar.gz
Binary file not shown.
Binary file added dist/finmodels-2.0.3-py3-none-any.whl
Binary file not shown.
Binary file added dist/finmodels-2.0.3.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion finmodels.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: finmodels
Version: 2.0.2
Version: 2.0.3
Summary: finmodels is a Python package that provides various financial models for analysis and optimization.
Home-page: https://github.com/arjunlimat/finmodels
Author: Tamilselvan_Arjunan
Expand Down
3 changes: 1 addition & 2 deletions finmodels/ipo.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def __init__(self, initial_valuation, funds_raised, operating_income, growth_rat

def calculate_ipo_valuation(self):
# Calculate the IPO valuation using a simple discounted cash flow (DCF) model
discount_factor = 1 / (1 + self.growth_rate)
discount_factor = 1 + self.growth_rate
future_cash_flows = [self.operating_income * (discount_factor ** year) for year in range(1, self.years + 1)]
total_cash_flows = sum(future_cash_flows)
ipo_valuation = self.initial_valuation + total_cash_flows + self.funds_raised
Expand All @@ -18,7 +18,6 @@ def print_summary(self):
ipo_valuation = self.calculate_ipo_valuation()
print(f"IPO Valuation after {self.years} years: ${ipo_valuation:,.2f}")


# Example usage
#initial_valuation = 500000000 # Initial company valuation before IPO
#funds_raised = 100000000 # Funds raised during the IPO
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name='finmodels',
version='2.0.2',
version='2.0.3',
packages=find_packages(),
install_requires=[
'numpy',
Expand Down

0 comments on commit acba9ef

Please sign in to comment.