bayesline.api.equity.RiskDatasetMetadata#

pydantic model bayesline.api.equity.RiskDatasetMetadata#

Metadata for a risk dataset.

Attributes#

namestr

The name of the risk dataset.

statusDatasetStatus

The status of the risk dataset. “ready” means the dataset is ready to use. “data_stale” means the dataset is ready to use but newer data is available. “needs_update” means local data needs to be computed/updated. “not_ready” means the reference dataset is not in a usable state. “corrupt” means the underlying settings are corrupted and need to be repaired.

sourceLiteral[“System”, “User”]

The source of the risk dataset.

reference_datasetstr | int | None

The reference dataset for the risk dataset (name or global int identifier). System datasets have no reference dataset.

cache_keystr | None, default=None

The cache key of the currently stored data. For system datasets, this is the cache key of the synced data. For user datasets, this is the cache key of the computed data. None if no local data exists.

latest_cache_keystr | None, default=None

The cache key that would result from an update. For system datasets, this is the cache key available on the remote source. For user datasets, this is the cache key computed from the current settings and reference dataset. None if the dataset is corrupt or reference is not ready.

data_datedt.date | None, default=None

The data date of the currently stored dataset. This represents the date of the market data used in the stored dataset. None if no local data exists.

last_updated_ondt.datetime | None, default=None

When the dataset was last updated/computed. None if not yet computed.

settings_created_ondt.datetime | None, default=None

When the dataset settings were first created. Only applies to user datasets; None for system datasets.

settings_last_updated_ondt.datetime | None, default=None

When the dataset settings were last modified. Only applies to user datasets; None for system datasets.

Show JSON schema
{
   "title": "RiskDatasetMetadata",
   "description": "Metadata for a risk dataset.\n\nAttributes\n----------\nname : str\n    The name of the risk dataset.\nstatus : DatasetStatus\n    The status of the risk dataset.\n    \"ready\" means the dataset is ready to use.\n    \"data_stale\" means the dataset is ready to use but newer data is available.\n    \"needs_update\" means local data needs to be computed/updated.\n    \"not_ready\" means the reference dataset is not in a usable state.\n    \"corrupt\" means the underlying settings are corrupted and need to be repaired.\nsource : Literal[\"System\", \"User\"]\n    The source of the risk dataset.\nreference_dataset : str | int | None\n    The reference dataset for the risk dataset (name or global int identifier).\n    System datasets have no reference dataset.\ncache_key : str | None, default=None\n    The cache key of the currently stored data. For system datasets, this is\n    the cache key of the synced data. For user datasets, this is the cache key\n    of the computed data. None if no local data exists.\nlatest_cache_key : str | None, default=None\n    The cache key that would result from an update. For system datasets, this\n    is the cache key available on the remote source. For user datasets, this\n    is the cache key computed from the current settings and reference dataset.\n    None if the dataset is corrupt or reference is not ready.\ndata_date : dt.date | None, default=None\n    The data date of the currently stored dataset. This represents the date\n    of the market data used in the stored dataset. None if no local data exists.\nlast_updated_on : dt.datetime | None, default=None\n    When the dataset was last updated/computed. None if not yet computed.\nsettings_created_on : dt.datetime | None, default=None\n    When the dataset settings were first created. Only applies to user datasets;\n    None for system datasets.\nsettings_last_updated_on : dt.datetime | None, default=None\n    When the dataset settings were last modified. Only applies to user datasets;\n    None for system datasets.",
   "type": "object",
   "properties": {
      "name": {
         "title": "Name",
         "type": "string"
      },
      "status": {
         "enum": [
            "ready",
            "data_stale",
            "needs_update",
            "not_ready",
            "corrupt"
         ],
         "title": "Status",
         "type": "string"
      },
      "source": {
         "enum": [
            "System",
            "User"
         ],
         "title": "Source",
         "type": "string"
      },
      "reference_dataset": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "title": "Reference Dataset"
      },
      "cache_key": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Cache Key"
      },
      "latest_cache_key": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Latest Cache Key"
      },
      "data_date": {
         "anyOf": [
            {
               "format": "date",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Data Date"
      },
      "last_updated_on": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Last Updated On"
      },
      "settings_created_on": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Settings Created On"
      },
      "settings_last_updated_on": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Settings Last Updated On"
      }
   },
   "required": [
      "name",
      "status",
      "source",
      "reference_dataset"
   ]
}

Fields:
  • cache_key (str | None)

  • data_date (datetime.date | None)

  • last_updated_on (datetime.datetime | None)

  • latest_cache_key (str | None)

  • name (str)

  • reference_dataset (str | int | None)

  • settings_created_on (datetime.datetime | None)

  • settings_last_updated_on (datetime.datetime | None)

  • source (Literal['System', 'User'])

  • status (Literal['ready', 'data_stale', 'needs_update', 'not_ready', 'corrupt'])

field name: str [Required]#
field status: Literal['ready', 'data_stale', 'needs_update', 'not_ready', 'corrupt'] [Required]#
field source: Literal['System', 'User'] [Required]#
field reference_dataset: str | int | None [Required]#
field cache_key: str | None = None#
field latest_cache_key: str | None = None#
field data_date: date | None = None#
field last_updated_on: datetime | None = None#
field settings_created_on: datetime | None = None#
field settings_last_updated_on: datetime | None = None#