
/*  README.TXT  */

/********************************************************************************************************/
/**Programs for "Tell-tale tails: A new approach to estimating unique market information shares"       **/

by Joachim Grammig and Franziska Julia Peter  

Journal of Financial and Quantitative Analysis
Vol. 48, No. 2, April 2013

Department of Econometrics, 
Statistics and Empirical Economics
University of Tübingen
Mohlstrasse 36

D-72074 Tübingen
Germany

http://www.wiwi.uni-tuebingen.de/cms/index.php?id=881
http://www.facebook.com/tuemetrics

Tel: +49 7071 29 76009

September 2, 2011
revised September 3, 2013

/********************************************************************************************************/

Gauss Procedures to replicate results of the mixture model and information share 
(here for reference entity Ford in the credit risk application)

The zip-folder contains:

tell_tale_tails.prg (frontend program)

estimate.run (does the estimation)

boot.run (does the bootstrap)

model.src (main source file with procedures)

mixture_constraints.src (source file for retsrictions on W)

Ford_nomiss.fmt (data first column: CDS data; second column: bond market)	

readme.txt (this file)


/*******************************************************************************************************/

1. Unzip the folder contents into your home folder
   (for Windows-GAUSS: Change path to working directory*/
2. Open Gauss and run 

tell_tale_tails.prg 

!Note: the programs make use of the CML (Constraint Maximum Likelihood) library 
of GAUSS. You need to have CML installed on your computer (not the MT version) !

The program reads in the data (for reference entity "Ford") and calls the estimation and bootstrap programs.
It runs by itself. There is nothing else to do, but wait while it runs. 
Depending on the speed of your computer, the bootstrap may take a while as the model is
estimated on simulated data 399 times. On a modern Notebook under Windows7 the program run takes 90 Minutes.

If you only want to estimate parameters and information shares
and not to bootstrap, include a "stop" command in line 46 in tell_tale_tails.prg

tell_tale_tails.prg calls on 

estimate.run  and   boot.run.	 

estimate.run starts cml estimation with a diagonal W matrix and 
uses the converged parameters as starting values for the full model.
The diagonal W matrix estimation is equivalent to solving the problem (2.24). These
estimation results are also used to compute the Wald statistic (2.25)
The program also estimates 
Hasbrouck information shares. The cointegration vector is fixed to its theoretical values (1,-1) 
and the cointegration relation is demeaned (to change these settings read the definition of the global
variables in estimate.run).  estimate.run includes the source files model.src and 
mixture_constraints.src. The estimated parameters, the Wald-test statistic and other information shares
are saved as a .fmt file into the working folder. They are called on by

boot.run

to conduct the parametric residual bootstrap. The bootstrapped parameters are also saved as .fmt files into the
working folder, which are then reloaded into Gauss by tell_tale_tails.prg in order to calculate standard errors and
the specification test reults. boot.run needs model.src

3. A summary is printed into the output window:

psi_CDS        regime variance CDS market 
psi_Bond       regime variance BOND market
mix_prob       mixture probability gamma
w11            1,1 element of W
w12            1,2 element of W
w21            2,1 element of W
w22            2,2 element of W
waldpval       p-value of the Wald test of Psi_1=Psi_2 (Equation 2.25)
Lambdapval     p-value of specification test according to Equation (2.26) 
Haslow         lower bound Hasbrouck CDS market information share
Hasup          upper bound Hasbrouck CDS market information share
Hasmid         midpoint Hasbrouck CDS market information share
IS_T-CDS       Tail-dependent CDS market information share according to Equation (2.15)

Second column contains standard errors (if available)

Note: The bootstrap p-value for the Lambda-test statistic may differ slightly across GAUSS Versions. the one reported in
the paper is for GAUSS 6.043 64 bit for Linux

The run of tell_tale_tails.prg on this system yields this output:

************************
Estimation Results
************************
 psi_CDS        22.850014        4.2756282 
psi_BOND        6.4393239        1.2043198 
mix_prob       0.68109913      0.034129986 
     w11        2.6544908       0.19195255 
     w12      -0.19944481       0.39353791 
     w21       0.76520006        0.3012286 
     w22        3.6553715       0.24326498 
waldpval       0.32706059             -999 
Lambdapv             91.5             -999 
  Haslow        52.288449             -999 
   Hasup         80.02756             -999 
  Hasmid        66.158004             -999 
IS_T-CDS        83.424117       0.16361401 
/*******************************************************************************************************/