Profile Picture

OtherSymbols accessing data for symbols outside watchlist

Posted By NorgateData Last Year

OtherSymbols accessing data for symbols outside watchlist

Message
Posted Monday February 01 2016
As far as I understand it, during a simluation, the OtherSymbols method can only access data on symbols within the watchlist you are currently testing.

This becomes an issue with dynamic watchilsts that only contain, for example, the stocks within a particular index and you want to use some other external trend filter (such as an index or something else like a symbol containing a market breadth-based indicator).

Request: Allow the OtherSymbols method to access data on symbols outside the watchlist



Best regards,
Richard Dale
Norgate Data
Posted Friday February 12 2016
The way to do this today is to have the watchlist include all the symbols you need in your system, and then in your trading logic you can filter out the ones you don't want to trade.

I don't want to try to allow you to access any symbol possible from your system, because making that data available means it would have to go through the bar data processing / aggregation pipeline.  So most of the time when you don't need symbols you haven't specified, there would be a lot of overhead for processing the extra symbols.

Perhaps a good solution would be to allow you to specify the symbols you intend to trade as a subset of the ones you want to have access to in the system.  What do you think?

Thanks,
Daniel
Posted Friday March 04 2016
Hi, 

I also have the same issue. I am currently working on a system that ranks stocks and trades on them accordingly. I've got my data stored in a MySQL database.

Just say I only want to trade stocks that are in the S&P500 ($SPX) at the time of the trade, I will have to either:

a) Manually create a watchlist with all stocks that have been in the $SPX at some point in time then filter them by date
problem: Long manual process for information that already exists in my Database, what happens when a new stock is added or removed? I'd have to be constantly updating the watch list manually.

b) have a watch list with everything and then identify which ones were in the $SPX at the time filtering out the others
Problem: My database has 40,000 stocks. I have tried a watchlist with only a fraction of these, RightEdge understandably starts freezing. 
Problem: RightEdige, I think, will be creating a MySymbolScript for each one in the watchlist and run it, that is just a big waste of time when I'm only going to be using a small fraction. 

The ideal approach would be that in MySystem I can define which symbols I want to use. E.g. I do a lookup in the database for the symbols in the index at the time and define that as my universe.

Any ideas?


Posted Saturday March 05 2016
Hi Daniel,

Regarding watchlists, we're decided to create a "combined" watchlist feature that allows you to combine two or more watchlists into a single one.  The first watchlist might be the S&P 500 Current & Past constituents (a dynamic watchilst that gets new stocks over time) and the other might be the individual items you want to references as part of the system (eg. economic activity indexes, other indexes,  bond yields, etc.).  Users can create a watchlist that combines both watchlists into one and use that in a simulation.  Within the simulation, they can use a simple filter against the security type to ignore any possible entires in security types they want to ignore.... e.g. for a stock trading system, within the NewBar override:


public override void NewBar()
{
    if (Symbol.AssetClass != AssetClass.Stock)
        continue;
...




Best regards,
Richard Dale
Norgate Data

Edited: Saturday March 05 2016 by NorgateData
Posted Saturday March 05 2016
Hi Norgate Data,

"a dynamic watchilst that gets new stocks over time" how are you building and maintaining this watch list?

Thanks
Posted Saturday March 05 2016
sambwest (3/5/2016)
"a dynamic watchilst that gets new stocks over time" how are you building and maintaining this watch list?


We have (laboriously) matched historical index constituent/rebalancing lists with our historical database.  eg. Russell 3000 "Current & Past" watchlist back to mid 1990 contains over 10000 stocks. S&P 500 back to the 1960s contains over 1600 stocks.  As new stocks are added/symbols are changed/stocks are removed we track that too.  Each index has its own rebalancing/replacement rules.




Best regards,
Richard Dale
Norgate Data
Posted Sunday March 13 2016
sambwest (3/4/2016)
The ideal approach would be that in MySystem I can define which symbols I want to use. E.g. I do a lookup in the database for the symbols in the index at the time and define that as my universe.

Any ideas?


The problem with this is that by the time your code in MySystem is running, a bunch of stuff has already been initialized with the list of symbols for the system.  The solution I came up with for things like this is to allow you to create custom watchlist plugins.  That way instead of manually creating and keeping a watchlist up to date with what's in your database, the watchlist plugin can simply pull that information directly from the database and process it as needed.  The source to the default watchlist plugin is included in the RightEdge samples.

Norgate has created a very nice watchlist plugin that works with their data offering which can dynamically include the right symbols for a given index or other watchlist.


Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems