27 June 2011

Migration from 7 to 8

by Antti Ripatti

My inner engineer wanted to get employed. I employed it to make the migration of the Bank of Finlands’s Aino model from Iris 7 to 8. The code now works without error messages, but is not tested yet (engineers’ bad habit). For those who have not made migration yet might benefit the following issues that the engineer met.

The function loadstruct is, of course, easy to change. We had only one of them. Model language syntax changes are easy too. Note, however, that !links has := instead of =.

The new model.jforecast method has different logic compared to the old model.forecast. The time-varying stds should be part of the judgment dbase. It is easy to create the new judgment dbase using dbmerge function. I am curious to see the implementation of the blending of anticipated and unanticipated shocks in our model.

We also learned the lesson not to build the code on inner logic of objects: in several place of the code we utilize dummy variables and want to extract the date when 1 turns to 0. We utilized the tseries object structure by referring to year column and period column with the command qq(ts(ind,1),ts(ind,2)). This is not possible anymore. The new implementation relies on get method. This is good oo-programming habit as has been told in many places. What are your migration experiences?

1 comment:

  1. The main experience is of course the new report class which requires to review all previous codes and principles. But convenience of new oo approach will offset all your costs.

    ReplyDelete