-
Notifications
You must be signed in to change notification settings - Fork 6
Expected Returns: FactorAnalytics
As witnessed by recent events, the lack of portfolio diversification and risk control can severely impact the financial goals and long term plans for individual investment accounts, retirement accounts, University Endowment funds, and Municipal Pension funds alike. And as recent examples of speculative booms and busts have revealed (GameStop), investors sometime exhibit a lack of diversification among their securities holdings, and investments are not as safe as they initially seem.
In this project, you shall explore and implement several investment strategies in R, as inspired by one of the most interesting investment references on the topic
Expected Returns: An Investors Guide to Harvesting Market Rewards by
Antti Ilmanen.
From the Description;
This comprehensive reference delivers a toolkit for harvesting market rewards from a wide range of investments. Written by a world-renowned industry expert, the reference discusses how to forecast returns under different parameters. Expected returns of major asset classes, investment strategies, and the effects of underlying risk factors such as growth, inflation, liquidity, and different risk perspectives, are also explained. Judging expected returns requires balancing historical returns with both theoretical considerations and current market conditions. Expected Returns provides extensive empirical evidence, surveys of risk-based and behavioral theories, and practical insights.
Your objective will be to reproduce key approaches suggested by the text and test
performance on current market conditions with R. You will use functions found
in popular R in finance packages such as FactorAnalytics,
PerformanceAnalytics and PortfolioAnalytics. But you will also need to write
functions of your own to streamline workflows and implement solutions. While
these packages are excellent and widely used, there are gaps in the workflows
involved in constructing portfolio management strategies we'd like to fill.
Mentors will guide your understanding of the topic, support your use of best
practices in software development for quantitative finance using R, and
provide market data for validating these approaches.
Ultimately, this work will be organized into an open source R package. It will
complement the text and provide data, functions, and reproducible examples to
guide academics, practitioners, and hobbyists in the R community in applying
the work to their own research or portfolio management endeavors.
Students engaged in this project will obtain a deeper understanding of:
i) Data Science applications in finance
ii) Quantitative Analysis of active portfolio management
Value-oriented equity selection, chapter 12
Commodity Momentum and trend following, Chapter 14
Most underlying data series are extracted from Bloomberg, including MSCI Barra’s equity indices, Barclays Capital and other banks’ bond indices, and S&P GSCI commodity futures indices. Other key sources include Kenneth French’s, Robert Shiller’s, and AQR's websites.
To create long data histories for major asset classes, the author concatenated best quality recent data and best available older data series. Most exhibits display total returns denominated in U.S. dollars; but some exhibits show real (inflation-adjusted) returns or excess returns over cash or over maturity/duration-matched Treasuries.
- Skim the text above
- Get familiar with the ExpectedReturns project.
- Refactor, document, and unify existing functions, adding new ones as needed.
- Refactor case studies in existing vignettes and unify them with the
FactorAnalyticsR package functions. - Convert existing vignettes to static vignettes
- Add Unit tests using the
tinytestR package - Submit PRs for finished vignettes for inclusion in the FactorAnalytics package
- EVALUATING MENTOR Prof. Justin M. Shea
author of
neverhpfilter,wooldridge, andphoenixdownR packages. Contributor toPerformanceAnalyticsandFactorAnalyticspackages. This will be his 3rd year mentoring at GSoC. - Prof. Brian Peterson has developed numerous popular R packages for quantitative finance, and has been a GSOC administrator from 2008-2021.
- Erol Biceroglu, Senior Investment Policy Analyst
- Peter Carl, Portfolio Manager
- Soumya Kalra, Operations Analytics Manager
- Helen Ristov, Manager Analytics & AI Engineering
Students, please do one or more of the following tests before contacting the mentors above. We encourage work on Linux Debian-based distributions.
-
Easy: Begin by downloading and building the
ExpectedReturnsandFactorAnalyticspackages locally. Work through, and list any build errors or issues you encounter on install.
library(remotes)
install_github("JustinMShea/ExpectedReturns")
install_github("braverock/FactorAnalytics")
-
Intermediate: Locate the
expected-returns-replications.Rmdfile in thevignettesdirectory. Refactor sections of this vignettes to replace functions from theplmpackage with thefitFfmorfitFfmDTfunctions associated with theFactorAnalyticspackage. This may include debugging upstream issues with merging data series, as well as reformatting data to match requirements of the new function arguments. -
Harder: Reflect on the steps above. How do you interpret the results of the new functions? In addition, was there any repetitious code in the vignette that may be written as a function for future use? If so please include it as an example. What data transformations or models might have benefited from writing unit tests? Please include examples for these as well.
Students, please post a link to your test results here.
- EXAMPLE STUDENT 1 NAME, LINK TO GITHUB PROFILE. (Email your test results to mentors)
Ilmanen, Anti. 2011. “Expected Returns.” John Wiley & Sons Ltd. ISBN: 978-1-119-99072-7