Your SlideShare is downloading. ×
  • Like
Hadoop - Stock Analysis
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Hadoop - Stock Analysis

  • 530 views
Published

 

Published in Economy & Finance , Business
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
530
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
14
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Stock Analysis using Hadoop Framework Presented by: Sudhanshu Ranjan Vaibhav Jain Santosh Koppada Sumit Sahay Madhumita Ghosh
  • 2. AGENDA • OBJECTIVE • TECHNICAL ARCHITECTURE • BASIC STRUCTURE & CODES USED • FINAL RESULTS • BUSINESS IMPLICATIONS
  • 3. OBJECTIVE • To obtain the companies adjusted closed share price after dividend distribution. • To review the past trends of dividend payout & formulate future group strategy. • Brand establishment increasing dividends. across the industry by paying
  • 4. TECHNICAL ARCHITECTURE MapReduce Program Using Hive Mapper -1 Table Creation Reducer -1 Loading Data Final Output Inner Join Final Output
  • 5. BASIC STRUCTURE & CODES USED(Using Hive) • FOR REMOVING THE HEADER: ON UNIX – • Tail -n +2 {FILE_NAME_WITH_HEADER} > {FILE_NAME_WITHOUT_HEADER} CREATING NYSE TABLE: ON HIVE – hive> CREATE TABLE NYSE (exchange STRING, stock_symbol STRING, T_date STRING, SP_open FLOAT, stock_price_high FLOAT, stock_price_low FLOAT, stock_price_close FLOAT, stock_volume INT, stock_price_adj_close FLOAT) ROW FORMAT DELIMITED FIELDS TERMINATED BY ','; • LOADING THE DATA INTO NYSE TABLE: – hive>Load data local inpath '/home/ec2-user/MS_Praxis/ NYSE_daily_prices_AT_W.csv' Overwrite into table NYSE; • To SELECT ADJUSTED CLOSING PRICE FOR EACH DAY THAT A STOCK REPORTED A DIVIDEND – hive> select n.stock_symbol,n.t_date,stock_price_adj_close FROM nyse n JOIN dividend d ON n.stock_symbol=d.stock_symbol and n.t_date=d.t_date;
  • 6. BASIC STRUCTURE & CODES USED(Using MapReduce) : Mapper Import java and hadoop packages Public class stockers { Public static class stockanalysismapper extends mapreducebase implements mapper <longwritable, text, text, text> { // Declared the mapkey and mapvalue @Override Public void map(longwritable key, text value,outputcollector<text, text> output, reporter reporter) throws ioexception { // declaration of given variables // Used for loop switch case to parse the input lines and store the data // Check for null values in the key // Check the header and send the key value to output collector } }
  • 7. Contd…Reducer public static class StockAnalysisReducer extends MapReduceBase implements Reducer<Text, Text, Text, Text> { //Declaration of required variables @Override public void reduce(Text key, Iterator<Text> values,OutputCollector<Text, Text> output, Reporter reporter) throws IOException { //Declaration of sum and flag variables while (values.hasNext()) { // Parse the inputs which are count, stock adjusted closing price and check // Store them as required after parsing //check for null values of stock adjusted closing price //Increment the sum } // write to output if sum is 2 and flag is 0 } } }
  • 8. Contd… • Implementation of MapReduce on Hadoop: – Copy the data from UNIX directory to HDFS • hadoop fs -put *.csv eproj/input/ – Run ‘JAR’ code on hadoop • hadoop jar Hadoop_matching.jar Stockers eproj/input mproj/output108 – To view the output • hadoop fs -cat mproj/output108/part-00000
  • 9. RESULT • We have found the adjusted stock closing prices of companies on dates when they offered dividends.
  • 10. BUSINESS IMPLICATIONS • Examining historical adjusted closing price trends as it give accurate representation of the company equity value beyond simple market price. • Basis the findings, it will encourage new investors will invest in the company. • It shows that the company is performing efficiently & meeting shareholder’s expectations. • Incase, there is no adjustment and the stock’s price is same after a dividend distribution, then any investor will get free money by buying the stock the day before the ex-date & later selling the stock after dividend distribution. Clearly no such arbitrage situation exists.
  • 11. THANK YOU