Components
- class rivapy.instruments.components.Issuer(obj_id: str, name: str, rating: Rating | str, esg_rating: ESGRating | str, country: Country | str, sector: Sector)[source]
- static _create_sample(n_samples: int, seed: int = None, issuer: List[str] = None, rating_probs: ndarray = None, country_probs: ndarray = None, sector_probs: ndarray = None, esg_rating_probs: ndarray = None) List [source]
Just sample some test data
- Parameters:
n_samples (int) – Number of samples.
seed (int, optional) – If set, the seed is set, if None, no seed is explicitely set. Defaults to None.
issuer (List[str], optional) – List of issuer names chosen from. If None, a unqiue name for each samples is generated. Defaults to None.
rating_probs (np.ndarray) – Numpy array defining the probability for each rating (ratings ordererd from AAA (first) to D (last array element)). If None, all ratings are chosen with equal probabilities.
- Raises:
Exception – _description_
- Returns:
List of sampled issuers.
- Return type:
List
- property country: str
Getter for issuer’s country.
- Returns:
Issuer’s country.
- Return type:
Country
- property esg_rating: str
Getter for issuer’s rating.
- Returns:
Issuer’s rating.
- Return type:
Rating
- property name: str
Getter for issuer name.
- Returns:
Issuer name.
- Return type:
str
- property obj_id: str
Getter for issuer id.
- Returns:
Issuer id.
- Return type:
str
- property rating: str
Getter for issuer’s rating.
- Returns:
Issuer’s rating.
- Return type:
Rating
- property sector: str
Getter for issuer’s sector.
- Returns:
Issuer’s sector.
- Return type:
Sector