Let's say I have time series of stock prices for many stocks. What's the best way to sort the stocks based on which have been going up/stayed the same relative to others? Can this be done with a weighted average, putting more weight on the most recent numbers, to account for trends?
|
migrated from stats.stackexchange.com Oct 18 '11 at 17:51
|
This entire approach hinges on how you define "value." Once you've defined value, you can define a metric for "stability" or "risk." A working hypothesis would be that stock that have been stably valuable in the past would continue to be valuable in the future. Of course, this is a hypothesis. Let's say (for sake of an example, this is not financial advice) you define value as "mean of log returns" and stability as "standard deviation of log returns." You could then sort your stocks by these metrics and pick ones with a high value and a low risk. If you want to get fancy, you can use another metric of risk, such as drawdown. You can also do a rolling analysis or use bootstrap re-sampling to distributions around your "value" and "stability" metrics. Here's some code in R that illustrates my example:
|
|||
|
|
|
you might want to rank stocks on the basis of standard dev of a forecast divided by the forecast. In this way the "tighter" the value the more predictable the stock. |
|||||||
|
|
It sounds as if you would be interested in computing Relative Strength http://www.investopedia.com/terms/r/relativestrength.asp You could either measure it against a benchmark index such as the Dow 30, or compute your own index from your 50 stocks and measure each individual stock against the index. -Ralph Winters |
|||
|
|
|
What you are describing is momentum investing. It is typically done in two steps:
Step 1 is typically done using a moving average of past returns (it is wrong to use prices because splits and dividends will skew the results). This can be done using a simple moving average, or using exponentially weighted moving averages. In either case, your results will depend strongly on the window/half-life of the moving average. For equity momentum, most studies use momentum in the last 6-12 months excluding the most recent month or so. Step 2 may be done either using an ad hoc sorting rule (Jegadeesh and Titman (1993) use top/bottom deciles) or with the aid of a risk model. |
|||
|
|