# DSFM2D: Estimation of Dynamic Semiparametric Factor Model for... In MarcGumowski/dysefamor: Estimation Algorithm of Dynamic Semiparametric Factor Model

## Description

DSFM2D performs a model estimation using Dynamic Semiparametric Factor mechanics with two-dimensional covariates. This function is called by the DSFM main function.

## Usage

 1 2 DSFM2D(data, numDataPoints = 25, h = c(0.5, 0.5), L = 3, initialLoad = "WN", tol = 1e-05, maxIt = 301) 

## Arguments

 data a matrix containing time indicator in first row, value Y_{t,j} in second row, and the coordinates X_{t,j} in the two remaining rows. Proper formatting has to be done using the DSFM2DData. numDataPoints the number of points in the axis of the grid to perform the kernel density estimation. h the bandwidth used to perform the kernel density estimation. can be a single global parameter, a vector of two bandwidths (one by dimension) or a matrix of size numDataPoints x 2 for local bandwidth. L the number of underlying factors. initialLoad the type of initial loadings to choose between White Noise "WN", and AR(1) process "AR". Required as starting value of the algorithm. Changing the initialLoad can sligthly improve the convergence rate. tol the tolerance for the algorithm to stop. maxIt the maximum number of iterations for the algorithm to break.

## Details

Dynamic Semiparametric Factor Models (DSFM) are defined as Y_{t,j} = m_0(X_{t,j}) + ∑_{l=1}^L Z_{t,l} m_l(X_{t,j}) + \varepsilon_{t,j}. DSFM estimation is performed using kernel density for the non-parametric functions m_l. The estimation is performed using the iterative algorithm of Fengler and al. (2007).

The function has predefined arguments that can be changed for better approximation. First, the number of data points on the estimation grid is set to 25. Larger grid can significantly increase the computation time without necesseraly improve the fit. Secondly, the bandwidth h is basically set to 0.05 but optimal bandwidth has to be found externally. The algorithm always normalize the covariates to work on an estimation grid bounded beetween [0,1].

For model selection, different criteria are computed.

For number of factors selection, the function compute the Explained Variance, for bandwidth selection, two criteria are computed, a weighted Akaike Information Criterion (AIC) and a weighted Schwarz Criterion (SC). The goodness-of-fit is measured by the Root Mean Squared Error (RMSE). The proper definition of each criterion can be found in references.

## Value

DSFM2D returns an object of class "DSFM2D".

The generic functions print,summary, plot and predict are available.

An object of class "DSFM2D" is a list containing the following components:

 data the input data. YHat the estimated \hat{Y}_{t,j}. ZHat the estimated factor loadings \hat{Z}_{t,j}. mHat the estimated factor functions \hat{m}_l. residuals the error terms. EV gives the Explained Variance, used to select the approriate number of factors. RMSE gives the Root Mean Squared Error, used to compare models. AIC gives the bandwidth h used and two selection criteria to select the optimal bandwidth. density the kernel density estimation performed. convergence the value of the algorithm stopping criterion at each loop. time an indicator of the time taken by the function to perform the fit.

## Author(s)

The implementation of model by Marc Gumowski was based on Fengler and al. (2007).

## References

Borak, Szymon, Matthias R. Fengler, and Wolfgang K. Haerdle (2005)."DSFM Fitting of Implied Volatility Surfaces". In: 5th International Conference on Intelligent Systems Design and Applications (ISDA'05), pp. 526-531. IEEE.

Fengler, Matthias R, Wolfgang K Haerdle, and Enno Mammen (2007). "A Semiparametric Factor Model for Implied Volatility Surface Dynamics". In: Journal of Financial Econometrics 5.2, pp. 189-218.

Haerdle, Wolfgang K., and Piotr Majer (2014). "Yield Curve Modeling and Forecasting using Semiparametric Factor Dynamics". In: The European Journal of Finance, pp. 1-21.

summary.DSFM2D for summaries and plot.DSFM2D for plot possibilities.

predict.DSFM2D provide succint predictions.

DSFM2DData has to be used before using the DSFM function to ensure that the data are correctly formated.

simulateDSFM2D is a function to simulate data that can be used as simple example purposes.

## Examples

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 # Prepare the data --------------------------------------------------------- # simulatedData <- simulateDSFM2D() dsfmData <- simulatedData\$dataSim dsfmData # Set the parameters ------------------------------------------------------- # h <- c(0.05, 0.05) L <- 4 # Fit the model ------------------------------------------------------------ # dsfmFit <- DSFM(dsfmData, h = h, L = L) summary(dsfmFit) plot(dsfmFit) # Perform prediction ------------------------------------------------------- # horizon <- 5 predict(dsfmFit, nAhead = horizon) 

MarcGumowski/dysefamor documentation built on May 7, 2019, 2:47 p.m.