EconPapers    
Economics at your fingertips  
 

A practical application of the mvport package: CAPM-based optimal portfolios

Carlos Dorantes ()
Additional contact information
Carlos Dorantes: Tec de Monterrey

2019 Stata Conference from Stata Users Group

Abstract: The mvport package has commands for financial portfolio optimization and portfolio backtesting. I present a practical implementation of a CAPM-based strategy to select stocks, and then apply different optimization settings, and evaluate the resulting portfolios. The presentation illustrates how to automate the process through a simple do file that allows to easily change parameters (e.g. stock list, market index, risk-free rate) using an Excel interface. The program automates the following: a) data collection, b) CAPM model estimation for all stocks, c) selection of stocks based on CAPM parameters, d) portfolio optimization with different configurations, and e) portfolio backtesting. For data collection, the getsymbols and the freduse command is used to get online price data for all the S&P500 stocks and the risk-free rate. For each stock, two competing CAPM models are estimated: using a simple regression, and using an autoregressive conditional heteroscedasticity (ARCH) model. The CAPM parameters are used to select stocks. Then the mvport package is used to optimize different configurations of the portfolio. Finally, the performance of each portfolio configuration is calculated is compared with the market portfolio.

Date: 2019-08-02
References: Add references at CitEc
Citations: View citations in EconPapers (1)

Downloads: (external link)
http://fmwww.bc.edu/repec/scon2019/chicago19_Dorantes.pdf

Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.

Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text

Persistent link: https://EconPapers.repec.org/RePEc:boc:scon19:50

Access Statistics for this paper

More papers in 2019 Stata Conference from Stata Users Group Contact information at EDIRC.
Bibliographic data for series maintained by Christopher F Baum ().

 
Page updated 2025-03-19
Handle: RePEc:boc:scon19:50