How to define correct my input variable?
1 次查看(过去 30 天)
显示 更早的评论
Hi,
my base function is: function [out1,qc1,teststat,pval] = exceedence_correl(X,Y,qc)
I define X and Y ans x(:,1) and x(:,2), as the first column shows the returns on lets say equity index and second column returns on one of my commodity indices. The function then computes the exceedence correlation at different threshold levels (0,0.5,1,1.5).
As I have 10 different indices and I am interested in exceedence correlation between these indices. I wanted to know if there is a way to define my input data such that the function takes next indices pair after it is done computing the first one. So that I don't have to specify my X for each indices pair.
This is the way I have read in my data: data=xlsread('C:\Users\jkorolev\Documents\Thesis\Data\Bloomberg\Matlab asymmetric correlation.xlsx');
MSCISP500=data(:,[1 2]); MSCIGSCI=data(:,[1 3]); MSCIGSAG=data(:,[1 4]); MSCIGSEN=data(:,[1 5]); MSCIGSExEN=data(:,[1 6]); MSCIGSEM=data(:,[1 7]); MSCIGSIM=data(:,[1 8]); MSCIGSGold=data(:,[1 9]); MSCIGSLS=data(:,[1 10]);
So I want the function to go to the next pair, e.g. MSCIGSCI after it has calculated the exceedence correlation for MSCISP500, and still show me the outputs of the previous calculations. I do it for three time periods, so it is very time consuming to define the inputs one after another.
I am not sure if it is clear what I need or not. :(
Any help is appreciated.
Thanks, Julia
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Preprocessing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!