Bloomberg Demo - Failed to add New Positions


Hi all,

I am new to OpenGamma and hope you don’t mind if my question is too simple. I downloaded the demo src on my linux machine which is fed with Bloomberg data. I successfully compiled the src (yet there were a few error-like messages) and successfully loaded data into the given sample portfolios from Bloomberg feed. I used my web browser to see “localhost:8080” … everything looks fine. Then, I tried to add a bond position (which is not in any of the sample portfolios) by specifying its ISIN but there is an error message telling me that

“Status: 404 Not Found; Mesage: Unable to resolve security: ****”

I tried to add a position using “AAPL US” and it worked. Seems like adding positions of security that is not in the sample portfolio did not work. Is it because it is a demo version?



It’s possible that the bond you were trying to load was not supported by out bond loader. If your setup correctly identified being connected to a Bloomberg terminal, then it should have created a range of securities with BLOOMBERG_TICKER identifiers. Are you seeing those? You can check by hovering over a position in the Analytics grid, dropping down the preview window and clicking the security link. If the identifiers section shows ids with OG_SYNTHETIC_TICKER then your installation didn’t detect your Bloomberg connection, which is why you can’t load additional securities. If it does show BLOOMBERG_TICKER, then it’s probably because the bond in question is not supported by out bond loader. If that’s the case, post the ISIN and I’ll look into it.


Hi Jim,

After playing around a bit more, I realized that I need to add securities before I can add it to the portfolio. With Bloomberg connection, I tried to add a few bonds (treasury bonds, corporate bonds, etc.). It turns out that most treasury bonds are loaded successfully. However, all but one corporate bonds that I tried can be loaded. Where I should modify so that more corporate bonds can be loaded? Thanks.


Strangely I am working on exactly this problem right now. If you modify the class

   * Gets a convention by name.
   * Matching is case insensitive.
   * @param name  the name, not null
   * @return the convention, null if not found
  public YieldConvention getYieldConvention(final String name) {
    ArgumentChecker.notNull(name, "name");
    if (_conventionMap.get(name.toLowerCase(Locale.ENGLISH)) == null) {
      store(new SimpleYieldConvention(name.toLowerCase(Locale.ENGLISH)), name.toLowerCase(Locale.ENGLISH));
    return _conventionMap.get(name.toLowerCase(Locale.ENGLISH));

which is in


you will be able to at least load more bonds. This doesn’t add handling code for all the yield conventions, but does allow them to be loaded. What this won’t handle though, is perpetual bonds. You could support these initially by using the standard trick of using a 2049 maturity. For this you’ll need to change around line 226 you should but something like:

  if (maturityStr == null) {
    maturityStr = "2049-06-29";

but clearly that’s not a real solution (it doesn’t differentiate between perpetual and callable bonds, for example). We will have improved coverage generally in the next release as we’re working with various customers who require improved coverage. You might want to track the develop or milestone branches (e.g. M1, M2, M3, etc) over the next couple of weeks to pick up improvements as they go into the code base.

Hope that helps,



Hi Jim,

Thanks for the info. I shall try the suggested code modifications.

In fact, I had tried adding a few more corporate bonds (incl. convertibles) of different day count conventions and currencies (without the code modifications). None of them could be loaded successfully.