valuation_analytics.get_issuer_category_credit_rating_valuations
****************************************************************

spice.valuation_analytics.get_issuer_category_credit_rating_valuations(tenor: str, start_date: str, issuer_category: str | None = None, credit_rating: str | None = None, end_date: str | None = None) -> list[dict]

   Get a single valuation per day (yield only) of an aggregated
   security group with particular issuer category, credit rating and
   tenor.

   Tenor is mandatory, and either issuer_category or credit_rating
   must be specified.

   Automatically filters out yield spikes exceeding 0.2 that are
   temporary. A spike is removed if the yield returns within 0.2 of
   the pre-spike value in subsequent dates.

   Parameters:
      * **tenor** -- Tenor of the security group (e.g., "3M", "1Y",
        "5Y")

      * **start_date** -- Start date in YYYY-MM-DD format

      * **issuer_category** -- Issuer category (e.g., "PSU",
        "Private", "GOI")

      * **credit_rating** -- Credit rating (e.g., "AAA", "AA+")

      * **end_date** -- End date in YYYY-MM-DD format (defaults to
        last market day)

   Returns:
      List of dictionaries (one per valuation date in the requested
      range), each containing: - yield: Valuation yield as
      decimal.Decimal (e.g., Decimal('0.075000') for 7.5%) -
      valuation_date: Market date

   Return type:
      list[dict]

   Raises:
      **ValueError** -- If neither issuer_category nor credit_rating
      is specified

   -[ Example ]-

   >>> import spice.valuation_analytics as va
   >>> results = va.get_issuer_category_credit_rating_valuations(
   ...     tenor="5Y",
   ...     start_date="2024-01-01",
   ...     issuer_category="PSU",
   ...     end_date="2024-01-31"
   ... )
   >>> print(results[0])
   {'yield': 0.078, 'valuation_date': '2024-01-01'}
