AMS 512 -- Capital Markets & Portfolio Theory

Spring 2020


Prof. Robert J. Frey


Course Lecture:

     Monday, 02:30 PM - 05:20P PM,

     Frey Hall 216


Office Hours:

    Please email for appointment.



Teaching Assistant

    Zeyu Cao


Office Hours:
     Thursday, 12:00 PM - 03:30 PM





  • Be sure to check the Announcements and Updates section on my home page for information about schedule changes, class cancellations, up coming seminars and events, and other important news.


On This Page



Course Overview


Development of capital markets and portfolio theory in both discrete and continuous time and both single and multi-period settings. Techniques for the optimal trade-off of risk and reward under various metrics and assumptions. Whenever practical, examples will use real market data. Numerical exercises and projects in a high-level programming environment, Mathematica, will also be assigned. Prerequisite: AMS 511. 3 credits.


Texts and Software (required):

  • Class lessons will be covered by a set of modules covering the main topics of the course. The modules can be downloaded below and will be implemented as Mathematica notebooks. They will contain links to additional reading material.


  • Mathematica, Version 12 is used extensively for class notes and all assignments. A working knowledge of Mathematica is assumed from AMS 511, the immediate prerequisite for this course. A free student version of Mathematica can be downloaded by registered Stony Brook students via SoftWeb: Mathematica is also available on machines in the Math/Physics SINC Site. Mathematica tutorials and similar resources can be found on Wolfram Research's web site here.


  • Students will need access to the Internet to be able to download exercises and data and submit certain assignments via email.


Top of Page

Course Objectives


Effective portfolio management requires the analyst to understand the financial markets whose constituent instruments form the building blocks of investment portfolios. The portfolio analyst must be able first to formulate the problem in a form that can be subject to economic and mathematical analysis, second to develop an approach that solves the resulting problem through such techniques as nonlinear programming or Monte Carlo simulation, and third to estimate the parameters required based on both theoretical reasoning and empirical data analysis.


Top of Page

General Teaching Approach and Course Policies


The schedule class lectures will develop the mathematical foundations required for successful completion of the course. Additional readings, available online, will also be assigned. Solutions to selected assignments will also be covered.


Homework Assignments and Class Project


Homework assignments and the class project will be used to further develop the material covered during class, including many important practical applications, and so will introduce important new content. Homework assignments are due the first class of the week after assignment. In addition to the weekly assignments, students will be assigned a class project that they will have two to four weeks to complete.

All assignments must be submitted by email. Homework assignments are submitted to the course grader, Zeyu Cao. Workshops are submitted to the course instructor, Robert J. Frey. The subject line of the email must begin with AMS-512 and your student ID number followed by a brief description of the submission, e.g.,


AMS-512 123456789 Homework 3


Please note that all emails to Prof. Frey must include "AMS-512" in the subject line. Prof. Frey receives a large number of emails daily, and failure to follow this protocol may cause your email to be deleted as spam or simply be missed among hundreds of others. Many problems will be avoided if all students follow this simple rule. Also, while the TA may make other arrangements, material submitted to Prof. Frey must be submitted via email and not via Blackboard, unless specific instructions to the contrary are given.


Also, on any files you attach to your email please ensure that the filename includes your student ID and for any Mathematica notebooks that your student ID also appears at the top of the file. This will ensure that each file clearly identifies which student's work it is and will avoid many problems as files are collected for review and grading.




There will be two examinations, a mid-term and a final. For in-class examinations students will be able to bring in an 8.5" x 11" sheet of paper with whatever content her or she desires for use during the test; however, this sheet must be generated by the student him- or herself. Students may use calculators, but not laptops or other computers, during the examinations.




Homework assignments will be graded on a "Pass/Fail" basis and the workshops and examinations will be graded on an "A-to-F" basis. I do not follow a strict grade distribution. If you are diligent and complete all homework and workshop assignments to receive full credit, then this will go a long way towards increasing your final grade.


The contribution of each to the final grade is as follows:


  • Homework assignments -- 10%


  • Class Project -- 25%


  • Mid-Term Examination -- 25%


  • Final Examination -- 40%


Positive trends in a student's performance will, however, receive due consideration.


Effects of Other  Classes' Workloads


It is natural that the mid-terms etc. of classes tend to occur at approximately the same time. Students must expect this and must manage their time to take this fact of life into account. It is simply not practical for the scheduled dates for assignments, projects or examinations in one class to be adjusted because they occur at times similar to those of another class.


