'''
Created Oct 10-20, 2010
Modiifed math.pi day, 2012
@author: apsd, ola
'''

import StockData
import matplotlib.pyplot as plt

def get_date_of_max_price(data):
    """
    Given a list of (date, price, volume) tuples, returns the date of the tuple 
    that has the highest price.
    """
    # TODO: students fill this in
    pass

# Getter functions here:
def date(tuple):
    """
    Given a (date, price, volume) tuple, return the date.
    """
    return tuple[0]

def price(tuple):
    """
    Given a (date, price, volume) tuple, return the price.
    """
    return tuple[1]

def average_price(data):
    """
    Given a list of (date, price, volume) tuples, return the average price.
    """
    # TODO: students fill this in.
    pass

def plot_prices(data):
    """
    data is a list of (date, price, volume) tuples.
    We create a plot of the price of the stock over all the days in the list.
    The x-axis is the index in the list, and the y-axis is the price of the stock.
    """
    # TODO: students fill this in
    pass

def plot_price_vs_average(data):
    """
    data is a list of (date, price, volume) tuples.
    We plot a graph describing how the current price of the stock compares
    to the average price of the past 10 days. 
    The x-axis is the index in the list, and the y-axis is the difference 
    between the current price and the 10-day average.
    """
    # TODO: students fill this in
    pass

if __name__ == "__main__":
    data = StockData.getWebData("GOOG", "20110101", "20120101")
    # if you want to test various functions, you can do it here.
