mktdata.py
def _check_db(symbols, from_date, to_date):
    ''' Checks in very naive way if marketdata db is created and populated with data '''
    try:
        l = list(Symbols().symbols())
        if len(l) < len(symbols):
            return False
        if len(_get_marketdata(symbols[0], from_date, from_date + timedelta(days=10))) == 0:  # check if we have market data for first equity
            return False
        if len(_get_marketdata(symbols[-1], to_date - timedelta(days=10), to_date)) == 0:  # check if we have market data for the last equity
            return False
        return True
    except:
        return False
 Checks in very naive way if marketdata db is created and populated with data 
Checks in very naive way if marketdata db is created and populated with data
Checks in very naive way if marketdata db is created and populated with data
def _check_db(symbols, from_date, to_date):
    try:
        l = list(Symbols().symbols())
        if len(l) < len(symbols):
            return False
        if len(_get_marketdata(symbols[0], from_date, from_date + timedelta(days=10))) == 0:  
            return False
        if len(_get_marketdata(symbols[-1], to_date - timedelta(days=10), to_date)) == 0:  
            return False
        return True
    except:
        return False
def _check_db ( symbols , from_date , to_date ) : try : l = list ( Symbols ( ) . symbols ( ) ) if len ( l ) < len ( symbols ) : return False if len ( _get_marketdata ( symbols [ 0 ] , from_date , from_date + timedelta ( days = 10 ) ) ) == 0 : return False if len ( _get_marketdata ( symbols [ - 1 ] , to_date - timedelta ( days = 10 ) , to_date ) ) == 0 : return False return True except : return False
Checks in very naive way if marketdata db is created and populated with data
Checks in very naive way if marketdata db is created and populated with data
''' Checks in very naive way if marketdata db is created and populated with data ''' # check if we have market data for first equity # check if we have market data for the last equity
symbols
from_date
to_date