bayesline.api.equity.PortfolioCatalog#

pydantic model bayesline.api.equity.PortfolioCatalog#

A catalog of portfolio sources and their respective portfolio names.

Show JSON schema
{
   "title": "PortfolioCatalog",
   "description": "A catalog of portfolio sources and their respective portfolio names.",
   "type": "object",
   "properties": {
      "sources": {
         "additionalProperties": {
            "items": {
               "type": "string"
            },
            "type": "array"
         },
         "description": "A dictionary of source identifier to their respective list of portfolio names.",
         "title": "Sources",
         "type": "object"
      },
      "fof_graphs": {
         "additionalProperties": {
            "additionalProperties": {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            "type": "object"
         },
         "description": "A dictionary of source identifier to their respective fund-of-funds graph.",
         "title": "Fof Graphs",
         "type": "object"
      },
      "dates": {
         "additionalProperties": {
            "additionalProperties": {
               "maxItems": 2,
               "minItems": 2,
               "prefixItems": [
                  {
                     "format": "date",
                     "type": "string"
                  },
                  {
                     "format": "date",
                     "type": "string"
                  }
               ],
               "type": "array"
            },
            "type": "object"
         },
         "description": "A dictionary of source identifier to a per-portfolio holdings date range (``portfolio_id -> [start, end]``): the first and last date each portfolio in that source has holdings.",
         "title": "Dates",
         "type": "object"
      },
      "portfolio_settings": {
         "additionalProperties": {
            "anyOf": [
               {
                  "additionalProperties": {
                     "type": "string"
                  },
                  "type": "object"
               },
               {
                  "type": "string"
               }
            ]
         },
         "description": "A dictionary of the settings name to the schema settings, which contains a mapping of portfolio id to the underlying source or a string reference to a whole source",
         "title": "Portfolio Settings",
         "type": "object"
      },
      "organizer_settings": {
         "additionalProperties": {
            "anyOf": [
               {
                  "additionalProperties": {
                     "type": "string"
                  },
                  "type": "object"
               },
               {
                  "type": "string"
               }
            ]
         },
         "description": "A dictionary of the settings name to the schema settings, which contains a mapping of portfolio id to the underlying source or a string reference to a whole source",
         "title": "Organizer Settings",
         "type": "object"
      },
      "mappings": {
         "additionalProperties": {
            "additionalProperties": {
               "items": {
                  "anyOf": [
                     {
                        "type": "string"
                     },
                     {
                        "type": "null"
                     }
                  ]
               },
               "type": "array"
            },
            "type": "object"
         },
         "description": "A dictionary of mapping upload name to the portfolio mappings this upload defines. The mapping is a dictionary with one key being 'portfolio_id' and the other keys being the mapping dimensions. Column-oriented and aligned by row; a portfolio without a value for a dimension is ``None``.",
         "title": "Mappings",
         "type": "object"
      }
   },
   "required": [
      "sources",
      "fof_graphs",
      "portfolio_settings",
      "organizer_settings"
   ]
}

Fields:
  • dates (dict[str, dict[str, tuple[datetime.date, datetime.date]]])

  • fof_graphs (dict[str, dict[str, list[str]]])

  • mappings (dict[str, dict[str, list[str | None]]])

  • organizer_settings (dict[str, dict[str, str] | str])

  • portfolio_settings (dict[str, dict[str, str] | str])

  • sources (dict[str, list[str]])

field sources: dict[str, list[str]] [Required]#

A dictionary of source identifier to their respective list of portfolio names.

field fof_graphs: dict[str, dict[str, list[str]]] [Required]#

A dictionary of source identifier to their respective fund-of-funds graph.

field dates: dict[str, dict[str, tuple[date, date]]] [Optional]#

A dictionary of source identifier to a per-portfolio holdings date range (portfolio_id -> [start, end]): the first and last date each portfolio in that source has holdings.

field portfolio_settings: dict[str, dict[str, str] | str] [Required]#

A dictionary of the settings name to the schema settings, which contains a mapping of portfolio id to the underlying source or a string reference to a whole source

field organizer_settings: dict[str, dict[str, str] | str] [Required]#

A dictionary of the settings name to the schema settings, which contains a mapping of portfolio id to the underlying source or a string reference to a whole source

field mappings: dict[str, dict[str, list[str | None]]] [Optional]#

A dictionary of mapping upload name to the portfolio mappings this upload defines. The mapping is a dictionary with one key being ‘portfolio_id’ and the other keys being the mapping dimensions. Column-oriented and aligned by row; a portfolio without a value for a dimension is None.