ECON 424/AMATH 462: Introduction to Computational Finance and Financial Econometrics

Home
Syllabus
Homework
Notes 
Excel Hints 
R Hints
Announcements
Links
Project
Review

Homework Assignments

Summer 2014

  • New homework assignments are posted every Monday after 8 pm PST. Assignments are due at 8 pm one week after they are assigned and are to be submitted electronically through the class Canvas page (typically Monday at 8 pm).  For R work, I suggest that you either copy and paste statistical output and graphs from R into a word processor (e.g MS Word) or use R markdown within R studio.

Last updated: July 28, 2014

 

Assignment

Due Date

Programs/Data

Solutions

Monday 6/30/14 by 8 pm PST

download data from finance.yahoo.com. See below for instructions.

econ424lab1.r

sbuxPrices.csv

solutions

Excel solutions

 

Monday 7/7/14 by 8 pm PST

None needed

Monday 7/14/14 by 8 pm PST

 

econ424lab3.r

Monday 7/21/14 by 8 pm PST

 

econ424lab4.r

  • No lab this week

 

 

 

 

Monday 8/4/14 by 8 pm PST

econ424lab5.r
  • solutions
  • Lab 7

Monday 8/11/14 by 8 pm PST

econ424lab7.r
  • solutions
  • Lab 8

Monday 8/18/14 by 8 pm PST

econ424lab8.r
econ424lab8returns.csv
  • solutions

 

To get data from Yahoo! do the following for each series to be downloaded:

  1. Point your browser to the Yahoo! finance site.

  2. In the Get Quotes box type the symbol of the stock for which you want data. For example, the symbol for Microsoft is MSFT. If you do not know the ticker symbol use the symbol lookup link at the right of the box.

  3. The recent quote for your stock as well as a wealth of other information will be presented on a new page. To get historical prices, click the historical prices link on the upper left panel of the page.

  4. A new page will open and you will be able to specify the date ranges for the data to be downloaded and the frequency of the data (daily, weekly or monthly).

  5. After setting the date and frequency information, click the get prices button.  This brings up a table with your specified data.

  6. At the bottom of the displayed table click on Download to Spreadsheet. This will bring up a Save As dialogue box. Specify a name for the file and save to disk. Each file will contain 6 columns (as in the table below). For monthly data, the column labeled Open gives the opening price at the beginning of the month, the column labeled High gives the highest price during the month, the column labeled Low gives the lowest price during the month, the column labeled Close gives the closing price during the month and the column labeled Volume gives the total monthly volume. The open and the close data have been adjusted for dividends and stock splits. Use the (adjusted) close data for your analysis. 

After downloading your data file, you need to reverse the time ordering of the data in the file. To reverse the time ordering of the data do the following.

Open the .csv file containing your data in Excel. You should see data arranged like the following

Date

Open

High

Low

Close

Volume

Jun-99

80.625

90.25

78.4375

90.1875

23414100

May-99

81.4375

81.5

78.125

80.6875

27182000

Apr-99

91.25

92.875

79.875

81.3125

24916100

Mar-99

74.7812

94.625

74.75

89.625

21979600

Feb-99

87.7188

87.9688

74.75

75.0625

17625300

Notice that the most recent data is at the top of the spreadsheet. To reverse the date ordering of the data, highlight all of the data (including the column headers). Then select Data/Sort which brings up the Sort dialogue box. In the Sort by box choose Date, click the Ascending option and the OK box. Your data will be sorted from the earliest date to the latest date.