Can you help?


#1

Can you tell me if I can calculate price, YTM, DV01, Duration,
Convexity for US TSY given settlement date, cpn , maturity etc?
with simple method calls to the classes you provide.

The simplicity I am seeking in this regard is to download one or two jars, involves no database, and get on with
reliable/robust Fixed Income Analytics – that is beyond text books…
More aligned with industry practice including daycount options, irregular coupon days…etc.

Similarly for greeks separate from VaR and its variants.
So three jars – driven by interface and data and other jars may be for datamanagement – samplegeneration, mc etc…
Simplicity=>ease of use=>success.
regards
Raman


#2

Hi,

Yes, you can do that, and if you’re looking to do this WITHOUT the rest of the Platform, you’ll want to look at just the OG-Analytics subproject. At the moment this isn’t packaged as a separate release on its own, but we’ve been considering that as it’s extremely useful without the rest of the Platform.

The one thing to bear in mind is that OG-Analytics has a number of dependencies. While it’s a single jar file in our distribution, it has a number of dependencies (visible from the ivy.xml file: https://github.com/OpenGamma/OG-Platform/blob/master/projects/OG-Analytics/ivy.xml ). Some of these (like our dependency on Dexy.it and latexlet) are there for our documentation, but many of these are for mathematical underlyings that are available in other jars.

That being said, you might also require some classes in OG-Financial, for which it’s easiest to depend on the whole Platform and only classload what you require.

For examples of some of your specifics, you’ll want to look in the Javadocs primarily. Much of what you’re looking for is under com.opengamma.financial.

Daycount conventions are all in com.opengamma.financial.convention.daycount: http://docs-static.opengamma.com/Latest%20Version/java/javadocs/com/opengamma/financial/convention/daycount/package-summary.html

Business day conventions are in com.opengamma.financial.convention.businessday: http://docs-static.opengamma.com/Latest%20Version/java/javadocs/com/opengamma/financial/convention/businessday/package-summary.html

To calculate things like price of a bond, you probably want to start with BondFunction (code: https://github.com/OpenGamma/OG-Platform/blob/master/projects/OG-Financial/src/com/opengamma/financial/analytics/model/bond/BondFunction.java ), which is the basic integration with the Engine, which shows exactly which parts of the Analytics library would be invoked.


#3

Hi,

Just to clarify some of the above: the actual analytics library itself doesn’t have any dependencies on OG-Financial. We used to have some classes, such as the day count and business day conventions classes that Kirk included links to in the OG-Financial module, but these have since been moved to OG-Analytics, so while the package names suggest they are OG-Financial classes, they in fact are not (we need to change that). It’s possible that you might find something useful in OG-Financial too, but it’s primarily for integration with our engine and other modules so if you’re interested in pure analytics, I’d stick to OG-Analytics as a starting point.

If you don’t want to use the Ivy dependency manager that we use, you should download and build the whole source tree (follow the instructions here: http://docs.opengamma.com/display/DOC/Developing+The+OpenGamma+Platform+Itself). After building with publish-all-local at the top level, you will find all the dependent jars for OG-Analytics in projects/OG-Analytics/lib/jar, which you can copy into your own setup.