How to define correct my input variable?

1 Ansicht (letzte 30 Tage)
Julia
Julia am 10 Jul. 2013
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

Antworten (0)

Kategorien

Mehr zu Data Preprocessing finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by