Click here to Login





                                                   Composites - Making Them Faster

  0

0
Dave W.
2014-03-06 18:03:32


I have a fairly powerful computer, and love the idea of using composites in my trading systems. As you've mentioned in your articles, though, using them can be extremely slow.

I'd like to get a few ideas on how to make using them faster. Let's take a specific case. Let's say I'm optimizing a trading system that creates a composite based on the members of the Russell 3000 index that trade an average of 3M shares a day. I want to run roughly 250 optimization iterations, but doing that takes 6 - 8 hours. (Side question: Is it the case that the composite is re-calculated each time on optimization iteration is run?) This makes it very challenging to evaluate various system options for using comp().

Here's some sample code to give you a better idea about how I'm using the comp() function in the system:

NatrShortRankLength = 5;
RankThreshold = 140;
Optimize("NatrShortRankLength", 2, 8, 2);
Optimize("RankThreshold", 5, 175, 5);
ShortRankFunction = natr(NatrShortRankLength );

Rule1 = connorsrsi(CRSI_RSI_Lookback, CRSI_DaysUp, CRSI_PctRank_Length ) > CRSI_Threshold;
Rule4 = SMA(volume, 22) > MinimumVolume;
Rule5 = comp(ShortRankFunction, 'rank' ,1 , SMA(volume, 22) > MinimumVolume) >= RankThreshold ;

Short = Rule1 && Rule4 && Rule5;


I've seen some related posts, but I'm not sure if there are there options to store the composite data in a custom database and request the data versus re-calculating the composites when optimizing. Or are there other options to make them faster that I'm missing?

Thanks in advance for your suggestions.



QuantShare
2014-03-07 13:23:32

  0

Best Answer
Hi Dave,

We are preparing a blog post on how to store ranking data in a custom database for later use during optimizations.
But in your case, you can replace the "comp" function with the "SetSimShortRank" function.

Example:
SetSimShortRank(ShortRankFunction); // Rank stocks based on a specific rule
The volume filter can be added as a new rule in the "short" variable.




clonex
2014-03-07 16:37:13

  0

I use setsimlong/shortrank and It works fast



clonex
2014-03-07 16:37:21

  0

I use setsimlong/shortrank and It works fast



Dave W.
2014-03-07 16:58:59

  0

Thanks all.

I typically also use SetSimLong (/Short), I just didn't think that I could use it in this case, but your example (QuantShare) made me realize I could accomplish what I wanted via what you said + limiting the number of positions... Much better solution!

Thank you.
Dave



No more messages
0




Reply:

No html code. URLs turn into links automatically.

Type in the trading objects you want to include: - Add Objects
To add a trading object in your message, type in the object name, select it and then click on "Add Objects"










QuantShare

Trading Items
Number of Stocks Making a new 52-Week Low - Market Indicator
Number of Stocks Making a new 52-Week High - Market Indicator
Record High Percent - 10-day Simple Moving Average of the High-Lo...
Time-series location relative to its high and low
Trending Up/Down using Ten Moving Averages

How-to Lessons
How to automatically arrange charts?
How to create a formula
How to download EOD quotes for active and valid stocks only
How to create a mobile database/account
How to use a custom drawing tool

Related Forum Threads
Backtesting composites
Making available indicators read-only
Making better use of multiple panes?
Interpret Prediction results and making it useful?
Composites in a Dynamic Watchlist filter

Blog Posts
Create indicators, composites and trading systems using QL and CS...
Speed Up Optimizations by Saving Ranking Data into a Custom Datab...
4 Links to Download Free Historical Stock Prices Data by Date
Running QuantShare on Amazon's EC2 Cloud & Automate Strategies Si...
How to create and backtest thousands of trading rules in less tha...









QuantShare
Product
QuantShare
Features
Create an account
Affiliate Program
Support
Contact Us
Trading Forum
How-to Lessons
Manual
Company
About Us
Privacy
Terms of Use

Copyright © 2024 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items



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.