@classmethod
def fromCSV(cls, filepath):
    """Constructor: creates a Stock instance by loading the stock data
           from a CSV file.

        The file should contain no headers and have 3 columns.
        The 1st column should have date stamps in the format YYYYMMDD (year,
        month and  day). The 2nd column should have time stamps in the format
        HHMM (hour and minute). The 3rd column should have stock price values.

        Examples of valid lines:
        20070805,0935,12.34
        20121231,1404,0.35

        The first two columns are imported as integers, and the last column is
        imported as floats.

        Args:
            filepath (string): Path to the CSV file to be imported.

        Returns:
            (Stock): An instance of the Stock class where prices and date/time
                     stamps were loaded from the supplied CSV file.
        """
    data = cls.stockFromCSV(filepath)
    stock = cls(prices=data['price'], dates=data['date'], timestamps=data[
        'time'])
    stock.filepath = filepath
    return stock
