# Normalisation for regression

First off, I know little about statistics, so some of this question may seem naive.

I'm trying to perform linear regression to model the relationship between x and y where:

-x is a company's daily stock volume on a date

-y is variable that is taken from the same date, however is something unrelated to stock volume. It is the volume of activity on that wikipedia for that company.

I assume that the variables need normalising. Specifically, x needs to be normalised as overall index volume fluctuates. My first thoughts were to divide the daily volume by the total index volume. I'll do the same with the y variable.

I just wondered if this seems sensible? Thanks

EDIT:

I've just noticed a typo in the question, the Y variable description has changed.

• Your question isn't all that clear, but it does seem like you have data collected over time. If this is the case, regression is not appropriate. You need to account for the nonindependence of the data. Two general sets of methods are time series analysis and mixed models (aka multilevel models, hierarchical linear models and other terms). Commented Aug 14, 2011 at 12:37
• @peter flom, Data collected over time need not be time dependent, and even if it is, it may not make that much difference to your results. It depends on the situation and on what information you have. Moominpappa - just wondering, why do you think the variables need to be normalised? What problem do you think will be caused by not normalising? Commented Aug 14, 2011 at 13:49
• @probabilityislogic, it 'feels' as though the data should be normalised. For example, on day$_1$ the index volume is 1000 and security volume is 100, and on day$_2$ the index volume is 10,000 and the security volume is 100. Looking at the security volumes alone doesn't seem 'fair', so i thought that they should be normalised so they are more reflective of volume on that day, so 100/1000 for day$_1$ and 100/10,000 for day$_2$. Commented Aug 14, 2011 at 15:30
• Well, you can test it yourself. You have stock volume data, simply check if it's autocorrelated. Commented Aug 14, 2011 at 18:14
• @Iterator let us continue this discussion in chat Commented Aug 14, 2011 at 18:32

It's fairly common practice to log-transform financial data. You could also look through the rest of the family of Box-Cox transformations, and stop when you judge the distribution to be normal. You're idea to divide daily volume by total index volume is a good one, but that distribution STILL may not be normal.

Furthermore, Volume (and possibly your Y variable) are likely to-be auto-correlated, so you need to deal with this as well. Commonly, you can deal with auto-correlation by differencing: rather than using Today's Volume as Y, use (Today's Volume-Yesterday's Volume)/(Today's Volume) as Y. However, if you are unlucky, the differenced series will also be auto-correlarted, and then you disappear down the rabbit hole of time-series analysis...

On the other hand, if you are lucky, differencing and log-transformations will be sufficient for your data, and you can use linear regression to build your models. One extra check you should do during your model building is to check for auto-correlation in your errors. If you can't get rid of the error auto-correlation, try a method of regression that is robust to these sorts of errors.

/Edit: as @whuber noted, differencing is only needed if your residuals are auto-correlated. If your regression model removes the apparent auto-correlation in the y variable, you are all set.

• Whether y exhibits serial correlation is immaterial in the regression context: what matters is the nature of correlation among the residuals. It can happen--and often does--that the apparent autocorrelation in the dependent variable is due solely to autocorrelation in the independent variables, but after regression, there are independent residuals. Its seems likely that's the case for these data. Whether it is or not is easily checked: do the regression and test the residuals! But please don't do the differencing first: that's not the model that's needed here.
– whuber
Commented Aug 16, 2011 at 15:15

Honestly this is more of a finance question than a stats one. (I'm new to CV but have been finding a huge number of questions on here about forecasting financial time series!)

Anyway, it always helps to normalize your variables as much as possible. A guiding principle might be that we should always be able to meaningfully compare two individual datapoints. So if you're looking at volume of a single stock over time, you probably want to adjust by total market volume; if you're looking at multiple different stocks, you might want to adjust by shares outstanding so as to not bias the numbers for large vs small cap issuers.

• I agree. I now think that the question is not suitable for the site. Commented Aug 16, 2011 at 14:55
• @Moom It's fine for the site. Unfortunately it's rather broad as stated, because you don't offer details about the characteristics of your data. Thus it's really a general question about whether it can make sense to re-express data (yes) and how to go about doing it (it depends on many things). Look at data-transformation for examples and guidance.
– whuber
Commented Aug 16, 2011 at 15:17