Calculating concentration ratio - financial time series

4 次查看(过去 30 天)
Hello everyone,
I am fairly new to MATLAB so please bare with me.
I have the time series of the S&P500 for 18 years and I would like to compute the concentration ratio of the index for each day (just a column vector). I know that I can use the function concentrationIndices from the MATLAB Risk Management tool which supports 7 measures one of which is the concentration ratio.
I am now wondering how to create the loop so I would get the concentration index for each trading day. I thought that I can use the for function but it doesnt really work:
n = 347 % number of assets
t = 4779 % number of trading days
for m = 1:t
ci(m) = concentrationIndices(Data200018(m,:)); % the m-th trading day
end
The error I get is:
Subscripting a table using linear indexing (one subscript) or multidimensional indexing
(three or more subscripts) is not supported. Use a row subscript and a variable subscript.
Can you please tell me what I am doing wrong?
Many thanks in advance!
Nadya
  1 个评论
Clement Schuurman
Hello Nadezhda,
I currently have the same problem using the function "concentrationIndices". I need to calculate these indices for every row of my matrix (rows represent trading days like in your case).
Have you been able to resolve the problem?
Thank you in advance!
Clément

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Transaction Cost Analysis 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by