Navigation: Importing Bar Data >

The Event List File





Event List files can be included in a data import to add point-in-time event information to specific dates for specific symbols. The most likely use of this feature would be to include historical earnings dates and values if you have access to such information.

As with the symbol information file, the event list is a CSV file (or group of files).

The first row of the file must contain column names from the following list:

Symbol – the symbol for which the event occurred

Date – the date of the event

Time – the time of the event (optional)

Type – any numeric code > 0

Value – any numeric value (e.g. dividend amount, or EPS, or index constituency flags)

These columns can be in any order. The names are used to identify them.

Rows after the header row can also be in any order. Each row defines one event for one symbol on one date.

When first importing with an event list, it is suggested to use the LogFile option in your import definition. Events for which the symbol+date is not found in the imported bar data will be listed in the log.

Imported event data is accessed in script formulas by using the Event(type) function, which returns the value field if an event exists for the current symbol on the current date, or 0 if no event was found (with an option to return the most recent event -- see the function link for details).

The Time field stored with each event record determines which bar the Event function will align the event with. If Time <= 16:00:00 (160000) then the event will be aligned with the bar which has the specified date. If Time > 160000 then the event will be aligned with the next bar after the bar with the specified date.

The intention with this distinction is to differentiate "before the open" vs. "after the close" earnings report times. If you have point-in-time earnings data and are using EventListFile to import it and Event(n) to reference it, you will want Event(n) to return a value only for the dates on which the market first reacted to earnings news.

See also djia_earnings.rts and djia_earnings.csv in the Examples folder (note that this example does not use the Time field).

The following is not necessary to read or understand unless you have your own custom dividend and/or index constituency data series that you need to add to a non-Norgate import.

As well as for user-defined events as described above, RealTest also uses the event list within each RTD file to store Dividends and Constituency Changes events.

Dividends are stored as event type -1. Event(-1) is therefore equivalent to Dividend in any formula. Event(-1, 1) can be used if desired to find the most recent dividend amount. Event(-1, 1) is equivalent to WhenTrue(Dividend > 0, Dividend).

To add your own dividend event, set Date to the ex-dividend date, Type to -1, and Value to the dollars-per-share amount of that dividend on that date.

Constituency Changes are stored as event type -2 through -n. The specific event number for an index is -1 minus the number from the first column of the constituency.csv file. So by default $MEL is -2, $XAO is -3, etc.

RealTest automatically generates a constituency change event on the first available date of each symbol in the RTD file for each imported constituency series (index) that it belonged to on that date.

Though constituency change events are only present for the dates (after the first date) on which the symbol entered or left the index, RealTest automatically maps the corresponding InXXX variable to Event(n, 1), i.e., it looks up the most recent change event to determine whether the stock was in the index on the date being evaluated.

To add your own index constituency series, do the following:

1. Edit your copy of the constituency.csv file and add your indices at the end. Perhaps start with 100 is the first index number, to leave plenty of space after the Norgate numbers. Make up your own values for the remaining columns, e.g. 100, $DAX, InDAX, Member of Dax. The only required items here are the number and the InXXX name to use -- the other two are provided only for your own information since you would not be directly importing these series from Norgate.

2. Create an EventListFile containing your constituency change events. Symbol is the stock to which the change applies. Date is the date of change. Type is -1 minus your index number as specified in step 1 above, e.g. -101 for index 100. Value is 1 if the stock joined the index or 0 if the stock left the index on that date.

3. Close and re-open RealTest so it can read your new constituency.csv file

4. Run your import

You should now be able to reference your custom index constituency series using your custom InXXX variable!






Copyright © 2020-2024 Systematic Solutions, LLC