bayesline.api.equity.FactorCovarianceSettings#

pydantic model bayesline.api.equity.FactorCovarianceSettings#

Settings for factor covariance matrix forecasts.

Show JSON schema
{
   "title": "FactorCovarianceSettings",
   "description": "Settings for factor covariance matrix forecasts.",
   "type": "object",
   "properties": {
      "halflife_vol": {
         "default": 60.0,
         "description": "The half-life for the factor volatility.",
         "title": "Halflife Vol",
         "type": "number"
      },
      "halflife_cor": {
         "default": 120.0,
         "description": "The half-life for the factor correlation.",
         "title": "Halflife Cor",
         "type": "number"
      },
      "halflife_vra": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The half-life for the factor volatility regime adjustment. If None, no adjustment is applied.",
         "title": "Halflife Vra"
      },
      "nw_lags_vol": {
         "default": 0,
         "description": "The Newey-West lags of the factor volatility.",
         "title": "Nw Lags Vol",
         "type": "integer"
      },
      "nw_lags_vol_halflife_override": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The Newey-West lags override for the factor volatility for lagged returns.",
         "title": "Nw Lags Vol Halflife Override"
      },
      "nw_lags_cor": {
         "default": 0,
         "description": "The Newey-West lags of the factor correlation.",
         "title": "Nw Lags Cor",
         "type": "integer"
      },
      "shrink_cor_method": {
         "anyOf": [
            {
               "enum": [
                  "LIS",
                  "QIS",
                  "GIS"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The method to use for the shrinkage of the factor correlation. If None, don't shrink.",
         "title": "Shrink Cor Method"
      },
      "shrink_cor_length": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "If a shrinkage method is provided, the length of the shrinkage for the factor correlation.",
         "title": "Shrink Cor Length"
      },
      "combine_standardized": {
         "default": false,
         "description": "If True, the correlation matrix is combined with an estimate based on the standardized returns. The halflife_factor_vra is used for the weights.",
         "title": "Combine Standardized",
         "type": "boolean"
      }
   },
   "additionalProperties": false
}

Config:
  • frozen: bool = True

  • extra: str = forbid

Fields:
  • combine_standardized (bool)

  • halflife_cor (float)

  • halflife_vol (float)

  • halflife_vra (float | None)

  • nw_lags_cor (int)

  • nw_lags_vol (int)

  • nw_lags_vol_halflife_override (float | None)

  • shrink_cor_length (int | None)

  • shrink_cor_method (Literal['LIS', 'QIS', 'GIS'] | None)

field halflife_vol: float = 60.0#

The half-life for the factor volatility.

field halflife_cor: float = 120.0#

The half-life for the factor correlation.

field halflife_vra: float | None = None#

The half-life for the factor volatility regime adjustment. If None, no adjustment is applied.

field nw_lags_vol: int = 0#

The Newey-West lags of the factor volatility.

field nw_lags_vol_halflife_override: float | None = None#

The Newey-West lags override for the factor volatility for lagged returns.

field nw_lags_cor: int = 0#

The Newey-West lags of the factor correlation.

field shrink_cor_method: Optional[Literal['LIS', 'QIS', 'GIS']] = None#

The method to use for the shrinkage of the factor correlation. If None, don’t shrink.

field shrink_cor_length: int | None = None#

If a shrinkage method is provided, the length of the shrinkage for the factor correlation.

field combine_standardized: bool = False#

If True, the correlation matrix is combined with an estimate based on the standardized returns. The halflife_factor_vra is used for the weights.