bayesline.api.equity.IndustrySettings#

pydantic model bayesline.api.equity.IndustrySettings#

Specifies include and exclude filters for industries.

Assets are includes if they are part of at least one include and not part of any exclude.

By default all industries for the given hierarchy are included.

Show JSON schema
{
   "title": "IndustrySettings",
   "description": "Specifies include and exclude filters for industries.\n\nAssets are includes if they are part of at least one include\nand not part of any exclude.\n\nBy default all industries for the given hierarchy are included.",
   "type": "object",
   "properties": {
      "hierarchy": {
         "default": "trbc",
         "description": "The industry hierarchy to use.",
         "examples": [
            "trbc"
         ],
         "minLength": 1,
         "title": "Hierarchy",
         "type": "string"
      },
      "include": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "const": "All",
               "type": "string"
            }
         ],
         "default": "All",
         "description": "Valid industry codes or labels for given hierarchy at any level. If labels are used which may be duplicated, then the code with the highest level is used.",
         "examples": [
            [
               "3571"
            ],
            "All",
            [
               "Materials",
               "1010"
            ]
         ],
         "title": "Include"
      },
      "exclude": {
         "description": "Valid industry codes or labels for given hierarchy at any level. If labels are used which may be duplicated, then the code with the lowest level is used.",
         "examples": [
            [
               "3571"
            ],
            [
               "Materials",
               "1010"
            ]
         ],
         "items": {
            "type": "string"
         },
         "title": "Exclude",
         "type": "array"
      }
   },
   "additionalProperties": false
}

Config:
  • frozen: bool = True

  • extra: str = forbid

Fields:
  • exclude (list[str])

  • hierarchy (str)

  • include (list[str] | Literal['All'])

field hierarchy: str = 'trbc'#

The industry hierarchy to use.

Constraints:
  • min_length = 1

field include: Union[list[str], Literal['All']] = 'All'#

Valid industry codes or labels for given hierarchy at any level. If labels are used which may be duplicated, then the code with the highest level is used.

field exclude: list[str] [Optional]#

Valid industry codes or labels for given hierarchy at any level. If labels are used which may be duplicated, then the code with the lowest level is used.