Extracting a minimal view for standalone portfolio analytics

Hi everyone,

I introduced myself and what I’m trying to do a little bit in my first post here:

As I work my way through the OpenGamma source code and, aside from being super impressed, I’m starting to appreciate how I can use it for my business. I was shy about asking too many questions here, so I sent a note via your web enquiry form. I’m happy to pay someone for some dedicated time if necessary (I know you guys are busy!), but Soila recommended I start here first so here it goes.

Insurance companies, particularly in Asia, are not too concerned about real-time risk analytics or even pre-trade risk analytics (yet!), at least for ALM purposes. There is still quite some lag, so I don’t see myself using the trading functionality or live data feeds for risk analytics initially, but I certainly like having that functionality in the background waiting to be exploited (which, on second thought, would come in handy for my client’s OTC trades - my mind has been maybe too focused on ALM).

So what I’m currently trying to do is extract enough of the OpenGamma functionality to, independently of any server and UI:

  1. Define some assets
  • I think these should extend ManageableSecurity
  1. Create a SecurityMaster
  • I’m not sure which kind to use. I’m looking at InMemorySecurityMaster and DataSecurityMasterResource.
  • If I understand, with the latter, I can define securities in CSV files in my WEBContent/resources folder.
  1. Build up some positions in these assets using ManageablePosition
  2. Create a PositionMaster.
  • Similar to above, I’m not sure what kind of master to use.
  1. Put the positions into a portfolio using ManageablePortfolio
  2. Create a PortfolioMaster

If I got this far, which I’m not even close yet, I would already consider that a huge victory. What have I left out?

Assuming I am able to construct a portfolio master with a portfolio I’m happy with, what else would I then need in order to run it through some cycles for Monte Carlo, etc, using your analytics tools?

Could someone help outline the minimal components I would need in order to, for example, build a bond portfolio with several thousand issuers and feed it a few tens of thousands of yield curves and look at the P&L distribution using OpenGamma?

On a personal note, I am quickly becoming a big fan of OpenGamma and hope I can contribute back in some ways. I see my use of OpenGamma as selling point and will proudly display (with permission beforehand) “Powered by OpenGamma”, or something, on any apps I build that use it.

Two areas I may be able to help include:

  1. Quantitative Research
  • Asset/liability modelling
  • Risk and performance analytics
  • Market modelling/economic scenario generation
  1. User experience and data visualisation

The areas I have made most progress so far (although still very early) are in the user interface and data visualisation. I’m developing a re-usable data visualisation library geared for risk analytics based on d3.js, which you might find interesting.

Cheers and thanks for any help!
Eric Forgy, Director
Coherent Capital Advisors, Limited

I found this post helpful:

There are various implementations of the masters, so I still need to figure out which one to use, but it seems I’m on the right path.

Once I have my portfolio master, apparently I need to configure a view. I’ll give it a try tomorrow (its late now in HK), but any tips to help get started would be appreciated.

Thank you.

Each master interface has a variety of implementations. The two main ones are in-memory and database.

The in-memory ones are good for testing, but for anything serious you need to setup a database. More details in the documentation. One option is to setup the example server as that involves creating a local HSQL database.

The Data*Master classes are used with the Remote*Master classes to transmit data RESTfully across a network.

Just to warn you that the harder part is configuring the engine and views.

1 Like

Thank you Stephen. I finally bit the bullet and taught myself how to install PostgreSQL (I’ve never used it). It sounds like a small thing, but I’m pretty excited. Not only did I set up my database, but I got all my OpenGamma tables/sequences set up, started populating them, and was able to query them from my Maven/Spring MVC app. Baby steps. I’ll get there. Thank you again for your help.