SP500 vs. FAANG Shiny Stock Analysis on Quarterly Earnings

Posted on May 11, 2022

The skills the authors demonstrated here can be learned through taking Data Science with Machine Learning bootcamp with NYC Data Science Academy.

shinyThis is my Shiny Dashboard to compare FAANG stocks with S&P500. Using R shiny to visualize the return of investment on each individual FANNG stock for the last decade. Besides, to understand the fluctuation of every single FANNG stock by examining their price after the quarterly earnings report, in terms of beat or miss the expected eps.Β 


The S&P 500 Index or the Standard & Poor's 500 Index is a market-capitalization-weighted index of 500 of the largest publicly-traded companies in the U.S.Β 

β€œFAANG stocks” is an acronym used to describe some of the most prominent companies in the tech sector. Originally, the acronym was FANG, for Facebook, Amazon, Netflix, and Alphabet (formerly Google). In 2017, investors started including Apple in the group, turning the acronym into FAANG.

As of 2020, the five FAANG stocks are among the largest companies in the world, with a combined market capitalization of over $4.1 trillion. The large influence over the index means that volatility in the stock price of the FAANG stocks can have a substantial effect on the performance of the S&P 500 in general.




R Shiny App Framework


The shiny app contains 4 tabs, Introduction, Analysis, Data, and About. Under the Analysis tab, there are 3 sub-tabs, ROI, Correlation, and Earning Report.


The ROI tab shows two time series graphs, one is base on the FAANG stock price, the other is to calculate the true value of each stock whether it has split during the time.

The graph shows the FAANG stock price during 2010 Q1 to 2020 Q3
The graph shows the true return on investment for each FAANG stock vs. SP500. Calculated by cumulative multiplying the stock split ratio from 2010 Q1 to 2020 Q3.

As we know the FAANG have a substantial effect on the performance of the S&P 500, we would like to examine the correlation of each FAANG stock to SP500. However, when we just look at the stock price, the correlation heatmap seems off because "AAPL" has a negative relationship to SP500, and "NFLX" is nearly neutral to SP500, which are contradicted the above statement.

Pairwise correlation heatmap using FAANG stock price


Key Takeaways

  • A company's earnings are its after-tax net income, or profits, in a given quarter or fiscal year.
  • Earnings are crucial when assessing a company's profitability and are a major factor in determining a company's stock price.
  • Earnings per share (EPS) is a company's net income (or earnings) divided by the number of common shares outstanding.
  • EPS shows how much a company earns for each share, with a higher EPS indicating the stock has a higher value when compared to others in its industry.
  • Corporations are required to report quarterly results, but EPS tends to get the most attention from investors, particularly when the EPS either beats, matches, or misses what stock analysts had been forecasting

The table shows the earning information for the FAANG stock from 2010 Q1 to 2020 Q3. It shows the earning date, estimate earning per share(eps), and the actual eps, diff represents the stock price


Choose the specific stock ticker and the earnings status, "beat" or "miss", the graph will show the stock price fluctuation in percentage driven by the report.

Future Improvement


About Author

Leave a Comment

No comments found.

View Posts by Categories

Our Recent Popular Posts

View Posts by Tags

#python #trainwithnycdsa 2019 2020 Revenue 3-points agriculture air quality airbnb airline alcohol Alex Baransky algorithm alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus ames dataset ames housing dataset apartment rent API Application artist aws bank loans beautiful soup Best Bootcamp Best Data Science 2019 Best Data Science Bootcamp Best Data Science Bootcamp 2020 Best Ranked Big Data Book Launch Book-Signing bootcamp Bootcamp Alumni Bootcamp Prep boston safety Bundles cake recipe California Cancer Research capstone car price Career Career Day citibike classic cars classpass clustering Coding Course Demo Course Report covid 19 credit credit card crime frequency crops D3.js data data analysis Data Analyst data analytics data for tripadvisor reviews data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization database Deep Learning Demo Day Discount disney dplyr drug data e-commerce economy employee employee burnout employer networking environment feature engineering Finance Financial Data Science fitness studio Flask flight delay gbm Get Hired ggplot2 googleVis H20 Hadoop hallmark holiday movie happiness healthcare frauds higgs boson Hiring hiring partner events Hiring Partners hotels housing housing data housing predictions housing price hy-vee Income Industry Experts Injuries Instructor Blog Instructor Interview insurance italki Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter las vegas airport lasso regression Lead Data Scienctist Lead Data Scientist leaflet league linear regression Logistic Regression machine learning Maps market matplotlib Medical Research Meet the team meetup methal health miami beach movie music Napoli NBA netflix Networking neural network Neural networks New Courses NHL nlp NYC NYC Data Science nyc data science academy NYC Open Data nyc property NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time performance phoenix pollutants Portfolio Development precision measurement prediction Prework Programming public safety PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R R Data Analysis R language R Programming R Shiny r studio R Visualization R Workshop R-bloggers random forest Ranking recommendation recommendation system regression Remote remote data science bootcamp Scrapy scrapy visualization seaborn seafood type Selenium sentiment analysis sentiment classification Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau teachers team team performance TensorFlow Testimonial tf-idf Top Data Science Bootcamp Top manufacturing companies Transfers tweets twitter videos visualization wallstreet wallstreetbets web scraping Weekend Course What to expect whiskey whiskeyadvocate wildfire word cloud word2vec XGBoost yelp youtube trending ZORI