# How to set up Heston and Rouwenhorst regression? [duplicate]

This question is an exact duplicate of:

Heston and Rouwenhorst (1994) devised an empirical estimation strategy to decompose stock returns into three components: a pure industry effect, a pure country effect, and a world-factor return. Essentially, they perform monthly cross-sectional weighted least squares regressions on individual stock returns to determine "pure" country and sector effects. To estimate "pure" effects, they add constraints to the regression so that the country and sector factors have a weighted mean of zero for each period. Note the intercept in this equation would be interpreted as the global world return.

The sector constraint would be interpreted as the product of each sector's market weight and its sector factor coefficient summed over each sector. Same for country.

As an example, I've built country and sector factors and set up the following regression for one time period but don't know how to add the constraints...

lm(Return ~ Country + Sector, data = data, weights = MktCapUsd)


Are there packages available to easily add in these types of constraints?

## marked as duplicate by chrisaycockJun 1 '13 at 23:48

This question was marked as an exact duplicate of an existing question.

## migrated from stats.stackexchange.comJun 1 '13 at 19:04

This question came from our site for people interested in statistics, machine learning, data analysis, data mining, and data visualization.

• If you are only wondering about an R package to do this, your question would be off-topic for CV (see our FAQ) & I'm not even sure if it would be a good fit for Stack Overflow (although, you could certainly try it there); I would think it would be best posted to the R help listserv. If you have a question about the substantive statistical aspects, please edit to clarify. If you want it migrated to SO, flag it (but, please don't cross-post). – gung May 31 '13 at 16:13