Basis expansion, Smoothed Functional Principal ComponentsData description and preliminary treatment
Results of Functional Principal Components
Functional Principal ComponentsApplication to Yield Curves
Tomáš Hanzák
Department of Probability and Mathematical Statistics
seminarStochastic modeling in economics and finance
November 18, 2013
Tomáš Hanzák Functional Principal Components Application to Yield Curves
Basis expansion, Smoothed Functional Principal ComponentsData description and preliminary treatment
Results of Functional Principal Components
Content
1 Basis expansion, Smoothed Functional Principal ComponentsBasis expansionSmoothed Functional Principal Components
2 Data description and preliminary treatmentEURIBOR interest rate and yield curvesFitting yield curves using B-splinesDescriptive statistics
3 Results of Functional Principal ComponentsMaturities from 1 week to 1 yearMaturities from 2 to 30 years
Tomáš Hanzák Functional Principal Components Application to Yield Curves
Basis expansion, Smoothed Functional Principal ComponentsData description and preliminary treatment
Results of Functional Principal Components
Basis expansionSmoothed Functional Principal Components
Basis expansion
Some initial dimension reduction and smoothing can be attainedby so called basis expansion.
Let θ = (θ1, . . . , θL)T be the first L functions of a basis
of the functional space.
Let observed functions Xi (t) are approximated as a linearcombination of θ:
Xθ,i (t) =L∑l=1
cilθl(t) .
Then the sample mean, variance, covariance etc. of {Xi} can beapproximated by those of {Xθ,i} which can be expressed in termsof coefficient matrix C, functional vector θ and a matrix Wof inner product values of elements of θ.
Tomáš Hanzák Functional Principal Components Application to Yield Curves
Basis expansion, Smoothed Functional Principal ComponentsData description and preliminary treatment
Results of Functional Principal Components
Basis expansionSmoothed Functional Principal Components
Functional Principal Components via basis expansion
Algorithm for Functional Principal Components via basis expansion(the notation comes from the previous slide):
1 Calculate matrices C and W.
2 Calculate W1/2, the square root of W.
3 Calculate the eigenvalues λ and eigenfunctions u of symmetricpositive semi-definite matrix W1/2Cov(C)W1/2, whereCov(C) is a sample covariance matrix of rows of matrix C.
4 Then θTW−1/2u are the eigenfunctions and λ the eigenvalueswe are looking for.
Tomáš Hanzák Functional Principal Components Application to Yield Curves
Basis expansion, Smoothed Functional Principal ComponentsData description and preliminary treatment
Results of Functional Principal Components
Basis expansionSmoothed Functional Principal Components
Smoothed Functional Principal Components
Sample eigenfunction v and its eigenvalue of observations X areobtained by maximizing the sample variance of observations X”in direction” of v , given that ‖v‖ = 1.
Equivalently: maximizing the sample variance of observations X”in direction” of v divided by ‖v‖2.
Idea: Put ‖v‖2 + α‖v ′′‖2 instead of ‖v‖2 in the denominatorof the maximized expression. I.e. penalize the non-smoothnessof the eigenfunction v .
Value of α can be determined as an argument of minima of crossvalidation (CV) criterion - measuring the residual sizeof the observations from their projection onto the eigenfunctions(optimal basis) subspace.
Tomáš Hanzák Functional Principal Components Application to Yield Curves
Basis expansion, Smoothed Functional Principal ComponentsData description and preliminary treatment
Results of Functional Principal Components
EURIBOR interest rate and yield curvesFitting yield curves using B-splinesDescriptive statistics
EURIBOR interest rate
EURIBOR (Euro Interbank Offered Rate) = reference interestrate for Euro, established in 1999.
Calculated from interest rates of interbank deposits between thepanel of banks (31 today). For details see www.euribor.org.
EURIBOR is determined for maturities 1 weeks, 2 weeks, 3 weeks,1 month, 2 month, . . . 12 months = yield curve.
First data set: EURIBOR rates (15 maturities), period from2004-01-01 to 2006-06-15.
A possible way how to derive ”EURIBOR” for longer maturities:EURIBOR interest rate swaps.
Second data set: EURIBOR swap based interest rates, maturitiesfrom 2 to 30 years, period from 2004-01-01 to 2006-06-15.
Tomáš Hanzák Functional Principal Components Application to Yield Curves
Basis expansion, Smoothed Functional Principal ComponentsData description and preliminary treatment
Results of Functional Principal Components
EURIBOR interest rate and yield curvesFitting yield curves using B-splinesDescriptive statistics
EURIBOR interest rates. June 2nd, 2006
Tomáš Hanzák Functional Principal Components Application to Yield Curves
Basis expansion, Smoothed Functional Principal ComponentsData description and preliminary treatment
Results of Functional Principal Components
EURIBOR interest rate and yield curvesFitting yield curves using B-splinesDescriptive statistics
EURIBOR interest rates. June 2nd, 2006
Tomáš Hanzák Functional Principal Components Application to Yield Curves
Basis expansion, Smoothed Functional Principal ComponentsData description and preliminary treatment
Results of Functional Principal Components
EURIBOR interest rate and yield curvesFitting yield curves using B-splinesDescriptive statistics
EURIBOR swap based interest rates. June 2nd, 2006
Tomáš Hanzák Functional Principal Components Application to Yield Curves
Basis expansion, Smoothed Functional Principal ComponentsData description and preliminary treatment
Results of Functional Principal Components
EURIBOR interest rate and yield curvesFitting yield curves using B-splinesDescriptive statistics
B-splines
Spline = piecewise polynomial curve with continuous derivativesup to certain order.
B-splines = basis splines = spline functions of which a linearcombination forms a desired spline curve.
B-spline of (n + 1)th order and nth degree: polynomial of nthdegree, composed from n + 1 pieces.
Sequence of m points, knots, where the polynomial pieces meet.
Linear interpolation corresponds to using 1st degree B-splines.
Can be calculated using recursive formulas or directly by solvinga linear system of constraints.
Tomáš Hanzák Functional Principal Components Application to Yield Curves
Basis expansion, Smoothed Functional Principal ComponentsData description and preliminary treatment
Results of Functional Principal Components
EURIBOR interest rate and yield curvesFitting yield curves using B-splinesDescriptive statistics
B-splines of different orders/degrees
Tomáš Hanzák Functional Principal Components Application to Yield Curves
Basis expansion, Smoothed Functional Principal ComponentsData description and preliminary treatment
Results of Functional Principal Components
EURIBOR interest rate and yield curvesFitting yield curves using B-splinesDescriptive statistics
B-splines - uniqueness
Tomáš Hanzák Functional Principal Components Application to Yield Curves
Basis expansion, Smoothed Functional Principal ComponentsData description and preliminary treatment
Results of Functional Principal Components
EURIBOR interest rate and yield curvesFitting yield curves using B-splinesDescriptive statistics
System of cubic B-splines
Tomáš Hanzák Functional Principal Components Application to Yield Curves
Basis expansion, Smoothed Functional Principal ComponentsData description and preliminary treatment
Results of Functional Principal Components
EURIBOR interest rate and yield curvesFitting yield curves using B-splinesDescriptive statistics
Fitting yield curves using cubic B-splines
For a fixed date, EURIBOR rates for 15 different maturities forma ”yield vector” rather than a curve.
To fit (interpolate) these discrete values by a smooth curve,B-splines are used.
Cubic B-splines are chosen, i.e. piecewise cubic polynomial curvewith continuous 2nd derivative.
The knots are set to the 15 maturity points ⇒system of 15 B-splines.
15 parameters (B-splines linear combination coefficients) to match15 points (constraints) ⇒ unique perfect fit.
Tomáš Hanzák Functional Principal Components Application to Yield Curves
Basis expansion, Smoothed Functional Principal ComponentsData description and preliminary treatment
Results of Functional Principal Components
EURIBOR interest rate and yield curvesFitting yield curves using B-splinesDescriptive statistics
Exact interpolation (June 2nd, 2006)
Tomáš Hanzák Functional Principal Components Application to Yield Curves
Basis expansion, Smoothed Functional Principal ComponentsData description and preliminary treatment
Results of Functional Principal Components
EURIBOR interest rate and yield curvesFitting yield curves using B-splinesDescriptive statistics
Penalized Least Squares
The yield curve should be smoothed, definitely not look like ason the previous figure.
We must not require an exact fit and rather penalize thecurvature of the fitted curve.
Penalized Least Squares: Find a spline S (a linear combinationof cubic B-splines considered) which minimizes
SSE (S) + α‖L(S)‖2 ,
where SSE (S) = Sum of Squared Errors (residuals) betweenthe observed EURIBOR values and S , α > 0 (= 10−9) and
L(S)(t) = (1 + t)S ′′(t) .
Tomáš Hanzák Functional Principal Components Application to Yield Curves
Basis expansion, Smoothed Functional Principal ComponentsData description and preliminary treatment
Results of Functional Principal Components
EURIBOR interest rate and yield curvesFitting yield curves using B-splinesDescriptive statistics
Fit using Penalized Least Squares (June 2nd, 2006)
Tomáš Hanzák Functional Principal Components Application to Yield Curves
Basis expansion, Smoothed Functional Principal ComponentsData description and preliminary treatment
Results of Functional Principal Components
EURIBOR interest rate and yield curvesFitting yield curves using B-splinesDescriptive statistics
EURIBOR yield curves from 2004-01-01 to 2006-06-15
Tomáš Hanzák Functional Principal Components Application to Yield Curves
Basis expansion, Smoothed Functional Principal ComponentsData description and preliminary treatment
Results of Functional Principal Components
EURIBOR interest rate and yield curvesFitting yield curves using B-splinesDescriptive statistics
Switching to the first difference (returns)
EURIBOR curves seem not to form a stationary time series. So wemove to its first differences - returns:
∆ri (t) = ri (t)− ri−1(t) ,
where ri (t) is the smoothed EURIBOR on a day i and maturity t.
L-factor linear return generating process:
∆ri (t) = µ+L∑j=1
βjivj ,
where vj are factors (principal components) and βji are randomfactor loadings.
Next possible step: to model βji by a vector autoregressive model.
Tomáš Hanzák Functional Principal Components Application to Yield Curves
Basis expansion, Smoothed Functional Principal ComponentsData description and preliminary treatment
Results of Functional Principal Components
EURIBOR interest rate and yield curvesFitting yield curves using B-splinesDescriptive statistics
EURIBOR yield curve returns
Tomáš Hanzák Functional Principal Components Application to Yield Curves
Basis expansion, Smoothed Functional Principal ComponentsData description and preliminary treatment
Results of Functional Principal Components
EURIBOR interest rate and yield curvesFitting yield curves using B-splinesDescriptive statistics
Yield curve returns: Sample mean and ±2σ bounds
Tomáš Hanzák Functional Principal Components Application to Yield Curves
Basis expansion, Smoothed Functional Principal ComponentsData description and preliminary treatment
Results of Functional Principal Components
EURIBOR interest rate and yield curvesFitting yield curves using B-splinesDescriptive statistics
Yield curve returns: System of box plots
Tomáš Hanzák Functional Principal Components Application to Yield Curves
Basis expansion, Smoothed Functional Principal ComponentsData description and preliminary treatment
Results of Functional Principal Components
EURIBOR interest rate and yield curvesFitting yield curves using B-splinesDescriptive statistics
Covariance function
Tomáš Hanzák Functional Principal Components Application to Yield Curves
Basis expansion, Smoothed Functional Principal ComponentsData description and preliminary treatment
Results of Functional Principal Components
EURIBOR interest rate and yield curvesFitting yield curves using B-splinesDescriptive statistics
Correlation function
Tomáš Hanzák Functional Principal Components Application to Yield Curves
Basis expansion, Smoothed Functional Principal ComponentsData description and preliminary treatment
Results of Functional Principal Components
Maturities from 1 week to 1 yearMaturities from 2 to 30 years
Functional Principal Components applied
Smoothed Functional Principal Component with α = 1.71 · 10−8
(minimization of CV criterion).
Calculated from the empirical covariance operator.
Implementation through the B-spline basis expansion.
Interpretation of the extracted principal components (seethe next slides for details):
1 Level (87-88 % of variance explained)
2 Slope (6-7 % of variance explained)
3 Curvature (1-2 % of variance explained)
Tomáš Hanzák Functional Principal Components Application to Yield Curves
Basis expansion, Smoothed Functional Principal ComponentsData description and preliminary treatment
Results of Functional Principal Components
Maturities from 1 week to 1 yearMaturities from 2 to 30 years
Maturities up to 1 year: Explained variance
Tomáš Hanzák Functional Principal Components Application to Yield Curves
Basis expansion, Smoothed Functional Principal ComponentsData description and preliminary treatment
Results of Functional Principal Components
Maturities from 1 week to 1 yearMaturities from 2 to 30 years
Maturities up to 1 year: Eigenfunctions
Tomáš Hanzák Functional Principal Components Application to Yield Curves
Basis expansion, Smoothed Functional Principal ComponentsData description and preliminary treatment
Results of Functional Principal Components
Maturities from 1 week to 1 yearMaturities from 2 to 30 years
Maturities over 1 year: Explained variance
Tomáš Hanzák Functional Principal Components Application to Yield Curves
Basis expansion, Smoothed Functional Principal ComponentsData description and preliminary treatment
Results of Functional Principal Components
Maturities from 1 week to 1 yearMaturities from 2 to 30 years
Maturities over 1 year: Eigenfunctions
Tomáš Hanzák Functional Principal Components Application to Yield Curves
Basis expansion, Smoothed Functional Principal ComponentsData description and preliminary treatment
Results of Functional Principal Components
ReferencesContacts
References
Michal Benko: Functional Data Analysis with Applications inFinance. Dissertation thesis, WirtschaftwissenschaftlichenFakultät, Humboldt-Universität zu Berlin, 2006.
Lajos Horváth, Piotr Kokoszka: Inference for Functional Datawith Applications. Springer, New York, 2012.
James I. Craig: B-Spline Curves. AE4375-6380 SupplementalNotes (Spring 2004), Georgia Tech.
Tomáš Hanzák Functional Principal Components Application to Yield Curves
Basis expansion, Smoothed Functional Principal ComponentsData description and preliminary treatment
Results of Functional Principal Components
ReferencesContacts
Contacts
Tomáš Hanzákmobile: 604 799 879e-mail: [email protected]: www.thanzak.sweb.cz
Department of Probability and Mathematical StatisticsFaculty of Mathematics and PhysicsCharles University in Prague
Sokolovská 83, 186 75 Praha 8.
e-mail: [email protected]: www.karlin.mff.cuni.cz/̃ kpms
MEDIARESEARCH, a.s.
Českobratrská 1, 130 00 Praha 3.
mobile: 725 535 535e-mail: [email protected]: www.mediaresearch.cz
Tomáš Hanzák Functional Principal Components Application to Yield Curves