Release of SQX 139 Dev 1 and what’s planned for year 2024
We’d like to announce the release of the new SX 139 Dev 1 version – note that this is a development version for testing, not the final 139 version. Most …
Přejít k obsahu | Přejít k hlavnímu menu | Přejít k vyhledávání
There are many ways to trade equities (stocks, ETFs, etc.). SQX has the ability to generate, research and trade “standard” single-asset trading strategies that trade one individual asset – be it forex, futures contract, stocks, or ETFs.
But the nature of stocks allows many other trading styles:
The common thing with these different styles of stock-trading algorithms is that they usually trade groups of stocks – either several stocks in a group, several pairs of stocks, or hundreds of stocks that constitute indexes like S&P 500.
Note that this kind of trading algorithm is not as same as using one symbol and define additional charts with another symbols. This is possible in SQX right now, but it doesn’t give us the possibility to create this special type of stocks strategies.
To offer our users access to this new vast area of possible strategies we are introducing a new Stockpicker engine in SQX – it will be in the upcoming Build 136.
Our new Stockpicker engine uses the third mentioned style of trading stocks – it supports strategies that trade big number of stocks, for example 500 stocks in the S&P 500 or 2000 stocks in Russel 2000 index.
According to our best knowledge StrategyQuant X is the WORLD’S FIRST AND ONLY platform that offers automatic generation and research of this kind of strategies and you as our users are the first who can benefit from it.
Note – this new engine and its backtesting and generation of strategies is still under development at the time of writing this article. The first preview is available in SQX Build 136 Dev 1 version, but it is still a first preview and there is still some work on it until the final release.
This article is only a first one in the series where we’ll explain this trading style, the new engine, and its possibilities.
As said earlier, Stockpicker engine creates algo strategies that trade on group of stocks, not individual assets. In order to support it we added a new Stock groups feature to Data manager:
It already contains predefined standard indexes, and it enables you to create your own stock groups.
To distinguish stock groups from standard symbols, they are enclosed in [ ], for example [StockGroupName].
Default (uneditable) stock groups provided by us are enclosed in double quotes [[ ]]
Stock group is defined by its name and its constituents – the list of stocks it contains:
SQX Stockpicker engine natively supports Survivorship bias – which is important for realistic backtests (more about this in another article) – so you can add also dates from – to when the stock belonged to index.
An example Stockpicker strategy in pseudo code:
//-------------------------------------------------------------------- // Trading options logic //-------------------------------------------------------------------- Entry type: On Bar Open Order place type: Immediately //-------------------------------------------------------------------- // Trading rule: Long (On Bar Open) //-------------------------------------------------------------------- Entry Condition: (Kaufman Adaptive Moving Average(Main chart, PRICE_TYPICAL, 146)[2] is rising for 2 bars at 3 bar ago) Order: Open Long order at Market; Exit: At end of day (DayClose) //-------------------------------------------------------------------- // Trading rule: Short (On Bar Open) //-------------------------------------------------------------------- Entry Condition: (Kaufman Adaptive Moving Average(Main chart, PRICE_TYPICAL, 146)[2] is falling for 2 bars at 3 bar ago) Order: Open Short order at Market; Exit: At end of day (DayClose) //-------------------------------------------------------------------- // Trading rule: Position Score (On Bar Open) //-------------------------------------------------------------------- Position Score = LowDaily(Main chart)[2]; Max positions: 5
Stockpicker strategy consist of Long + Short rule and Position score rule. It trades on a Daily timeframe only.
Long and Short rules define:
In our example the strategy will have a long entry signal when:
(Kaufman Adaptive Moving Average(Main chart, PRICE_TYPICAL, 146)[2] is rising for 2 bars at 3 bar ago), and it will close it ad the end of day
Position score rule is a specialty of Stockpicker strategies. Because Stockpicker strategy trades on a group of stocks (for example 500 stocks in S&P 500 index), it must determine how many positions should be open in parallel as well as the criterium on how to sort signals from different stocks:
This kind of engine is different because remember – it trades on 500 stocks in the group.
The trading result of this strategy applied on S&P 500 stock group could look as follows:
You can see that it opened 5 different stocks on day 1, and then another 5 stocks on day 2.
It can happen that less than 5 or even no trades are opened on a particular day – it depends in the entry conditions, etc.
Strategy can also use a different entry rule than Close at end of day – the trades can last for more than one day, but there will be never more than 5 stocks opened at the same time.
Stockpicker strategies have a completely different “architecture” than standard strategies, and we added this special type of strategy also in AlgoWizard editor.
The strategy definition is quite simple, it consists of defining Long (and Short) rules:
and Position score rule:
There are some limitations in SQX regarding the new Stockpicker engine and its strategies:
Stockpicker engine supports only TALib indicators
Right now, Stockpicker strategies can use only indicators from TALib library – TALib is a standardized library of technical indicators that consists of over 200+ most used indicators.
This means that internal indicators and signals implemented in SQX are for now not available for these strategies. This might change in the future, but it is like this for now.
There are also no predefined signals based on TALib indicators defined for now.
Source code of Stockpicker strategy is available only in Pseudo code
This is related to the next section – tradability of this class of strategies.
Stockpicker strategies work only on Daily timeframe
This type of strategies is traded usually on a Daily timefrane, and it is the only timeframe that is allowed for them in SQX for now.
Generation and backtest of Stockpicker strategies is slower than “normal” strategies
The engine is still in development, and it will be optimized further.
Moreover, with Stockpicker one strategy backtest means that the strategy is in fact backtested on hundreds of stocks in a given Stock group, so it must be somewhat slower than backtest on one symbol.
Advanced features like ATM and cross checks don’t work on Stockpicker strategies yet
There is no support for these more advanced features yet, but we are working on it.
This kind of strategies is difficult to trade automatically – not because it would be impossible, but because trading platforms are usually targeted towards one-strategy-per-chart approach.
It is not as simple as opening a chart in MetaTrader or Tradestation and attach a strategy to it, as we could do it with “standard” algo strategies.
There are programs like AmiBroker, that could backtest and to some extend trade this kind of strategies there is a Portfolio trader in MultiCharts that could theoretically trade these strategies live.
Some traders who trade this kind of strategies do it manually – it is possible because you usually need to check for the signal only once or twice a day.
More “advanced” traders (and some of SQX team members) that currently trade similar strategies use Python and a lot of programming and hacks to be able to trade them.
All these options are very cumbersome to use and prone to error. We want to offer a better way – not only to you, but also to ourselves – because we already trade this kind of strategies to.
We are glad to announce that we are developing our own cloud trading platform that will have a direct support for Stockpicker strategies produced by SQX and it will make trading it extremely simple.
A Beta version of this platform is very close to finish, it will be announced shortly. Our plan is to have it ready with the final release of StrategyQuant X Build 136 that will offer support for these new Stockpicker strategies.
We’d like to announce the release of the new SX 139 Dev 1 version – note that this is a development version for testing, not the final 139 version. Most …
Dive into Algorithmic Trading Without the Coding Headache! Are you intrigued by algorithmic trading but dread the thought of coding? Today marks the beginning of our exciting series that’s about …
In this interview, we catch up with Naoufel, a seasoned trader, to explore his journey through the stormy market of 2023. Naoufel is successful trader with verfied track record who …
Excellent ! I would like to test it !!!!
please send us link of trial version 136 to test it.
Got the new stockpicker SQX build 136. Have also been looking at AlgoWizard Beta with web trading.
Q: How do you import the Stockpicker strats developed on the StratQuantX platform to AlgoWizard beta?
Hi,
you need to save the strategies to SQX files. You can load sqx files into the AlgoWizard platform
Excellent! But if you can add weekly and monthly timeframe please! Also, a tutorial about configuring stock groups! Thanks a lot!!!
@Mark Fric Stockpicker (SQX ver 138.1837) is missing MAX and MIN functions from the TA-Lib functions. Cannot make even the most basic breakout strategies on stocks without these.
You can find that under “Functions” -> MAX / MIN
Thanks!