R, Python, Financial Econometrics, Term Structure, Macro-Finance, Machine & Deep Learning
Showing posts with label NelsonSiegel. Show all posts
Showing posts with label NelsonSiegel. Show all posts
R: parallel execution using foreach and %dopar%
This post provides a quick introduction to parallel execution in R using foreach and %dopar%.
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: 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.
Python: Independent Component Analysis (ICA) versus PCA
This post demonstrates the usage of Independent Component Analysis (ICA) in Python, a technique akin to PCA but focused on independent factors (source signals).
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.
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.
Python : Nelson-Siegel or Svensson model with fixed lambda
This post implements the period-by-period OLS estimation of the Nelson-Siegel and Svensson yield curve model with fixed lambda.
Python code: Estimation of Dynamic Nelson-Siegel model
This post introduces a Python library for estimation of the dynamic Nelson-Siegel (DNS).
R code snippet : Transform from long format to wide format
This post introduces a simple R code snippet for transforming the long format data to the wide format. We occasionally encounter the long format data such as yield curve data since it has two dimensions : maturity and time. For this end, we can use reshape() R built-in function.
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.
Understanding PCA 3 Factors of the Yield Curve using R code
This post explains how to decompose a movement of bond yields into 3 factors (level, slope, curvature) which is the work of Litterman and Scheinkman (1991). Using R functions for the principal component analysis and eigen decomposition, we can understand the contributions of these factors.
Non-linear Optimization by using constrOptim.nl R function
This post shows how to use constrOptim.nl() R function to solve non-linear optimization problem with or without equality or inequality constraints. Nelson-Siegel yield curve model is used as an target example. Its calculation time is faster than nloptr() function.
Non-linear Optimization of Nelson-Siegel model using nloptr R package
This post shows how to use nloptr R package to solve non-linear optimization problem with or without equality or inequality constraints. Nelson-Siegel yield curve model is used as an target example.
Run Excel Solver multiple times : Period-by-Period Estimations of Nelson-Siegel model
This post shows how to run an Excel solver using VBA macro multiple times. As an example, we take period by period estimations of Nelson-Siegel model.
Excel Solver using VBA macro : Nelson-Siegel yield curve fitting
This post shows how to run an Excel solver using VBA macro. If the number of optimization problems are more than two, every time we switch among these optimization problems, we have to change each settings for solver. It is tedious and may cause key-input errors. In this case, this approach is useful.
Bayesian Estimation of Nelson-Siegel model using rjags R package
This post shows how to use rjags R package to estimate Nelson-Siegel yield curve model based using a Bayesian MCMC in a compact way.
Subscribe to:
Posts (Atom)