print 'Updating the database with latest hist price.'
            datastore = FinanceDataStore(db_full_path)
            stock_list = list(ss.modified_df['SYMBOL'])
            datastore.scan_and_input_recent_prices(stock_list,5)
            print 'Updating the database with latest hist price -- Done\n'

        if 'c' in partial_run:
            ## using database to retrieve the data
            datastore = FinanceDataStore(db_full_path)
            datastore.retrieve_hist_data_fr_db()

            ## 3 days trends data
            print "Getting Trends data"
            trend_ext = YFHistDataExtr()
            trend_ext.set_bypass_data_download()
            trend_ext.set_raw_dataset(datastore.hist_price_df, datastore.hist_div_df)
            trend_ext.run_all_hist_data()
            full_stock_data_df = pandas.merge(ss.modified_df, trend_ext.all_stock_combined_post_data_df, on = 'SYMBOL', how ='left')
            
            print "Getting Trends data -- Done. \n"
            full_stock_data_df.to_csv(final_store_filename, index = False)

        if 'd_pre' in partial_run:
            """ Skip the company data info and just join based on store data."""
            print 'Use backup data for company data.'
            store_com_path = r'C:\data\stock_sql_db\company_data.csv'
            com_data_df = pandas.read_csv(store_com_path)
            full_stock_data_df = pandas.merge(full_stock_data_df, com_data_df, on = 'SYMBOL', how ='left')

        if 'd' in partial_run:
            ## Replaced with the com data scraping using YQL --> some problem for this