Applying Strategy to collective price action versus individual symbols
Author: jpmorgan
Creation Date: 4/13/2010 2:13 AM
profile picture

jpmorgan

#1
Is there a way to treat an underlying group of individual equities as a single security for modeling purposes? WealthLab allows the creation of data sets, but applies the strategy elements to each of the underlying symbols, as opposed to one level up in the hierarchy to the overall basket of securities or index. I am interested in creating a self defined basket or benchmark index of sorts and run buy and sell rules on the group based upon the collective performance, although I may wish to take activity on a given individual security from time to time. A simple example would be to Buy all underlying securities in the index when the SP500 when closes above 50d SMA and Sell all securities when it closes below the 50d SMA. In this example, which isn't what I am really looking to do or I would just use an ETF to do it, I would want to have all 500 symbols buy or sell based upon the index performance versus applying that rule separately to all 500 components.

Sorry, but just beginning here, so I appreciate, in advance, whatever thoughts or experiences may be shared.
profile picture

Eugene

#2
You can build an index of it using this technique:

EDIT 08/29/2017:
1. Wealth-Lab User Guide > Index-Lab® chapter
2. basket trade

Then you can export it to an ASCII/CSV file and create a new virtual but real symbol by reading the file back using the ASCII data provider. That's if you want to apply trading rules to the virtual symbol directly. Otherwise, if the symbol is intended to be a performance benchmark proxy for trading the actual stocks, this step is not required and what is said in the Wiki article above is sufficient.
profile picture

Cone

#3
"Index-Lab" will will be integrated in the next release - summer 2010. Here's the description from the baseline product: Index-Lab

QUOTE:
A simple example would be to Buy all underlying securities in the index when the SP500 when closes above 50d SMA and Sell all securities when it closes below the 50d SMA.
This is a very simple rule for which you don't need Index-Lab - you just need to have all the securities in a DataSet and run a Multi-Symbol Backtest, or MSB. Here's a script with all the bells and whistles -

CODE:
Please log in to see this code.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).