Create a stock index or a trading indicator using the composite tools
Post on: 11 Июнь, 2016 No Comment
Create a stock index or a trading indicator using the composite tools
Updated on 2010-06-15
There are two tools in QuantShare that at the first glance seem to perform the same task. Although it is true that these tools have the same name and have a lot of things in common, each one can perform things that are impossible for the other to do. These tools are the composite/index plug-in and the composite function.
In this post, we will describe and introduce each tool and enumerate each one’s advantages.
The composite plug-in was developed first. Its main role is to create composites and indices using quotes and/or databases’ data. Before creating a composite, you will have to open a form, add ticker symbols, formula, calculation method and some other optional settings. Once the composite is created, its data is associated with a ticker symbol; you can later display the symbol’s data, reference it into formulas and use it to create trading rules.
The composite function doesn’t contain any forms, controls or buttons. It simply consists of a powerful vector-based function that you can use to create rules based on aggregate data of several securities (quotes, technical indicators, fundamental data. ). With a single line, you can for example instruct the trading software to create a trading system that buys stocks when the difference between their close price and moving averages is two time higher the standard deviation of the same formula for all US stocks.
Advantage of the composite plug-in:
- It associates the index or composite data with a ticker symbol and therefore you can plot quotes data as you do with any stock, currency or futures contract. Example, you can calculate then plot the advance-decline market breadth indicator for all stocks or only for stocks that are part of the Dow Jones Index
Advantage of the composite function:
- It requires only one line of code and can be easily used to create trading rules
The main disadvantage of this function is that it can be used only by some plug-ins (Rules Analyzer, Ranking System Analyzer, Screener, Simulator, and Portfolio). You cannot use it for example to display data on a chart. The watch list plug-in cannot use it either.
To summarize, both tools allow you to create composites. While the main role of the first one is to analyze and display composites data, the second composite (function) is usually used to create trading rules. The latter let you also calculate the percentile and rank of an instrument for any given formula.