Clear Filters
Clear Filters

arma regression with NAN

1 view (last 30 days)
Qian cao
Qian cao on 29 Dec 2015
HI,the two matrix are included as attached . rows represent time series. how to conduct arma model( inc. error and intercept term)with return(t) as y and MAprice(t-1) as explanary variable. The output of the coefficients of x should be in a matrix B which has the corresponding row and column as the return matrix. NOTE, the regression is only done with the MAprice available values. So some values in return matrix will be kicked due to the 1 to 1 relationship between y and x.
return=0 0 0 0 0 0 0 0 0 0
0.448154165 -6.968325792 -3.280941338 0.479237811 9.547738693 11.73457986 5.428571429 5.424485939 0 -3.101851852
6.251742792 -2.399481193 -6.353787408 -7.654081225 9.174311927 -4.56630137 10.56910569 -11.5759843 0 -1.672240803
14.28721394 20.06644518 9.501683182 24.35207521 15.12605042 27.75131842 17.64705882 20.72749816 0 16.69073737
6.980802792 0.249031544 2.065382117 10.66599682 2.99270073 1.87258427 -0.625 -4.216917632 0 7.231068369
0.413187945 -2.658937345 -2.630697438 -2.662218288 -4.676258993 -3.676326233 -7.446808511 -11.95004093 0 -5.140896839
-24.64984776 -21.56069364 -13.61064591 -11.32717777 -26.41509434 -11.45037294 -17.70114943 -19.2853264 0 -12.77123373
-11.45875426 -23.87619749 -11.2490831 -15.85853274 -21.02564103 -6.03464997 -14.80446927 -17.69946687 0 -10.22269604
-3.761898553 9.825750242 -1.40504162 6.806462702 5.194805195 -31.19259742 3.278688525 0.806781361 0 14.46101069
-16.48262313 -9.211106214 -6.28704868 2.94057407 -3.703703704 4 -11.9047619 -2.197468354 0 -0.806916427
7.916937054 -2.718446602 -10.06325474 5.713148769 3.846153846 -4.615384615 0.900900901 0.561710499 -3.225968494 2.167344567
-2.525556224 -0.598802395 4.745666382 1.352441385 0.617283951 -2.419354839 -17.14285714 -10.05559989 -4.666493641 0.534607291
26.41887724 20.73293173 16.83396636 -0.888712031 20.24539877 19.00826446 22.84482759 20.49653001 6.293150387 8.174463993
1.951933634 1.912681913 -1.387437594 0 15.81632653 11.11111111 -1.052631579 -9.278105666 -4.605108136 6.343478716
-2.297475171 -0.611995104 11.5146877 -1.346359743 -2.202643172 -3.125 -0.709219858 -3.409864391 6.207444638 4.357019916
-3.135333742 8.210180624 -2.265258935 7.274059202 -1.801801802 11.61290323 10.71428571 -7.059126452 0.649006006 6.9223882
-0.202301176 -2.921092564 -7.295383744 -5.254226314 -9.174311927 -0.115606936 -0.967741935 2.532734537 -6.000519076 -2.088047598
2.130039275 1.953888238 11.37044052 0.904794058 0.518134715 1.183431953 6 10.00014221 -2.127119112 4.660670482
2.238900903 13.45343043 0 4.483404711 -12.06185567 -11.11111111 -3.459119497 -9.652105338 -2.174477257 0
-1.990792584 -4.155405405 -0.526662278 -6.43781222 0.82063306 -2.631578947 -5.537459283 -1.864491665 -7.406681124 0
MAprice=NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
0.959374344 1.041971207 1.057307224 1.053534979 0.917366947 0.995216263 0.920751634 1.067879722 NaN 1.022189828
0.899497872 0.895406752 0.962805802 0.891663351 0.888077859 0.867665169 0.872916667 0.921687137 NaN 0.915041954
0.917546722 0.942773024 0.958170711 0.882133103 0.947242206 0.91666685 0.963120567 0.969601472 NaN 0.913142204
0.98677686 1.030539499 1.037432671 0.988287322 1.027672956 1.019083192 1.061302682 1.107146187 NaN 1.012433698
1.223941196 1.203267011 1.130863809 1.095442195 1.261538462 1.100574051 1.175977654 1.215336888 NaN 1.118317144
1.209436259 1.329461116 1.143672393 1.176255508 1.329004329 1.08868632 1.2 1.240144834 NaN 1.130272243
1.07088499 1.035551638 1.052352155 1.016336523 1.051440329 1.333333333 1.034920635 1.087911392 NaN 0.948933718
1.14717175 1.034789644 1.049794475 0.960320618 1.008547009 1.119657692 1.078078078 1.02246842 NaN 0.962967267
1.012051513 1.053393214 1.099460074 0.954963433 0.987654321 1.018817204 1.038690476 1.00372382 NaN 0.988511631
0.992185893 1.013386881 1.005403328 0.973329796 0.983640082 1.033057851 1.13433908 1.072461902 1.044288359 0.989421282
0.867512505 0.887179487 0.891017454 1.001490007 0.886054422 0.900462963 0.932163743 0.91752663 0.975879956 0.947983126
0.918910295 0.931320549 0.960675811 1.002988936 0.860499266 0.885416667 0.944444444 1.005680926 1.01149487 0.936546185
1.009144723 0.997810619 0.935367506 1.009098226 0.968468468 0.987096774 1.008333333 1.058828312 0.976186624 0.953112483
1.029670839 0.951315124 1.011705843 0.95903519 1.019877676 0.94026975 0.937634409 1.063296492 0.997778355 0.943822536
1.012162676 0.994008076 1.078694935 1.021111861 NaN 0.980276134 0.988888889 1.008224425 1.052014652 0.9982284
1.003392274 0.997061454 0.955489723 1.016443612 NaN 1 0.972746331 0.931907797 1.036230003 0.980092593
0.986728049 0.915315315 0.965968108 0.968532514 NaN 1.078947368 1.004343105 1.037680952 1.022224273 NaN
1.00609369 0.987663024 1.003529671 1.030584305 NaN 1.060810811 1.051724138 1.048953564 1.061329745 NaN

Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!