-
Notifications
You must be signed in to change notification settings - Fork 0
/
CARE_estimate_rolling_figure.m
110 lines (93 loc) · 5.49 KB
/
CARE_estimate_rolling_figure.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
% ---------------------------------------------------------------------
% Project: CARE
% ---------------------------------------------------------------------
% Quantlet: CARE_estimate_rolling_figure
% ---------------------------------------------------------------------
% Description: CARE_estimate_rolling_figure plots the estimated
% parameter alpha_1 across the three selected stock
% markets from 3 January 2006 to 31 December 2014,
% with 20 (upper panel) and 250 (lower panel)
% observations used in the rolling window exercise at
% fixed expectile level tau (0.05 or 0.01).
% ---------------------------------------------------------------------
% Usage: CARE_estimate_rolling_figure
% ---------------------------------------------------------------------
% Inputs: tau_005.mat, tau_001.mat
% ---------------------------------------------------------------------
% Output: Time series of estimated parameter alpha_1
% ---------------------------------------------------------------------
% Keywords: lCARE, expectiles, tail risk, risk management, index,
% returns, plot, time series, DAX, FTSE100, S&P500
% ---------------------------------------------------------------------
% See also: CARE_estimate_rolling
% ---------------------------------------------------------------------
% Author: Andrija Mihoci, Xiu Xu 20150928
% ---------------------------------------------------------------------
%% tau = 0.05
clear all; clc;
load('tau_005.mat');
figure;
subplot(2, 4, 1); plot(paras_DAX(:, 2), '-b', 'LineWidth', 1.5); title('DAX');
ylabel('Value'); ylim([-3, 3]); xlim([1, 2348]);
Year = {'2006', '2010', '2014'}; hold on; set(gca, 'xtick', [1 1045 2088]);
Estimate = {'-3', '0', '3'}; hold on; set(gca, 'ytick', [-3 0 3]);
set(gca, 'xticklabel', Year); set(gca, 'yticklabel', Estimate);
subplot(2, 4, 5); plot(paras_DAX(:, 17), '-b', 'LineWidth', 1.5);
ylabel('Value'); ylim([-3, 3]); xlim([1, 2348]);
Year = {'2006', '2010', '2014'}; hold on; set(gca, 'xtick', [1 1045 2088]);
Estimate = {'-3', '0', '3'}; hold on; set(gca, 'ytick', [-3 0 3]);
set(gca, 'xticklabel', Year); set(gca, 'yticklabel', Estimate);
subplot(2, 4, 2); plot(paras_FTSE(:, 2), '-b', 'LineWidth', 1.5); title('FTSE 100');
ylabel(''); ylim([-3, 3]); xlim([1, 2348]);
Year = {'2006', '2010', '2014'}; hold on; set(gca, 'xtick', [1 1045 2088]);
Estimate = {'-3', '0', '3'}; hold on; set(gca, 'ytick', [-3 0 3]);
set(gca, 'xticklabel', Year); set(gca, 'yticklabel', Estimate);
subplot(2, 4, 6); plot(paras_FTSE(:, 17), '-b', 'LineWidth', 1.5);
ylabel(''); ylim([-3, 3]); xlim([1, 2348]);
Year = {'2006', '2010', '2014'}; hold on; set(gca, 'xtick', [1 1045 2088]);
Estimate = {'-3', '0', '3'}; hold on; set(gca, 'ytick', [-3 0 3]);
set(gca, 'xticklabel', Year); set(gca, 'yticklabel', Estimate);
subplot(2, 4, 3); plot(paras_SP(:, 2), '-b', 'LineWidth', 1.5); title('S&P 500');
ylabel(''); ylim([-3, 3]); xlim([1, 2348]);
Year = {'2006', '2010', '2014'}; hold on; set(gca, 'xtick', [1 1045 2088]);
Estimate = {'-3', '0', '3'}; hold on; set(gca, 'ytick', [-3 0 3]);
set(gca, 'xticklabel', Year); set(gca, 'yticklabel', Estimate);
subplot(2, 4, 7); plot(paras_SP(:, 17), '-b', 'LineWidth', 1.5);
ylabel(''); ylim([-3, 3]); xlim([1, 2348]);
Year = {'2006', '2010', '2014'}; hold on; set(gca, 'xtick', [1 1045 2088]);
Estimate = {'-3', '0', '3'}; hold on; set(gca, 'ytick', [-3 0 3]);
set(gca, 'xticklabel', Year); set(gca, 'yticklabel', Estimate);
%% tau = 0.01
clear all; clc;
load('tau_001.mat');
figure;
subplot(2, 4, 1); plot(paras_DAX(:, 2), '-b', 'LineWidth', 1.5); title('DAX');
ylabel('Value'); ylim([-3, 3]); xlim([1, 2348]);
Year = {'2006', '2010', '2014'}; hold on; set(gca, 'xtick', [1 1045 2088]);
Estimate = {'-3', '0', '3'}; hold on; set(gca, 'ytick', [-3 0 3]);
set(gca, 'xticklabel', Year); set(gca, 'yticklabel', Estimate);
subplot(2, 4, 5); plot(paras_DAX(:, 17), '-b', 'LineWidth', 1.5);
ylabel('Value'); ylim([-3, 3]); xlim([1, 2348]);
Year = {'2006', '2010', '2014'}; hold on; set(gca, 'xtick', [1 1045 2088]);
Estimate = {'-3', '0', '3'}; hold on; set(gca, 'ytick', [-3 0 3]);
set(gca, 'xticklabel', Year); set(gca, 'yticklabel', Estimate);
subplot(2, 4, 2); plot(paras_FTSE(:, 2), '-b', 'LineWidth', 1.5); title('FTSE 100');
ylabel(''); ylim([-3, 3]); xlim([1, 2348]);
Year = {'2006', '2010', '2014'}; hold on; set(gca, 'xtick', [1 1045 2088]);
Estimate = {'-3', '0', '3'}; hold on; set(gca, 'ytick', [-3 0 3]);
set(gca, 'xticklabel', Year); set(gca, 'yticklabel', Estimate);
subplot(2, 4, 6); plot(paras_FTSE(:, 17), '-b', 'LineWidth', 1.5);
ylabel(''); ylim([-3, 3]); xlim([1, 2348]);
Year = {'2006', '2010', '2014'}; hold on; set(gca, 'xtick', [1 1045 2088]);
Estimate = {'-3', '0', '3'}; hold on; set(gca, 'ytick', [-3 0 3]);
set(gca, 'xticklabel', Year); set(gca, 'yticklabel', Estimate);
subplot(2, 4, 3); plot(paras_SP(:, 2), '-b', 'LineWidth', 1.5); title('S&P 500');
ylabel(''); ylim([-3, 3]); xlim([1, 2348]);
Year = {'2006', '2010', '2014'}; hold on; set(gca, 'xtick', [1 1045 2088]);
Estimate = {'-3', '0', '3'}; hold on; set(gca, 'ytick', [-3 0 3]);
set(gca, 'xticklabel', Year); set(gca, 'yticklabel', Estimate);
subplot(2, 4, 7); plot(paras_SP(:, 17), '-b', 'LineWidth', 1.5);
ylabel(''); ylim([-3, 3]); xlim([1, 2348]);
Year = {'2006', '2010', '2014'}; hold on; set(gca, 'xtick', [1 1045 2088]);
Estimate = {'-3', '0', '3'}; hold on; set(gca, 'ytick', [-3 0 3]);
set(gca, 'xticklabel', Year); set(gca, 'yticklabel', Estimate);