A pre-release, beta repository of the MATLAB toolkit accompanying Novy-Marx and Velikov (2023) is publicly available at: https://github.com/velikov-mihail/AssayingAnomalies.
The code repository contains an extensive library of MATLAB code. It implements the tests in the protocol from scratch with just a couple of mouse clicks. It can also be modified and adapted by individual users for their specific needs. This also allows for the toolkit’s open-source evolution over time.
Moreover, the repository contains a far broader set of tools, offering functionality that goes far beyond the actual testing protocol proposed in Novy-Marx and Velikov (2023). It includes functions for accessing and downloading data from common sources, organizing this data, and running common tests in the asset pricing literature. These are all well-documented and designed so that their basic functionality requires minimal coding skill. This dramatically lowers the bar for researchers wanting to start serious empirical work, offering an easy on-ramp for those beginning their careers.
The repository contains three main MATLAB scripts:
- setup_library.m downloads, stores, merges, and organizes data from CRSP and COMPUSTAT through a JDBC connection with WRDS. A step-by-step tutorial can be found here.
- use_library.m shows various examples on how to use the code to conduct basic asset pricing research. A step-by-step tutorial can be found here.
- test_signal.m implements the testing protocol of Novy-Marx and Velikov (2023).
Finally, the tools interface with related public github repositories, giving access to a growing library of replications of important (and not so important) papers in the literature, and code for running empirically driven finance classes, such as:
- A PhD module on the cross-section of stock returns taught by Mihail Velikov at Penn State and publicly available at: https://github.com/velikov-mihail/AnomaliesPhDModule