CS286r: Topics at the Interface between Computer Science and Economics

Spring 2008: Computational Finance

Harvard School of Engineering and Applied Sciences

Christopher Thorpe and David C. Parkes

DRAFT

**Course Summary**

Topic for Spring 2008: Computational Finance

Note: Enrollment in this course is limited.

See the course web page for office hours information.

Applications of computer science to the study of modern financial markets. Motivation of finance as a source of important, interesting problems. Introduction to major markets, asset classes and market data. Characterization of price movements: random walks, ``crashes'', ``momentum'', mean reversion, etc. Mathematical financial models. Study of modern artificial intelligence (AI) tools and their applications, not only in finance but also in other research areas. Scientific computer analysis of large-scale data corpora to investigate hypotheses in finance research. Examination of behavioral finance with respect to human and computer traders in markets. Applications of AI in derivative pricing, time series analysis and price prediction, risk analysis. Discussion of terabyte-scale and millisecond-response-time systems challenges associated with analysis and trading in modern financial markets. Market impact of trading; reasoning about other traders. Applications of cryptography in securities trading.

**Required Background**

The course is designed to be accessible to anyone with sufficient
mathematical background for graduate study in the social or
natural sciences. Ideally, students will collaborate in cross-
functional teams (for example, a computer scientist, a statistician
and an economist) on assignments and projects so that each team has
members familiar with different aspects of the task.
While students should have some exposure to computer programming,
familiarity with spreadsheets (such as Excel), or statistical
analysis software (such as Stata or R), or Matlab will be sufficient
for students with strong backgrounds in economics and finance.

**Readings**

All texts will be on reserve at the Gordon McKay Library in
Pierce Hall. See `http://library.seas.harvard.edu/map.php`
for a map and operating hours; you may also view the
``Reserve Materials'' link under ``Services'' in the
left navigation bar.

__Required Texts:__

Lo, Mackinlay. *A Non-Random Walk Down Wall Street*. Princeton, 2001.
ISBN: 978-0691092560. (The 1999 edition is OK.)

Voit. *The Statistical Mechanics of Financial Markets*. Springer, 2005.
ISBN: 978-3540262855.

Ross. *An Elementary Introduction to Mathematical Finance:
Options and other Topics*. (Second edition).
Cambridge, 2002. ISBN: 978-0521814294.

__Optional Texts:__

Taleb. *The Black Swan: The Impact of the Highly Improbable.*
Random House, 2007. ISBN: 978-1400063512

Dacorogna et al. *An Introduction to High-Frequency Finance.* Academic
Press, 2001. ISBN: 978-0122796715

__Papers and Articles:__

Papers will be distributed during class at least one meeting
before they are to be read; where possible they will also be
made available on the course website.

__Data and Trading Platforms__

- Trading Technologies is generously donating several copies of its
proprietary
`X_TRADER`trading platform and API for students to use in a ``paper trading'' environment during the course. This platform is used by many professional traders. - Opentick allows for free educational use of historical market
data for many major markets. Students may sign up for free at
`opentick.com`; a major credit card is required but we have spoken to the data provider, and users will not be billed unless they sign up for real-time data. Real-time data access is*not*required for this course. - ...

**Homework and Grading**

Each week has two homework components: assigned reading for the
following meeting and homework based on the previous week's reading
and discussion. While no formal homework is required for the
reading assignments, those who complete the reading will be
better prepared for active class participation.

**Grading Guidelines:**

20% | Class Participation |

10% | Attendance (up to 1 absence is ``free'') |

10% | Contributions to Class Discussion |

NB: Absent students rarely contribute. | |

40% | Homework Assignments |

4% | Each week's assignment |

40% | Final Project |

Grading guidelines will be issued later. |

**Course Schedule**

The first course meeting will be an introduction to the course and
the second week's topics.

Each course meeting will begin promptly at 2:07 and conclude at 5 pm.

After the first meeting, students will begin each meeting by presenting their homework for that week--approximately one hour. We will then discuss how the past week's work relates to final project ideas. After a brief break, we will cover the material from that week's reading, which will introduce the next homework assignment.

Part 1: Introduction to Trading; Asset Classes; Data Sources | |||

1 | Feb | (Lecture) | Course introduction; asset classes; markets; overview of computer science tools we will study |

8 | Feb | (Homework) | Study and present a particular asset class in depth. |

(Lecture) | Time-series analysis: how do prices move? Examination of prices and trading volume in various markets; correlations between asset classes in different markets. | ||

15 | Feb | (Homework) | Study and present price movements and trading volume for the asset class studied in the previous homework. |

(Lecture) | Mathematical tools for studying time series: Black-Scholes, power laws, Lévy flights, stochastic differential equations, etc. | ||

22 | Feb | (Homework) | Compare the accuracy of two or more of these tools on many years of price data for some asset in the past homework's asset class. |

Section 2: Introduction to Computational Tools | |||

22 | Feb | (Lecture) | Introduction to Artificial Intelligence (AI) and machine learning (ML): neural networks; support vector machines; etc. |

29 | Feb | (Homework) | Present a history of and non-finance applications of a particular AI/ML tool |

(Lecture) | Graphical models: Hidden Markov Models, Bayesian Networks. | ||

7 | Mar | (Homework) | Describe an HMM or BN model for a financial application, and encode it using existing tools. |

Section 3: Behavior, Derivatives, and Risk | |||

7 | Mar | (Lecture) | Behavioral finance: time of day/day of week; seasonality; news; noise and naïveté; stock spam; human error; computers behaving badly! |

14 | Mar | (Homework) | Pick a behavioral finance research topic and investigate it, either empirically or by presenting empirical research. |

(Lecture) | Derivative pricing given mathematical models and behavioral effects; computation tools to estimate derivative prices | ||

21 | Mar | (Homework) | Examine a time series of traded derivative prices and actual prices at expiration. How accurate were the derivative prices? |

(Lecture) | Risk analysis: what is the actual risk of a position? Can we even measure it? How do we ``hedge'' it properly? | ||

28 | Mar | SPRING BREAK | |

4 | Apr | (Homework) | Choose a scenario in the last 400 years when an investment firm, fund, or asset crashed. Using data available prior to the crash, how could you assess the risk of holding that asset? How could you mitigate that risk? |

4 | Apr | (Discussion) | Project proposals, discussion, and team assignment |

Section 3: Computer-Based Trading in Practice | |||

11 | Apr | (Project) | Project description complete |

(Lecture) | Systems: terabyte-scale data challenges; network and hardware challenges for millisecond-response high-frequency trading | ||

18 | Apr | (Homework) | Estimate the total cost to obtain and react to all real-time market data for a particular asset class in a given market. |

(Lecture) | Market impact of trading; backtesting versus real trading; other agents' responses to an agent's orders | ||

25 | Apr | (Homework) | Describe how to estimate market impact of a trade. |

(Lecture) | Applications of cryptography in financial trading (no homework) | ||

Section 4: Final Projects | |||

2 | May | (Project) | Project Presentations |

9 | May | (Project) | Postponed project presentations; plenary pizza party |

9 | May | Trading agent projects: agent code is due | |

13 | May | Agent project ``testing'' period ends; summary of raw results due for all projects | |

15 | May | Complete project writeups are due |