This is a trading item or a component that was created using QuantShare by one of our members.
This item can be downloaded and used by QuantShare Trading Software.
Trading items are of different types. There are data downloaders, trading indicators, trading systems, watchlists, composites/indices...
You can use this item and hundreds of others for free by downloading QuantShare.
Top Reasons Why You Should Use QuantShare:
Works with US and international markets (stock, forex, options, futures, ETF...)
Offers you the tools that will help you become a profitable trader
Allows you to implement any trading ideas
Exchange items and ideas with other QuantShare users
Our support team is very responsive and will answer any of your questions
We will implement any features you suggest
Very low price and much more features than the majority of other trading software
This composite index calculates for each stock, its close price correlation with the close price of an index. It then averages the results and creates the Average Correlation Index, whose symbol name is "Correl_10bars".
For each trading bar and for each stock (only stocks whose close prices are above two are selected), the correlation between this stock and the index is calculated for the preceding 10 bars. The index involved in the correlation is the "^GSPC" or the S&P 500.
You can update both, the correlation period and the index symbol name. You can also modify the list of symbols used by this composite.
In order to change the correlation period, you will have to update the composite item and change its formula. The first line "period = 10;" defines the period.
In order to change the index, which is currently set to S&P 500, replace "^GSPC" and type in the index symbol name you want to use. As an example, if you want to calculate the average correlation between stocks listed on the Bombay Stock Exchange and this exchange main index, type in "^BSESN" as the index symbol name (Use BSE Sensex to download historical end-of-day for the Bombay Stock Exchange Sensitive Index). For the National Stock Exchange, you should use "^S&P_CNX_Nifty" instead of "^GSPC" (NSE Nifty - S&P CNX Nifty).
A high value for the Average Correlation Index may indicate that many stocks are correlated with the S&P 500. And a low value for this composite indicates that there is a low correlation between individual stocks and the S&P 500 index.
From 2001 to 2009, a simple strategy that buys the S&P 500 when its 10-bar rate-of-return is negative and the Average Correlation Index is higher than 0.5 (50%) and exits the position after 5 bars, generated 35 trades and produced an average gain of 0.356% per bar.
A simple strategy that shorts the S&P 500 when its 10-bar rate-of-return is positive and the Average Correlation Index is higher than 0.5 and exits the position after 5 bars, generated 23 trades and produced an average gain of 0.245% per bar.
Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.