Brooks et al. (2001) estimate the parameters with nine ..... ne. Philip Morris. United Technologies. Norfolk Sthn. Oracle. Em c Mass. At & T. Mcdonalds Burlington.
Introduction
GARCH
Factor Selection
Further Applications
Conclusion
Heuristic Methods for Financial Modelling Concepts and Applications
Dietmar Maringer CCFEA Summer School, University of Essex
September 2007
© Dietmar Maringer
Heuristic Methods for Financial Modelling
1
Introduction
GARCH
Factor Selection
Further Applications
Conclusion
Financial Modeling & Computational Finance The Importance of Financial Modeling in (Computational) Finance discover relationships understand processes test models modeling
© Dietmar Maringer
Heuristic Methods for Financial Modelling
2
Introduction
GARCH
Factor Selection
Further Applications
Conclusion
Financial Modeling & Computational Finance How it’s usually done 1
state a model
2
apply to data
3
test and evaluate the outcome
Example 1
rt = f (xt , ψ)
2
Estimate parameters ψ
3
test ψ for statistical significance
© Dietmar Maringer
Heuristic Methods for Financial Modelling
3
Introduction
GARCH
Factor Selection
Further Applications
Conclusion
A Short Primer in Risk Modelling Traditional Engle (1982): ARCH(q) Bollerslev (1986): GARCH(p, q)
rt = µ + et ¢ ¡ et ∼ N 0; σt2 eˆt2 = σ2t = α0 +
q X i=1
2 αi et−i +
p X j=1
βj σ2t−j
Finding the parameters ψ = [µ α0 α1 β1 ] for GARCH(1,1): Ã ! T et2 T 1X 2 max L = − ln(2π) − ln(σt ) + 2 ψ 2 2 t=1 σt
© Dietmar Maringer
Heuristic Methods for Financial Modelling
4
Introduction
GARCH
Factor Selection
Further Applications
Conclusion
Estimation Issues McCullough and Vinod (1999, p. 635) “Many textbooks convey the impression that all one has to do is use a computer to solve the problem, the implicit and unwarranted assumptions being that the computer’s solution is accurate and that one software package is as good as any other.”
© Dietmar Maringer
Heuristic Methods for Financial Modelling
5
Introduction
GARCH
Factor Selection
Further Applications
Conclusion
Estimation at Work GARCH(1,1) for DEM / GPB exchange rate 1974 daily observations actual result: Fiorentini, Calzolari, Panattoni (1996) provide analytical derivatives for GARCH(1,1) benchmark results in Bollerslev and Ghysels (1996)
results from software packages: Brooks et al. (2001) estimate the parameters with nine standard software packages
© Dietmar Maringer
Heuristic Methods for Financial Modelling
6
Introduction
GARCH
Factor Selection
Further Applications
Conclusion
GARCH Estimation at Work Chris Brooks, Simon P. Burke, and Gita Persand (2001): “Benchmarks and the Accuracy of GARCH Model Estimation,” International Journal of Forecasting, 17(1):45–56
Software packages
Method Benchmark E-Views Gauss-Fanpac Limdep Matlab Microfit SAS Shazam Rats TSP
µ –0.00619041 –0.00540 –0.00600 –0.00619 –0.00619 –0.00621 –0.00619 –0.00613 –0.00625 –0.00619
© Dietmar Maringer
α0 0.0107613 0.0096 0.0110 0.0108 0.0108 0.0108 0.0108 0.0107 0.0108 0.0108
α1 0.153134 0.143 0.153 0.153 0.153 0.153 0.153 0.154 0.153 0.153
β1 0.805974 0.821 0.806 0.806 0.806 0.806 0.806 0.806 0.806 0.806
Heuristic Methods for Financial Modelling
7
Introduction
GARCH
Factor Selection
Further Applications
Conclusion
Estimation Issues Uphill search and Starting Point Objective: find parameter(s) ψ∗ s.t. L (ψ) → max
© Dietmar Maringer
Heuristic Methods for Financial Modelling
8
Introduction
GARCH
Factor Selection
Further Applications
Conclusion
Traditional vs. Heuristic Methods Objective: find ψ∗ that maximizes L (ψ)
Uphill search
Threshold Accepting
Initialize ψ with “good” guess
Initialize ψ with “good”random guess
REPEAT make sophisticated guess for ∆ψ ψn := ψ + ∆ψ if L (ψn ) > L (ψ) then ψ := ψn UNTIL converged
REPEAT make sophisticatedrandom guess for ∆ψ ψn := ψ + ∆ψ if L (ψn ) > L (ψ) –Threshold then ψ := ψn lower Threshold UNTIL convergedhalting criterion met
report last ψ
report lastbest ψ
© Dietmar Maringer
Heuristic Methods for Financial Modelling
9
Introduction
GARCH
Factor Selection
Further Applications
Conclusion
GARCH Estimation with Threshold Accepting First Results (Maringer, 2005)
Software packages
Method Benchmark E-Views Gauss-Fanpac Limdep Matlab Microfit SAS Shazam Rats TSP Heuristic optimization
µ –0.00619041 –0.00540 –0.00600 –0.00619 –0.00619 –0.00621 –0.00619 –0.00613 –0.00625 –0.00619 –0.00619034
© Dietmar Maringer
α0 0.0107613 0.0096 0.0110 0.0108 0.0108 0.0108 0.0108 0.0107 0.0108 0.0108 0.0107614
α1 0.153134 0.143 0.153 0.153 0.153 0.153 0.153 0.154 0.153 0.153 0.153134
β1 0.805974 0.821 0.806 0.806 0.806 0.806 0.806 0.806 0.806 0.806 0.805973
Heuristic Methods for Financial Modelling
10
Introduction
GARCH
Factor Selection
Further Applications
Conclusion
Estimation Issues Which parameters? underlying model: “best” estimator from observed data: result from optimizer:
ψTR ψML ψ
Main Problems with Parameter Estimation 1
identifying the Maximum Likelihood estimator
2
differences between Maximum Likelihood estimator and “True” estimator
3
differences between reported and actual Maximum Likelihood estimator
© Dietmar Maringer
Heuristic Methods for Financial Modelling
11
Introduction
GARCH
Factor Selection
Further Applications
Conclusion
Computational Study (Winker and Maringer (2006)) Data Driven Monte Carlo Data Generating Process: GARCH(1,1) model with ψTR from Bollerslev and Ghysels (1996) 100 data series with 2000 (+100) observations each estimate parameters for first T = [50, 100, 200, 400, 1000, 2000] observations =⇒ 600 cases
Testing the Heuristic allow for I = [1, 5, 10, 25, 50, 100] · 1000 iterations for each instance: approx. 1700 runs with TA
© Dietmar Maringer
Heuristic Methods for Financial Modelling
12
Introduction
GARCH
Factor Selection
Further Applications
Conclusion
Computational Study (Winker and Maringer (2006)) “Reliability” of Threshold Acceptance Benchmark: Matlab GARCH toolbox Let ∆ = L ∗,TA − L Matlab 88 259 253 600
cases: cases: cases: cases
∆ < −10−10 |∆| < 10−10 ∆ > +10−10
© Dietmar Maringer
(extreme: −0.0000001) (extreme: +9.45)
Heuristic Methods for Financial Modelling
13
Introduction
GARCH
Factor Selection
Further Applications
Conclusion
Convergence of Actual ML Estimator
Drawing from a sample true parameters of DGP, ψTR T observations =⇒ ψML,T
Herwartz (2004, p. 202) If ψML,T is a consistent estimator asym
ψML,T ∼ N p converges with standard rate T to ψTR =⇒ choose T proportional to 1/ε2 to obtain ¯ ¡¯ ML,T ¢ TR ¯ ¯ P ψ −ψ < ε > 1−δ © Dietmar Maringer
Heuristic Methods for Financial Modelling
14
Introduction
GARCH
Factor Selection
Further Applications
Conclusion
Convergence of Reported Estimator Threshold Acceptance heuristic search & optimization method stochastic elements given T : ψT ,I,r from run r with I iterations ideally: ψT ,I,r = ψML,T Based on convergence result by Althöfer & Koschnik (1991): number of iterations, I(δ, ε), such that ¯ ¡¯ ¢ P ¯ψT ,I,r − ψML,T ¯ < ε > 1 − δ
© Dietmar Maringer
Heuristic Methods for Financial Modelling
15
Introduction
GARCH
Factor Selection
Further Applications
Conclusion
Joint Convergence Achieving a precision ε with probability δ reported and ML
¯ ¢ ¡¯ prob ¯ψML,T − ψT ,I,r ¯ < ε > 1 − δ
I ≥ I(ε, δ)
ML and true
¯ ¢ ¡¯ prob ¯ψML,T − ψTR ¯ < ε > 1 − δ
T ≥ T (ε, δ)
reported and true
¯ ¢ ¡¯ prob ¯ψT ,I,r − ψTR ¯ < ε > 1 − δ
I ≥ I (T (ε, δ))
© Dietmar Maringer
Heuristic Methods for Financial Modelling
16
Introduction
GARCH
Factor Selection
Further Applications
Conclusion
Convergence of the ML estimators Distribution of ψML,T for 100 data series
© Dietmar Maringer
Heuristic Methods for Financial Modelling
17
Introduction
GARCH
Factor Selection
Further Applications
Conclusion
Convergence of the reported and ML estimators Distribution of reported results for one specimen case 1 000 Iterations
. . . ψTR * ψML,T −− ¦ median - - 10% (90%) quantile
© Dietmar Maringer
Heuristic Methods for Financial Modelling
18
Introduction
GARCH
Factor Selection
Further Applications
Conclusion
Convergence of the reported and ML estimators Distribution of reported results for one specimen case 5 000 Iterations
. . . ψTR * ψML,T −− ¦ median - - 10% (90%) quantile
© Dietmar Maringer
Heuristic Methods for Financial Modelling
19
Introduction
GARCH
Factor Selection
Further Applications
Conclusion
Convergence of the reported and ML estimators Distribution of reported results for one specimen case 25 000 Iterations
. . . ψTR * ψML,T −− ¦ median - - 10% (90%) quantile
© Dietmar Maringer
Heuristic Methods for Financial Modelling
20
Introduction
GARCH
Factor Selection
Further Applications
Conclusion
Evaluation Measures of Deviation I: Reported and Actual ML Parameters
MSDpML,d,T ,I =
´2 1 X ³ d,T ,I,r · ψp − ψML,d,T p R r
´ ³ ln MSDpML,d,T = a + b · ln(I)
p b R2
µ α0 α1 β1 −1.527 −2.561 −2.207 −2.520 .913 .901 .891 .897 averaged over data series d; T = 400
© Dietmar Maringer
Heuristic Methods for Financial Modelling
21
Introduction
GARCH
Factor Selection
Further Applications
Conclusion
Evaluation Measures of Deviation II: Reported and “True” Parameters
MSDpTR,d,T ,I =
´2 1 X ³ d,T ,I,r · ψp − ψTR p R r
³ ´ ln MSDpTR,d,I = a + b · ln(T )
p b R2
µ α0 α1 β1 −0.962 −1.890 −1.159 −1.643 .428 .615 .567 .639 averaged over data series d; I = 100 000
© Dietmar Maringer
Heuristic Methods for Financial Modelling
22
Introduction
GARCH
Factor Selection
Further Applications
Conclusion
Linear Factor Models A Simple Linear Factor Model
ri,t = α0 + β1 f1,t + β2 f2,t + · · · + βn fn,t + εi,t Ideally: data: “reasonable” frequency individually for each stock i parsimonious, e.g., at most k out of n different factors The Modelling Problem: + estimation of parameters β – selection of factors the k factors
© Dietmar Maringer
Heuristic Methods for Financial Modelling
23
Introduction
GARCH
Factor Selection
Further Applications
Conclusion
Genetic Algorithms for Linear Factor Models Basic Idea binary strings represent inclusion / exclusion of factors: f 1 f 2 f3 f 4 f 5 f6 f 7 1 1 0 0 1 0 0 X X − − X − − Ingredients 1
population of candidate solutions
2
cross-over:
3
1
parents 0 0
1
1
0
1
1
0
···
···
mutation: ···
4
0
1
before 1 1
offspring 0 1 1 0
0 after 0 1
1 1 ···
survival of the fittest © Dietmar Maringer
Heuristic Methods for Financial Modelling
24
Introduction
GARCH
Factor Selection
Further Applications
Conclusion
Genetic Algorithm for Factor Selection Pseudo-Algorithm randomly initialize population of P binary strings REPEAT %% generate new solutions: FOR offspring = 1 . . . P pick 2 current solutions = parents; cross-over parents; with probability π, mutate offspring; compute offspring’s fitness; END %% select new population pool = current population + offspring; pick P solutions from pool based on fitness; UNTIL converged;
© Dietmar Maringer
Heuristic Methods for Financial Modelling
25
Introduction
GARCH
Factor Selection
Further Applications
Conclusion
Heuristic Factor Selection (Maringer (2004)) Computational Study S & P 100 stocks, 1995–2000 103 MSCI indices: 23 country indices 42 regional indices 38 industries
combinatorial problem: 2n combinations to (not) include n indices factors: 23 42 38 103 combinations: 8.39E + 06 4.40E + 12 2.75E + 11 1.01E + 31 heuristic: Memetic Algorithm
© Dietmar Maringer
Heuristic Methods for Financial Modelling
26
0 General Electric Halliburton Intel Boeing Microsoft Citigroup Wal Mart Stores IBM Baker Hughes Schlumberger (Nys) Coca Cola Procter & Gamble Exxon Mobil Amer.Intl.Gp. Cisco Systems Merck Merrill Lynch Walt Disney Intl.Paper Lucent Technologies Pfizer Du Pont E Ide Bank Of America Amer.Express Hewlett - Packard Mgst.Dn.Witter & Co Weyerhaeuser J P Morgan Chase & Nortel Networks Delta Air Lines Bristol Myers Squibb Home Depot Alcoa Johnson & Johnson Texas Insts. Wells Fargo& Co Boise Cascade Bank One Philip Morris United Technologies Norfolk Sthn. Oracle Emc Mass. At & T Mcdonalds Burlington Dow Chemicals Lehman Brothers Amer.Elec.Pwr. Sbc May Dept.Stores Eastman Kodak Us Bancorp Del.New Hartford Viacom 'B' Campbell Soup Southern General Motors Verizon Comms. Colgate - Palm. Aol Time Warner Baxter Intl. Honeywell Intl. Minnesota Mng.& Pepsico Sears Roebuck Sara Lee Corp. Pharmacia Cigna Ford Motor Gillette Limited Nat.Semiconductor Xerox Heinz Hj Fedex Medtronic Clear Chl.Comms. Avon Products Gen.Dynamics Rockwell Automation Black & Decker Amgen Anheuser - Busch Nextel Comms.A Raytheon Cmp.Sciences Entergy Tyco Intl. Allegheny Techs. Exelon Toys R Us Radioshack Hca Williams Cos. Unisys Medimmune Harrahs Entm. El Paso Aes
Introduction GARCH Factor Selection
© Dietmar Maringer
Further Applications
Heuristic Methods for Financial Modelling
Conclusion
Parsimonious Linear Regression Models Computational Study: R2 with k = 5 factors
0,9 1
0,8
0,7
0,6
0,5
0,4
0,3
0,2
0,1
27
0 O/Ac Health & Personal Care O/Ac Energy Equipment & Services O/Ac Merchandising O/Ac Electronic O/Ac Financial Services O/Ac Beverages & Tobacco O/Ac Data Processing & Reproduction O/Ac Transportation - Road & Rail O/Ac Chemicals O/Ac Food & Household Products O/Ac Energy Sources Ac Americas O/Ac Utilities - Electrical & Gas O/Ac Forest Products & Paper O/Ac Broadcasting & Publishing O/Ac Aerospace & Military Technology O/Ac Business & Public Services North America New Zealand O/Ac Transportation - Airlines O/Ac Banking O/Ac Electrical & Electronics O/Ac Metals - Non Ferrous Finland Europe Ex Emu Canada O/Ac Telecommunications O/Ac Gold Mines O/Ac Leisure & Tourism Venezuela O/Ac Insurance Brazil O/Ac Multi-Industry O/Ac Recreation; Other Consumer Malaysia Germany O/Ac Real Estate O/Ac Automobiles O/Ac Transportation - Shipping Chile O/Ac Building Materials & Components Sri Lanka Russia Italy Singapore Egypt Em Latin America Denmark Far East O/Ac Industrial Components Hungary O/Ac Misc. Materials & Commodities Colombia Indonesia O/Ac Appliances & Household Durables O/Ac Construction & Housing Nordic Countries O/Ac Textiles & Apparel Eafe + Em Easea Index (Eafe Ex Japan) Ac Asia Pacific Europe Ac World Index Ex Usa India Eafe + Canada Eafe Ex Uk Em Europe Kokusai Index (World Ex Japan) Em Eastern Europe Eafe France Pacific Ac World Index Ex Japan O/Ac Metals - Steel Ac Far East Taiwan Eu Em Asia Em (Emerging Markets) Belgium Jordan Europe Ex Uk Em Europe & Middle East Pacific Ex Japan O/Ac Machinery & Engineering Ac Far East Ex Japan Ac Europe Europe Ex Switzerland Ac Asia Pacific Ex Japan World Ex Europe World Ex Usa O/Ac Wholesale & International Trade Czech Republic Ac Pacific World Ex Emu Em Far East Emu Ex Germany World Ex Uk Ac Pacific Ex Japan Ac World Index Emu World Ex Australia The World Index
Introduction GARCH Factor Selection
Sector
© Dietmar Maringer
Further Applications
Country
Heuristic Methods for Financial Modelling
Conclusion
Parsimonious Linear Regression Models Computational Study: Picked factors when k = 5
80 Region
70
60
50
40
30
20
10
28
Introduction
GARCH
Factor Selection
Further Applications
Conclusion
VAR– and VEC–Models Basic Idea Yt =
k+1 X
Πi Yt−i + εt
i=1
Y1,t ¤ £ . with initial values Y−k . . . Y0 and Yt = .. Yd,t Expressed in error-correction notation (Ahn and Reinsel (1990))
∆Yt =
k X
Γi ∆Yt−i + ΠYt−k−1 + εt
i=1
© Dietmar Maringer
Heuristic Methods for Financial Modelling
29
Introduction
GARCH
Factor Selection
Further Applications
Conclusion
VAR– and VEC–Models (cont.’d) Parsimonious Models and Rank Identification (Winker and Maringer (2005))
· ¸ 0 0.0076 0 0 1 −1 0 −0.20 0 0.0111 0 Ωε = 1 0 −1 0.17 0 0 0.0057 ♣ · · · · ♣ · · ♣ −♣ Γ2 = ♣ −♣ −♣ Γ3 = ♣ · −♣ ♣ · · · · · · ♣ ♣ −♣ −♣ · · ♣ ♣ · Γ5 = · · −♣ Γi≥6 = 0 Γ4 = ♣ · −♣ ♣ · −♣ ·
0 Π = 0.20 −0.07 · Γ1 = · ·
Parameter estimation (Ahn and Reinsel (1990)): ! Ã !(−1) Ã T T X X 0 bι+1 = b bι + b −1 ε b −1 U ∗ bt U ∗Ω b U ∗Ω t
t=1
ε
t
t
t=1
ε
h £ ¤0 i0 Ut∗ = (α0 ⊗ [0, Id−r ]Yt−1 )0 , Id ⊗ (βYt−1 )0 , ∆Yt−1 , ..., ∆Yt−k © Dietmar Maringer
Heuristic Methods for Financial Modelling
30
Introduction
GARCH
Factor Selection
Further Applications
Conclusion
Smooth Transition Autoregressive (STAR) Models Basic Idea of Smooth Transition Autoregressive (STAR) Models £ ¡ ¢¤−1 G(zt ) = 1 + exp γ · (zt − c) two regimes transition variable, zt transition function G(zt ) 7→ [0, 1] The Model xt = (1 − G(zt )) ·
X `∈L 1
+ G(zt ) ·
X `∈L 2
α` xt−` φ` xt−` + εt
Problem (Maringer and Meyer (2007); Chen and Maringer (wip)) parameter estimation: γ, c lag structures L 1 , L 2 factor selection © Dietmar Maringer
Heuristic Methods for Financial Modelling
31
Introduction
GARCH
Factor Selection
Further Applications
Conclusion
Summary & Conclusions for Parameter Estimation Main results heuristic methods are capable, appropriate and useful more advanced financial modelling possible more CPU time (iterations, runs) = higher precision analysis of convergence Further research alternative models choice of heuristic distribution of estimations
© Dietmar Maringer
Heuristic Methods for Financial Modelling
32
Introduction
GARCH
Factor Selection
Further Applications
Conclusion
Literature D Maringer, Portfolio Management with Heuristic Optimization, Springer, 2005. D Maringer, “Finding the Relevant Risk Factors in Asset Pricing," Computational Statistics and Data Analysis, 47, 2004, 339-352. D Maringer and M Meyer, “Smooth Transition Autoregressive Models – New Approaches to the Model Selection Process,” Studies in Nonlinear Dynamics and Econometrics, forthcoming. P Winker and D Maringer, “Optimal Lag Structure Selection in VEC-Models,” in: A Welfe (ed.), New Directions in Macromodelling, Elsevier, Amsterdam, 2005, pp 213-234. P Winker and D Maringer, “Convergence of Optimization Based GARCH Parameters: Theory and Applications,” in: A Rizzi, M Vichi (eds): Proceedings in Computation Statistics, Physica-Verlag 2006, 483-494.
© Dietmar Maringer
Heuristic Methods for Financial Modelling
33