Serving the Quantitative Finance Community

 
User avatar
Pascoe
Topic Author
Posts: 0
Joined: February 16th, 2010, 3:10 pm

Granger Causality Spreadsheet

March 10th, 2010, 7:06 am

Hi,First post. Just want to know if anyone has a spreadsheet, or knows of the existence of one, whereby I can plug in two data series and test to see if one granger causes the other. I'm most definitely NOT a quant so go gently please. Something fairly user friendly and robust needed.Thanks a lotPascoe
Last edited by Pascoe on March 9th, 2010, 11:00 pm, edited 1 time in total.
 
User avatar
acastaldo
Posts: 14
Joined: October 11th, 2002, 11:24 pm

Granger Causality Spreadsheet

March 10th, 2010, 10:55 pm

It is not quite as simple as that.In essence Granger causality involves building a (linear) model to predict A based on past values of B, then building a model to predict B based on past values of A, and finally comparing these two models.The model building requires that a human being (econometrician) make some decisions (eg. how may lags are you going to use in each model, are you going to use levels or differences, raw data or logs) and, importantly, review the fitted equations to make sure the models are reasonably satisfactory. It would be difficult to completely automate this process IMHO.I other words it is not like a Student t test where you just plug some number into a formula, there is a small but nonzero element of judgement/skill involved. You must have experience in fitting equations to data.
 
User avatar
Pascoe
Topic Author
Posts: 0
Joined: February 16th, 2010, 3:10 pm

Granger Causality Spreadsheet

March 11th, 2010, 7:35 am

Thanks for the response. I was basically aware that there may be some additional inputs required. Wasn't quite expecting to be able to simply plug in 2 time series (although, reading my post, I see now that this is EXACTLY how I must have come across). And (I think) I do understand the basic concept underpinning it (or my wanting to use it would be a little premature imho if I had no idea what sort of tool I were using).Ok, so maybe the better question to ask is; I have a bunch of time series data for various instruments and economic data, and some suspicions regarding cause and effect. I am not a quant and at the moment I don't have, for example, Matlab or anything similar. But I am however proficient in Excel. What's the best way to proceed if I think that Granger causality may be worth testing for?
 
User avatar
Hansi
Posts: 41
Joined: January 25th, 2010, 11:47 am

Granger Causality Spreadsheet

March 11th, 2010, 11:11 pm

Here is matlab code that does this by choosing the nr. lags based on BIC.Should be easy to translate into VBA for use with Excel and even use predefined nr. of lags instead of the BIC defined one.Post back if you get stuck on writing this up in VBA.
Last edited by Hansi on March 11th, 2010, 11:00 pm, edited 1 time in total.
 
User avatar
acastaldo
Posts: 14
Joined: October 11th, 2002, 11:24 pm

Granger Causality Spreadsheet

March 11th, 2010, 11:24 pm

If you don't have Matlab, consider the free substitutes GNU Octave and Scilab. You may have to make minor changes to the code, but at least you will be building on a solid regression package. Exhell/VBA does not qualify IMHO.
 
User avatar
Tdenton8772
Posts: 0
Joined: June 3rd, 2014, 2:54 pm

Granger Causality Spreadsheet

June 4th, 2014, 12:30 pm

Hansi, I realize this thread is very old. But if you are still on here or someone else has the knowledge, I am trying to do the same thing Pascoe was. I built a vba function modelling your matlab code but since I am not familiar with matlab I had to make a few guesses. (Incorrect ones apparently) It seems matlab is much better at generating arrays and analyzing them than vba. If you have the VBA code I would really appreciate you posting it. Thank youTyler
 
EIUpanther
Posts: 1
Joined: January 11th, 2017, 7:28 pm

Re: Granger Causality Spreadsheet

January 11th, 2017, 7:58 pm

Good afternoon,
I realize my question is 2.5 years after the last post on this thread; however, I have the same question and do not see an answer. 

**NEWB / Student**, please go easy.

Given two samples (from the same 20 year period) of Percent Changes in:
 Quarterly RealGDP (USA) and Quarterly CPI (USA)
and... without using standard stats packages, only using Excel or Excel+VBA
does anyone have a spreadsheet based solution for Granger Causality? 

I am trying to understand "how" this works, not just be a monkey on a keyboard.
THANK YOU