How to create series that sums other series for particular date?
Posted: Sun Aug 16, 2020 4:42 am
Hello,
I am trying to create my own stock market index that is aggregate of all stocks' trade data within a particular stock market. I have multiple markets with multiple stocks in each. Let's say I want to create a series that sums number of all traded stocks (volume) for each trading day. How can I do it in eviews v8.1?
Assume that for market="US" I have series VOL (number of stocks traded for a given day) for stocks X,Y, and Z for dates Date:t, Date:t+1, and Date:t+n.
I need to create a series of US_inx_vol that sums VOL of all stocks for each date (total number of stocks traded for a given day).
If I use excel SUMIF function then I would type =sumif(range of multiple stocks data for a period; Date; VOL) near each Date on the vector.
PS: Also, if it won't complicate it much, how to weight each additional component. In the example above, all stocks have same impact on the index. Is it possible to weight variables by market capitalization before summing? Let's say I want to estimate weighted average of PE ratio for all stocks in a market.
I am trying to create my own stock market index that is aggregate of all stocks' trade data within a particular stock market. I have multiple markets with multiple stocks in each. Let's say I want to create a series that sums number of all traded stocks (volume) for each trading day. How can I do it in eviews v8.1?
Assume that for market="US" I have series VOL (number of stocks traded for a given day) for stocks X,Y, and Z for dates Date:t, Date:t+1, and Date:t+n.
I need to create a series of US_inx_vol that sums VOL of all stocks for each date (total number of stocks traded for a given day).
If I use excel SUMIF function then I would type =sumif(range of multiple stocks data for a period; Date; VOL) near each Date on the vector.
PS: Also, if it won't complicate it much, how to weight each additional component. In the example above, all stocks have same impact on the index. Is it possible to weight variables by market capitalization before summing? Let's say I want to estimate weighted average of PE ratio for all stocks in a market.