Seasonal ajustments using X12-ARIMA functions. More...
Data Structures | |
struct | X12ARIMA_OPTIONS |
Enumerations | |
enum | X11_MODE_TYPE { X11_MODE_MULT = 0 , X11_MODE_ADD = 1 , X11_MODE_PSEUDOADD = 2 , X11_MODE_LOGADD = 3 } |
enum | X11_SEASONALMA_TYPE { X11_SEASONALMA_3x1 = 0 , X11_SEASONALMA_3x3 = 1 , X11_SEASONALMA_3x5 = 2 , X11_SEASONALMA_3x9 = 3 , X11_SEASONALMA_3x15 = 4 , X11_SEASONALMA_STABLE = 5 , X11_SEASONALMA_DEFAULT = 6 , X11_SEASONALMA_MSR =7 } |
Functions | |
int __stdcall | NDK_X12_ENV_INIT (BOOL override) |
int __stdcall | NDK_X12_ENV_CLEANUP (void) |
int __stdcall | NDK_X12_SCEN_INIT (LPCTSTR szScenarioName, LPVOID X12Options, size_t *ulModelHash) |
int __stdcall | NDK_X12_SCEN_READ (LPCTSTR szScenarioName, LPVOID X12Options, size_t *ulModelHash) |
int __stdcall | NDK_X12_SCEN_CLEAUP (LPCTSTR szScenarioName) |
int __stdcall | NDK_X12_DATA_FILE (LPCTSTR szScenarioName, double *X, size_t nLen, BOOL monthly, LONG startDate, WORD reserved, size_t *ulDataHash) |
int __stdcall | NDK_X12_READ_DATA_FILE (LPCTSTR szScenarioName, double *pData, size_t nLen, WORD fileType, size_t *ulDataHash) |
int __stdcall | NDK_X12_SPC_FILE (LPCTSTR szScenarioName, LPVOID X12Options, size_t *ulModelHash) |
int __stdcall | NDK_X12_RUN_BATCH (LPCTSTR szScenarioName, LPCTSTR szBatchFile, LPWORD status) |
int __stdcall | NDK_X12_RUN_SCENARIO (LPCTSTR szScenarioName, LPWORD status) |
int __stdcall | NDK_X12_RUN_STAT (LPCTSTR szScenarioName, LPWORD status, LPTSTR szMsg, size_t *nLen) |
int __stdcall | NDK_X12_OUT_FILE (LPCTSTR szScenarioName, WORD retType, LPTSTR szOutFile, size_t *nLen, BOOL OpenFileFlag) |
int __stdcall | NDK_X12_OUT_SERIES (LPCTSTR szScenarioName, WORD nComponent, double *pData, size_t *nLen) |
int __stdcall | NDK_X12_FORE_SERIES (LPCTSTR szScenarioName, size_t nStep, WORD retType, double *pData) |
The X-12-ARIMA software comes with extensive time series modeling and model selection capabilities for linear regression models with ARIMA errors (regARIMA models).
enum X11_MODE_TYPE |
enum X11_SEASONALMA_TYPE |
int __stdcall NDK_X12_DATA_FILE | ( | LPCTSTR | szScenarioName, |
double * | X, | ||
size_t | nLen, | ||
BOOL | monthly, | ||
LONG | startDate, | ||
WORD | reserved, | ||
size_t * | ulDataHash ) |
Write the given data into an X12a formatted data file
NDK_SUCCESS | Operation successful |
NDK_FAILED | operation is unsuccessful ( ) |
[in] | szScenarioName | is the scenario name or the model unique identifier |
[in] | X | is the univariate time series data (a one dimensional array). |
[in] | nLen | is the number of observations in X |
[in] | monthly | is a boolean flag for whether the data is monthly/quartelry sampled. |
[in] | startDate | is the serial date number of the 1st observation in the series |
[in] | reserved | is a reserved argument for future releases. must be set to 1 |
ulDataHash | [inout] (optional) is CRC hash of the data file (tab delimated). |
int __stdcall NDK_X12_ENV_CLEANUP | ( | void | ) |
Finalize the X12A environment and release any resources allocated
NDK_SUCCESS | Operation successful |
NDK_FAILED | operation is unsuccessful ( ) |
int __stdcall NDK_X12_ENV_INIT | ( | BOOL | override | ) |
Initialize the filesystem environment on the local machine for the current user
NDK_SUCCESS | Operation successful |
NDK_FAILED | operation is unsuccessful ( ) |
[in] | override | is a boolean flag to wipe our existing files and copy new ones. |
int __stdcall NDK_X12_FORE_SERIES | ( | LPCTSTR | szScenarioName, |
size_t | nStep, | ||
WORD | retType, | ||
double * | pData ) |
Read the output forecaste series generated by x12a program
NDK_SUCCESS | Operation successful |
NDK_FAILED | operation is unsuccessful ( ) |
[in] | szScenarioName | is the given X12-ARIMA scenario/model identifier |
[in] | nStep | is the forecast horizon |
[in] | retType | is the switch to designate desired output
|
[out] | pData | is the forecast output value |
int __stdcall NDK_X12_OUT_FILE | ( | LPCTSTR | szScenarioName, |
WORD | retType, | ||
LPTSTR | szOutFile, | ||
size_t * | nLen, | ||
BOOL | OpenFileFlag ) |
Return the full path of the output file generated by x12a program
NDK_SUCCESS | Operation successful |
NDK_FAILED | operation is unsuccessful ( ) |
[in] | szScenarioName | is the scenaio.model name |
[in] | retType | is a switch to designate the desired specific output file.
|
[out] | szOutFile | is a buffer to hold the return full path |
nLen | [inout] is the length of the szOutFile. Upon return, this argument stores the actual number of bytes used. | |
[in] | OpenFileFlag | is a switch to instruct the functiona whether it should open the file using system default editor (e.g. notepad) |
int __stdcall NDK_X12_OUT_SERIES | ( | LPCTSTR | szScenarioName, |
WORD | nComponent, | ||
double * | pData, | ||
size_t * | nLen ) |
Read the output time series (e.g. seasonal adjusted data) generated by x12a program
NDK_SUCCESS | Operation successful |
NDK_FAILED | operation is unsuccessful ( ) |
[in] | szScenarioName | is the given scenario/model |
[in] | nComponent | is the desired output of the X12a output
|
[out] | pData | is the output buffer to hold the data series |
nLen | [inout] is the original size of the output buffer. Upon return, nLen will have the actual number of data copied. |
int __stdcall NDK_X12_READ_DATA_FILE | ( | LPCTSTR | szScenarioName, |
double * | pData, | ||
size_t | nLen, | ||
WORD | fileType, | ||
size_t * | ulDataHash ) |
Read the scenario data file into the given data into an X12a formatted data file
NDK_SUCCESS | Operation successful |
NDK_FAILED | operation is unsuccessful ( ) |
[in] | szScenarioName | is the scenario name or the model unique identifier |
[out] | pData | is the univariate time series data (a one dimensional array). |
[in] | nLen | is the number of observations in pData |
[in] | fileType | is a reserved argument for future releases. must be set to 1 |
[out] | ulDataHash | (optional) is CRC hash of the data file (tab delimated). |
int __stdcall NDK_X12_RUN_BATCH | ( | LPCTSTR | szScenarioName, |
LPCTSTR | szBatchFile, | ||
LPWORD | status ) |
Run a batch file in x12a environment
NDK_SUCCESS | Operation successful |
NDK_FAILED | operation is unsuccessful ( ) |
[in] | szScenarioName | is the scenario name or the model unique identifier |
[in] | szBatchFile | is the batch file name to run |
[out] | status | is the status after running the batch file |
int __stdcall NDK_X12_RUN_SCENARIO | ( | LPCTSTR | szScenarioName, |
LPWORD | status ) |
Run a x12a program for the given model or scenrio
NDK_SUCCESS | Operation successful |
NDK_FAILED | operation is unsuccessful ( ) |
[in] | szScenarioName | is the scenario name or the model unique identifier |
[out] | status | is the status after running the batch file |
int __stdcall NDK_X12_RUN_STAT | ( | LPCTSTR | szScenarioName, |
LPWORD | status, | ||
LPTSTR | szMsg, | ||
size_t * | nLen ) |
Read the status file generated by x12a program
NDK_SUCCESS | Operation successful |
NDK_FAILED | operation is unsuccessful ( ) |
[in] | szScenarioName | is the scenario name or the model unique identifier |
[out] | status | is the status after running the batch file |
[out] | szMsg | is the output buffer to copy the status message |
nLen | [in, out] is the sizxe of buffer szMsg |
int __stdcall NDK_X12_SCEN_CLEAUP | ( | LPCTSTR | szScenarioName | ) |
Finalize the given scenario/model and free allocated resources
NDK_SUCCESS | Operation successful |
NDK_FAILED | operation is unsuccessful ( ) |
[in] | szScenarioName | is the scenario name or the model unique identifier |
int __stdcall NDK_X12_SCEN_INIT | ( | LPCTSTR | szScenarioName, |
LPVOID | X12Options, | ||
size_t * | ulModelHash ) |
Initialize the required files for the given scenario/model
NDK_SUCCESS | Operation successful |
NDK_FAILED | operation is unsuccessful ( ) |
[in] | szScenarioName | is the scenario name, must be unique |
[in] | X12Options | (optional) is an instance of X12ARIMA_OPTIONS structure with all X12 model options. |
ulModelHash | [inout] (optional) CRC hash for the options.ini file |
int __stdcall NDK_X12_SCEN_READ | ( | LPCTSTR | szScenarioName, |
LPVOID | X12Options, | ||
size_t * | ulModelHash ) |
Read the model configuration file
NDK_SUCCESS | Operation successful |
NDK_FAILED | operation is unsuccessful (e.g., scenario not found) |
[in] | szScenarioName | is the scenario name, must be unique |
[out] | X12Options | is an instance of X12ARIMA_OPTIONS structure with all X12 model options. |
[out] | ulModelHash | (optional) is CRC hash of the model option file (ini file). |
int __stdcall NDK_X12_SPC_FILE | ( | LPCTSTR | szScenarioName, |
LPVOID | X12Options, | ||
size_t * | ulModelHash ) |
Create or updates the x12a specification file using the options selected
NDK_SUCCESS | Operation successful |
NDK_FAILED | operation is unsuccessful ( ) |
[in] | szScenarioName | is the scenario name, must be unique |
[in] | X12Options | (optional) is an instance of X12ARIMA_OPTIONS structure with all X12 model options. |
ulModelHash | [inout] (optional) CRC hash for the options.ini file |