FE 588 - Python Programming for Financial Engineering

Description

In recent years, quantitative analysis depends increasingly on computation. The use of computers became essential in carrying out complex financial decisions and handling vast amounts of financial data available.

For such complex information processing tasks, institutions need to develop their own proprietary software. Yet, such software is very rarely rewritten from scratch; rather it is built using existing components and continually adapted to changing requirements.

To be competitive, a financial engineer must be sufficiently literate in computer code and software engineering concepts: he or she must be able to understand, test, maintain and alter written code, and develop new applications based on reusable and flexible libraries.

The primary goal of this course is to provide a self contained introduction to computer programming. Our focus will be on algorithmic aspects of computer applications currently used primarily in the financial industry, and to prepare the student for the development of new applications.

Our treatment will be exclusively based on case studies and examples: after introducing a programming concept, its use will be illustrated in an example relevant for financial computation.

The student will be introduced to the Python programming language and associated programming ecosystem containing various tools for document preparation, data analysis and visualization. The requirement will be a weekly homework that will involve writing Python code, and the final project will also involve programming in the same environment.

Objectives

After successful completion of the course, the students will

  • Posses a working knowledge of the Python programming language

  • Demonstrate knowledge of issues relating to programming, especially in financial applications,

  • Be able to develop applications in Python using processes and techniques commonly found in financial engineering,

  • Be able to apply software engineering concepts to produce reusable and flexible frameworks for computing applications,

Topics

  • Introduction to computers, programming and algorithms

  • Introduction to Python and Jupyther Notebook:

  • Objects in Python

    • Identifiers, Objects, and the Assignment Statement

    • Creating and Using Objects

    • Python’s Built-In Classes

  • Expressions, Operators, and Precedence

    • Compound Expressions and Operator Precedence

  • Control Flow

    • Conditionals

    • Loops

  • Functions

    • Information Passing

    • Python’s Built-In Functions

  • Simple Input and Output

    • Console Input and Output

    • Files

  • Exception Handling

    • Raising an Exception

    • Catching an Exception

  • Iterators and Generators

  • Additional Python Conveniences

    • Conditional Expressions

    • Comprehension Syntax

    • Packing and Unpacking of Sequences

  • Scopes and Namespaces

  • Modules and the Import Statement

  • Basic Data Processing

    • introduction to pandas

  • Visualization

    • introduction to matplotlib

  • Numerical Computation

    • introduction to numpy, scipy

Programming Examples and Exercises

  • random number generation; Box-Muller technique for generating normal variables;

  • Options and derivative pricing:

  • Black-Scholes framework; Binomial tree option pricing: 2-phase forward-backward time-stepping; impact of early exercise

  • Calculation of expectation values via Monte Carlo techniques; Rejection and Importance Sampling;

  • Simulation of normal and lognormal stochastic processes

  • Recursive estimation of time series; The Kalman filter and smoother (tentative)

  • Stochastic Volatility; estimation via Sequential Monte Carlo (tentative)

Administrative

Grading; In class and take home assignments; Final Project

Total Credits

3