NbbTools > Use cases

Tramo specification

The specifications for the processing of Tramo are enclosed in the TramoSpecification class. Entities of that class play the same role as the input files for the FORTRAN program ($INPUT $ section).
See the class libraries guide for an advanced description of the TramoSpecification object and its links with the input file of Tramo/TSW.

 

C#:

References:

Code:

// Default specification
TramoSpecification spec = new TramoSpecification();

// LAM = -1
spec.Transformation.Option = DataTransformation.Pretest;

// INIC=3, IDIF=3
spec.ModelIdentification.IsEnabled = true;

// ITRAD=-7
spec.CalendarEffect.TradingDaysEffect = TradingDaysOption.Td6Pretest;
spec.CalendarEffect.LeapYearEffect = TramoChoice.Pretest;

// Outliers: AIO=3. Outliers detection is automatically enabled (IATIP = 1) if at least one of the outliers kind is selected.
spec.OutliersDetection.AO = true;
spec.OutliersDetection.LS = true;
spec.OutliersDetection.TC = true;

// forecasts
spec.Forecast.NPred = 24;

// use bfgs
spec.Algorithm.OptimizationMethod = OptimizationMethod.BFGS;

VB.Net:

References:

Code:

Imports Nbb.TramoSeats

'Default specification
Dim spec As New TramoSpecification

'LAM = -1
spec.Transformation.Option = DataTransformation.Pretest

'INIC=3, IDIF=3
spec.ModelIdentification.IsEnabled = True

'ITRAD=-7
spec.CalendarEffect.TradingDaysEffect = TradingDaysOption.Td6Pretest
spec.CalendarEffect.LeapYearEffect = TramoChoice.Pretest

'Outliers: AIO=3. Outliers detection is automatically enabled (IATIP = 1)
' if at least one of the outliers kind is selected.
spec.OutliersDetection.AO = True
spec.OutliersDetection.LS = True
spec.OutliersDetection.TC = True

'forecasts
spec.Forecast.NPred = 24

'use bfgs
spec.Algorithm.OptimizationMethod = OptimizationMethod.BFGS