quantlib.termstructures.credit.flat_hazard_rate.FlatHazardRate¶
- class FlatHazardRate(int settlement_days, Calendar calendar, hazard_rate, DayCounter day_counter)¶
Bases:
DefaultProbabilityTermStructure
Flat hazard rate curve
- Parameters:
settlement_days (int) – number of days from evaluation date
calendar (
Calendar
) – calendar used to compute the reference datehazard_rate (float or
Quote
) – the flat hazard rateday_counter (
DayCounter
) – DayCounter for the curve
- __init__(*args, **kwargs)¶
Methods
__init__
(*args, **kwargs)from_reference_date
(cls, ...)Alternative constructor for FlatHazardRate
hazard_rate
(self, d, bool extrapolate=False)survival_probability
(self, d, ...)time_from_reference
(self, Date d)Attributes
day_counter
jump_dates
jump_times
max_date
reference_date
- classmethod from_reference_date(cls, Date reference_date, hazard_rate, DayCounter day_counter)¶
Alternative constructor for FlatHazardRate
- Parameters:
reference_date (
Date
) – reference date for the curvehazard_rate (float or
Quote
) – the flat hazard rateday_counter (
DayCounter
) – DayCounter for the curve