Modelling Fundamentals for Forecasting Capital Flows to Emerging Markets