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(freq='FQ/FS', *, extend=True, period)

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

Parameters:
  • freq (str) – The signal frequency. One of 'FQ/FS' (quarterly or semi-annual fiscal periods, depending on which calendar the company uses), 'FQ' (fiscal quarters), 'FS' (fiscal semi-annuals) and 'FY' (fiscal years). The default is 'FQ/FS'. (In addition, the legacy values 'q', 's' and 'a' are supported; these are deprecated and will be removed after June 2024.)

  • extend – If True, the result will contain future periods; if an integer, at most this number of future periods will be returned.

  • period (str) – Which period to fetch the number from. One of 'q' (quarterly), 's' (semi-annually), 'a' (annually). (This argument is deprecated and will be removed after June 2024; use freq instead.)

report_date(freq='FQ/FS', *, extend=True, 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:
  • freq (str) – The signal frequency. One of 'FQ/FS' (quarterly or semi-annual fiscal periods, depending on which calendar the company uses), 'FQ' (fiscal quarters), 'FS' (fiscal semi-annuals) and 'FY' (fiscal years). The default is 'FQ/FS'. (In addition, the legacy values 'q', 's' and 'a' are supported; these are deprecated and will be removed after June 2024.)

  • extend – If True, the result will contain future periods; if an integer, at most this number of future periods will be returned.

  • period (str) – Which period to fetch the number from. One of 'q' (quarterly), 's' (semi-annually), 'a' (annually). (This argument is deprecated and will be removed after June 2024; use freq instead.)

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')