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 Rcode. Show all posts
Showing posts with label Rcode. 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.
Enumeration of combinations and permutations in R
This post demonstrates how to enumerate combinations and permutations using R.
R: collect the i-th or last rows of each data frame in a list of data frames
This post demonstrates selecting either the last row or the i-th row from each data frame in a list of data frames in R.
R: parallel execution using foreach and %dopar%
This post provides a quick introduction to parallel execution in R using foreach and %dopar%.
R: Creating Sequential Filenames or Folders: AA, AA_01, AA_02, ...
This post demonstrates how to generate sequential filenames or folders, like 'AA', 'AA_01', 'AA_02', and beyond.
R: Saving Lists with Renaming and Loading into a List
This post shows a streamlined list handling by saving lists with renaming and then loading them into a list for ongoing analysis.
R: Speed Up R Code using Rcpp and RcppArmadillo
This post demonstrates how to incorporate C++ code to enhance the running speed of R code, through the integration of Rcpp and RcppArmadillo. The Nelson-Siegel yield curve model serves as an illustrative example.
R: Outlier Detection with Mahalanobis Distance in R
This post demonstrates outlier detection using Mahalanobis distance with R.
R: Error in Integration with Vector Function and Its Remedy
This post illustrates how to address an error arising from the integration of one of the results of a vector function in R. A straightforward remedy is to use Vectorize().
R: Symbolic Matrix Multiplications
This post shows how to perform symbolic matrix multiplications using two R libraries.
R: Integration using R integrate() function
This post demonstrates the usage of a numerical integration function in R, integrate(), accompanied by an example featuring a slope factor-related term.
R: Shape-based decomposition of the yield-adjustment term in the AFNS model
This post covers Steeley (2014) shape-based decomposition of the yield-adjustment term in the AFNS model using R.
R: Conversion between Lower Triangular Matrix and Vector
This post shows how to convert a lower triangular matrix into a vector or vice versa using R code.
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: Using Differential Evolution to the Nelson-Siegel model
This post demonstrates the application of Differential Evolution (DE) to estimate Nelson-Siegel parameters using the NMOF R package.
R: Apply Particle Swarm Optimization to the Nelson-Siegel model
This post shows how to apply the Particle Swarm Optimization (PSO) to estimate the Nelson-Siegel parameters using pso R package.
Subscribe to:
Posts (Atom)