Posts by: WST Expert 1

Re: WLSRegression using Excel VBA
It looks like you can get rid of the #VALUE error by removing the bcnt loop as we discussed previously. In other words, try setting OLSregression = b in your final line of the first function. With some admittedly unrealistic data, we managed to just get a bunch of 0s for the values. Would you by ... Read More
Go to post added 8 years ago
Re: DCF modeling in an M&A situation
Hi Leon, 1. In listed co's 2016 financials, the investment in Company A will most likely be accounted for using the equity method. Strip out company A's earnings to project the list co on a standalone basis. Project both companies separately and combine as part of your consolidation. 2. For yo... Read More
Go to post added 8 years ago
Re: Suitable course
We would recommend three courses: 1) Advanced Financial Modeling: Core Model course - this will give you the integrated statement projection modeling 2) Segment Build-up Modeling - this will give you the process on constructing more detailed drivers of revenue and expenses 3) The debt piece in En... Read More
Go to post added 8 years ago
Re: WLSRegression using Excel VBA
You could actually simplify this by removing (try commenting first, of course) every line after your declaration of b. Then, your last line will just be: WLSregression = b Or you can just skip the need for b completely and just have: WLSregression = Application.WorksheetFunction.MMult(XwXin... Read More
Go to post added 8 years ago
Re: WLSRegression using Excel VBA
Actually, if you extend to a fourth cell, you should get the missing number.

Using the data and code you provided, we're getting these four numbers:

0
22.11698721
0.01370646
-1.032383816
Go to post added 8 years ago
Re: WLSRegression using Excel VBA
Hi Brendan, After looking through your code a bit more, it looks like it actually does work as intended, as long as you first select three cells going across, paste in the formula, and hit Ctrl + Shift + Enter to make it an array formula. The formula I tested with is: =TRANSPOSE(WLSregression... Read More
Go to post added 8 years ago
Re: I answered my own
Hi Peter,

Glad to hear that you were able to figure it out before we could post a response to you. The implications of random walk can be a bit tricky sometimes!
Go to post added 8 years ago
Re: WLSRegression using Excel VBA
Let's start with that random data you have there. We could do a few useful things, like generate a covariance matrix, etc.

What's the desired behavior of the WLSregression function? Should it calculate and then return the three calculated coefficients, or something else?
Go to post added 8 years ago
Re: WLSRegression using Excel VBA
Hi Brendan, Just to make sure we understand the desired effect: how do you envision the usage of the Diagonal function? It looks like you're giving it a range of cells (I suppose it would be any NxN matrix on your spreadsheet), and return the elements of the main diagonal. For example, you mig... Read More
Go to post added 8 years ago
Re: VLOOK and MATCH
Hi Peter, In step 3, the MATCH function will always only point you to one value/position. In other words, if on those three trading dates, the stock all closed at exactly $50.00, then your result would simply show the first date in the search. So in this case, the latest dates are at the top, des... Read More
Go to post added 8 years ago