Difference between ValueSpecification , ValueRequirement and ValueProperties

MarketDataSpecification is a description of where to source data for your view execution cycle. There are sub-classes of it for Live, Historical (on a date), Historical (latest), snapshots and combined source (e.g. Bloomberg live falling through to activ). FixedHistoricalMarketDataSpecification is probably what you want. The appropriate time series is chosen according to the resolution keys you specify. If you choose null it loads a config object called DEFAULT_TSS_CONFIG of type HistoricalTimeSeriesRating. These can be viewed in JSON form via the web UI. They are a simple table of data sources, data providers, fields and ratings. The request is scored according to what had been supplied and the one with the highest score wins and gets used.

@jim - Thanks for all your efforts but am still not able to make the code run.

I got the concept of the class HistoricalTimeSeriesRating . From what i understood from it is that we can define the default dataProvider and dataSource in there.

This is the code i am trying to execute - https://gist.github.com/2911420

Here i am trying to execute portfolio “Equity Portfolio View” on the historical date 2010-07-07.
I haven’t specified the timeseries resolve key and time series field resolve key. I am assuming that the default values from HistoricalTimeSeriesRating would be taken.
Configuration for HistoricalTimeSeriesRating is - https://gist.github.com/2911439

Also the field i have for each timeseries is CLOSE.
I specified it as a valueRequirement for my function.
My OG function - https://gist.github.com/2911448

My expectation is that that a single cycle would be executed on the portfolio and also that all available timeseries fields related to the security specified in the portfolio would be available as valueRequirement.

Is my understanding right ?

Thanks
Vineeth

You’re definitely on the right track. What ID’s do you have in your ID bundle for your time series? Is at least one of those IDs also in the ID bundle for the EquitySecurity you have in your portfolio? If you look in AbstractHistoricalMarketDataProvider.getAvailability() - this is where is checks each value requirement against the market data provider to see if it’s available. It sounds like that is returning false for some reason - probably because the identifiers don’t match, you don’t have data in the series on that date, or the field names don’t match, although from the looks of it, that shouldn’t be the issue.

Hello @jim ,

Your suspicion is right.
It seems the external id that reaches the function AbstractHistoricalMarketDataProvider.getAvailability() is of form DbSec~1309 (which i feel is the unique id of the security) and the externaID stored in the timeseries is of the form OG_SYNTHETIC_TICKER~CHFLIBORP6M.
I don’t understand how this is supposed to work without mapping the ExternalIDBundle from the security with unique id - DbSec~1309 and then giving it to historicaltimeseries source.

Thanks
Vineeth

So, if you follow the code in getAvailability(), what it does is pass the unique id of the security (the DbSec~1309) through to the lookupExternalIdBundle() method - now because your target type is SECURITY, it then looks up that unique id against the security master to find the equity you’re talking about. It then gets it’s ExternalIdBundle (i.e. all the known external identifiers associated with that security) and then passes that back to getAvailability(), which passes it to the time series source (with the requirement value name as the field. As I said previously, you need to make sure your external id bundle on the security DbSec~1309 contains the same ExternalIds (preferably all the same, although a subset should work too) as your time series external id bundle.

Hello @jim ,

Finally got to the root of issue.
https://github.com/OpenGamma/OG-Platform/blob/dev/stable/projects/OG-Engine/src/com/opengamma/engine/marketdata/historical/AbstractHistoricalMarketDataProvider.java
https://github.com/OpenGamma/OG-Platform/blob/master/projects/OG-Engine/src/com/opengamma/engine/marketdata/historical/AbstractHistoricalMarketDataProvider.java

There are some missing check ins in dev/stable branch on which i am working.
Should i switch to master branch or will this check in moved to dev/stable.

Once again thanks for all your efforts.

Thanks
Vineeth

Ok, sorry about that - I didn’t know that had been a recent bug. I’d switch to master. We’re now treating that as a stable branch, but probably updating it slightly more frequently than dev/stable.

Ok then , i will move to master. Also i really feel bad for bothering you with such an issue.
On an unrelated note - i feel fetching the whole time series in AbstractHistoricalMarketDataProvider.getAvailability() just to see if a particular time series have a particular field is a waste on time and resource.

Thanks
Vineeth

I got it working with the master branch.
Thanks again @jim