Info
この質問は閉じられています。 編集または回答するには再度開いてください。
Order in combined financial time series
1 回表示 (過去 30 日間)
古いコメントを表示
Hello,
I have the following problem:
I create a fts for each security and simply name it s1,s2,...,s30 just by the index k of the loop.
for k=1:z
prices_fts{1,k}=fints(prices_sort{1,k}(:,1),prices_sort{1,k}(:,2),['s' num2str(k)]);
end
So far so good.
Now I merge all fts to one.
all_fts=prices_fts{1,1};
for k=1:z
all_fts=merge(all_fts, prices_fts{1,k});
end
Here comes the problem: instead of sorting it straight from 1 to 30, the order of the single series in the merged series is 1,11,12,13,14,15,16,17,18,19,20,21,...,3,30,31. It's all sorted by the first number.
I didn't find anything about sorting it rigth. I am thankful if somebody can help me.
Dominik
0 件のコメント
回答 (1 件)
Leah
2013 年 4 月 8 日
I don't have the financial toolbox, so it's hard to know exactly what's going on. You can use orderfields and specify an array with the order you want.
It might work to merge all at once instead of in a loop, but it seems like the sort is happening inside merge.
0 件のコメント
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!