These are projects posted by the students of Dr. Gove Allen at Brigham Young University. These students have taken one semester-long course on VBA and generally have had no prior programming experience

Tuesday, April 16, 2013

Testing the CAPM

            CAPM is short for the Capital Asset Pricing Model, which is a theory of asset pricing that has held a prominent position in the world of financial economics for the last several decades. It constitutes a series of predictions concerning the equilibrium expected returns of risky assets that are based on a set of foundational assumptions about the nature of assets, investors, and asset markets. These powerful and intuitive predictions have informed investor thought about asset pricing for decades. Perhaps the best-known expression of the CAPM is the following:

Equation 1:                 E[ri] – rf = βi(E[rm] – rf)

This equation posits that the expected return to any asset beyond the risk-free rate (E[ri] - rf) should relate to the expected return to the market of all assets beyond the risk-free rate (E[rm] - rf) only by the coefficient β, a value unique to each asset.
            One notable attribute of the CAPM is that its predictions can be checked using reasonably straightforward empirical tests and real-world data. For my VBA final project, I constructed an Excel workbook that replicates one of the earliest such empirical tests of the CAPM from the late 1960s. Of course, what took the attention of many researchers and massive computer mainframes back then can be greatly simplified with modern technology today. The workbook I have created is designed to automate as much of the empirical testing process as possible by assisting the user in selecting valid stocks for analysis, gathering and properly arranging the most recent price and returns data from the internet to fill approximately 4,000 cells, and performing the correct regression analysis and statistical inference to test whether or not the CAPM relationship holds. Without access to such an automating process, performing the same empirical test would likely take a researcher many hours to complete.
            The motivation for this project was a term assignment I completed this semester to test the validity of the CAPM as part of my Financial Economics class (Econ 450). My project should benefit future students by giving them access to a tool that guides them through their term assignment, hopefully accelerating their learning and saving them valuable time. Writing the code also helped me gain a much deeper understanding of the CAPM. Finally, this project should make clear to future employers that I have a thorough grasp of financial economic concepts and the skills to apply these concepts to develop user-friendly software solutions.

PDF Writeup
Excel File


Blog Archive