From 800ea56007e09124af16a360f8a2804223072481 Mon Sep 17 00:00:00 2001 From: brandonwilliams24 Date: Thu, 5 Jan 2023 10:18:20 +0500 Subject: [PATCH 01/13] fix typo in comments --- build/lib/finmodels/ipo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/lib/finmodels/ipo.py b/build/lib/finmodels/ipo.py index 66b3709..6891df2 100644 --- a/build/lib/finmodels/ipo.py +++ b/build/lib/finmodels/ipo.py @@ -7,7 +7,7 @@ def __init__(self, initial_valuation, funds_raised, operating_income, growth_rat self.years = years def calculate_ipo_valuation(self): - # Calculate the IPO valuation using a simple discounted cash flow (DCF) model + 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) From f9e435eada71002ec61c38dbe6b19180c4a0e35d Mon Sep 17 00:00:00 2001 From: brandonwilliams24 Date: Sun, 5 Feb 2023 10:18:20 +0500 Subject: [PATCH 02/13] Remove redundant code --- build/lib/finmodels/ipo.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/build/lib/finmodels/ipo.py b/build/lib/finmodels/ipo.py index 6891df2..958f44e 100644 --- a/build/lib/finmodels/ipo.py +++ b/build/lib/finmodels/ipo.py @@ -7,7 +7,7 @@ def __init__(self, initial_valuation, funds_raised, operating_income, growth_rat self.years = years def calculate_ipo_valuation(self): - + # Calculate the IPO valuation using a simple discounted cash flow (DCF) model 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) @@ -18,12 +18,3 @@ 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() From 42cb4f23ee804f3a1834b9949fab7e3e42f95b59 Mon Sep 17 00:00:00 2001 From: brandonwilliams24 Date: Sun, 5 Mar 2023 10:18:20 +0500 Subject: [PATCH 03/13] updates in code --- build/lib/finmodels/ipo.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/build/lib/finmodels/ipo.py b/build/lib/finmodels/ipo.py index 958f44e..66b3709 100644 --- a/build/lib/finmodels/ipo.py +++ b/build/lib/finmodels/ipo.py @@ -18,3 +18,12 @@ 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() From 75ec884d3b969d97681ed391dd5cb0bcf36115e2 Mon Sep 17 00:00:00 2001 From: brandonwilliams24 Date: Wed, 5 Apr 2023 10:18:20 +0500 Subject: [PATCH 04/13] Add unit tests --- build/lib/finmodels/lbo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/lib/finmodels/lbo.py b/build/lib/finmodels/lbo.py index c022584..6548a2a 100644 --- a/build/lib/finmodels/lbo.py +++ b/build/lib/finmodels/lbo.py @@ -23,7 +23,7 @@ def calculate_free_cash_flows(self): Returns: - list: Projected free cash flows for each year. """ - # Simplified example: Assuming constant free cash flows for demonstration + average_free_cash_flow = 50 free_cash_flows = [average_free_cash_flow] * self.years return free_cash_flows From 39b1ecf213e701ee21c44f776779f2a6a314bbab Mon Sep 17 00:00:00 2001 From: brandonwilliams24 Date: Fri, 5 May 2023 10:18:20 +0500 Subject: [PATCH 05/13] bug fixing --- build/lib/finmodels/lbo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/lib/finmodels/lbo.py b/build/lib/finmodels/lbo.py index 6548a2a..c022584 100644 --- a/build/lib/finmodels/lbo.py +++ b/build/lib/finmodels/lbo.py @@ -23,7 +23,7 @@ def calculate_free_cash_flows(self): Returns: - list: Projected free cash flows for each year. """ - + # Simplified example: Assuming constant free cash flows for demonstration average_free_cash_flow = 50 free_cash_flows = [average_free_cash_flow] * self.years return free_cash_flows From 2233858f393cb843d0efd9d1831e2152f49f86bf Mon Sep 17 00:00:00 2001 From: brandonwilliams24 Date: Mon, 5 Jun 2023 10:18:20 +0500 Subject: [PATCH 06/13] Implement feature --- build/lib/finmodels/lbo.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/build/lib/finmodels/lbo.py b/build/lib/finmodels/lbo.py index c022584..d7f1788 100644 --- a/build/lib/finmodels/lbo.py +++ b/build/lib/finmodels/lbo.py @@ -53,18 +53,5 @@ def calculate_equity_returns(self): return equity_returns -# Example usage (commented out) -# acquisition_price_example = 1000 -# equity_percentage_example = 0.3 -# debt_interest_rate_example = 0.05 -# projection_years_example = 5 -# Create an instance of LBOModel (commented out) -# lbo_model = LBOModel(acquisition_price_example, equity_percentage_example, -# debt_interest_rate_example, projection_years_example) - -# 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}") -# From f3b44044ab2045617945930cacf0ab2592d7a565 Mon Sep 17 00:00:00 2001 From: brandonwilliams24 Date: Wed, 5 Jul 2023 10:18:20 +0500 Subject: [PATCH 07/13] updates in code --- build/lib/finmodels/lbo.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/build/lib/finmodels/lbo.py b/build/lib/finmodels/lbo.py index d7f1788..c022584 100644 --- a/build/lib/finmodels/lbo.py +++ b/build/lib/finmodels/lbo.py @@ -53,5 +53,18 @@ def calculate_equity_returns(self): return equity_returns +# Example usage (commented out) +# acquisition_price_example = 1000 +# equity_percentage_example = 0.3 +# debt_interest_rate_example = 0.05 +# projection_years_example = 5 +# Create an instance of LBOModel (commented out) +# lbo_model = LBOModel(acquisition_price_example, equity_percentage_example, +# debt_interest_rate_example, projection_years_example) + +# 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}") +# From eeca9735a33b044431fa44a10c58172fb69c18ec Mon Sep 17 00:00:00 2001 From: brandonwilliams24 Date: Sat, 5 Aug 2023 10:18:20 +0500 Subject: [PATCH 08/13] Fixing bugs --- build/lib/finmodels/portfolio_optimization.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/lib/finmodels/portfolio_optimization.py b/build/lib/finmodels/portfolio_optimization.py index c67024e..b43f667 100644 --- a/build/lib/finmodels/portfolio_optimization.py +++ b/build/lib/finmodels/portfolio_optimization.py @@ -14,7 +14,7 @@ def optimize_portfolio(expected_returns, covariance_matrix): """ num_assets = len(expected_returns) - # Define the variables for optimization + weights = cp.Variable(num_assets) expected_return = expected_returns @ weights risk = cp.quad_form(weights, covariance_matrix) From 6a8afb54403890289cc187b512a76c9733799804 Mon Sep 17 00:00:00 2001 From: brandonwilliams24 Date: Tue, 5 Sep 2023 10:18:20 +0500 Subject: [PATCH 09/13] Enhancing code --- build/lib/finmodels/portfolio_optimization.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/lib/finmodels/portfolio_optimization.py b/build/lib/finmodels/portfolio_optimization.py index b43f667..c67024e 100644 --- a/build/lib/finmodels/portfolio_optimization.py +++ b/build/lib/finmodels/portfolio_optimization.py @@ -14,7 +14,7 @@ def optimize_portfolio(expected_returns, covariance_matrix): """ num_assets = len(expected_returns) - + # Define the variables for optimization weights = cp.Variable(num_assets) expected_return = expected_returns @ weights risk = cp.quad_form(weights, covariance_matrix) From ede26eebc94f22a6793639414f0fdc93acd82068 Mon Sep 17 00:00:00 2001 From: brandonwilliams24 Date: Thu, 5 Oct 2023 10:18:20 +0500 Subject: [PATCH 10/13] Optimize code --- build/lib/finmodels/portfolio_optimization.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/lib/finmodels/portfolio_optimization.py b/build/lib/finmodels/portfolio_optimization.py index c67024e..7f4d55f 100644 --- a/build/lib/finmodels/portfolio_optimization.py +++ b/build/lib/finmodels/portfolio_optimization.py @@ -19,7 +19,7 @@ def optimize_portfolio(expected_returns, covariance_matrix): expected_return = expected_returns @ weights risk = cp.quad_form(weights, covariance_matrix) - # Define the objective function (maximize return, minimize risk) + objective = cp.Maximize(expected_return - 0.5 * risk) From 475d0f3f1fd73ba440aa411ef25545ed2e71e8dc Mon Sep 17 00:00:00 2001 From: brandonwilliams24 Date: Sun, 5 Nov 2023 10:18:20 +0500 Subject: [PATCH 11/13] Fix broken links --- build/lib/finmodels/portfolio_optimization.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/lib/finmodels/portfolio_optimization.py b/build/lib/finmodels/portfolio_optimization.py index 7f4d55f..c67024e 100644 --- a/build/lib/finmodels/portfolio_optimization.py +++ b/build/lib/finmodels/portfolio_optimization.py @@ -19,7 +19,7 @@ def optimize_portfolio(expected_returns, covariance_matrix): expected_return = expected_returns @ weights risk = cp.quad_form(weights, covariance_matrix) - + # Define the objective function (maximize return, minimize risk) objective = cp.Maximize(expected_return - 0.5 * risk) From 99487821597c7a6d88696b775a0aed3caef59dec Mon Sep 17 00:00:00 2001 From: brandonwilliams24 Date: Sat, 5 Nov 2022 10:18:20 +0500 Subject: [PATCH 12/13] Adding commits --- finmodels/ipo.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/finmodels/ipo.py b/finmodels/ipo.py index 66b3709..958f44e 100644 --- a/finmodels/ipo.py +++ b/finmodels/ipo.py @@ -18,12 +18,3 @@ 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() From 2e2a855ac26cb8741fc41692aeef0d5625e9eb92 Mon Sep 17 00:00:00 2001 From: brandonwilliams24 Date: Mon, 5 Dec 2022 10:18:20 +0500 Subject: [PATCH 13/13] update code --- finmodels/ipo.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/finmodels/ipo.py b/finmodels/ipo.py index 958f44e..66b3709 100644 --- a/finmodels/ipo.py +++ b/finmodels/ipo.py @@ -18,3 +18,12 @@ 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()