%BondEstimator (c) K Nimark 2008

clear all;
clc;
format short;
global Y 

load('YFB');
Y=YFB;

%Assign starting values and boundaries to parameter vector theta
 x(1:3,1)=[0.95,0.9,0.6;]';%factor persistence
 x(4:6,1)=[.2,.2,.1;]';% s.d. factor innovations
 x(7:9,1)=[0,0,0;]';
 x(10:11,1)=[0.005,1;]';
 x(12,1)=0.19;

%Define bounds on theta
LB=[0,0,0,zeros(1,9);]';
LB(7:9)=-10;
UB=[.99,.99,.99,ones(1,9)*10;]';
UB(7:9)=10;


sa_t= 5; %starting temperature
sa_rt=.5;
sa_nt=5;
sa_ns=20;
warning off all;
[xopt]=simannb( 'BondLL', x, LB, UB, sa_t, sa_rt, sa_nt, sa_ns, 1);