Other Issues


Throughout our time together the sooner you inform me of any problem, personal or academic, which may affect your attendance or performance, the better the chance we have of solving it together. It is important that we work together to make each student as successful as possible in completing the class.


Americans with Disabilities Act (ADA) Notification


If you have a physical, psychological, medical or learning disability that may impact your course work, please contact Disability Support Services. They will determine with you what accommodations are necessary and appropriate. All information and documentation is confidential.


Students who require assistance during emergency evacuation are encouraged to discuss their needs with their professors, Disability Support Services, and Environmental Health and Safety.


Office of Diversity and Affirmative Action


Stony Brook University is committed to a learning and working environment in which all members of our community can thrive. Maintaining an environment that is free from discrimination and sexual violence is a major part of that commitment.

To that end, the University is providing education and awareness training for all members of our community to help continue to foster the positive environment that is key to your success here at Stony Brook. More information about your rights and responsibilites can found at the Office of Diversity and Affirmative Action website.


Emergency Management


Information on class closings due to weather and other emergency alerts can be found on the University's Emergency Management page which also contains a link so you can sign up for alerts.


Top of Page

Class Schedule & Assignments


The schedule planned for this semester is listed below; however, this schedule will be adjusted as needed throughout the semester if certain topics take up more or less time than planned. Students must read the chapters indicated under Coverage for each week before coming to class.



  • Notes - These are Mathematica notebooks covering the notes for that class's lecture. Every attempt will be made to link the class notes in advance of the class. The Notes cover the assigned readings but also include material and examples intended to amplify or extend the content presented in the textbook. They are not a substitute for studying the text or attending class.


  • Assignment - These are Mathematica notebooks containing assigned problems in addition to those assigned from the text under Coverage. Every attempt will be made to link the assignments in advance of the class. Assignments are due the next class.


  • Solution - The solutions of each class's assigments will be linked after the respective due date. These solutions are usually Mathematica notebooks.


  • Project - The project will be specified in a Mathematica notebook.


  • Project Solution - A sample solution of the project will be provided as a Mathematica notebooks.


  • Additional documents required such as tutorials, data needed for assignments, additional software and so forth will also be included as needed.


The supplementary materials and exercises below are intended to amplify or extend the content presented in the main text and classroom lectures. They are not a substitute for studying the notes or attending class.


Mathematica Styesheet Required


To properly use the notebooks below you will need to download a copy of my StonyBrook.nb stylesheet and install it on your system. Type in "install stylesheet" in the search box of Mathematica's Documentation Center (accessed under Help on the main menu) for detailed instructions on how to install a stylesheet on your system. Please see me if you have any problems, and I will help you with the installation.


Top of Page

Class / Lesson


Content & Comments






Review of basic mean-variance optimization and optimization software




Review of univariate and multivariate distributions

Techniques for modeling dependency structures

Example of applications in portfolio construction

Thoughts on constructing and using models effectively

3 ExtremeEvents.nb

Modeling Extreme Events

Power Law Models

Value-at-Risk (VaR) and Expected Shortfall (CVaR)

4 PortfolioSelection.nb

Fat Tails and Statistical Estimation

Portfolio Selection with Alternative Risk Measures

180 Years of Market Draw Downs


Factors Models: Structure and Estimation

Estimation of Parameters

Structuring Optimizations

Missing Value Imputation


The EM Algorithm and Finite Mixtures

Handling Missing Values in Mean and Covariance Estimation

Distribution of Covariance and Its Eigenvalues

Denoising Correlation Matrices


Mid-Term Exam, Mon 01 Apr 2019

Release of  Workshop 1, due Mon 15 Apr 2019


Ex Post versus Ex Ante Performance

Simulation Studies


Continuous Mixtures

Analyzing Market Draw Downs


Workshop 2

Analysis of Candidate In-Sample Data

Shrinkage Means and Denoised Correlations

Assignment: Build a Factor Model from In-Sample Statisitics



Using the Marchenko-Pastur distribution to test for signficance in correlation matrices.

Examples of correlation denoising.

A cautionary tale on using neural networks.


AI/ML - Computational Statistics

AI/ML - Neural Networks

These are questions which should be added to the sample mid-term above.

The final is a cumulative examination.



Content & Comments