Example #1
0
def get_benchmark_data(symbol):
    """
    Benchmarks from Yahoo.
    """
    start_date = datetime(year=1950, month=1, day=3)
    end_date = datetime.utcnow()

    raw_benchmark_data = get_raw_benchmark_data(start_date, end_date, symbol)
    # Reverse data so we can load it in reverse chron order.
    benchmarks_source = reversed(list(raw_benchmark_data))

    mappings = benchmark_mappings()

    return source_to_records(mappings, benchmarks_source)
Example #2
0
def get_benchmark_data():
    """
    Benchmarks from Yahoo's GSPC source.
    """
    start_date = datetime(year=1950, month=1, day=3)
    end_date = datetime.utcnow()

    raw_benchmark_data = get_raw_benchmark_data(start_date, end_date)
    # Reverse data so we can load it in reverse chron order.
    benchmarks_source = reversed(list(raw_benchmark_data))

    mappings = benchmark_mappings()

    return source_to_records(mappings, benchmarks_source)
Example #3
0
def get_benchmark_data(symbol, start_date=None, end_date=None):
    """
    Benchmarks from Yahoo.
    """
    if start_date is None:
        start_date = datetime(year=1950, month=1, day=3)
    if end_date is None:
        end_date = datetime.utcnow()

    raw_benchmark_data = get_raw_benchmark_data(start_date, end_date, symbol)

    mappings = benchmark_mappings()

    return source_to_records(mappings, raw_benchmark_data)
Example #4
0
def get_benchmark_data(symbol, start_date=None, end_date=None):
    """
    Benchmarks from Yahoo.
    """
    if start_date is None:
        start_date = datetime(year=1950, month=1, day=3)
    if end_date is None:
        end_date = datetime.utcnow()

    raw_benchmark_data = get_raw_benchmark_data(start_date, end_date, symbol)

    mappings = benchmark_mappings()

    return source_to_records(mappings, raw_benchmark_data)
Example #5
0
def get_benchmark_data(symbol, start_date=None, end_date=None):
    """
    Benchmarks from Yahoo.
    """
    if start_date is None:
        start_date = datetime(year=1950, month=1, day=3)
    if end_date is None:
        end_date = datetime.utcnow()

    raw_benchmark_data = get_raw_benchmark_data(start_date, end_date, symbol)
    # Reverse data so we can load it in reverse chron order.
    benchmarks_source = reversed(list(raw_benchmark_data))

    mappings = benchmark_mappings()

    return source_to_records(mappings, benchmarks_source)
Example #6
0
def get_treasury_data():
    mappings = treasury_mappings()
    source = get_treasury_source()
    return source_to_records(mappings, source)
Example #7
0
def get_treasury_data():
    mappings = treasury_mappings()
    source = get_treasury_source()
    return source_to_records(mappings, source)