The goal of the program is to take as its input a sequence of daily quotes for a stock, then derive a collection of buy signals and sell signals, which are, respectively, recommendations to either buy or sell the stock on given days in the sequence. The program begins by presenting a console-mode user interface to the user, allowing the user to make a few decisions about the analysis that will be run. The program runs a single analysis according to the user's specifications, then ends; if the user wants to run another analysis, he or she would run the program again.
The user interface asks the user to specify the following:
The ticker symbol of the stock for which the analysis should be done. For example, if the stock was Microsoft, the user would specify MSFT. Allow the user to type a symbol (so accept anything the user specifies, then report the failure later if downloading quote data fails).
The start date of the analysis. The user should specify the date in the format YYYY-MM-DD (i.e., a four digit year, followed by a dash, followed by a two-digit month, followed by a dash, followed finally by a two-digit day). So, for example, February 4, 2012 would be specified as 2012-02-04. The start date should be on or before today's date; if not, ask the user to specify another. If the date is entered in an incorrect format (anything other than YYYY-MM-DD), ask the user to specify another.
The end date of the analysis. The user should specify the date in the format YYYY-MM-DD. The end date should be on or before today's date, and should also be later than the start date; if not, ask the user to specify another. If the date is entered in an incorrect format (anything other than YYYY-MM-DD), ask the user to specify another.
The signal strategy, which determines the manner in which buy or sell signals will be generated. Show a menu of options to the user and allow one of them to be selected and then configured. The options are listed in the section titled Signal strategies below.
Simple moving average.
Please see file for more information