This page was created to support students taking the Financial Modeling course. This page contains:
The course syllabus. This will give you a perspective on what we are trying to accomplish in the course.
The notes the I use for my lectures in chronological order. Please keep in mind that all my notes are "works in progress" and I expect to change them when I prepare for the lectures and after the lectures are finished. I will be developing code in class that will not be in the notes, so, you should take notes.
Introduction 1/26/2009
Market Definitions and Preliminaries 1/26/2009, 2/16/2009, 3/2/2009 , 3/30/2009
Programming Prerequisites 2/2/2009, 2/9/2009, 2/16/2009, 2/23/2009, 3/2/2009 (snow day), 3/9/2009
Mathematical Prerequisites 3/30/2009
Price Data - we will discuss how to use this in class We will discuss in class how to create a class to use this data.
Other assignments These will be prefixed with the assignment date.
Read chapters 1 and 2 - 1/26/2009
Homework: find access to the S&P 500 and the Russell 1000 indexes. Email me a link. 2/23/2009
Read Chapters 6 through 11. 4/4/2009
Lecture topics for 3/30/2009
Review Configuration file class - I have had a number of questions on this.
Discuss in detail the elements of the data classes. I will give you some ideas - Data access class
Start the math definitions.
More Market Definitions and Preliminaries.
We will take a little time for your groups to
meet.
Lecture topics for 4/6/2009
Review the Data access class
Simulations and Actual Trading
I will spend the last half of the presentation meeting with your groups.
Lecture topics for 4/13/2009
Review and expansion on section on the process of building a trading model.
Group exercise. Try RSI and Fast and Slow Stochastic.
Group exercise. This is an exercise in optimization. Develop a program to compute the x and y values that result in the maximum value of the following function. For the sake of reality, assume that each evaluation of F(x,y) takes one second. Tell me how long it took to find an optimal value.
F(x,y) = exp( -x^2 -y^2 - x + y) + sin( x^2/2 - y^2/4 + 3) cos( 2x+1+exp(y)
Where -2 < x < 2 and -2 < y < 2
Lecture topics for 4/20/2009
Review math prerequisites and present additional statistics.
Review Optimization. I will be giving a 3
variable optimization, that will take 20 seconds for each calculation of the
objective function. How will this change the manner in which you attack
the problems? Reality might be 100 seconds per calculation. Here is
what you need to create your optimizer:
ObjectiveFunction.obj and
ObjectiveFunction.h
Lecture topics for 4/27/2009
Student Presentations - we will do these first to make sure we have time.
Discuss where people are going with their optimization programs.
Discuss walk-forward analysis
Allow more time on optimization.
Lecture topics for 5/3/2009
Have the last presentation on MACD.
Discuss walk forward optimization. Discuss how to test. How would I have to modify a simulator to take advantage of this.
See section on an actual simulator. We will visit one of mine and discuss it.
Discuss final.
Questions from a difficult interview
7) If you were building an application that requires realtime data (financial). What measures would you take to make sure you didn't have any problems?
9) You are writing a trading system in Java (gets realtime market data and executes orders).
a) How would you optimize such a system for speed and memory, in general?
b) The trading system needs to execute large trades that are broken down into smaller trades. Lets say you need to sell X shares. You can only do one sell order per minute. You are given a cost matrix C, where C(i,j) is the cost of selling i-shares at minute j. How would you efficiently find the cheapest way to sell X shares?
10) You have a trading strategy that you are trying to optimize to make more money. You ran simulations on historical data, generating m trades. You see that the strategy is dependent on n entry condition variables. What approach would you take to optimize the strategy? What problems would worry you? How would you avoid them? Be specific.
11) You are trying to buy a stock at the best price. You need to buy it in the next 100 minutes. Every minute you will receive a random price (uniform distribution) that is a number between 1 and 100 dollars and decide whether to buy it or not. 1) Assuming you buy the stock in one trade, give a condition for buying the stock. 2) On average how many minutes will pass before that condition holds (expression or approximation is fine)? 3) If you could split up the trade, ie, buy different amounts at different minutes, what would you do differently?