Blogs / Analysis Blog

Portfolio Analysis

When a fund manager makes a portfolio, he has ideas about individual positions and why he put those positions on.   But although each position may make sense by itself, the portfolio as a whole could be over-exposed to certain factors that the manager is not aware of.

The portfolio below is a sample fund portfolio that contains 8 long positions and 6 short positions over the past three years.



The analysis we want to do is to see what factors this portfolio is most exposed to and by how much.  Lists of factors can be saved off by group, and those lists can be used to look at correlations against our portfolio.  The first thing to look at in Palantir is how the portfolio is affected by each sector, by correlating the beta-adjusted returns of the sector against the returns of the portfolio over the past year.

Over the past year, the highest correlation has come from the Energy sector (XLE), and the lowest correlation has come from the Consumer Discretionary sector (XLY).


Other famous factor analysis was done by Fama and French, who did regressions against the Value factor and the Small Size factor on top of the Market factor.  We add the Momentum factor as a fourth factor below.  The Market factor had the highest correlation, followed by Small Size.  Momentum had the lowest correlation coefficient at -0.39.



The fund manager should take this even further and try to narrow down the factors to the ones that matter the most.  To do so, he should do a backwards stepwise OLS Regression against the factors, which will eliminate the factors that have the lowest impact.

This leaves us with a regression of just two of the sectors (Consumer Staples and Consumer Discretionary) and the three Fama-French factors.  The most important factor is the Market factor, accounting for 28% of the returns, then the inverse of the Consumer Discretionary factor, accounting  for 25% of the returns.  The portfolio is also long Consumer Staples (11%), Value stocks (7%), and Large Size stocks (6%).   23% of the returns are unexplained by this regression.

The fund manager might have put these positions on not knowing that he was long/short Consumer Staples/Consumer Discretionary sectors, and might not have wanted that type of exposure.


All of these are true today for the past year, but given that the fund manager put his positions on 3 years ago, it might have been much different.  Another thing the fund manager could then look at is the changing importance of factors over time by doing a rolling regression with a 1-year window.  Every point represents the factor’s importance over the past year.  The rolling regression window is below, starting on January 1, 2005.


One way to look at this is in a table, to compare the coefficients over time.  In particular, two years ago the Consumer Discretionary sector dominated the regression, whereas the Market factor was much lower in importance.


These coefficients can also be used in a Chart to see a dynamic view .  The yellow line represents zero.


Creating a factor

The factors used in the above analysis are relatively commonly used factors and are built into Palantir Finance.  But many fund managers have other factors that they think are important and would like an easy way of tracking those.

One possible factor is the carry trade factor, which goes long high-carry currencies and short low-carry currencies.   The first thing we want to do is isolate the high-carry currencies.   Our target set is the nine non-USD G10 currencies, of which we will choose the top two by three month deposit rate using Instrument Explorer.


Then we track these currencies dynamically, choosing the top two currencies every month since 2005 in an equal weighted Index.  The Index is dominated by AUD (orange) and NZD (green), and NOK was used for two months.


Completing the same steps for the Low Carry currencies gives us our short index, seen below.  The Index is dominated by CHF (red) and JPY (blue) which were present in the Index every month since the start date.


We use the difference in their daily returns as our Factor returns.  Now, using this factor in addition with other built in factors, we can better explain a portfolio.  The portfolio below contains various US and foreign stock and futures:


Now we can do the same backwards stepwise regression as we did against the first portfolio to help explain our results.

After the regressor elimination, we are left with seven important factors.  The most important factor is the Market factor once again, accounting for 29% of the returns, followed by our just-created Carry factor at 18%.   9% of the returns are unexplained.


The fact that the Carry factor is the best predictor of this portfolio other than the Market factor shows how important it is to be able to do these regressions.  Perhaps the fund manager wanted to be long the carry trade and knew that would be the outcome of these trades.   But if he didn’t, he’d be able to quickly find out by running these regressions in Palantir.

This study shows basic factors in addition to one custom factor.  An easy extension that would provide more information is to add more factors.  Specifically, an equity manager might be interested in macro factors such as the US Dollar, the 10-year Treasury, commodities, GDP.  These factors are built in to Palantir, and could be added in to the regressions to extract their effect on the portfolio.

Other Blogs