# Thread: Relationship between two variables

1. ## Relationship between two variables

Hello,

I have a hobby interest in the stock market and have recently been doing some tests on different indicators. I have run into a problem however due to my very limited statistical background.

For example, one test I have run involves interest rates. I currently have two columns of data in Excel - one is the percent change in interest rate at different time periods, and the other is the stock market return going forward from that date, generally one month ahead. I want to determine (using Excel if possible) if there is a firm relationship between interest rate changes and future stock market returns and somehow quantify the strength of that relationship so that I can compare that relationship to others.

My hypothesis is that interest rate cuts tend to be followed by a rise in the stock market return, and interest rate rises tend to be followed by a decline in the return. I'm wondering what the best statistical method to use would be to determine if a trend truly exists that would indicate a relationship between interest rate changes and return? At the moment i'm really having trouble determining if my results are simply due to random noise or a more conclusive relationship. As you can probably tell, i'm a real newbie when it comes to statistics, so I would be very grateful for any help!

2. Originally Posted by Mark24
Hello,

I have a hobby interest in the stock market and have recently been doing some tests on different indicators. I have run into a problem however due to my very limited statistical background.

For example, one test I have run involves interest rates. I currently have two columns of data in Excel - one is the percent change in interest rate at different time periods, and the other is the stock market return going forward from that date, generally one month ahead. I want to determine (using Excel if possible) if there is a firm relationship between interest rate changes and future stock market returns and somehow quantify the strength of that relationship so that I can compare that relationship to others.

My hypothesis is that interest rate cuts tend to be followed by a rise in the stock market return, and interest rate rises tend to be followed by a decline in the return. I'm wondering what the best statistical method to use would be to determine if a trend truly exists that would indicate a relationship between interest rate changes and return? At the moment i'm really having trouble determining if my results are simply due to random noise or a more conclusive relationship. As you can probably tell, i'm a real newbie when it comes to statistics, so I would be very grateful for any help!

Then note that correlation does not imply causation.

CB

3. Originally Posted by CaptainBlack

Then note that correlation does not imply causation.
In the type of analysis i'm doing, a strong correlation is really all that needs to be determined. There are so many factors influencing stock prices that it would probably be nigh impossible to pin it to a single cause.

I'm trying to determine the best statistical way to identify a strong correlation between changes in different indicators and stock returns going forward. There are clear trends evident that can be seen in some indicators, but I need some way to quantify the strength of that relationship. I'd like to be able to quantify these trends somehow to compare them. Using the interest rate example again, I'd also like to be able to determine if larger returns were associated with a larger interest rate cut based upon the historical data, as this is more conclusive evidence to me that more is going on there than just random noise. I'd also like to determine how smooth of a run off in returns there are for smaller magnitudes of interest rate change. Any idea what statistical tools might best accomplish this for me?

4. Originally Posted by Mark24
In the type of analysis i'm doing, a strong correlation is really all that needs to be determined. There are so many factors influencing stock prices that it would probably be nigh impossible to pin it to a single cause.

I'm trying to determine the best (statistical) way to identify a strong correlation between changes in different indicators and stock returns going forward. There are clear trends evident that can be seen in some indicators, but I need some way to quantify the strength of that relationship. Any idea what statistical tool might best accomplish this for me?

CB

5. Originally Posted by CaptainBlack

CB
Yes - thank you. I wasn't aware there was a correlation function in Excel. I'll give that a shot.

6. Would it be better to use Spearman correlation than Pearson correlation for what i'm trying to do? And should the significance of the correlation also be taken into consideration?

Using these formulas for significance:
t test = (r-rho)/Sr
where r = pearson correlation coefficient, rho = 0, and
Sr = sqrt[(1-r^2)/(N-2)]
where N = number of samples
In excel: tdist(t,df,tails)
where df = N-2, and tails = 1

I get a probability of 0.000882 on some sample data. Am I correct that the correlation has a higher probability of being significant if this number is closer to 1? As you can probably tell, i'm kind of winging this, so let me know if i'm totally off base here.

7. Originally Posted by Mark24
Would it be better to use Spearman correlation than Pearson correlation for what i'm trying to do? And should the significance of the correlation also be taken into consideration?

Using these formulas for significance:
t test = (r-rho)/Sr
where r = pearson correlation coefficient, rho = 0, and
Sr = sqrt[(1-r^2)/(N-2)]
where N = number of samples
In excel: tdist(t,df,tails)
where df = N-2, and tails = 1

I get a probability of 0.000882 on some sample data. Am I correct that the correlation has a higher probability of being significant if this number is closer to 1? As you can probably tell, i'm kind of winging this, so let me know if i'm totally off base here.
I would be inclined to use Spearman's rank correlation coefficient myself.

CB