Skip to content

Commit

Permalink
added ipo model for new version 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tamilselvanarjun committed Mar 12, 2024
1 parent f14190f commit a7c9663
Show file tree
Hide file tree
Showing 13 changed files with 79 additions and 2 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@

`Portfolio Optimization`: Optimize portfolio allocations using Mean-Variance Optimization to balance returns and risk.

`The Leveraged Buyout (LBO) Model`: LBO Model is a financial analysis tool used in corporate finance for

evaluating the acquisition of a company using a significant amount of borrowed funds.

`IPO Model`: IPO Model is a simple Python script for calculating the Initial Public Offering (IPO) valuation using a discounted cash flow (DCF) model.


#### Installation

You can install the package using `pip`:
Expand Down Expand Up @@ -58,6 +65,20 @@ equity_returns_result = lbo_model.calculate_equity_returns()
print(f"Equity Returns for each year: {equity_returns_result}")
```

#### Example usage of IPO Model
```
import finmodels as fm
# Example usage
initial_valuation = 500000000 # Initial company valuation before IPO
funds_raised = 100000000 # Funds raised during the IPO
operating_income = 75000000 # Annual operating income before IPO
growth_rate = 0.05 # Annual growth rate of operating income
years = 5 # Number of years for the IPO model
ipo_model = fm.IPOModel(initial_valuation, funds_raised, operating_income, growth_rate, years)
ipo_model.print_summary()
```

#### Contributors
Tamilselvan Arjunan
#### License
Expand Down
1 change: 1 addition & 0 deletions build/lib/finmodels/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
from .dcf import calculate_dcf
from .portfolio_optimization import optimize_portfolio
from .lbo import LBOModel
from .ipo import IPOModel

30 changes: 30 additions & 0 deletions build/lib/finmodels/ipo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
class IPOModel:
def __init__(self, initial_valuation, funds_raised, operating_income, growth_rate, years):
self.initial_valuation = initial_valuation
self.funds_raised = funds_raised
self.operating_income = operating_income
self.growth_rate = growth_rate
self.years = years

def calculate_ipo_valuation(self):
# Calculate the IPO valuation using a simple discounted cash flow (DCF) model
discount_factor = 1 / (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
return ipo_valuation

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
#operating_income = 75000000 # Annual operating income before IPO
#growth_rate = 0.05 # Annual growth rate of operating income
#years = 5 # Number of years for the IPO model

#ipo_model = IPOModel(initial_valuation, funds_raised, operating_income, growth_rate, years)
#ipo_model.print_summary()
1 change: 1 addition & 0 deletions build/lib/finmodels/lbo.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,5 @@ def calculate_equity_returns(self):
# Calculate and print equity returns (commented out)
# equity_returns_result = lbo_model.calculate_equity_returns()
# print(f"Equity Returns for each year: {equity_returns_result}")
#

Binary file removed dist/finmodels-1.0.2-py3-none-any.whl
Binary file not shown.
Binary file removed dist/finmodels-1.0.2.tar.gz
Binary file not shown.
Binary file added dist/finmodels-2.0.0-py3-none-any.whl
Binary file not shown.
Binary file added dist/finmodels-2.0.0.tar.gz
Binary file not shown.
23 changes: 22 additions & 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: 1.0.2
Version: 2.0.0
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 All @@ -21,6 +21,13 @@ Requires-Dist: cvxpy

`Portfolio Optimization`: Optimize portfolio allocations using Mean-Variance Optimization to balance returns and risk.

`The Leveraged Buyout (LBO) Model`: LBO Model is a financial analysis tool used in corporate finance for

evaluating the acquisition of a company using a significant amount of borrowed funds.

`IPO Model`: IPO Model is a simple Python script for calculating the Initial Public Offering (IPO) valuation using a discounted cash flow (DCF) model.


#### Installation

You can install the package using `pip`:
Expand Down Expand Up @@ -72,6 +79,20 @@ equity_returns_result = lbo_model.calculate_equity_returns()
print(f"Equity Returns for each year: {equity_returns_result}")
```

#### Example usage of IPO Model
```
import finmodels as fm
# Example usage
initial_valuation = 500000000 # Initial company valuation before IPO
funds_raised = 100000000 # Funds raised during the IPO
operating_income = 75000000 # Annual operating income before IPO
growth_rate = 0.05 # Annual growth rate of operating income
years = 5 # Number of years for the IPO model

ipo_model = fm.IPOModel(initial_valuation, funds_raised, operating_income, growth_rate, years)
ipo_model.print_summary()
```

#### Contributors
Tamilselvan Arjunan
#### License
Expand Down
1 change: 1 addition & 0 deletions finmodels.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ README.md
setup.py
finmodels/__init__.py
finmodels/dcf.py
finmodels/ipo.py
finmodels/lbo.py
finmodels/portfolio_optimization.py
finmodels.egg-info/PKG-INFO
Expand Down
1 change: 1 addition & 0 deletions finmodels/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
from .dcf import calculate_dcf
from .portfolio_optimization import optimize_portfolio
from .lbo import LBOModel
from .ipo import IPOModel

1 change: 1 addition & 0 deletions finmodels/lbo.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,5 @@ def calculate_equity_returns(self):
# Calculate and print equity returns (commented out)
# equity_returns_result = lbo_model.calculate_equity_returns()
# print(f"Equity Returns for each year: {equity_returns_result}")
#

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='1.0.2',
version='2.0.0',
packages=find_packages(),
install_requires=[
'numpy',
Expand Down

0 comments on commit a7c9663

Please sign in to comment.