IEmHodrickPrescottFilterSettings.Serie

Fore syntax

Serie: IEmSerie;

Fore.NET syntax

Serie: Prognoz.Platform.Interop.Modeller.IEmSerie;

Description

The Serie property determines the smoothable series.

Comments

If the smoothable series is not specified, the Hodrick-Prescott filter method calculation is not possible.

Fore example

To execute the example, add a link to the Modeller system assembly.

Sub HodrickPrescottFilter;
Var
    ExprMod: IExpressModeller;
    Ar: Array[14Of Double;
    Serie: IEmSerie;
    Sett: IEmHodrickPrescottFilterSettings;
    Period: IEmPeriodSettings;
Begin
    ExprMod := New ExpressModeller.Create;
    Sett := ExprMod.CreateHodrickPrescottFilterSettings;
    // Setting smoothable series
    Ar[0] := 56; Ar[1] := 45; Ar[2] := 23; Ar[3] := 45;
    Ar[4] := 65; Ar[5] := 23; Ar[6] := 54; Ar[7] := 87;
    Ar[8] := 67; Ar[9] := 98; Ar[10] := 89; Ar[13] := 79;
    Ar[11] := Double.Nan; Ar[12] := Double.Nan;
    Serie := ExprMod.Series.Add(Ar, "X1""Data series 1");
    Sett.Serie := Serie;
    // Setting smoothing parameter 
    Sett.SmoothingParameter := 0.5;
    // Setting calculation periods
    Period := Sett.Period;
    Period.BeginPeriod := 0;
    Period.EndPeriod := 13;
    Period.EndFore := 4;
    // Performing calculation
    ExprMod.EvaluateMethod("C:\HodrickPrescottFilter.html", Sett, True);
End Sub HodrickPrescottFilter;

Example execution result: the Hodrick-Prescott Filter method is calculated with set parameters, calculation report is saved to the file C:\HodrickPrescottFilter.html.

Fore.NET example

Imports Prognoz.Platform.Interop.Modeller;

Public Shared Sub HodrickPrescottFilter();
Var
    ExprMod: IExpressModeller;
    Ar: Array[14Of Double;
    Serie: IEmSerie;
    Sett: IEmHodrickPrescottFilterSettings;
    Period: IEmPeriodSettings;
Begin
    ExprMod := New ExpressModeller.Create();
    Sett := ExprMod.CreateHodrickPrescottFilterSettings();
    // Setting smoothable series
    Ar[0] := 56; Ar[1] := 45; Ar[2] := 23; Ar[3] := 45;
    Ar[4] := 65; Ar[5] := 23; Ar[6] := 54; Ar[7] := 87;
    Ar[8] := 67; Ar[9] := 98; Ar[10] := 89; Ar[13] := 79;
    Ar[11] := Double.Nan; Ar[12] := Double.Nan;
    Serie := ExprMod.Series.Add(Ar, "X1""Data series 1");
    Sett.Serie := Serie;
    // Setting smoothing parameter 
    Sett.SmoothingParameter := 0.5;
    // Setting calculation periods
    Period := Sett.Period;
    Period.BeginPeriod := 0;
    Period.EndPeriod := 13;
    Period.EndFore := 4;
    // Performing calculation
    ExprMod.EvaluateMethod("C:\HodrickPrescottFilter.html", Sett, True);
End Sub HodrickPrescottFilter;

Example execution result: the Hodrick-Prescott Filter method is calculated with set parameters, calculation report is saved to the file C:\HodrickPrescottFilter.html.

See also:

IEmHodrickPrescottFilterSettings