bayesline.api.equity.CalendarSettings#

pydantic model bayesline.api.equity.CalendarSettings#

Define the settings for the calendar.

Show JSON schema
{
   "title": "CalendarSettings",
   "description": "Define the settings for the calendar.",
   "type": "object",
   "properties": {
      "dataset": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The name of the underlying dataset to use. If none is given then the configured default dataset is used.",
         "examples": [
            "Bayesline-US"
         ],
         "title": "Dataset"
      },
      "filters": {
         "default": [
            [
               "XNYS"
            ]
         ],
         "description": "The filters to apply. Each filter is a list of exchange MIC codes. The outer list will be treated as an OR conditions, while the inner lists will be treated as an AND conditions. For example, `[['A', 'B'], ['C']]` means that the holidays are the days where either A and B are both holidays, or C is a holiday.",
         "examples": [
            [
               [
                  "XNYS"
               ]
            ],
            [
               [
                  "XNYS",
                  "XNAS"
               ]
            ],
            [
               [
                  "XNYS"
               ],
               [
                  "XNAS"
               ]
            ]
         ],
         "items": {
            "items": {
               "type": "string"
            },
            "type": "array"
         },
         "minItems": 1,
         "title": "Filters",
         "type": "array"
      }
   },
   "additionalProperties": false
}

Config:
  • frozen: bool = True

  • extra: str = forbid

Fields:
  • dataset (str | None)

  • filters (list[list[str]])

Validators:
  • validate_filters » filters

field dataset: str | None = None#

The name of the underlying dataset to use. If none is given then the configured default dataset is used.

field filters: list[list[str]] = [['XNYS']]#

The filters to apply. Each filter is a list of exchange MIC codes. The outer list will be treated as an OR conditions, while the inner lists will be treated as an AND conditions. For example, [[‘A’, ‘B’], [‘C’]] means that the holidays are the days where either A and B are both holidays, or C is a holiday.

Constraints:
  • min_length = 1

Validated by:
  • validate_filters

property menu_type: type[CalendarSettingsMenu]#

Get the menu type for this settings object.

Returns#

type[SettingsMenuType]

The menu type for this settings object.

validator validate_filters list[list[str]]  »  filters#
describe(menu: CalendarSettingsMenu) str#

Describe the calendar settings.

Parameters#

menuCalendarSettingsMenu

The settings menu to use to describe the settings.

Returns#

str

A description of the calendar settings.