Skip to content
Browse the docs

Rule reference

Rule reference

Every kind of rule the engine runs, with what it does, the settings the agent uses when you name none, and an example to try.

On this page

How to read this reference

Each rule has a plain description, the settings the Strategy Agent uses when your words name none, and an example you can open in the agent with one tap. The settings shown are the agent's own reading of the example, so they change when the agent does.

Where the house tests run the same rule, its exact wording is shown, with a link to those recorded tests beside simply holding.

Timing rules: in or out of one share

Rules that decide, each day, whether to hold a share or fund or to sit in cash.

RuleWhat it does
Moving average crossover (golden cross)A moving average is the average closing price over the last so many days. This rule holds the share while a faster average is above a slower one, and holds cash when it falls below.
Exponential moving average crossoverThe same idea with exponential averages, which count recent days for more, so they turn sooner after a change of direction.
RSI dip (mean reversion)RSI scores the recent rises against the recent falls, from 0 to 100: a low score means mostly falls. This rule buys when the score drops below a low level and sells once it has climbed back above a higher one.
Breakout (Donchian channel)Buys when the close is the highest of the last so many trading days, and sells when the close is the lowest of the same number of days.
MACD crossoverMACD is the gap between a fast and a slow exponential average, and its signal line is an average of that gap. The rule buys when the gap crosses above its signal line and sells when it crosses back below.
Bollinger bandsThe bands sit a set number of standard deviations above and below a moving average, so they widen when prices swing more. The rule buys when the close falls below the lower band and sells when it is back at the middle line.

Ranking rules: hold the leaders of a list

Rules that score a list of shares or funds and hold the ones at the top, swapping as the order changes.

RuleWhat it does
Momentum rankingAt each rebalance, it ranks a list by each one's return over a past window and holds the leaders in equal parts, swapping when the order changes.
Rotation (momentum and calm prices)Like a momentum ranking, but each score blends the past return with how calmly the price moved.
Low volatilityHolds the names whose prices moved about the least over the past year, and scales the whole portfolio down when its ups and downs run above a target.
Quality rankingRanks on company accounts (how much profit a company makes on its owners' money) where Quantis holds them, blended with calm prices. A share with no accounts is ranked on its prices alone, and the result says which.

Holding several things at set weights

Portfolios with no buy or sell signal: fixed weights, buying and holding, and risk parity.

RuleWhat it does
Risk parityHolds the calmer assets of a list in equal parts, capped per asset, and scales the whole portfolio down when its ups and downs run above a target. Ask for hierarchical risk parity to weight them by how they move together instead.
Fixed weightsHolds set weights, such as most in a stock fund and the rest in a bond fund, and puts them back to those weights on a schedule. Weights that add up to less than the whole leave the rest in cash.
Buy and holdBuys on the first day and keeps it to the last. Every result is set beside this, so a plain question like "what if I had bought it" is answered the same way.

Conditions you can combine

The single tests a rule of several conditions is built from, each of which can also stand alone.

RuleWhat it does
Price against its moving averageThe close above or below its simple or exponential moving average. On its own it is the trend filter many people know.
One moving average against anotherA faster average above, below or crossing a slower one. Combined with a filter, it buys only when the filter also holds.
RSI above or below a levelThe RSI over any length against a level. A short RSI, such as two days, reacts to very short dips.
MACD crossing its signal lineThe MACD line crossing above or below its signal line, as a condition beside others.
Price against a Bollinger bandThe close below the lower band, above the upper band, or either side of the middle line.
A new high or low (channel break)The close breaking above the highest close, or below the lowest, of the last so many trading days.
A rise or fall over some daysThe close against the close a number of trading days earlier: a fall of so much in a day, or a rise over a month.
A fall from a recent highHow far the close is below its highest close of the last so many trading days.
A market-wide series against a level (the VIX)A stored daily series that is not a share price, against a level. Today the agent reads the VIX's close, a measure of how much traders expect prices to swing.
A gap at the openThe day's opening price against the day before: a gap up or down of so much from the previous close, or an open above the previous high or below the previous low.
A condition read on another symbolAny condition can be read on another symbol, such as the S&P 500 fund, so a rule trades one thing while watching another. Often used as a market filter.

Ways to sell, shorts, and what cannot run yet

Stops, profit targets and time limits, selling short, and the rules the engine does not run yet.

RuleWhat it does
Stop loss and trailing stopA stop sells when the price falls a set amount below where it was bought. A trailing stop follows the price up and sells on a fall of that much from the highest price since the purchase.
Selling on a gainSells the whole position once it is up a set amount from the price paid. No stop is needed beside it.
Selling after some daysSells a set number of trading days after the purchase, unless a stop, a target or the rule's own exit sells it first.
Selling shortSelling short means selling shares you have borrowed and buying them back later: it makes money when the share falls and loses when it rises.

What cannot run yet

Some rules need data the engine does not have, such as earnings dates. The list, in the engine's own words.

These pages describe how Quantis Trade works and what its tests show about the past. They are not forecasts and not advice.