RealTest User Guide
RealTest User Guide

 

 

Navigation: Trading Your System >

Symbol Changes in Open Positions

 

 

 

 

When you trade a system live, a position can be entered under one symbol and need to be exited under another. Between entry and exit the data vendor may rename the stock (e.g. FB became META), delist it, or trade it temporarily under a different exchange code. Your trade list still carries the symbol as it was at entry, so RealTest has to reconcile the two when it plays back the trade list to establish your current positions before generating Tomorrow's Orders.

This topic explains what RealTest does automatically, what the OrderClerk round trip adds, and the two cases that still need a line in your script.


What happens if a symbol is not found

If a trade list symbol cannot be matched to any symbol in the loaded data file, the trade is dropped with the log message TradeList: symbol XYZ not found in currently loaded data file. In an order run this means the position is simply not there: no exit order will be generated for it, and the strategy could even enter it again as a new position. The message appears in the Log window and in errorlog.txt during order runs, and in the SaveLogAs file on every run when that setting is used, which is the easiest way for an automated workflow to detect the situation.


Delisted symbols

When a stock has been delisted since the trade was entered and the data file includes delisted stocks (e.g. a Norgate import with delisted securities), RealTest finds the delisted version of the symbol automatically, e.g. CATM is found as CATM-202105. Nothing needs to be configured for this case.


Renamed symbols: automatic handling by asset ID

Data sources with persistent asset IDs (Norgate, or any source where you provide an AssetId column in a Symbol Information File) allow RealTest to follow a symbol change automatically. This requires RealTest 2.0.32.3 or later and OrderClerk 1.0.29.5 or later, and works as follows:

Every order RealTest generates carries the asset ID of its symbol, in the AssetId column of the order list (the assetid tag in row 2 of OrderClerkTemplate.csv; see CSV Order Baskets). The template in the RealTest program folder already includes it; if you keep a custom copy of the template in your OrderClerk folder, add the column there.

OrderClerk stores the asset ID with the trade when the entry order is loaded (the AssetId column of OrderClerkTrades.csv) and hands it back to RealTest as part of the trade list.

On every order run RealTest matches open trades by asset ID first (TLFields AssetId, which takes precedence over the symbol). If the data vendor's symbol for that asset ID has changed, RealTest rewrites the trade's symbol and logs TradeList: symbol for AssetId 2088 changed from HGO.au to HGODB.au. The position is never lost and exit orders continue to be generated.

When such an exit order is loaded into OrderClerk, it recognises the asset ID under a new symbol and renames the trade (both the RealTest symbol and the broker symbol) so that fills and position reconciliation still match. OrderClerk reports this as Symbol for AssetId ... changed from ... to ... in its messages.

Nothing needs to be configured for this; it only requires that both programs were at the versions above when the entry order was generated, because that is when the trade acquires its asset ID. Open trades entered before then have no asset ID and still match by symbol. If you want them covered too, type the IDs into the AssetId column of OrderClerkTrades.csv by hand (with OrderClerk closed). The asset ID of any imported symbol is available in RealTest as InfoID, e.g. as a column in a Data Scan.


Temporary exchange codes (ASX consolidations, US "D" suffix)

Some symbol changes are temporary, and the broker does not follow them. The most common example is an ASX consolidation (reverse split): for about two weeks after the effective date the shares trade under a deferred-settlement code, and Norgate renames the symbol accordingly, e.g. HGO.au becomes HGODB.au and then reverts to HGO.au. Interactive Brokers keeps trading it as HGO throughout. A similar thing occasionally happens with US stocks (mainly OTC) which carry a "D" suffix for a period after a reverse split.

The asset ID mechanism is not the right tool here: RealTest would keep the position and generate the exit order, but the order would go to the broker under the temporary code and be rejected. Instead, use the IncludeList alias syntax to import the renamed symbol under its original name for as long as the temporary code lasts:

Import:
    IncludeList:    HGODB.au>HGO.au

With this line the trade list, the generated order symbol (HGO), and the splits file for the consolidation (see Split Handling) all continue to work unchanged. If your import also pulls the temporary symbol in by itself (e.g. via a Norgate watchlist), you will have the same stock twice; keep the strategy from entering the second copy by adding and ?Symbol <> "HGODB.au" to its EntrySetup. An ExcludeList cannot be used for this, because it would remove the aliased import as well. Remove the alias line once the symbol has reverted.


Manual mapping with SymChangeList

For any other case, such as a permanent rename with a data source that has no asset IDs, or old trade lists from before asset IDs were recorded, list the change in a SymChangeList file (symchanges.csv in the OrderClerk folder or the RealTest program folder is found automatically). This is applied when the trade list is read and is an alternative to editing the trade list itself.


Spotting changes early

Add SaveLogAs to your Settings. Trade list warnings (symbol not found, symbol changed by asset ID, delisted symbol replaced, unusable rows) are then written to that file on every run, so an automated order workflow can check it each morning and alert you before an exit order is missed.

 

 

 

Copyright © 2020-2026 Systematic Solutions, LLC