public String classifyPosition(final Position position) {
final Security security = resolveSecurity(position);
if (security instanceof CreditDefaultSwapOptionSecurity) {
final CreditDefaultSwapOptionSecurity cdsOption = (CreditDefaultSwapOptionSecurity) security;
final ExternalId underlyingId = cdsOption.getUnderlyingId();
final Security underlying = _securitySource.getSingle(underlyingId.toBundle());
return ((CreditDefaultSwapSecurity) underlying).getDebtSeniority().toString();
} else if (security instanceof CreditDefaultSwapSecurity) {
final CreditDefaultSwapSecurity cds = (CreditDefaultSwapSecurity) security;
return cds.getDebtSeniority().toString();
}