matlab - weighted correlation matrix -


In general I know that I can easily calculate the correlation matrix in matlab, there is a lot of function for this But what is weighted correlation about? I found this matlab file

, but how does choosing weight depend on intuition or is it standard?

Say that we put

  x = randn (30,4) x = 0,5377 0,8884 -1,0891 -1,1480 1,8339 -1.1471 0.0326 0.1049 -2.2588 -1.0689 0.5525 0.7223 0.8622 -0.8095 1.1006 2.5855 0.3188 -2.9443 1.5442 -0, 6669 -1.3077 1.4384 0.0859 0.1873 -0.4336 0.3252 -1.4916 -0.0825 0.3426 -0.7549 -0.7423 -1.9330 3.5784 1.3703 -1.0616 -0.4390 2.7694 -1.7115 2.3505 -1.7947 -1,349 9 -0.1022 -0.6156 0.8404 3.0349 - 0.2414 0.7481 -0.8880 0.7254 0.3192 -0.1924 0.1001 -0.0631 0.3129 0.8886 -0.5445 0.7147 -0.8649 -0.7648 0.3035 -0.2050 -0.0301 -1.4023 -0.6003 -0.1241 - 0.1649 -1.4224 0.4900 1.4897 0.6277 0.4882 0.7394 1.4090 1.0933 -0.1774 1.7119 1.4172 1.1093 -0.1961 -0.1941 0 , 6715 -0.8637 1.4193 -2.13 84 -1.2075 0.0774 0.2 9 16 -0.8396 0.7172 -1.2141 0.1978 1.3546 1.6302 -1.1135 1.5877 -1.0722 0.4889 -0.0068 -0.8045 0.9610 1.0347 1.5326 0.6966 0.1240 0.7269 -0.7697 0.8351 1.4367 -0.3034 0.3714 -0.2437-1.9609 0.2939 -0.2256 0.21 57 -0.1977 -0.7873 1.1174 - 1.1658-1.2078 and we did  

x (:, 4) = sum (x, 2); % Correlation intro [R, P] = corrcoef (x)% computed sample correlation and P values.

got more

  r = 1,0000 -0,0352 0,2673 0,6901 -0,0352 1,0000 -05101 0,2617 , 2673 -0,5101 1,0000 0,3504 0,6901 0,2617 0,3504 1,0000   

this undefined relationship, but how do I help the weighted correlation matlab file Can do? Please help me.

This function requires the weight of each observation as input.

If these were the outputs of a simulation for example, then you can tell the number of performances of iterations in weight. If they were the outcome of the stock, consider using the value in the portfolio. However, there is no standard way to achieve 'best' weight in general. Just think a value that is more reliable should generally get more weight.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -