Country Portfolios in a Two-Country DSGE Model

Hi all,
I am solving a DSGE model with portfolio choice similar to the Devereux and Yetman (2010) model ( DSGE Model with leverage constraint and international portfolio integration with transmission of shocks between countries). Does anyone have programmed this kind of model? or is there any helpful reference you can recommend ?
Thank you very much,

Look at Alan sutherland home page

st-andrews.ac.uk/~ajs10/home.html

Thank you…