Parameter Optimization Problem - Excel Solver

Hi KNIMErs,

I want to clean my time series and smooth a trend component using the HP-Filter, a well-known practice in economics. (https://de.wikipedia.org/wiki/Hodrick-Prescott-Filter)

In excel, the infamous “excel solver” does the job to minimize the penalty function for me. In KNIME, I think the optimization loops can be helpful, however, I am stuck here.

Data looks like this:
In cell H4, we have the function which should be minimized. It is a function of values that are available and one random variable (tau), which is found in column F. “tau” has a dummy value here of 2 for now, which needs to be optimized to minimize the penalty.

Therefore, I can use the excel solver:

And minimize the outcome in H4, by selecting “tau” as tuning variable.

The result would be:

How would be the solution in KNIME? Any similar functionality to the excel solver? I have a feeling that one would need recursive loops and optimization loops here, but this sounds scary tbh.

Cheers,
Stiefel

Hi @Residentstiefel -

I believe the closest functionality we have to the Excel Solver are the Multiobjective nodes demonstrated in this workflow:

Here we don’t use the usual optimization loop nodes. Does this get you closer to what you’re looking for?

3 Likes

Hi Scott,

Thanks for the reply!
I had a look at the GA node, however, I am not too familiar with it. But I think it is definetly worth looking more into it for future, similar, problems.

Nevertheless, I tackled my particular problem now the other way around. Instead of building the Hodrick-Prescott filter myself (with the help of the grg nonlinear solving method of the infamous excel solver), I looked for a ready-built package. Though I usually refrain from using scripting within KNIME, as I value the ease of low coding solutions, I found a python package, which provides the HP filter.

For the case someone is interested in the HP Filter solution in Python/KNIME, find screenprinted the solution, where U is the macroeconomic key figure, which I want to detrend.

2 Likes

Glad you arrived at a solution. Don’t forget that you can always upload nice examples like this to the KNIME Hub for others to benefit from! :slight_smile:

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.