DRAFT: This module has unpublished changes.

MEC 102 – Final Project
Technical Analysis of Stock Price History to Determine Profitable Trades
Jon Longtin

 

1) Write a Matlab program that does the following;

 

2) Prompt user for
    a) ticker symbol, e.g., AAPL,
    b) number of days of data to plot
    c) fast simply moving average period, e.g., 10
    d) slow simple moving average period, e.g. 40

 

3) Download the appropriate data using the sqq.m function provided on blackboard.

 

4) Write a separate function that will compute the N-point moving average of a vector of time se-ries data (i.e., the stock price history). For the first points in the vector where there are not enough points, just use as many as available.

 

5) Generate a plot of the stock’s closing price, as well as plots of the slow and fast moving aver-ages.
   a) Do NOT plot the raw date values. Rather calculate the dates based on the LAST (latest) date and plot from 0 (oldest day) to N last day data is available,   e.g., 0 to 250 with day 250 being the most recent and day 0 being the oldest.
   b) Include a title
   c) Include labels on the x and y axes
   d) Have the days labeled
   e) Use black for the stock price, red for the fast average and blue for the slow average


6) 50 points EXTRA CREDIT: identify the points where the fast and slow SMA cross
      a) Identify each crossing point and whether the fast crosses from above or below
      b) Plot all points when the fast SMA crosses the slow SMA from below as green points (indi-cating a buy signal)
      c) Plot all points when the fast SMA crosses the slow SMA from above as red points (indicat-ing a sell signal)

 

MEC 102 Final Project - Stock Analysis.pdf

DRAFT: This module has unpublished changes.