Overview
The overall goal of this program is to calculate a 1 year price target for the stock of Apple (AAPL). 
There are three scripts, and they all have different objectives. 
The first script plots Apple closing price data over time from May 3, 2016 to May 3, 2021. It then lets the user enter a day during that time period and the program tells whether to buy or sell Apple stock using the moving average system of trading. 
The second script plots quarterly earnings per share data for Apple over the same time period and estimates the annual earnings per share for Apple in 2021. 
The third script calculates a price target for Apple using the growth data found in the second script. 
Abstract
Finding price targets for stocks is an instrumental part of stock market analysis. Knowing whether a stock will go up or down is important in itself, but to refine that prediction with an exact price for a certain date is even more difficult. The aim of this program is to do exactly that using statistics of companies like earnings and historical closing prices. This program analyzes this data to determine whether to buy or sell the stock of a company, display and predict quarterly earnings, and then bring it all together to find a 1 year price target of the stock, and in the case of this program, it is Apple stock (AAPL). 
Script 1
This script first plots the closing prices of Apple stock (price when the market closes on trading days) from May 3, 2016 to May 3, 2021. 
On the same plot, a 50 day moving average is plotted as well. 
The program then asks on what day since May 3, 2016 the user wants to trade Apple stock. 
Based on the day given (1-1258), the program will tell the user to either ‘buy’ or ‘sell or hold’ based on the moving average system of trading. 
The moving average system of trading essentially says that if a stock is above the moving average, it should be bought, and if not, it should be sold or held.
Script 2
This script plots the quarterly earnings per share for Apple from Q1 2016 to Q1 2021. 
Earnings per share is the earnings of a company over a certain amount of time divided by the amount of shares there are of that company. 
A line of best fit is plotted on the graph of EPS over time, and the equation is saved as a variable. 
Based on this line of best fit, the quarterly EPS is found for Q2, Q3 and Q4 in 2021. 
Some slight adjustments are made specific to Apple stock based on previous trends in the calculations of Q4 EPS.
Annual EPS is calculated using one method, and then double checked using the method of past EPS growth. 
These two values are averaged, and come out to be 4.90.
Script 3
The third and final script achieves the final goal of finding a price target. 
Using the estimated EPS data for 2021, the trailing P/E of Apple stock on May 3, 2021, and factoring in a potential market correction, a price target is calculated. 
The price target for May 3, 2022 is predicted to be $168.73 per share, which would be roughly a $33 increase over one year.
Back to Top