Tags

A tag contains a collection of entities. Using the tag() function, a signal can be evaluated for all entities in a static tag or a screen. If a screen is specified, the screen is resolved for the current date.

tag(tag_id, signal, errors_as_warnings=False)

Evaluate a signal for all entities in a static tag or screen.

Parameters
  • tag_id (str) – Semantic tag id or screen id.

  • signal (Signal) – Signal to evaluate.

  • errors_as_warnings – Whether to convert errors for the underlying entitites to warnings.

Examples

A signal that returns close prices for all companies at the Oslo Stock Exchange:

tag("graph:tag:exchange:xosl", close_price)

A signal that returns the sum of close prices for all companies in the given screen:

tag("signal:dynamicTag:123", close_price).sum()

A signal that returns the mean of close prices for all companies in the given screen:

tag("signal:dynamicTag:123", close_price).mean()

A signal that returns the mean of a complex signal for all companies in a tag, ignoring those companies for which the underlying signal fails:

tag("graph:tag:exchange:xosl", ComplexSignal, errors_as_warnings=True).mean()