|
<< Click to Display Table of Contents >> Statements overview |
![]() ![]()
|
Note: You may consult the specialized overviews regarding data handling and modeling: |
Introduction
Below, all Gekko statements are listed, grouped together by functionality (regarding functions, see the section on these: 'Gekko functions').
Databanks
At startup, Gekko operates with two databanks; 'Work' (first-position, working bank) and 'Ref' (reference, baseline bank). There are the following statements related to databanks:
Reads a databank file (typically gbk) into the first-position and reference databanks. |
|
Writes the first-position databank to a gbk file |
|
Merges a databank file (typically non-gbk) into the first-position databank |
|
Writes the first-position databank to a non-gbk file |
|
Opens a databank file (typically gbk). May use OPEN<edit> or OPEN<ref>. |
|
Closes 'named' databanks (cf. OPEN) |
|
Makes the reference databank an exact copy of the first-position databank. |
|
Retrieves timeseries from a web-based database |
|
Copies timeseries between banks (or inside the first-position databank) |
|
Renames timeseries. |
|
Uses wildcards to search for timeseries in databanks. |
|
Uses wildcards to count timeseries in databanks. |
|
Finds differences between the first-position and reference databanks. |
|
This statement finds timeseries with missing values. |
|
Inserts a heading (description) into a gbk databank |
|
Sets a databank editable |
|
Sets a databank non-editable |
Timeseries
Timeseries exist as objects in a databank. Frequency can be annual, quarterly, monthly, weekly, daily or undated.
Sets global time for timeseries operations. |
|
Omits or averages certain periods in output |
|
Create a new timeseries |
|
Delete an existing timeseries |
|
Transform a timeseries using mathematical expressions or data values |
|
Convert e.g. quarterly timeseries into annual timeseries etc. |
|
Convert e.g. annual timeseries into quarterly timeseries etc. |
|
Fills in missing values in a timeseries |
|
Splices two timeseries into one. |
|
Calculates an index series |
|
Removes observations in a timeseries outside the stated sample. |
|
Computes cross-correlations etc. |
|
Change meta information (label, source and date stamp) |
Lists, scalars, matrices etc.
Gekko can put names of timeseries into a list, in order to reuse the list for different purposes (or make the program file easier to read). In addition, scalar variables like strings, dates and values can be used.
Create and delete lists |
|
Scalar variable of date type |
|
Scalar variable of string type |
|
Scalar variable of value type |
|
Define a matrix |
|
Shows a list of scalar variables and their values |
Show data
Gekko can show data in several ways, including printing on the screen, graphs, or showing the data in an Excel sheet. In addition, there is a special table-like decomposition window (DECOMP). The DISP statement also functions as an in-built equation browser. You may prefix a variable with '@' to indicate the reference ('Ref') databank, for instance @gdp. Or else use colon to indicate a databank, for instance mybank:gdp.
Prints timeseries or expressions in different ways |
|
Prints multipliers: differences between the first-position and reference databanks. |
|
Prints info regarding timeseries, and starts equation browser |
|
Show a graph of timeseries (using gnuplot) |
|
Like PRT, but shows timeseries data in Excel |
|
Like PRT, but puts timeseries data on the Windows clipboard |
|
Decompose an equation |
|
Find a variable in equations |
|
Show a flowgraph corresponding to a DECOMP statement |
|
Prints text strings on the screen |
|
Show data-traces (timeseries) |
Model
A model can be loaded directly from a .frm file. After the model is loaded, a number of statements can be used:
Load, parse and compile a model from file. |
|
Simulates the model (also if there are goals/means) |
|
Endogenize variables (means) |
|
Exogenize variables (goals) |
|
Removes ENDO/EXO goals/means. |
|
Single-equation prediction |
|
Skip convergence check for chosen variables (Gauss) |
|
Show iterations in detail for chosen variable (Gauss) |
|
For signing models with signatures. |
Gekko program files
Larger tasks can be run by means of program files (.gcm). There are the following statements related to such files:
Runs a .gcm program file. Use the EDIT statement to edit these files. |
|
Direct output to an external file instead of screen |
|
Runs gekko.ini if located in the program and/or working folder |
Functions/procedures
You may use user-defined functions or procedures to avoid repetitive tasks and encapsulate functionality.
Defines a user-defined function. |
|
Defines a user-defined procedure. |
|
Store functions/procedures inside a library .zip file for general use. |
Cleanup
The principal cleanup-statement is the following
Clears all databanks, lists, scalars, models, etc. and runs any gekko.ini files. |
|
Same as RESTART, but without running any gekko.ini files. |
|
Clearing databanks |
|
Closes all 'named' databanks, and clears Work and Ref. |
|
Clears main window (short for 'clear screen') |
|
Closes all PLOT and DECOMP windows |
Control flow
Gekko supports basic control flow like loops, conditional statements etc. At the moment the possibilities are quite limited, but will be augmented as the software matures.
For-loop over lists/strings, values or dates, parallel loops are possible. |
|
Ends loop (FOR), conditional statement (IF) or FUNCTION/PROCEDURE. |
|
Returns from the program file or function defintion. |
|
Stops execution completely. |
|
Stops execution completely, and terminates Gekko. |
|
Input data interactively |
|
Waiting for the user to click [Enter] |
|
Transfers execution to the corresponding TARGET |
|
Receives execution from the corresponding GOTO |
Tables/menus
Econometrics
Single-equation linear regression |
Python and R interfaces
Runs the decorated Python file, and returns matrices back to Gekko |
|
Runs the decorated R file, and returns matrices back to Gekko |
Miscellaneous
The following statements did not fall into the above categories, and so are gathered here:
Set Gekko mode to sim/data/mixed |
|
Access the help system |
|
Sets different options |
|
Indicate a particular Gekko version |
|
Edit a file via Notepad |
|
Edit a xml file via XML Notepad. |
|
Access the system shell if needed |
|
Translates syntax from Gekko 1.8 or AREMOS |
From the menu items (‘Utilities’), you can also compare two databanks, check residuals, and compare variables in model/databank/varlist.