How to create Index Sector Chart

kkseal

Well-Known Member
#11
With Oxy's guidance in the matter this thread has the potential to become one of the most interesting & valuable threads in Traderji. Looking forward to it.

Regards,
Kalyan.

P.S. My request is to keep the discussion & methodology as general as possible & not make it MS specific.
 
Last edited:
#12
HI
is it possible to take today's closing prices of index's make them them base price and waiigth's remain same as before.

example assuming today the nifty is closed some what say, 5010 and wee take it as base price and so on is it possible ?

Ali
 

oxusmorouz

Well-Known Member
#13
oxy, i also need help calculating the index, please let me know all the building components that you need, INDEX, INDEX Components, What is the basis for allocating different weights for different individual components ? what else information you need, i will setup the components by wednesday and let you know we can start working from thursday. while i can build myself
Shall make a detailed post in a couple of days.

Essentially, before starting to build the index, the question you must ask yourself is "Why I am creating this index?". Weight age of the components in the index will primarily depend upon this.
The purpose may be to track the movement of a particular sector (So you may prefer to weigh it according to market cap/free float) or you may seek to create the index to define your initial portfolio and track your selection and allocation abilities, and also note the extent to which you have out/under performed the index (in which case you may prefer a fixed weight for each component based on subjective perceptions or an equally weighted index).

Once you've defined the purpose, the next step is to identify the stocks you'd like in the index. Care must be taken in order to ensure that the stocks have data history which is sufficiently more in duration than the gap between current date and base date. Otherwise, there will be disruption in the index values. For eg, if your base date for the index is 1 Jan 2005, and one of the stocks is listed in 2007, the values between 2005 and 2007 will be deflated to the extent of influence.

Method of calculation can be:
1) Arithmetic (where prices are taken in absolute terms)
2) Logarithmic (where percentage change from the base date is taken)
Log method is more useful and practial.

Types of weighing the index can be:
1) Equally weighted
2) Weighted according to discretion
3) Weighted using any other available data, which can be market cap (price*no of shares) or free float(price* liquid public holding) and so on.

The type of weighing can be mixed with the method of calculation to arrive at the desired type of index. This isn't exactly exhaustive but I hope it served some purpose.

Posting an example of an equally weighted logarithmic price index for cements with base date of 1 Jan 08.

a1:= Security("E:\New MS Data\NSE\ACC",C);
a2:= Security("E:\New MS Data\NSE\ambujacem",C);
a3:= Security("E:\New MS Data\NSE\ultracemco",C);
a4:= Security("E:\New MS Data\NSE\indiacem",C);
a5:= Security("E:\New MS Data\NSE\madrascem",C);
a6:= Security("E:\New MS Data\NSE\shreecem",C);
a7:= Security("E:\New MS Data\NSE\birlajute",C);
a8:= Security("E:\New MS Data\NSE\sanghiind",C);
a9:= Security("E:\New MS Data\NSE\dalmiacem",C);
a10:= Security("E:\New MS Data\NSE\prismcem",C);
a11:= Security("E:\New MS Data\NSE\jkcement",C);
a12:= Security("E:\New MS Data\NSE\ramcoind",C);

x:= DayOfMonth() = 1 AND Month() = 1 AND Year() = 2008;

100*(a1/ValueWhen(1,x,a1) + a2/ValueWhen(1,x,a2) + a3/ValueWhen(1,x,a3) + a4/ValueWhen(1,x,a4) + a5/ValueWhen(1,x,a5) + a6/ValueWhen(1,x,a6) + a7/ValueWhen(1,x,a7) + a8/ValueWhen(1,x,a8) + a9/ValueWhen(1,x,a9) + a10/ValueWhen(1,x,a10) + a11/ValueWhen(1,x,a11) + a12/ValueWhen(1,x,a12))/12
Any suggestions/criticisms will be appreciated.
 

kkseal

Well-Known Member
#16
A query on the percentage chng aspect w.r.t. Oxy's code :-

For the %chng in (security)a1, we should be taking 100*(a1-ValueWhen(1,x,a1))/ValueWhen(1,x,a1)
& same for the other securities.

Having said that i've seen similar formulas for ROC.

For a M-cap weighted index do we similarly take the %chng in M-cap from a base date divided by the number of index constituents??

Regards,
Kalyan.

P.S. Oxy don't bother to answer till your Exams are over.
 
Last edited:

kkseal

Well-Known Member
#17
That leaves two things in the agenda for further discussions (post Wednesday off-course after Oxy is free)

i) Weighting by M-Cap
ii) Weighting by Free-float M-Cap

This i think will be enough for our purpose

Regards,
Kalyan.
 
#19
HI,
I'm not sure if the question I have is related to this, but this is the only closest thread that i could find on the topic.
I'm a newbie on Metastock and have successfully downloaded the historic data from rapidshare (using getbhavcopy links) and have updated the remaining using the getbhavcopy.
The question i have is, is it possible to select just the NIFTY 50 stocks alone and do an analysis using Explorer?
Right now, i need to select all the stocks or pick and choose the required ones manually to do that.
instead is there a way of predefining the NIFTY and the Sensex stocks alone so that they can be chosen easily as required?

Thanks in advance for any suggestions,
 
#20
I need your help regarding sector chart in AMIBROKER. Please let me know if there is any afl to see sector chart.

Suppose, I have some bank’s script in bank sector as a,b,c..........x,y,z. Now I need to see a combined sector chart for all bank's script.
Please help me. Your cooperation is highly appreciated in this regards.
 

Similar threads