Asset Pricing-2 Homework #3: A.Vamsi Krishna Roll No:019
Asset Pricing-2 Homework #3: A.Vamsi Krishna Roll No:019
A.Vamsi Krishna
Roll no:019
TABLE:
violation(0 if
|t-
mean =2p- sample standard stat|<1.96, no. of
probability 1 mean error t-stat else 1) violations
0.01 -0.98 -0.9791 0.00064 1.4298 0 5
-
0.02 -0.96 -0.9604 0.00088 0.4996 0
0.03 -0.94 -0.9400 0.00108 0.0371 0
0.04 -0.92 -0.9176 0.00126 1.9406 0
0.05 -0.9 -0.8989 0.00139 0.7939 0
0.06 -0.88 -0.8788 0.00151 0.7688 0
0.07 -0.86 -0.8600 0.00161 0.0248 0
-
0.08 -0.84 -0.8413 0.00171 0.7722 0
-
0.09 -0.82 -0.8217 0.00180 0.9210 0
-
0.1 -0.8 -0.8040 0.00188 2.1379 1
0.11 -0.78 -0.7780 0.00199 1.0167 0
-
0.12 -0.76 -0.7653 0.00204 2.6038 1
0.13 -0.74 -0.7393 0.00213 0.3100 0
-
0.14 -0.72 -0.7212 0.00219 0.5569 0
0.15 -0.7 -0.6966 0.00227 1.4898 0
0.16 -0.68 -0.6791 0.00232 0.3791 0
-
0.17 -0.66 -0.6605 0.00237 0.2274 0
0.18 -0.64 -0.6355 0.00244 1.8349 0
0.19 -0.62 -0.6186 0.00248 0.5635 0
0.2 -0.6 -0.5966 0.00254 1.3476 0
0.21 -0.58 -0.5774 0.00258 0.9993 0
0.22 -0.56 -0.5571 0.00263 1.0967 0
-
0.23 -0.54 -0.5420 0.00266 0.7677 0
-
0.24 -0.52 -0.5216 0.00270 0.5930 0
-
0.25 -0.5 -0.5003 0.00274 0.1023 0
-
0.26 -0.48 -0.4806 0.00277 0.2236 0
0.27 -0.46 -0.4569 0.00281 1.0950 0
-
0.28 -0.44 -0.4408 0.00284 0.2818 0
0.29 -0.42 -0.4195 0.00287 0.1602 0
0.3 -0.4 -0.3963 0.00290 1.2675 0
0.31 -0.38 -0.3795 0.00293 0.1846 0
0.32 -0.36 -0.3566 0.00295 1.1643 0
-
0.33 -0.34 -0.3425 0.00297 0.8549 0
0.34 -0.32 -0.3187 0.00300 0.4470 0
0.35 -0.3 -0.2997 0.00302 0.1127 0
0.36 -0.28 -0.2757 0.00304 1.4146 0
-
0.37 -0.26 -0.2627 0.00305 0.8980 0
0.38 -0.24 -0.2336 0.00307 2.0944 1
0.39 -0.22 -0.2147 0.00309 1.7290 0
-
0.4 -0.2 -0.2017 0.00310 0.5553 0
0.41 -0.18 -0.1756 0.00311 1.4262 0
-
0.42 -0.16 -0.1674 0.00312 2.3864 1
0.43 -0.14 -0.1399 0.00313 0.0255 0
0.44 -0.12 -0.1184 0.00314 0.5223 0
0.45 -0.1 -0.0972 0.00315 0.8769 0
-
0.46 -0.08 -0.0809 0.00315 0.2792 0
0.47 -0.06 -0.0561 0.00316 1.2479 0
0.48 -0.04 -0.0359 0.00316 1.2974 0
-
0.49 -0.02 -0.0213 0.00316 0.4049 0
0.5 0 0.0001 0.00316 0.0253 0
0.51 0.02 0.0215 0.00316 0.4744 0
-
0.52 0.04 0.0381 0.00316 0.5886 0
0.53 0.06 0.0605 0.00316 0.1584 0
-
0.54 0.08 0.0784 0.00315 0.5075 0
0.55 0.1 0.1006 0.00315 0.1971 0
-
0.56 0.12 0.1166 0.00314 1.0889 0
-
0.57 0.14 0.1388 0.00313 0.3896 0
-
0.58 0.16 0.1594 0.00312 0.1794 0
0.59 0.18 0.1795 0.00311 - 0
0.1607
-
0.6 0.2 0.1980 0.00310 0.6388 0
0.61 0.22 0.2204 0.00308 0.1426 0
-
0.62 0.24 0.2398 0.00307 0.0717 0
-
0.63 0.26 0.2595 0.00305 0.1506 0
0.64 0.28 0.2813 0.00303 0.4218 0
-
0.65 0.3 0.2948 0.00302 1.7341 0
0.66 0.32 0.3245 0.00299 1.4910 0
0.67 0.34 0.3421 0.00297 0.7067 0
0.68 0.36 0.3623 0.00295 0.7871 0
0.69 0.38 0.3819 0.00292 0.6638 0
0.7 0.4 0.4006 0.00290 0.2071 0
-
0.71 0.42 0.4178 0.00287 0.7588 0
0.72 0.44 0.4426 0.00284 0.9310 0
-
0.73 0.46 0.4578 0.00281 0.7896 0
0.74 0.48 0.4845 0.00277 1.6267 0
-
0.75 0.5 0.4976 0.00274 0.8750 0
0.76 0.52 0.5229 0.00270 1.0833 0
-
0.77 0.54 0.5395 0.00266 0.2028 0
0.78 0.56 0.5640 0.00261 1.5241 0
0.79 0.58 0.5813 0.00257 0.4974 0
0.8 0.6 0.6013 0.00253 0.5224 0
0.81 0.62 0.6236 0.00247 1.4644 0
-
0.82 0.64 0.6379 0.00244 0.8459 0
-
0.83 0.66 0.6583 0.00238 0.7309 0
0.84 0.68 0.6804 0.00232 0.1553 0
0.85 0.7 0.7009 0.00226 0.3990 0
-
0.86 0.72 0.7196 0.00220 0.1822 0
0.87 0.74 0.7436 0.00211 1.7217 0
0.88 0.76 0.7614 0.00205 0.6731 0
0.89 0.78 0.7824 0.00197 1.2186 0
-
0.9 0.8 0.7988 0.00190 0.6203 0
0.91 0.82 0.8205 0.00181 0.2655 0
-
0.92 0.84 0.8348 0.00174 2.9981 1
-
0.93 0.86 0.8599 0.00161 0.0372 0
0.94 0.88 0.8817 0.00149 1.1259 0
-
0.95 0.9 0.8983 0.00139 1.1949 0
0.96 0.92 0.9204 0.00124 0.2911 0
-
0.97 0.94 0.9397 0.00108 0.2958 0
-
0.98 0.96 0.9583 0.00090 1.8595 0
0.99 0.98 0.9801 0.00063 0.1274 0
CODE:
bin function
fuction bin=binp(theta)
a=rand(1,1);
if a<=theta
bin=1
else
bin=-1;
end
main code
clear; clc;
m=10^5;
prob=[0.01:0.01:0.99];
for i=1:1:length(prob)
tic()
bin(1,1)=binp(0.5);
for j=1:1:m
if bin(j,1)==1
bin(j+1,1)=binp(prob(i));
else
bin(j+1,1)=binp(1-prob(i));
end
end
for r=1:1:m
y(r,1)=bin(r,1)*bin(r+1,1);
end
muhat_y(i,1)=mean(y);
mu_y(i,1)=2*prob(i)-1;
se_y(i,1)=std(y)/sqrt(m);
t_stat(i,1)=(muhat_y(i,1)-mu_y(i,1)-mu_y(i,1))./se_y(i,1);
clear bin;
toc()
end
result=[prob',mu_y,muhat_y,se_y,t_stat];
xlswrite('output.xls',result,'bmrw','b2');
THEORY:
yi is an auxiliary random variable used to check whether the outcome of the simulated xi
values came true.
yi xi xi 1
If the simulated outcomes of the xi values are true then the yi must follow the distribution
^
t-stat= * N
s.e( yi )
The simulation is true if then |t-stat| must be less than 1.96 for 95% of times