public static void main(final String[] args) throws Exception {

    final String cfgPath = "/com/sandy/stocktracker/bootstrap-config.xml";
    new Bootstrap().initialize(ScripDataModification.class.getResource(cfgPath));
    OF = (BizObjectFactory) BizObjectFactory.getInstance();

    try {
      new ScripDataModification().updateActiveEOD();
    } finally {
      final IJobSvc svc = ServiceMgr.getJobSvc();
      svc.shutdownScheduler();
    }
  }
  public void updateArchiveEODForSymbol(final String scrip) throws Exception {

    final IScripSvc eodScripSvc = ServiceMgr.getScripSvc();
    final List<ScripEOD> activeEOD = eodScripSvc.getArchivedEODData(scrip);
    double lastClosing = -1;
    for (final ScripEOD eod : activeEOD) {
      if (lastClosing != -1) {
        eod.setPrevClosePrice(lastClosing);
      }
      lastClosing = eod.getClosingPrice();
    }

    final IEODIndexDAO dao = (IEODIndexDAO) OF.getBean("EODIndexDAO");
    dao.updateArchive(activeEOD);
  }