I am a humble Milwaukeean. I write code, travel, ride two-wheeled transportation, and love my dogs. This is my blog. You can also follow as @joe@toot.works (Mastodon) or @joe@jws.social (GoToSocial).
These were taken with my phone’s 8mp camera. I have more that I took with the dslr.
Previously, we used wa-dropdown to build a state, city, and zip dropdown set, and two years ago, we looked at implementing autocomplete with Vue. Today, we are going to look at how to use Web Awesome’s Combobox component to combine the two. This demo uses the same dataset that I used for the dropdown demos. It also obviously uses the same CodePen 2.0 style that we used previously.
As before, App.vue is the core of our application. There is a ComboBox.vue file that creates the ComboBox using the wa-combobox component. Feel free to fork the pen, experiment with the code, and see how easily you can adapt it for your own Vue projects. Happy coding!
Example: https://grand-block-gar.codepen.app
The Cost of Equity can be estimated as [pmath size=10]R_s = R_f + beta*(R_m – R_f)[/pmath]
Where [pmath size=10]R_f[/pmath] is the risk-free rate, [pmath size=10]R_m – R_f[/pmath] is the market risk premium, and [pmath size=10]beta[/pmath] is the stock beta.
This assumes that the stock’s beta is the same as the project’s beta and the firm has no debt. If the assumptions are not true, the above equation would need to be adjusted.
Let’s look at a quick example. The risk-free rate of return is typically equal to the United States three-month Treasury bill rate. As of writing this, it is 0%. Lets say that the firm has a beta of 1.2 and that the new project has the same risk as the rest of the firm. Lets also say that the market risk premium equals 7%.The cost of equity would be: [pmath size=10]R_s = 0% + (1.2*7%) = 8.4%[/pmath]
According to the third edition of Corporate Finance: Core Principles & Applications, almost three-fourths of U.S. companies use the CAPM in capital budgeting.[pmath size=10]WACC = (E/V)*R_e+(D/V)*R_d*(1-T_c)[/pmath]
Where: [pmath size=10]R_E[/pmath] = cost of equity [pmath size=10]R_d[/pmath] = cost of debt [pmath size=10]E[/pmath] = the market value of the firm’s equity [pmath size=10]D[/pmath] = the market value of the firm’s debt [pmath size=10]V = E + D[/pmath] [pmath size=10]E/V[/pmath] = percentage of financing that is equity [pmath size=10]D/V[/pmath] = percent of financing that is debt [pmath size=10]T_c[/pmath] = the corporate tax rate
So, let’s look at a small example problem. Let’s say that a firm has a cost of debt of 5.2% and a cost of equity of 9.1%. Let’s also say that the corporate tax rate is 39% and the firm’s debt-equity ratio is 0.6. How would you figure out the firm’s WACC?5.2% implies 5.2 parts debt for 10 parts equity and because the value is equal to the sum of debt plus the equity, the debt-value ratio is [pmath size=10]5.2/(5.2+10)=0.342105[/pmath]. The equity-value ratio would then be [pmath size=10]10/(5.2+10)=0.657895[/pmath].
[pmath size=10].657895 * 9.1% + .342105 * 5.2% * (1 – 39%) = 0.07072 = 7.072%[/pmath]
So, now that we know what the WACC is and how it’s calculated, is there an easy way to find the WACC for a publicly traded company? Well, for better or worse, there is apparently an app for that. :)[pmath size=10]R_e = R_0 + (R_0 – R_d)*(D/E)[/pmath]
Where: [pmath size=10]R_E[/pmath] = Cost of equity [pmath size=10]R_0[/pmath] = Cost of capital for an all-equity firm [pmath size=10]R_d[/pmath] = Cost of debt [pmath size=10]D[/pmath] = Value of the firm’s debt or bonds [pmath size=10]E[/pmath] = Value of the firm’s stock or equity
According to the third edition of Corporate Finance: Core Principles & Applications, the cost of equity capital [pmath size=10]R_E[/pmath], will be positively related to the firm’s debt-equity ratio and the firm’s WACC will be invariant tot he firm’s debt-equity ratio. Using the cost of equity number, in a number of simulations can help a company determine the effects of taking on additional debt capital. As a quick programming note, before I end this post, I have turned on comments on the blog. If you would like to be part of a discussion surrounding these posts, feel free. I would love to hear your thoughts.No posts yet
This profile has no cached posts yet.