//String bbgUnique = validateAndGetStringField(fieldData, FIELD_ID_BBG_UNIQUE);
String marketSector = validateAndGetStringField(fieldData, FIELD_MARKET_SECTOR_DES);
String des = validateAndGetStringField(fieldData, FIELD_SECURITY_DES);
ManageableSecurity bondSecurity;
if ((inflationIndicator != null) && (inflationIndicator.trim().toUpperCase().startsWith("Y"))) {
bondSecurity = new InflationBondSecurity(issuerName, issuerType, issuerDomicile, market, currency,
yieldConvention, maturity, couponType, couponRate,
couponFrequency, dayCount, interestAccrualDate, settlementDate, firstCouponDate, issuancePrice,
totalAmountIssued, minimumAmount, minimumIncrement, parAmount,
redemptionValue);
((BondSecurity) bondSecurity).setAnnouncementDate(announcementDate);
((BondSecurity) bondSecurity).setGuaranteeType(guaranteeType);
} else if (issuerType.trim().equals(SOVEREIGN)) {
bondSecurity = new GovernmentBondSecurity(issuerName, issuerType, issuerDomicile, market, currency,
yieldConvention, maturity, couponType, couponRate,
couponFrequency, dayCount, interestAccrualDate, settlementDate, firstCouponDate, issuancePrice,
totalAmountIssued, minimumAmount, minimumIncrement, parAmount,
redemptionValue);
((BondSecurity) bondSecurity).setAnnouncementDate(announcementDate);
((BondSecurity) bondSecurity).setGuaranteeType(guaranteeType);
} else if (marketSector.equals(MARKET_SECTOR_MUNI)) {
bondSecurity = new MunicipalBondSecurity(issuerName, issuerType, issuerDomicile, market, currency,
yieldConvention, maturity, couponType, couponRate,
couponFrequency, dayCount, interestAccrualDate, settlementDate, firstCouponDate, issuancePrice,
totalAmountIssued, minimumAmount, minimumIncrement, parAmount,
redemptionValue);
((BondSecurity) bondSecurity).setAnnouncementDate(announcementDate);
((BondSecurity) bondSecurity).setGuaranteeType(guaranteeType);
} else {
bondSecurity = new CorporateBondSecurity(issuerName, issuerType, issuerDomicile, market, currency,
yieldConvention, maturity, couponType, couponRate,
couponFrequency, dayCount, interestAccrualDate, settlementDate, firstCouponDate, issuancePrice,
totalAmountIssued, minimumAmount, minimumIncrement, parAmount,
redemptionValue);
((BondSecurity) bondSecurity).setAnnouncementDate(announcementDate);
((BondSecurity) bondSecurity).setGuaranteeType(guaranteeType);
}
bondSecurity.setName(des.trim());
// set identifiers
parseIdentifiers(fieldData, bondSecurity);
return bondSecurity;
} catch (OpenGammaRuntimeException ogre) {
s_logger.error("Error loading bond {} - {} - FLOATER={}, Fields are {}",