Skip to content
This repository has been archived by the owner on May 29, 2018. It is now read-only.

Commit

Permalink
Add addIborSecurity from IborIndexConvention method
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartw committed Oct 30, 2014
1 parent 8dfecfa commit 62bcc3a
Showing 1 changed file with 11 additions and 1 deletion.
Expand Up @@ -9,6 +9,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.opengamma.financial.convention.IborIndexConvention;
import com.opengamma.financial.convention.OvernightIndexConvention;
import com.opengamma.financial.convention.VanillaIborLegConvention;
import com.opengamma.financial.security.index.IborIndex;
Expand All @@ -22,6 +23,7 @@
import com.opengamma.master.security.SecurityMaster;
import com.opengamma.master.security.SecurityMasterUtils;
import com.opengamma.util.ArgumentChecker;
import com.opengamma.util.time.Tenor;

/**
* A tool that allows a convention master to be initialized.
Expand Down Expand Up @@ -104,7 +106,15 @@ protected void addSecurity(SecurityMaster securityMaster, ManageableSecurity sec

protected void addIborSecurity(final SecurityMaster securityMaster, final VanillaIborLegConvention convention) {
ArgumentChecker.notEmpty(convention.getExternalIdBundle(), "externalIdBundle");
addSecurity(securityMaster, new IborIndex(convention.getName(), convention.getName(), convention.getResetTenor(), convention.getIborIndexConvention(), convention.getExternalIdBundle()));
addSecurity(securityMaster,
new IborIndex(convention.getName(), convention.getName(), convention.getResetTenor(),
convention.getIborIndexConvention(), convention.getExternalIdBundle()));
}

protected void addIborSecurity(final SecurityMaster securityMaster, final IborIndexConvention convention, Tenor tenor) {
addSecurity(securityMaster,
new IborIndex(convention.getName(), convention.getName(), tenor,
convention.getExternalIdBundle().iterator().next(), convention.getExternalIdBundle()));
}

protected void addOvernightSecurity(final SecurityMaster securityMaster, final OvernightIndexConvention convention) {
Expand Down

0 comments on commit 62bcc3a

Please sign in to comment.