Calculating the Portfolio Turnover
No License
function [p, k_sum]=turnover(old,new)
% PURPOSE: Calculating the equal weighted portfolio turnover
%---------------------------------------------------
% USAGE: [p, k_sum]=turnover(old,new)
% where: old, new are either character arrays, number arrays or cell arrays
% containing the tickers or CUSIPS of two different portfolio. They
% do not have to be the same size, that is, holding the same number
% of securities in both portfolios.
%---------------------------------------------------
% RETURNS: p = turnover percentage, defined as % newly added securites in the
% old portfolio (a % number)
% k_sum = total number of matches in the old portfolio for every cusip/ticker in the
% new portfolio (a vector)
%---------------------------------------------------
% Example: in the old portfolio, there are 10 stocks. If 5 were sold and
% 3 completely different stocks were bought, the turn over ratio would be: 3/10= 30%,
%
% It is not the exact turnover definition in portfolio management, as it
% is not value weighted. It is more accurate when portfolio is equal
% weighted by tickers/Cusips.
%
% The new and old portfolios do not have to be the same format, but have
% to be consistent in terms of CUSIP or ticker handles.
% For example, CUSIP could be in cell array format in the old portfolio,
% while in char array format in the new portfoliio, but they all have to
% be CUSIP.
%
% Both Tickers and Cusips must be in COLUMN vectors!
%
% Cusip is preferrable to ticker, at least in my experience. If you
% download data from FactSet,CompuStat, Cusip is constant through time
% while ticker C changes from Chrysler to Citibank.
%
% written by:
%
% Wei Li
% University of Chicago Graduate School of Business Class of 2003
% wayneli@fastmail.fm
% March, 8, 2004
%
Cite As
Wei Li (2024). Calculating the Portfolio Turnover (https://www.mathworks.com/matlabcentral/fileexchange/4597-calculating-the-portfolio-turnover), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- Computational Finance > Financial Toolbox > Portfolio Optimization and Asset Allocation >
- Computational Finance > Risk Management Toolbox >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |