/Math590_Final_Project

Implementation of regression that creates a line of best fit for financial data.

Primary LanguageJava

Math590_Final_Project

This program draws a line of best fit for an input set of raw stock data from Yahoo Finance formated at as 'Unicode Text' file. It is also able to graph the cost of the linear regression as as a function of iterations to make it clear how gradient descent works over time.

INSTRUCTIONS TO RUN:

  1. Press the Green Button on the right of this page and download the .zip file.
  2. Save the file wherever you like and extract all of the files to your computer.
  3. Inside the folder you will find a 'LineMaker.jar' file, double click this to begin.
  4. A small window will open presenting you with two options. Choose one.
  5. Now you will be prompted to choose an input '.txt' file. The program will not except anything else. I have provided several files already prepared in the the 'StockData' folder. You may also create your own using the instructions below.
  6. The program will run and graph your desired data.

INSTRUCTIONS FOR CREATING INPUT DATA:

  1. Go to yahoo finance and choose any stock.
  2. Go to 'Historical Data' and choose 'download' for whatever time period you wish.
  3. You will be given a '.csv' file. Open this preferrably with Excel.
  4. Resave the opened file as a 'Unicode Text' file.
  5. This new file is now ready for use.