This post is a straightforward replication of the Johansen cointegration test results from Johansen and Juselius (1990) using R urca package.
R, Python, Financial Econometrics, Term Structure, Macro-Finance, Machine & Deep Learning
Showing posts with label Econometrics. Show all posts
Showing posts with label Econometrics. Show all posts
Equivalence of VAR models between original variables and their linear transformations
This post demonstrates the VAR forecasting equivalence between original variables and their linear transformations by examining a simple example.
R: The Hodrick-Prescott filter or HP filter
This post demonstrates how to apply the Hodrick-Prescott (HP) filter in R by using the hpfilter R library.
R: Beveridge–Nelson Trend and Cycle Decomposition
This post shows how to extract trend and cyclical components from a univariate time series based on the Beveridge–Nelson (BN) decomposition using tsm R package.
R : Nyholm (2018) Rotated Nelson-Siegel Model
This post implements R code to estimate the Rotated Nelson-Siegel yield curve model of Nyholm (2018)
R : Nelson-Siegel-Svensson (NSS) model with fixed or estimated constant decay parameters
This post implements the period-by-period estimation of the Nelson-Siegel-Svensson yield curve model with fixed or estimated constant decay parameters using R code.
R : VAR Impulse Response Function
This post draws the orthogonal impulse response functions from an estimated VAR model with 1 standard deviation or 1 unit shock. vars R package does not provide 1 unit shock so I implemented it using the Cholesky decomposition.
Python: The Hodrick-Prescott filter or HP filter
This post shows how to extract trend and cyclical components from a univariate time series using the Hodrick-Prescott (HP) filter. A more realistic version is the one-sided HP filter since it uses only the information available at time t, not the full sample.
R code: Understanding Dynamic Conditional Correlation (DCC) model
This post explains the structure of DCC (dynamic conditional correlation) model of Engle (2002) and then, uses rmgarch R package for estimating DCC model. This R package also provides various extended versions of DCC model.
R code: Estimation and Forecasting of GARCH Volatility model
This post uses rugarch R package for estimating GARCH model to obtain conditional volatility estimates. This R package also provides various extended versions of GARCH model such as EGARCH, GJR-GARCH, to name a few.
R code: Range-Based Volatility Estimator
This post uses TTR R package to calculate various range-based volatility estimators such as Parkinson (1980), Garman and Klass (1989) and so on.
Theil mixed estimator
This post deals with the Theil mixed estimator which uses the prior information as well as the sample information.
Generalized Least Squares (GLS) estimator
This post deals with the generalized least squares (GLS) estimator Since when deriving the Black-Litterman (BL) model, the Theil mixed estimator is used, which is a kind of GLS.
Diebold-Yilmaz Spillover Index using R package
This post explains how to use Spillover R package to calculate Diebold-Yilmaz spillover index. It measures a return or volatility spillover across asset classes and also a time series of rolling spillover index for taking time-varying spillovers into account.
SAS : how to set combined group code and concatenated group name
This post shows a SAS code to set 1) combined group number and code and 2) concatenated group name for group-by estimations.
Excel : Scan Numeric Data From a Time Series Plot Image
This post introduces a very nice scanning excel tool for scanning numerical values approximately from a plot image. We sometimes encounter the case when some academic papers show a figure plotting data which is hard to find. In this case, I think this might be useful.
SAS : Repeated Estimation of Stepwise Regressions by Group
This post presents a SAS code for estimating regression models by group with a stepwise variable selection.
SAS : Repeated Estimation of Regressions by Group
This post presents a SAS code for estimating regression models by group. The number of group is not small that multiple estimation using a do-loop is convenient. In this process, each regression model name is set to each group name.
Nelson-Siegel-Svensson Yield Curve model using R code
This post introduces Nelson-Siegel-Svensson (NSS) yield curve model which is an extension of Nelson-Siegel (NS) model with an additional curvature factor. It aims to fit longer term maturities well.
Subscribe to:
Posts (Atom)