Puzzle H1

Question:

Download the following files:
AMEX_daily_prices_N.csv

AMEX_dividends_N.csv

The daily_prices file contains stock ticker symbols and opening, high, low and closing prices, as well as sales volumes.
The dividends file contains stock ticker symbols and dividend amounts.
Only a subset of stocks have dividends, so the stocks in the files do not match one-for-one.
Line one of each file is a header row that shows which column is which.
For every stock that pays a dividend, calculate the Market Capitalization (volume * closing price) for each day at the stock market’s closing bell. Identify which dividend-paying stock had the highest Market Capitalization of them all.

By way of example, based on the samples below, NGI and NAV are dividend-paying stocks, but NEX is not. Calculating the Market Capitalizations (MC) for NGI and NAV, the highest MC is NGI’s with an 200592, thus the answer is NGI

35.05 * 5500 = 192774.9
35.02 * 5400 = 189108.0
41.22 * 3900 = 160758.0
41.64 * 4800 = 199872.0
41.79 * 4800 = 200592.0

SAMPLE prices file:

exchange,symbol,date,opening_price,high_price,low_price,close_price,volume,price_adj_close

AMEX,NAV,2010-04-15,35.00,35.01,35.00,35.05,5500,35.00
AMEX,NAV,2010-04-16,35.00,35.01,35.00,35.02,5400,35.00
AMEX,NEX,2010-03-15,12.00,12.01,12.00,12.00,300,12.00
AMEX,NEX,2010-03-16,12.00,12.01,12.00,12.00,310,12.00
AMEX,NEX,2010-03-17,12.00,12.01,12.00,12.00,3.11,12.00
AMEX,NGI,2011-03-07,41.49,41.49,41.22,41.22,3900,41.22
AMEX,NGI,2011-03-04,41.62,41.64,41.00,41.64,4800,41.64
AMEX,NGI,2011-03-02,40.96,40.96,41.73,41.79,4800,41.79

SAMPLE dividends file:
exchange,stock_symbol,date,dividends<br />

AMEX,NAV,2011-01-21,0.08
AMEX,NGI,2010-12-31,0.06

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s