Company Reports

Companies report quarterly, semi-annually and annually. This section describes how you can get a target signal before and after company reports. The resulting signal is aligned to the end of the period the report refers to. It is also possible to get the report dates as a signal.

Usage

before_release(signal, period, days_before, alignment)

Gets the given signal before an earnings release. To avoid having to know whether a report was published before or after trading hours, days_before specifies when to fetch the target signal relative to when the report impacted trading. For example, if a quarterly report was published after closing hours 2019-04-25 and impacted trading 2019-04-26, then before_release(signal) will take the value of the target signal on 2019-04-25 and realign it to 2019-03-31.

Parameters
  • signal – Signal to retrieve.

  • period (str) – Type of report period. One of 'q' (quarterly), 's' (semi-annually), 'a' (annually). The default value is 'q'.

  • days_before (int) – Number of days before report to get signal. If the signal does not have a value on the specified day, the first value of the signal before the specified day is used. The default value is 1.

  • alignment (str) – How to align the data. Either None (not aligned) or 'afp' (aligned to the end of the actual fiscal quarters). The default value is None.

after_release(signal, period, days_after, alignment)

Gets the given signal after an earnings release. To avoid having to know whether a report was published before or after trading hours, days_after specifies when to fetch the target signal relative to when the report impacted trading. For example, if a quarterly report was published before opening hours 2019-04-25 and impacted trading the same day, then after_release(signal) will also fetch the value of the target signal on 2019-04-25 and realign it to 2019-03-31.

Parameters
  • signal – Signal to retrieve.

  • period – Type of report period. One of 'q' (quarterly), 's' (semi-annually), 'a' (annually). The default value is 'q'.

  • days_after – Number of days after report to get signal. If the signal does not have a value on the specified day, the first value of the signal after the specified day is used. The default value is 0.

  • alignment (str) – How to align the data. Either None (not aligned) or 'afp' (aligned to the end of the actual fiscal quarters). The default value is None.

publication_date(period)

Returns the value 1 on the date a report is published.

Parameters

period – Type of report period. One of 'q' (quarterly), 's' (semi-annually), 'a' (annually). The default value is 'q'.

report_date(period)

Returns the value 1 on the market impact date of a report. Date is when the data actually impacted trading; therefore report_date may be equal to or after publication_date. For instance IBM has published its Q2 2010 July 19th at 16:08. publication_date includes 2010-07-19, whereas report_date includes 2010-07-20 (after market effect).

Parameters

period – Type of report period. One of 'q' (quarterly), 's' (semi-annually), 'a' (annually). The default value is 'q'.

Examples

To get the quarterly earnings surprise (difference between the last consensus estimate before report and report value), use:

actual('sales')-before_release(estimate('sales'))

To get the stock market reaction to annual reports, use:

after_release(close_price, period='a')-before_release(close_price, period='a')