I think by using following dates I am kind of in the ballpark with Bloomberg. Am I doing it right ?
Thanks.
public CdsAnalytic(
TODAY,
TODAY.plusDays(1),
TODAY,
‘20-SEP-2016’, //previous IMM date which will be accrual start date for this period
LocalDate.of(2021, Month.JUNE, 20)
…)
Have you considered using IsdaCdsPricer? It allows the trade to be represented in a “standard” way using CdsTrade or ResolvedCdsTrade, with the conversion to CdsAnalytic happening internally.
For CdsAnalytic I note that the Javadoc describes the third parameter valueDate as typically being T+3, which may be of interest.