ARMA Problem whilst calculate the conditional mean
2 views (last 30 days)
Show older comments
I would like to calculate the conditional copulas, therefore I would like to calculate the conditional mean and conditional variance. I am following the code wrote by Andrew Patton. But I have a problem with this part when I try to running:
if true
% First: conditional mean
resids = nan(T,2);
mean_order = nan(2,3);
tic;
for ii=1:2
[theta1,sig21,vcv1,order1,resids1] = ARMAX_opt(rets1(:,ii),5,5,'BIC'); % takes about 6 seconds per variable
mean_order(ii,1:2) = order1';
mean_order(ii,3) = 1-sig21/cov(rets1(:,ii));
resids(:,ii) = [zeros(max(order1),1);resids1];
[ii,toc]
end
toc % takes 10 seconds for each series
mean_order
% so optimal models are AR(2) and AR(0)
end
When I am running it, I go this:
if true
% Cannot find an exact (case-sensitive) match for 'armax'
The closest match is: ARMAX in
C:\Users\SHK\Documents\MATLAB\Add-Ons\Toolboxes\kevinsheppard-mfe_toolbox-a93d075a449e\code\GUI\ARMAX.m
Error in ARMAX_2 (line 32)
M = armax(depvar,[ar,ma]);
Error in ARMAX_opt (line 40)
[theta_1,sig2_1,vcv_1,resids_1,yhat_1] = ARMAX_2(depvar,ii,jj);
end
Could you help me please!!!!
1 Comment
Answers (0)
See Also
Categories
Find more on Conditional Mean Models in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!