[R-sig-finance] Using R in equity research

Andrew West jgalt70 at yahoo.com
Tue Jun 8 03:26:52 CEST 2004


Ajay,
Yes, that's part of what I've been working on lately. 

I cover companies in the industrial and materials
sector. I can't do research just trying to apply the
major academic studies done on large universes, by
increasing my loadings on SMB, HML, earnings
surprises, and putting negative loadings on accruals
(though it's good to keep in mind). That kind of
strategy doesn't work so well within a universe of 30
companies and a 1 year measurement horizon. 

I mostly work on fundamental analysis, and DCF models,
but wanted to supplement that with value-added
relative value analysis. The typical sell-side "based
on average p/e blah blah" is quite weak, so I looked
at what Aswath Damodaran suggested in his valuation
book. He had some basic ideas of performing a
regression on one industry at one point in time,
regressing something like p/e on expected growth and
beta, for example, or ev/ebitda on some other factors.
But then he showed how the results vary widely year to
year, performing separate regressions each year, and
kind of just threw up his hands. 

Fortunately, I've got the Compustat database at work,
and can pull industry data like that for many points
in time, so I can create a longitudinal set of data
for an industry. I first tried piling multiple years
and companies into one big pile and performing a
regression on it, but I knew that would be very bad. I
asked my former NYU professor of regression for advice
on how to tackle such an analysis. He suggested using
mixed-effects models, such as nlme in R, and after
researching it and buying the Bates/Pinheiro book, and
performing some analyses, it definitely makes more
sense using this approach. Then I tie the
relationships that I find into my relative value
models using my fundemental forecasts (stuff like
growth, margins, expected leverage, etc.) as
predicting factors.

I don't expect a tight fit, but just to help make
better informed, more objective valuation estimates,
which tend to be required of a sell-side analyst. 

I definitely have to transform variables, do variable
weightings, look for outliers, check for
autocorrelations, etc. The RCMDR and NLME packages
make these things reasonably easy to do, and the best
thing about R is that I have the code for my study
after its done, so if I have second thoughts, I can go
back in fairly easily.

--- Ajay Shah <ajayshah at mayin.org> wrote:
> > I've been doing valuation studies within
> industries, looking at how
> > some valuation measures relate to company
> characteristics and
> > external factors over time. My professor suggested
> using mixed
> > effects models for such longitudinal data studies,
> and I don't have
> > a budget for this sort of thing, so using R and
> the NLME package was
> > a natural choice. I think I'm doing some things
> with it I haven't
> > seen other analysts do.
> 
> I'm not sure I understand what you are doing, but
> I've often thought
> about doing the following: Suppose you estimate
> regression models
> _within_ a homogeneous industry, where you put P/E
> or P/B on the
> l.h.s. and you use a bunch of firm characteristics
> as explanatory
> variables. Would the outliers be places to take a
> good look for a
> profit opportunity? (Is this what you have in mind?)
> 
> The problem with this (AFAICT) is that the cross
> section of accounting
> ratios / data tends to be pretty nasty in terms of
> distributions. You'll always have a few weird
> observations which drive
> the result. R might be particularly good at this, by
> virtue of
> bringing a variety of statistical and graphical
> tools to bear on weird
> observations, non-normal distributions, etc.
> 
> All this is just guesswork, I haven't actually done
> it. If you have,
> do show us examples?
> 
> -- 
> Ajay Shah                                           
>        Consultant
> ajayshah at mayin.org                      Department
> of Economic Affairs
> http://www.mayin.org/ajayshah           Ministry of
> Finance, New Delhi
> 
> _______________________________________________
> R-sig-finance at stat.math.ethz.ch mailing list
>
https://www.stat.math.ethz.ch/mailman/listinfo/r-sig-finance



More information about the R-sig-finance mailing list