Trade Sizing tab

The Trade Sizing tab is where you specify the price that RuleTrader uses, for trades in back-tests, and choose the method used to calculate the nominal trade-size.
Trading Style & Pricing
The ‘Trading style’ setting lets RuleTrader simulate two styles of investing. Use ‘Trade near close’ if you tend to trade during the day, near to market close (like the rest of the smart money). With this setting the close price is used for trades and trading rule decisions are based on the data available before market close, before the price channels and any statistics you use have been updated with the day’s data.
However, if you tend to review your investments after your day is done, when the markets have closed, and then trade the next day, then use ‘Trade tomorrow based on today’. This uses the data after markets have closed and everything has been updated, then enters the trade on the next day using the price specified in the ”Trade tomorrow…’ uses’ setting, which can be any of open, close, or day’s price. The latter is the average price calculated using the ‘Represent each day’s price using the’ setting in System Settings.
Trade Sizing
Defining the trade-size here saves you having to calculate a trade-size yourself in the Trading Spec, though you can do that if you prefer. It also lets you take advantage of RuleTrader’s unique Smart % trade-sizing method (see below), which is designed to make the best use of the cash in your account.
The first setting in the tab specifies the trade-sizing method: a fixed value, a smart % of capital or cash; or a combination of the two that chooses either the lesser or the greater value produced by the two approaches. The next two settings then specify what the fixed value and the smart % should be.
The final setting is the minimum trade value, which is the minimum amount that must remain in a trading account (over and above the account’s minimum balance) before it can be used to make a trade. It’s used to prevent trivial trades, whose value would be swamped by the account’s trading fees. So ensure the value you enter is large relative to these fees.
How Smart % Trade Sizing Works
The naive way to calculate a percentage trade size, based on a percentage or fraction of total capital, does not work well, as it does not take into account the actual cash available. Because of this, it will often leave cash in the account – either because the value of the last position sold was less than the target percentage of capital (in which case the position cannot be replaced and the cash remains in the account), or because the last position’s value is greater than the target percentage (so a new position can be bought but cash is still left over). The unemployed cash left in the account will then tend to increase over time, which severely impacts the performance of the investment system, as that cash is not invested.
However, only taking account of the cash available and ignoring total capital will result in positions that are either too small (and potentially swamped by trade costs), or too large (and potentially too high risk), relative to the total capital. Neither of these options is desirable.
The approach used here solves this by taking into account both total capital and total cash. It also takes into account both the nominal trade size, as a percentage of capital, and the target number of positions implied by that nominal percentage (i.e. 100 divided by the percentage).
The trade-size is calculated, using the following steps:
- nominal trade size = total capital x smart percentage
- nominal target number of positions = 100 / smart percentage
- minimum number of positions to buy = nominal target number of positions – number of existing positions
- number of positions that can be afforded = total cash / nominal trade size
- actual number of positions to buy = the greater of minimum number of positions to buy and number of positions that can be afforded
- trade size = total cash / actual number of positions to buy
The advantage of this approach is that it produces trade-sizes that are reasonably sized vs total capital, while also utilising all available cash. It ensures that a minimum number of positions are purchased (the nominal target number of positions), while allowing additional positions to be opened beyond the nominal target, if they can be afforded with the cash available.
