Why does my results from my code dont match the papers results? I am doing price discovery forgeneralized information share (GIS) and Gonzalo and Granger permanent-temporary decomposition (PT-GG) based information share measures for the spot, futures, and three ETFs.
where β and α are n×(n−1) matrices of rank n−1. The columns of β consist of the n−1 cointegrating vectors, and each column of α consists of the adjustment coefficients. The matrix Π is decomposed in such a way that βTYt represents the vector of n−1 stationary series. Let Ω denote the n×n covariance matrix of the innovation vector, i.e., E[εtεtT]=Ω. Following Stock and Watson (1988), equation (1) can be transformed into the following two equivalent vector moving average (VMA) representations (Hasbrouck, 1995):
Based on the above representations, Ψ(1)εt represents the long-run impact of innovations on the unit-root series (Hasbrouck, 1995). Different information share measures considered by Hasbrouck (1995), Lien and Shrestha (2009), and Lien and Shrestha (2014) are based on this term.
\textbf{GENERALIZED INFORMATION SHARE (GIS) MEASURES}
Based on the above framework, we first discuss the GIS measure. Note that, in this study, we have five non-stationary series with four cointegrating vectors. Therefore, the cointegrating vector represented by matrix β can be expressed as follows:
In other words, equation (4) implies that the first row of Ψ(1) is equal to the γj−1 times the jth row of Ψ(1). Therefore, the long-run impact of innovations on the ith series is respectively given by
where ψij is the jth element of ψir and Ωij is the (i,j)th element of Ω.
Let Sj,i denote the contribution of the innovation of series j to the total variance of the \textit{long-run impact} of innovation on series i. Then, we have the following:
Note that Sj,i is independent of i. Therefore, the contribution of the innovation of series j to the total variance of the \textit{long-run impact} of innovation on any series will be the same. It is important to note that Sj,i given by equation (9) is valid only when the innovations are independent. However, in general, the innovations are not independent. When the innovations are not independent, we diagonalize the correlation matrix and end up with the GIS measure proposed by Lien and Shrestha (2014). Let Λ be a diagonal matrix containing the eigenvalues of the innovation correlation matrix on the diagonal, where the corresponding eigenvectors are given by the columns of matrix G. Then, we can calculate the information share of the jth series as follows:
where ψ1G=ψ1rFM,FM=[GΛ−1/2GTV−1]−1 and ψjG is the jth element of ψ1G. The information share measure given by equation (10) is referred to as the generalized information share (GIS) measure. It can be shown that the GIS measure is independent of ordering. Therefore, the GIS method leads to a unique information share, unlike the upper and lower bound for Hasbrouck IS measure.
\vspace{1cm}
\textbf{GONZALO-GRANGER PERMANENT TEMPORARY DECOMPOSITION (PT/GG) INFORMATION SHARE}
Here, we briefly describe the PT/GG method. Gonzalo and Granger (1995) propose a way of decomposing the vector of non-stationary series Yt into permanent component ft (non-stationary series) and transitory (stationary) component Y^t, where the identification of these components is achieved by assuming that (i) the permanent component is a linear function of the original series and that (ii) the transitory component does not Granger cause the permanent component in the long-run.
The permanent component ft (under the linearity condition) can be written as:
[
f_t = \mu^T Y_t \tag{11}
]
where μ is an n×1 (or, 5 × 1 in this study) permanent component coefficient vector which can be shown to be orthogonal to the adjustment coefficient matrix α, i.e., μ=α⊥.
In our study, since we have five unit-root series, the permanent component, ft can be represented by:
[
f_t = \mu_1 Y_1 t + \mu_2 Y_2 t + \cdots + \mu_5 Y_5 t \tag{12}
]
If all the elements of μ are non-negative, then the PT/GG based information share of the ith series is given by:
In the case of non-negative μ, its elements correspond to the contribution of individual series to the permanent component. Therefore, the above definition of price discovery makes sense. However, there is no guarantee that all the elements of μ will be non-negative. It is important to note that the negative elements of μ may not necessarily lead to problems. For example, if some of the unit-root processes are negatively related to the common-stochastic trend, we expect the corresponding elements of μ to be negative. In such cases, where the negative elements of μ are valid, we can use the following definition of information share:
However, if some of the elements of μ are unexpectedly negative, one way to compute the PT/GG based information share is to replace the negative elements with zero and use equation (13). However, this will lead to all negative elements having zero information share regardless of their absolute value. Alternatively, we can add a constant number to each element of μ to obtain μ∗ so that the series with the most negative element in μ will have zero information share. This method will result in the following information share measure:
The data starts from 6 December 2007 to 31 December 2019, with a total number of 3,012 observations. We chose the starting date to be 6 December 2007 because this is the earliest date for which the data for all five prices are available. The data set includes the daily WTI crude oil spot and near month crude oil futures prices. The data set also includes prices of three crude oil future-based ETFs. We focus on oil ETFs that replicate the WTI spot Cushing through the nearby month futures contracts. The three oil ETFs that replicate the WTI spot Cushing through the nearby month futures contracts are:
\begin{itemize}
\item United States Oil Fund (USO),
\item iPath S&P GSCI Crude Oil Total Return (OIL), and
\item United States 12 Month Oil Fund (USL).
\end{itemize}
Throughout the empirical analyses, we use the logarithm of the prices. Table 1 presents detailed information on the three oil-based ETFs, including their ticker codes, inception dates, asset under management, and trading volumes. The USO accounts for around 77% of the assets under management, while OIL and USL account for 19% and 4%, respectively.
\begin{table}[ht]
\centering
\caption{Information of ETFs}
\begin{tabular}{|l|l|l|l|l|}
\hline
\textbf{Ticker Code} & \textbf{ETFs} & \textbf{Inception Date} & \textbf{Asset Under Management} & \textbf{Trading Volume}
& & & \textbf{(in USD million)} & \ \hline
U:USO & United States Oil Fund & 10-04-2006 & 2,510 & 16,012,332
U:OIL & iPath S&P GSCI Crude Oil Total Return ETN & 16-08-2006 & 628.87 & 7,109,239
U:USL & United States 12 Month Oil Fund Limited Partnership & 06-12-2007 & 104.84 & 26,720 \ \hline
\end{tabular}
\end{table}
The price discovery is measured using GIS and PT/GG information share measures. To compute these two IS measures, we need to validate that each of the log-price series used in this study is non-stationary with a single unit-root. We use the Phillips-Perron (PP) unit-root test, where the unit-root is the null hypothesis. Table 2 presents the unit-root test results for the crude oil spot, futures, and the three ETFs.
***, **, * indicate the test statistic to be significant at the 1%, 5%, and 10% significance levels, respectively.
All the PP test statistics for log-price series are insignificant, even at the 10% level. Also, all the PP test statistics for the first differenced log-price series are significant even at the 1% level. These results indicate that all the series are integrated of order one, i.e., each of the series consists of a single unit-root. To check the robustness of our test results, we also apply the KPSS test, where the null hypothesis is stationarity. The KPSS test statistics for log prices are highly significant even at the 1% level, which rejects the null hypothesis of stationarity.
However, none of the KPSS statistics is significant for the first differenced series even at the 10% level. Therefore, both PP and KPSS tests reveal a consistent result where each of the series consists of a single unit-root.
We then proceed to examine the number of cointegrating vectors. As discussed earlier, we are dealing with five series. Therefore, to compute GIS and PT/GG information share measures, we need to establish that there are four cointegrating vectors. We apply the Johansen (1991) cointegration test to find the number of cointegrating vectors. Table 3 reports the λmax and Trace statistics. The λmax statistics for the number of cointegrating vectors (r) less than or equal to 3 is significant even at the 1% level. However, the λmax statistics for the number of cointegrating vectors (r) less than or equal to 4 is insignificant even at the 10% level. Similarly, the Trace statistics for the number of cointegrating vectors (r) less than or equal to 3 is significant at the 1% level. Therefore, we conclude that the number of cointegrating vectors is equal to 4.
with γ1=0.9999, γ2=0.4034, γ3=0.3467, and γ4=0.6690. Even though γ1 is approximately equal to 1, other γs are significantly different from 1. Therefore, Hasbrouck information shares cannot be computed in this case. The GIS and PT/GG methods are the right models to use in such a case.
The GIS measures for the five series are presented in Table 4. Only approximately 41 percent of the price discovery takes place in the futures market. The remaining 59 percent of the price discovery takes place in the other four markets that include the spot and the three ETF markets. Approximately 25 percent of the price discovery occurs in the USO market. As to the remaining two ETFs, around 11 and 6 percent of the price discovery take place in the USL and OIL markets, respectively. In total, approximately 42 percent of the price discovery takes place in the three ETFs markets.
In sum, we find that ETFs play a significant price discovery role, and additional ETFs play an additional price discovery role. Therefore, additional ETFs are not redundant.
\end{document}
Reproducing results from academic papers can often be challenging due to the intricate details involved in the methodologies and implementations. Based on the information and code you've provided, there are several potential reasons why your results for the Generalized Information Share (GIS) and Gonzalo-Granger Permanent-Temporary (PT-GG) decomposition measures differ from those reported in the paper.
1. Incorrect Computation of psi_1^G in GIS Calculation
Issue:
In your code, you compute psi_1_G by extracting only the first row of the Psi_1 matrix and then applying the transformation using F_M. Specifically, you have:
r
psi_1_r <- matrix(Psi_1[1, ], ncol = 1) # Extracts only the first row
psi_1_G <- t(psi_1_r) %*% F_M # Results in a scalar
This approach only captures the impact on the first series (log_Spot) and ignores the contributions from the other series (log_Fut, log_USO, log_OIL, log_USL). Consequently, when you calculate the numerator for the GIS:
r
numerator <- as.vector(psi_1_G^2)
you're only using the information from log_Spot, leading to inaccurate GIS measures for the other series.
Solution:
You should use the entire Psi_1 matrix to compute psi_1_G for all series. Here's how you can adjust the computation:
r
# Step 12: Compute psi_1^G correctly for all series
psi_1_G <- Psi_1 %*% F_M # Psi_1 is a 5x1 matrix, F_M is 1x1, resulting in a 5x1 matrix
# Step 13: Compute numerator and denominator for GIS calculation
numerator <- as.vector(psi_1_G^2) # Element-wise square
denominator <- as.numeric(t(Psi_1) %*% Omega %*% Psi_1) # Scalar denominator
# Step 14: Compute GIS measures
GIS_measures <- numerator / denominator
# Normalize GIS measures to sum to 1
GIS_measures <- GIS_measures / sum(GIS_measures)
# Assign names to GIS measures
names(GIS_measures) <- colnames(Y)
# Display GIS measures
print("Generalized Information Share (GIS) Measures:")
print(GIS_measures)
Explanation:
Psi_1 Matrix: When dealing with (n - r) = 1 (where n is the number of series and r is the number of cointegrating vectors), Psi_1 becomes a 5x1 vector. Each element of this vector corresponds to the long-run impact of innovations on each series.
psi_1_G: Multiplying Psi_1 by F_M ensures that you're capturing the transformation for all series, not just the first one.
Numerator and Denominator: The numerator now correctly includes contributions from all series, and the denominator remains a scalar that normalizes these contributions.
Normalization: Ensures that the GIS measures sum to 1, making them comparable across series.
2. Validation of Cointegration and VECM Specifications
Ensure that the cointegration rank (r = 4) and the lag length selection (p = 5 using Schwarz Criterion) align precisely with the paper's methodology. Any deviation here can lead to differences in the estimated parameters (beta, alpha), which subsequently affect the GIS and PT-GG measures.
Verification Steps:
Cointegration Rank: Double-check the Johansen test results to confirm the correct number of cointegrating vectors.
Lag Length: Ensure that the lag selection (p = 5) is consistent with the paper. Even minor differences in lag length can significantly impact the VECM estimates.
3. Correct Implementation of Step 10 and 11
The computation of F_M involves eigenvalues and eigenvectors from the residual correlation matrix. Ensure that:
Eigen Decomposition: The eigenvalues (Lambda) and eigenvectors (G) are correctly extracted from the correlation matrix.
Matrix Operations: The matrix operations involving Lambda_inv_sqrt and V_inv are correctly implemented to avoid dimensional mismatches or computational errors.
4. Data Preprocessing and Alignment
Ensure that your data preprocessing steps (like log transformations and differencing) exactly match those described in the paper. Differences in data handling can lead to variations in unit root test results and subsequent analyses.
Key Points to Check:
Date Range and Frequency: Confirm that the date range and frequency of your data align with the paper.
Handling of Missing Values: Ensure that any missing data is handled similarly (e.g., using na.omit).
5. Validation of PT-GG Measures
After correcting the GIS computation, revisit the PT-GG measures to ensure they're calculated based on the accurate mu vector. The PT-GG measures depend on the permanent components, which are derived from the alpha_perp matrix. Ensure that:
Orthogonal Complement (mu): Properly computed and normalized.
Handling Negative Elements: Correctly addressed as per the methodology (either by adjustment or taking absolute values).
6. Consistent Normalization and Scaling
Ensure that all normalization steps (e.g., scaling mu or GIS measures to sum to 1) are consistent with the paper's approach. Inconsistent scaling can lead to proportionally incorrect measures.
Final Revised GIS Calculation Example
Here's a revised version of your GIS computation incorporating the corrections:
r
# Step 12: Compute psi_1^G correctly for all series
psi_1_G <- Psi_1 %*% F_M # 5x1 matrix
# Step 13: Compute numerator and denominator for GIS calculation
numerator <- as.vector(psi_1_G^2) # Element-wise square (vector of length 5)
denominator <- as.numeric(t(Psi_1) %*% Omega %*% Psi_1) # Scalar
# Step 14: Compute GIS measures
GIS_measures <- numerator / denominator
# Normalize GIS measures to sum to 1
GIS_measures <- GIS_measures / sum(GIS_measures)
# Assign names to GIS measures
names(GIS_measures) <- colnames(Y)
# Display GIS measures
print("Generalized Information Share (GIS) Measures:")
print(GIS_measures)
Expected Outcome:
By implementing these corrections, your GIS measures should align more closely with those reported in the paper. Specifically, you should observe:
Higher Contribution from the Futures Market: Approximately 40% as reported.
Significant Contributions from ETFs: Reflecting the non-redundant roles of USO, OIL, and USL.
Additional Recommendations:
Reproduce Step-by-Step: Go through each step of the methodology as outlined in the paper, ensuring that every transformation and computation matches precisely.
Cross-Validation: Compare intermediate results (like beta, alpha, Psi_1, Omega) with those reported in the paper (if available) to identify where discrepancies begin.
Consult Supplementary Materials: If the paper provides supplementary code or data, use them as references to ensure your implementation aligns.
Reach Out to Authors: If discrepancies persist, consider reaching out to the paper's authors for clarification on specific implementation details.
By meticulously verifying each step and ensuring that all computations align with the paper's methodology, you should be able to reconcile your results with those reported in the study.