public TimeSeriesContainer fetchTSData(TimeFrame tf, String[] marketInstrumentIds, String[] fieldNames,
double startDate8Time6, double endDate8Time6, Map<Parameter, Object> paramMap) throws Exception {
//
if (paramMap == null)
paramMap = new HashMap<Parameter, Object>();
Date8Time6Parser parser = new Date8Time6Parser();
//
Map<String, Map<String, Map<TimeStamp, Double>>> dataMap = new HashMap<String, Map<String, Map<TimeStamp, Double>>>();
List<TimeStamp> timeStamps = new ArrayList<TimeStamp>();
for (int i = 0; i < marketInstrumentIds.length; i++) {
String instrument = marketInstrumentIds[i];
// get the instrument specific map.
Map<String, Map<TimeStamp, Double>> instrumentMap;
if (!dataMap.containsKey(instrument))
dataMap.put(instrument, new HashMap<String, Map<TimeStamp, Double>>());
instrumentMap = dataMap.get(instrument);
for (int j = 0; j < fieldNames.length; j++) {
String field = fieldNames[j];
// get the field specific map
Map<TimeStamp, Double> fieldMap;
if (!instrumentMap.containsKey(field))
instrumentMap.put(field, new HashMap<TimeStamp, Double>());
fieldMap = instrumentMap.get(field);
TimeStamp t1 = new TimeStamp(parser.getNanoseconds(startDate8Time6));
TimeStamp t2 = new TimeStamp(parser.getNanoseconds(endDate8Time6));
TSContainer ts = archiveFactory.getReader(tf).getTimeSeries(instrument, field, t1, t2);
if (ts.timeStamps.length > 0) {
for (int k = 0; k < ts.timeStamps.length; k++) {
TimeStamp timeStamp = ts.timeStamps[k];
Double value = ts.values[k];