
************* May, 2020 ***********************************************

Milas, C., T. Panagiotidis and T. Dergiades (2020): 
Does it Matter where you Search?Twitter versus Traditional News Media. 
Journal of Money, Credit and Banking.

***************************************
The following files are provied:
***************************************

1. JMCB_data.txt
2. DPR.R
3. rHorizonSpecific.R
4. rHorizonALL.R

****************************************************************************************************************************************************
1. The JMCB_data.txt file includes the below reported variables:
****************************************************************************************************************************************************
Nu.	Variable name		Country		Period			obs.	Description 					Source
***	*********************	*********	*********************	*****	**********************************************	********************
1.	Tweets			Global 		3/5/2012 to 6/24/2016	1573	Twitter variable				Followthehashtag
2.	Traditional News	Global		3/5/2012 to 6/24/2016	1573	Traditional news variable			LexisNexis 
3.	Tweets_Orthogonalized 	Global		3/5/2012 to 6/24/2016	1573	Orthogonalized Twitter variable			Authors' calculation
4.	Global_risk 		Global		3/5/2012 to 6/24/2016	1573	Global Financial Stress Index			Bloomberg
5.	Eurozone_risk		Eurozone	3/5/2012 to 6/24/2016	1573	Euro area common risk factor			Datastream
6.	Spread_GR		Greece		3/5/2012 to 6/24/2016	1573	Bond spread (vs. German government bond yield)	Datastream 
7.	Default_risk_GR 	Greece		3/5/2012 to 6/24/2016	1573	Default risk					Datastream
8.	Liquidity_risk _GR	Greece		3/5/2012 to 6/24/2016	1573	Liquidity risk 					Datastream
9.	Spread_IE		Ireland		3/5/2012 to 6/24/2016	1573	Bond spread (vs. German government bond yield)	Datastream
10.	Default_risk_IE		Ireland		3/5/2012 to 6/24/2016	1573	Default risk					Datastream
11.	Liquidity_risk _IE	Ireland		3/5/2012 to 6/24/2016	1573	Liquidity risk 					Datastream
12.	Spread_IT		Italy 		3/5/2012 to 6/24/2016	1573	Bond spread (vs. German government bond yield)	Datastream
13.	Default_risk_IT		Italy		3/5/2012 to 6/24/2016	1573	Default risk					Datastream
14.	Liquidity_risk_IT	Italy		3/5/2012 to 6/24/2016	1573	Liquidity risk 					Datastream
15.	Spread_PT		Portugal	3/5/2012 to 6/24/2016	1573	Bond spread (vs. German government bond yield)	Datastream
16.	Default_risk_PT		Portugal	3/5/2012 to 6/24/2016	1573	Default risk					Datastream
17.	Liquidity_risk_PT	Portugal	3/5/2012 to 6/24/2016	1573	Liquidity risk 					Datastream
18.	Spread_ES		Spain 		3/5/2012 to 6/24/2016	1573	Bond spread (vs. German government bond yield)	Datastream
19.	Default_risk_ES		Spain 		3/5/2012 to 6/24/2016	1573	Default risk					Datastream
20.	Liquidity_risk_ES	Spain 		3/5/2012 to 6/24/2016	1573	Liquidity risk 					Datastream
21.	Spread_FR		France		3/5/2012 to 6/24/2016	1573	Bond spread (vs. German government bond yield)	Datastream
22.	Default_risk_FR		France		3/5/2012 to 6/24/2016	1573	Default risk					Datastream
23.	Liquidity_risk_FR	France		3/5/2012 to 6/24/2016	1573	Liquidity risk 					Datastream
****************************************************************************************************************************************************


**********************************************************************************************************************************************************************************************
2. The DPR.R is the source code (R software) for implementing the Dufour et al. (2006) causal test for two varibales of interest (cJ, cI) within tha data matrix of the selected specification
	#Do not alter the file
	Referrence: Dufour, J.M., D. Pelletier and E. Renault (2006). Short-run and Long-run Causality in Time Series: Inference. Journal of Econometrics 132, 337-362. 
**********************************************************************************************************************************************************************************************


*****************************************************************************************************************************
3. The rHorizonSpecific.R file executes the DPR source code for a specific horizon
	#in the above .R file, you need to adjust (adjust where capital "Θ" is reported) the following lines:  
		1. ydata = read.table("ΘΘΘ.txt",header=T) # ΘΘΘ is your data matrix of the selected specification
		2. cP = Θ # VAR(cP) model, with number cP of lags
		3. cD = Θ # Set to 1 if Data assumed nonstationary I(1), set to 0 if I(0) or if VAR in first-differences
		4. cN = Θ # cN = 1 : includes only constant in VAR, cN = 2 : constant plus trend
		5. cREP = ΘΘΘ # Monte Carlo simulations cREP+1
		6. cCHOR = Θ #Horizon
		7. cJ = Θ # Variable cJ in the set does not cause variable cI in the set
		8. cI = Θ
*****************************************************************************************************************************


*****************************************************************************************************************************
4. The rHorizonALL.R file executes the DPR source code for all horizons and varibales within tha data matrix 
	#in the above .R file, you need to adjust (adjust where capital "Θ" is reported) the following lines:  
		1. ydata = read.table("ΘΘΘ.txt",header=T) # ΘΘΘ is your data matrix of the selected specification
		2. cP = Θ # VAR(cP) model, number of lags
		3. cD = Θ # Set to 1 if Data assumed nonstationary I(1), set 0 if I(0) or if VAR in first-differences
		4. cN = Θ # cN = 1 : includes only constant in VAR, cN = 2 : constant plus trend
		5. cHORLIMIT = Θ # h Horizon Limit, change appropriately: max necessary = (number of auxiliary variabels)*cP+1
		6. cREP = Θ # Monte Carlo simulations cREP+1
*****************************************************************************************************************************