Changelog

On this page you will find detailes regarding changes in different Gekko versions. On the download pages, you will find only brief descriptions of changes, whereas this page goes in more detail. Even more details can be seen in the commits at GitHub.


Version 3.1.22 – 12/11 2024

  • New flowgraph button in the DECOMP window, activating a flowchart-like graph depicting the dependencies among variables. The graph can be thought of as a visual representation of a recursive DECOMP. The flowgraph window has buttons for recursive depth level, ignored percentage (like in the DECOMP window itself), and rotating the graph.
  • GAMS, better left-hand side identification from eq names. In the FIND window, a new “Name” column will indicate if the left-hand side variable name was identified from the equation name.
  • For GAMS scalar models, fixed variables will now in DECOMP show for instance “modelfix = 2019-2025”, to indicate fixed period. Also, exogenous vars (as defined as .fx in the scalar model gams.gms) are now shown in black, not blue font color.
  • Fixing machine translation of GAMS expression like x[i, j, ‘2018’], which now becomes x[#i, #j][2018] as Gekko code.
  • New “option decomp flowgraph depth = 2;” to set the default recursive depth regarding flowgraphs.
  • New “option interpolate olsette trend = yes”, so the trend can be switched off if needed.

Version 3.1.21 – 21/10 2024

  • DECOMP improvements. Easier unfolding of aggregated rows, more telling names shown, age interval grouping possible, etc.
  • Html browser for GAMS models (built in, not callable as a command yet).

Version 3.1.20 – 8/10 2024

  • Gekko warnings have been improved, so that not too many similar warnings will flood the Gekko output window while running Gekko programs. Instead, the number of similar warnings are limited regarding the output window, but pooled together and shown at the end of a Gekko session (clickable links). See the possibilities in the user manual, under OPTION (“option global warnings …”).
  • INTERPOLATE improvements, converting from a lower frequency like annual to a higher frequency like quarterly. The Cholette method is implemented, which is an improvement over the Denton method, because the Cholette method is less sensitive to differences in absolute levels between the high-frequency indicator series and the low-frequency goal series. In addition to the Cholette method, there is also a ‘Olsette’ method (using OLS to match the indicator series to the goal series and therefore less sensitive differences in relative levels). The Denton method now issues warnings if the indicator series and the low-freq series are too different regarding levels. See the help page regarding INTERPOLATE.
  • In function laspchain(), d-price values (values in the previous period’s prices) can now be used, too. Fix so that the function starts in the first period that has all non-missing data, and now done Paasche price index internally (will get 1 more aggregated price value in start of period in some cases). Possiblity of arguments ‘zeros1’ or ‘zeros2’ to handle 0-values.
  • New function allmiss(), to test if a timeseries has no data at all.
  • For series statements, it is now also possible to do <keep=d>, together with the existing <keep=p>. Error issued now if keep-operator is not ‘d’ or ‘p’.
  • Possibility to close all trace windows in bulk (from GUI or with CUT statement).
  • WRITE<trace=no> and CLOSE<trace=no> are now possible, to omit data traces.
  • TRUNCATE statement (and internal time-truncating) now also truncates inside array-timeseries.
  • tracebank() function to find precedents/dependents in data-traces. For instance: “#m = tracebank(‘qbnp’, ‘adambk’, ‘precedents’);” or “#m = tracebank(‘Syk’, ‘adambk’, ‘dependents’);”. Also a traceadam() shortcut function, calling tracebank(…variable…, ‘adambk’, ‘precedents’).
  • Bugfix: Speed improvements regarding tight loops consisting of normal timeseries statements like “z{%i} = x{%i} + y{%i};” and similar. The fix yields around 10x speed improvement in many cases. Array-series statements like “z[#i] = x[#i] + y[#i];” were not affected by the bug.
  • Bugfix: Fixing problem with combination of “+=” and “rep *” in series definitions. Before, in that combination, the “rep *” was implicitly ignored, also in series manipulations.
  • Bugfix: PLOT with xline, xlinebefore, xlineafter is now working properly, also for quarters/months and when mixed frequencies.
  • Bugfix: Refresh-button for DECOMP works again.
  • Bugfix: Solve (SIM). If a simulation period crashes with missing values for lagged endo variable, it may be because of a dummy Dabc == 1 and a fixed value Zabc = m(). In that case, Gekko detects it and writes a list of such missing-infected Z-variables in the error message. This is less mysterious and more like the error if a normal exogenous variable has missing values.
  • Bugfix: when reading a .gbk a second time (where cache kicks in), info and timestamp fields were not shown/remembered.
  • Bugfix: Fixed some bugs related to invalid dates like <2024 2023>. Such invalid dates would not always result in an error, which they obviously should.
  • Bugfix: Fix for null-series problem like “create x; y = -x;” which failed. Problem would also pop up when reading a Gekko 2.x databank.
  • Bugfix: export<tsp> did not work properly.
  • Bugfix: “x*=100;” did not work, but “x *=100;” did (blanks problem).

Version 3.1.19 – 24/5 2024

  • Data trace bugfix, not affecting series statements, but mostly statements like INTERPOLATE, COLLAPSE etc. Could render traces circular, crashing Gekko.
  • Fencing options. Blacklists and whitelists, making it possible to restrict read/write of files to certain folders. Options: option global fence black folders, option global fence white folders, option global fence black folders read, option global fence white folders read, option global fence black folders write, option global fence white folders write, option global fence sys.
  • Experimental function lhsRhs() that analyzes a Gekko gcm file syntactically and returns lists of timeseries names that appear on left-hand or right-hand sides of assignments (“series statements”).
  • Improved function compareFolders().
  • Stamp and colors now (again) possible with SHEET #m, where #m is a matrix.
  • Bugfix regarding something like “x <2020 2010> = 100;” that was wrongly accepted (bad time period). The bugfix can be turned off with option bugfix dates = no;.

Version 3.1.18 – 4/4 2024

  • Data trace fixes, so they accumulate less, and so trace dates are more useful. In trace viewer, clicking a trace up and down could produce more and more grandchildren traces (fixed, too).
  • New GEKKO statement to check Gekko version validity, including gekko.exe date. Simple example: “gekko version >= ‘3.1.18’;”. More advanced example: “gekko version >= ‘3.1.18’ 2024m4d3 and version < ‘3.1.19’ 2024m12d31;”.
  • New gekkoVersionDate() function: returns the daily date corresponding to the gekko.exe file of the currently executing Gekko.
  • New function includes() for strings. For instance includes(‘abcd’, ‘bd’) will return the value 1. Case-insensitive.
  • New options: option databank trace dublets = no; option databank trace divide = no;
  • Bugfixes regarding the function gamsscalar(‘pack’).

Version 3.1.17 – 3/4 2024

  • Note: this version has been retracted because of a ‘gekko version’ statement bug.

Version 3.1.16 – 11/3 2024

  • Data tracing is implemented for series and array-series, cf. TRACE2 (or DISP). This will keep track of (remember) how data is constructed, for instance how one timeseries is constructed from other timeseries. See more under TRACE2 in the help system, and deactivate with “option databank trace = no;”.
  • Program dependency tracking: activate from the Gekko menu ‘Options’ –> ‘Program dependency tracking’. When activated, Gekko tracks the use of external files (for instance program files, read/written databanks etc.). A list of such files is shown at the end of a Gekko session. You may alternatively use “option global dependency tracking = simple” to activate program tracking (can only be stated in a gekko.ini file next to the gekko.exe file).
  • Local options for Gekko statements: for instance “prt <2020q1 2021q2; option print freq = simple> y;” will work as if “option print freq = simple”
    was set before the PRT statement and restored after the command.
  • Improved INTERPOLATE with Denton method. For a rhs low-freq series and a high-freq indicator series, Gekko will find the common denominator regarding time periods, so that all the low-freq data periods are reflected in the indicator having data inside all these periods, too.
  • Function laspchain() now accepts quarterly series too, if used with ‘annualoverlap’ argument. Quarterly Laspeyres chain indices have been adapted from a user function called laspchainq(), circulated among Gekko users.
  • Drag & drop: From for instance File Explorer, you may drag a file into the lower part of the Gekko main window, and Gekko will paste the file name (including path) as a text string. Try typing READ in the lower input window, and then drop a file next to the READ keyword.
  • DECOMP window now uses single-click to decompose for Gekko models and single-clik for FIND window for GAMS models. For both Gekko and GAMS models, Ctrl+click opens FIND window. FIND window now uses single-click to decompose, Ctrl+click to select/retain an equation.
  • SYS command accepts a “working=” parameter where the SYS working folder can be set. This is practical when calling for instance an external .exe or .cmd file which depends upon being starter in the “right” folder.
  • For IF-ELSE-END structures, there is now also an ELSEIF. This provides nicer syntax in nested cases (avoids a lot of END; END; END; … at the end.)
  • Gekko model files (.frm) can now indicate frequency, for instance a line with ‘//Freq: q’. This is relevant regarding for instance the pchy() and similar function.
  • For a “parent” array-series with dimensions, DISP offers “view” link (same viewer as prt<view> for lists).
  • Datafile format “sdf” supported, for instance “import <sdf> x.sdf;”, importing the array-series x. The format is a special format for Statistics Denmark (Sumdatabasen).
  • DOC <varlist>; to get/import labels from a loaded model into timeseries. DOC <varlist> file=varlist.dat; to get/import labels from an external varlist file into timeseries.
  • GAMS: New right-click paste (“Paste special, Paste from GAMS –> Gekko”) translates the clipboard from a GAMS equation or assignment to equivalent Gekko code.
  • GAMS: SIM <res> now works for GAMS scalar models, too.
  • GAMS: This option is set per default: “option gams_time_detect_auto = yes”. Gekko will hence analyze the parameters/variables of a gdx databank to see if a domain-less dimension (with domain ‘*’) could be a time dimension. This is done by means of “tasting” the data to identify time-like dimensions.
  • GAMS: New functions modelrawvars() and modelraweqs(). For a GAMS raw model (defined as equations in .gms files), Gekko extracts the equation names and the variables that are parts of the equations, and returns this as a list of strings. The results are without possible dimensions.
  • GAMS: Redesign of gamsscalar() function for producing a GAMS scalar model.
  • GAMS: New functions: modelScalarVars() and modelScalarEqs() to extract variable and equation names from a GAMS scalar model.
  • GAMS: Introducing OPTION gams trim = … , with default = 0. If for instance = 1, all GAMS gdx variables/parameters with elements (records) < 1 (that is, == 0) will be ignored when reading/importing.
  • Functions arrayPack() and arrayUnpack() can be used to transfer a databank of normal timeseries inside a 1-dimensional array-timeseries, and vice versa.
  • Functions bankflatten() and bankreplace(). Works for a given databank, and for all series and array-series. The first function replicates the value x[t] for all other t, and the second function replaces a given value with another value.
  • Function readscreen() function gets the upper part of the main Gekko window as a string.
  • Function nl() returns the newline symbol. Can be used together with the split() function to split a string into lines.
  • Function comparefolders(). Use it to compare files in two folders (with subfolders). The files are compared by contents: byte for byte for binary files, and line for line for text files (differing whitespace at the start or end of a single text line will not count as a difference). The function outputs three files: comparefolders.txt with file info, comparefolders1.zip with differing common text files for easy comparison, and comparefolders2.zip with Gekko code to update folder1 or folder2.
  • Function design() for matrices. Can be used for aggregation.
  • Function flatten() for array-series, to convert an array-serier to a number of normal series.
  • Function rename() for array-series (renames and reorders dimension elements).
  • Functions tracestats2() and tracedelete2(). More trace functions to come.
  • Function isutf8file() will return 1 if the file seems to be a text file with UTF-8 encoding, returns 0 otherwise (the file may be ANSI/Windows-1252 encoded).
  • Function reorder() for array-series. Input is a list of integers, for instance (3, 1, 2), which will put dimension #3 first, then dimension #1, and last dimension #2. Example: y = x.reorder((3, 1, 2)); where x is an array-series with 3 non-time dimensions.
  • For csv, Gekko now uses #N/A or #I/T for missings inside a series data block (instead of #NAME? or #NAVN?). Also determines start/end dates better (also works for prn), where blank cells are showed.
  • New “option interface csv ignoremissing” and “option interface excel ignoremissing”. These are “no” per default, but if set to “yes”, EXPORT<csv> or EXPORT<xlsx> will represent missing values as blank cells.
  • New options for prn (option interface prn …): option interface prn decimalseparator = … , option interface prn delimiter = … , option interface prn ndec = … . These options are similar to the corresponding option interface csv … options. For option interface prn delimiter and option interface csv delimiter, there is now a ‘tab’ option, too (tab-delimited).
  • Option with ‘?’ now works at all levels of the option tree, for instance “option ?;” or “option solve gauss ?;” etc.
  • “option bugfix missingignore” is now set “yes” as default (with a comment at startup). Also a warning about DECOMP<missing=zero> is removed.
  • “option bugfix lhs dollar” is set to yes as default to emulate LHS $-condition (skips observations if false).
  • In GUI Help –> About, a time stamp regarding gekko.exe is shown too.
  • Better handling of Gekko window in case Gekko is put on monitor #2 at work, and the user returns home to work more on a laptop with 1 screen. In that case, the Gekko windows (including the main Gekko window) should not just disappear into a void.
  • Better error messages when the user tries an invalid mix or “option sheet freq = pretty” together with <dateformat=…> and/or <datetype=…>.
  • Bugfixes regarding DOC<browser>.
  • Bugfixes regarding Utilities menu, comparing databanks and calculating residuals. Both seemed broken.
  • Bugfix regarding cache and matrices stored in .gbk databank files.
  • Bugfix related to SHEET<import matrix csv> or SHEET<import matrix prn>.

Version 3.1.15 – 22/3 2023

  • Improved SPLICE command, now allowing multiple series, where “primary” series can be indicated. Also, time period ranges are supported. Splice method can be relative (3 variants) or absolute. An analogous splice() function is provided, too.
  • CLOSEALL command: short-hand for CLOSE *; CLEAR;
  • New option: option copy respect = yes|no; (default: no)
  • When INDEX or DISP tells that there are hits when using for instance *: or !*, there will now be clickable links.
  • Simple data tracing implemented, see menu ‘Data’ –> ‘Trace data’. Can be used to see which data files are read and written in a Gekko session.
  • TELL now also has TELL<line> that first inserts a blank line, and TELL<mute=no> that overrules a possible option interface mute = yes, so that TELL’s can tell about program progression even though everything else is muted.
  • COMPARE: <missing = zero> option implemented, treating missings as if they were = 0.
  • Regarding root(), it is now required that the folder of the currently running gcm file (if any) has the root.ini folder as a parent folder. Otherwise root() fails; this is a sanity requirement. Also a fix for when the root.ini is located at the root, like g:\root.ini. In that case, root() will return “g:” and not “g:\”.
  • The function fromseries() now has a ‘stamp2’ argument (returning a Gekko daily date).
  • The function bankfilename() is obsolete, use the new frombank() function. This function has arguments ‘filename’, ‘fullpath’, ‘label’
    ‘stamp’, ‘stamp2’, ‘format’, ‘count’ .
  • The function getMonth() can now be used with ‘en’ or ‘da’ argument, returning the name (and not the number) of the month (as a string).
  • With COPY x!a to y!q; a warning is now issued, but Gekko still produces a y!a result. This will become an error in Gekko 3.2.
  • Gekcel will now show version number (in Ribbon). Also, SHEET<names=… dates=… datetype=… dateformat…> now work for Gekcel.
  • New asbrename() inbuilt function, to get from an “asb” name like S3002010001 to a statbank-like name KSERV1!M[STOT, TOT, OMS, NET, FOR]. This is primarily used for migration AREMOS –> Gekko, and the function is not mentioned in the help system. Can also be called with ‘debug’ argument.
  • Bugfix: Error messages: In some circumstances, spurious and confusing messages were issued.
  • Bugfix: COPY<respect> will now work even if the global period freq is not the same as the series freq.
  • Bugfix: In frm files, “runbefore$” and “runafter$” had to be lower case, fixed.
  • Bugfix: Fixed issue that write<gdx> did not work on array-series where there were both normal and timeless sub-series inside. If so, the timeless series are now converted to normal, for use in GAMS. The period is set by looking at other sub-series periods.
  • Bugfix: Fixing a DECOMP bug that was triggered by “option series data missing = zero”.
  • Bugfix: When calling MODEL on a model already known (activating the cache), the 8 lists #exo, #endo, #exotrue, etc. from Global were not recreated, and the file <model>__info.zip was not recreated, too. This is fixed.
  • Bugfix: The special value ‘eps’ in a GAMS scalar model is now understood as 0 (for DECOMP).

Version 3.1.14 – 4/1 2023

  • DECOMP: completely new system, including recursive decomp, dimensions, plots, etc.
  • MODEL and READ/IMPORT commands use multi-core cache files. Depending upon the number of cores, speedup can be a factor 3-5x or more for large files (for instance large .gdx files).
  • MODEL<gms> can load scalar GAMS model from .zip file, can be used for DECOMP.
  • DOC<browser> now works for non-annual models (html equation browser).
  • Autocomplete of variables names, use [F3] or [Ctrl+Space] to activate popup window. Works on series and arrayseries names, and wildcards can optionally be used corresponding to the INDEX command.
  • INDEX command now supports array-series, for instance INDEX x[a*, *b]; or INDEX x[**];.
  • Multidim sets can be used for $-conditionals, for instance using $ #m[‘a’, ‘b’], where #m is a nested list containing n-dimensional ’tuples’. This corresponds to GAMS.
  • PRT <view> #m; where #m is nested list. This provides better overview of “two-dimensional” lists.
  • PC-Axis files: now supports IMPORT<px variablecode>, where the VARIABLECODE fields are read from the .px file. These are often shorter, for instance ‘VAREGR’ instead of ‘varegruppe’, which results in shorter composed series names (when the <array> option is not used).
  • Error messages: the output is less voluminous, less random, and hopefully more useful.
  • Error messages: detects 2.4 syntax and translates it automatically as a hint/service.
  • Error messages: provides help for wrong syntax like #m = a; or for string %i = a; where a trailing comma is needed for the naked list (1-element list).
  • Error messages: tries to provide better help in the cases where a %x or #x variable should be written {%x} or {#x}.
  • Possibility of using -hide and -nolog as gekko.exe parameter, which deactivates the Gui.cs.
  • Domain names exported with WRITE<gdx>. Also respects ts.meta.fix parameter, so that a parameter read from gdx will be exported as a parameter again.
  • Functions: binary(), flush(), getfixtype() , isarrayseries(), istimelessseries(), setFixType() , subseries(‘dimensions’), tanh()
  • option interface errors = old | normal;
  • option databank file cache = all | nonbgk | none.
  • option decomp plot zoom = 100;
  • Bug that affected file = … in COMPARE and R/Python interface.
  • Bug in SHEET, when for instance showing x!q when global freq is annual.
  • Bug: COMPARE did not allow for instance file = b:\x.txt.
  • Bug: CLIP<cols> did not transpose.
  • Bud: fixed bug that caused extra col(s) for CLIP command with long expressions.
  • Bug: DISP label fix.
  • … and a lot of other smaller bugfixes…

Version 3.1.13 – 29/11 2021

  • Weekly frequency implemented, with 2020w10 denoting week #10 of 2020, and x!w denoting a variable with weekly frequency. COLLAPSE and INTERPOLATE works, but some of these conversions are approximate, because in general, weeks do not fit exactly inside months, quarters or years.
  • Library logic has been reworked somewhat since Gekko 3.1.12. Now, functions and procedures defined “normally” (not in a library) will now be put in a special library with the name Local, which is first in the hierarchical list of loaded libraries. This means that any “normal” function f() or procedure f will have priority over other versions with the same name in loaded libraries.
  • Libraries can now contain external files, if these are put in a \data subfolder in the library zip file. When the library is loaded, the \data files will be generally available (also outside of the library), so you may for instance use this to store plot schema files (.gpt), table schema files (.gtb), list files, data files, etc. The \meta subfolder is reserved for future use (documentation, etc.).
  • You may make a function, procedure or external file private by prefixing it with ‘__’ (two underscores). After this, the file can only be accessed when called from a function or procedure of the same library. Inside library functions and procedures, there is also the possibility to use the special library name ‘this’, for instance this:g() or this:pretty.gpt. Using ‘this’ makes sure that the function/procedure/file can only be found in the same library. Library names must now be at least two characters to avoid future confusion with Windows one-letter drive letters.
  • “Zip paths” for files are supported. For instance, you may write “READ <csv> \scenario1\storage.zip\data\europe.csv;”, where Gekko finds the zip file storage.zip in the subfolder \scenario of the working folder. From this, Gekko automatically extracts the file europe.csv from the \data subfolder of the zip file. This works with any zip file, including library files (in the latter case, the library does not have to be loaded first). Zip paths only work for read access of a file inside a zip file, not for writing (and re-packing) such files.
  • New root() function that searches for a root.ini file in the working folder or any parent folder. Will abort with an error if none or more than two of such files are found. With root() and a root.ini located in for instance the folder g:\datarev, a statement like “READ {root()}\data\bank2;” will be equivalent to “READ g:\datarev\data\bank2;”. In that way, a folder structure of for instance command files, databanks etc. becomes easier to relocate because there are no absolute path names.
  • AREMOS translator improvements (quite a lot of improvements, e.g. set relevant {}-curlies).
  • Gekko 2.x translator improvements (quite a lot of improvements, translating from Gekko 2.x to 3.1.x).
  • X12A has better error messages if the sample is too large. Also some other fixes in X12A.
  • For PLOT, gnuplot code can now also be stated in the .gpt file, in the tag <plotcode> … </plotcode>.
  • New functions: getSpecialDay(), getWeek(), getWeekday(), isNull(), observations(), upperFirst().
  • New options: option collapse method, option collapse missing d, option interpolate method, option smooth method. These options control the default behavior of COLLAPSE, INTERPOLATE and SMOOTH, together with the equivalent functions collapse(), interpolate() and smooth().
  • DOWNLOAD now works for daily and weekly frequencies, too.There is no longer a requirement that the time dimension is stated last in the .json or .px file. If possible, it is still advised to set time as the last dimension (“code”), but Gekko will still work (with a warning) if this is not done.
  • Bugfix: When copying a series with for instance the COPY command, the source metadata field of the copied series was erroneously set to the units metadata field of the original series (and the units metadata field of the copied series was left empty). The bug does not seem to apply to READ/WRITE/OPEN/CLOSE etc.
  • Bugfix: Fixing PRT/PLOT/SHEET of sums with x{#i} or {#i}, but without explicit controlling #i as first argument. So now for instance PRT sum(x{#i}); will work as expected.
  • Bugfix: DOWNLOAD and PC-Axis (px) file reader is now ok with daily frequency (and weekly, too).
  • Bugfix: Several wildcards like in “EXPORT <csv> fx*, fy*;” are now possible again.
  • Bugfix: Some fixes of import/export <gcm> and <flat>

Version 3.1.12 — 24/6 2021

  • LIBRARY command to handle libraries of user-defined functions and procedures. Uses lazy loading for speedy library loading, and libraries can be loaded in hierarchies (a bit like databanks).
  • rebase(), collapse() and interpolate() functions that are mirror images of the commands REBASE, COLLAPSE and INTERPOLATE. The function variants can be practical for printing/plotting etc.
  • tic() and toc() functions to start and end a timer.
  • getweekday() calendar function.
  • mod() function: modulo.
  • isLibraryLoaded() function.
  • Gekcel has a new Gekko_GetGroup() VBA function.

Version 3.1.11 — 9/4 2021

  • Cleaned up the GUI a bit, new separator between upper an lower part of main window.
  • Restore of commands from previous session is now possible (restore links are shown when Gekko starts up). For instance practical if Gekko crashes.
  • Fixed autocollapse for PRT so that it now works again and supports <collapse=total> or <collapse=avg>, or as a global option as OPTION print collapse = total | avg.
  • Functions: Introduced collapse(), interpolate() and rebase() functions to supplement the COLLAPSE, INTERPOLATE, and REBASE commands. Can be practical for instance when printing/plotting: “PLOT x!q, x!q.collapse();”.
  • Also, min() and max() functions now work in models, too (.frm files).
  • Functions tic() and toc() can be used to time Gekko programs (counts seconds elapsed).
  • Maintenance note: the C# code behind printing on screen in general and error messages in particular has been reworked. In the longer run, this will allow for better (error) messages. In the shorter run, there may be glitches where error messages that were shown properly in 3.1.10 are not shown in the same way in 3.1.11.

Version 3.1.10 — 10/2 2021

  • A new “Gekcel” component. Gekcel makes it possible to issue Gekko commands (silently) from within Excel, and have results returned to a worksheet. Gekcel is downloaded separately and uses the same version numbers as the main Gekko program. Gekcel is work in progress: expect further developments in the coming months. It is documented in the Gekko help system, see the section “Excel add-in (Gekcel)”, here.
  • Gekko is now compiled as both 32- and 64-bit, and the user can choose which version to download. Using 64-bit provides access to a lot more RAM, which is necessary for RAM-intensive jobs. The 64-bit version is generally identical to the 32-bit version, but glitches may be present in the 64-bit version (in that case, a command will simply fail). In the longer run, Gekko will become 64-bit only.
  • sort() function for strings can now use a ‘natural’ argument to sort like a8, a9, a10, instead of the unnatural a10, a8, a9. Only relevant when the strings contain numbers.
  • New functions getelements() and subseries(), the latter with arguments ‘names’, ‘elements’ or ‘length’. Used to inspect array-series.
  • Fixed a problem implying that a listfile could not be printed.
  • The help files have been updated to include a “Gekko User Guide” section with an easier introduction to both data handling and model solving.
  • IMPORTANT: Clean up of source code, and update of source code documentation. This is a rather large project and involves a lot of cleanup of C# source code. Hopefully, this should have zero concequences for Gekko users, and all unit tests are ok. But glitches cannot be ruled out completely, but if so, they are of the type “fail-fast”: the Gekko command will simply crash.

Version 3.1.9 — 26/10 2020

  • .NET version is now bumped to 4.6.1 (which is from 2015). This is in order to use Apache Arrow files and C# dataframes.
  • Apache Arrow files can now be written with WRITE<arrow>. An arrow file is basically a dataframe (or SQL table) with rows and columns. These arrow files can be read by many other programs, for instance R or Python.
  • REBASE now has <frombank=… tobank=…> so that the output series can also be directed to some other databank (practical for instance if the source databank is non-editable). The former <bank=…> is deprecated (still works, and works like frombank=…).
  • SHEET has a new option append=ifexist, so that Gekko will append to existing xlsx file if it exists already (or alternatively create a new xlsx from scratch). For instance “SHEET <append=ifexist> x1, x2, x3 file = data.xlsx;”.
  • New format syntax: use for instance format(%v, ’20:0,0.00=da-DK’), where there are delimiters ‘:’ and ‘=’, and where the last part (here: da-DK) denotes the culture (region), for instance if comma or dot is used for thousands delimiter and decimals.
  • New inbuilt function yesno(x), where x is a value of 1 or 0, in which case the function returns the string “yes” or “no”. Can be useful when dealing with options.
  • New inbuilt function existfile(‘filename’), returning 0 or 1.
  • Improvements to the Gekcel project.
  • Bugfix: with SHEET and append=yes, cells containing na() values (missing values) would not get overwritten with new data.
  • Bugfix: reading px files (DOWNLOAD) had a problem with labels, if these contained commas.

Version 3.1.8 — 8/10 2020

  • Python interface, see PYTHON_RUN. The interface works like the R_RUN interface, interchanging matrices and returning Python output to the Gekko main window.
  • EXPORT<python> is now possible, providing a matrix in a format readable in Python.
  • The R_RUN interface is simplified, so that R_FILE and E_EXPORT is no longer needed.
  • Bugfix: When comparing whole timeseries like IF (x1 == x2), Gekko < 3.1.8 would treat the two series as different if any missing values are present in one or both of the series. Even two series like x1 = 1, m(), 3 and x2 = 1, m(), 3 would be considered different. This is remedied, and Gekko will watch how existing IF statements are run and issue a warning if existing IF statements are affected. In that case, Gekko proposes different ways of resolving the issue.

Version 3.1.7 — 31/8 2020

  • This version implements dynamics checking. See more in the help system, in the section named ‘Dynamic statements’. In short, a statement like x = x[-1] + 1 is no longer legal in this ‘naked’ form: it must be decorated with either <dyn> or <dyn = no> tag, or alternatively be located inside a BLOCK series dyn = yes|no.
  • Allowing parent folder double dot in file paths (..), even if the path is not inside quotes. So you can use RUN \..\..\prog, instead of RUN ‘\..\..\prog’.
  • Bugfix: array-series with lags did not work. Now you can do x[a] <dyn> = x[a][-1] + 1 or x[#i] <dyn> = x[#i][-1] + 1.
  • Bugfix: lag(), movsum() and movavg() did not work as object functions, for instance x.lag(3). This is fixed.

Version 3.1.6 — 21/8 2020

  • Function truncate() function to find overlap between two different time periods (“time windows”).
  • Functions fromseries(x, ‘dataStartTruncate’) and fromseries(x, ‘dataEndTruncate’) implemented, will respect the global/local time period. May return null/empty if the data window and the time period windows do not overlap at all.
  • Functions min() and max() functions that accept either values or dates.
  • isMiss() function now accepts a timeseries as input, too (besides value input).
  • OLS will now detect if there are missing values at the start or end of the time period and suggest a shorter (truncated) time period instead, if this is the case. For instance, this makes it easier to get the start of the period right, instead of trial and error.
  • Assignments and expressions should now be less sensitive to frequency settings, so for instance y!a = x!a + 1; would work, even if the global frequency is for instance set to quarterly (Gekko will try to use a sensible annual period regarding the assignment).
  • Bugfix: this error: “There are […] non-databank timeseries in the model” would occur for non-annual models because annual freq was hard-coded in this check. Fixed.

Version 3.1.5 — 10/8 2020

  • SHEET <import matrix>, SHEET <import list> and SHEET <import map> now also accept csv or prn files as input.
  • SIM<res> did not work with leads, fixed.
  • STOP command with call stack (so that it is easier to see which file and line number the STOP command originates from).
  • Some progress regarding frequency flexibility (for instance allowing the calculation of an annual series expression even if the global frequency is quarterly).
  • Bugfix: MODEL<gms> did not always work, because of some experimental code
  • Bugfix: With COPY, the name field of the cloned series did not get updated. Errors stemming from this are quite rare. but serious nonetheless.

Version 3.1.4 — 18/6 2020

  • Introducing new equation types T and P, alongside Y-type. T-type equations work just like Y-type equations, but the naming difference can be used to identify “interesting” table variables versus non-interesting technical equations. P-type equations are not part of the model, but may be called with the new PREDICT command. Also, the model .frm file may now contain normal Gekko code in the sections RUNBEFORE$ and RUNAFTER$ (these are run before and after the simulation). See more under MODEL in the help files.
  • New PREDICT command, “PREDICT fy;” will run the fy equation from a model (.frm file) as a single equation. It will run as implicit <dyn>, so “x = x[-1] + 1” will accumulate. PREDICT accepts a list of elements.
  • New option to control how the main window works as an editor: OPTION interface edit style = gekko | gekko2 | rstudio | rstudio2. This can also be chosen from the main menu: Edit –> Editor Style… . The normal style is ‘gekko’. With ‘gekko2’, a newline will execute the line AND move the cursor to the next line. Therefore, with ‘gekko2’, multiple lines can be executed with [Enter] [Enter] … [Enter] instead of [Enter] [downarrow] [Enter] [downarrow] … [Enter]. In ‘gekko’ and ‘gekko2’, [CTRL+Enter] issues a new line without executing anything (like Notepad). The ‘rstudio’ style emulates RStudio, where [Enter] works like Notepad, and [Ctrl+Enter] issues the line. In ‘rstudio’, an issued command moves the cursor to the next line (similar to ‘gekko2’). With ‘rstudio2’, [Ctrl+Enter] does not move to the next line (similar to ‘gekko’).
  • Removing lag restriction regarding right-hand side indexing, so lags like x[-120] or x[+120] are now allowed (before they had to be in the range -99..+99).
  • Some cleanup regarding left-hand side series statements with indexer. Here, we now allow indexers like x[-2] or x[+5] or x[5] to set values for a series of undated frequency. Other frequencies would fail in this case. In general, lags/leads are disallowed on the left-hand side.
  • BLOCK command now accepts a ‘time’ part anywhere in the list of options. This is better, so that for instance BLOCK freq q, TIME 2001q1 2003q4; … ; END; can be used.
  • Functions fromseries(‘perStart’) and fromseries(‘perEnd’) are rendered obsolete. Instead, the user should use fromseries(‘dataStart’) and fromseries(‘dataEnd’). The former functions can be imprecise in some cases, and this is not worth the fact that the former functions run faster. Sensible error messages are issued when trying to use fromseries(‘perStart’) or fromseries(‘perEnd’).
  • Some GAMS improvements regarding GAMS to Gekko equation translation.
  • DISP: a couple of bugfixes
  • DECOMP improvements, including new equations browser window. This is still work in progress.
  • Implemented a module called Gekcel (using ExcelDna) that makes it possible to call Gekko functions/procedures etc. from within an Excel sheet. The goal is to be able to read/write Gekko databanks from Excel, run Gekko jobs, etc. This is still work in progress.
  • Bugfix: missing values in IMPORT<aremos> caused alignment problems in the timeseries.
  • Bugfix: %d1 – %d2 (subtracting two dates) crashed with an error, if the result was negative. But this should be allowed (again).
  • Bugfix: In a command like PLOT <linecolor=’green’> …, the color had to be in lowercase. Fixed.
  • Bugfix: better error message when for instance “WRITE * file = data.csv;” does not match anything, possibly because the global frequency is not set correctly
  • Bugfix: fixing BLOCK freq = … ; … ; END; so that it will also set global time back and forth.

Version 3.1.3 — 12/12 2019.

  • Statistics Denmark (Statistikbanken.dk) now requires TSL 1.2 for connections to their API. Therefore, DOWNLOAD is adjusted to accomodate that.

Version 3.1.2 — 5/12 2019.

  • OLS improvements, clickable links that show parameter stability, fit, and decomposition.
  • Csv and prn files are now written in non-scientific format. Two new options: “OPTION interface csv ndec” and “OPTION interface csv pdec”. Only the former works for now. Controls number of decimals for .csv and .prn files. A value > 19 is interpreted as “full machine precision”.
  • Bugfix: scalars were plotted with zero values.
  • Bugfix: some links in the user manual were dead.

Version 3.1.1 — 26/11 2019.

  • Daily frequency for timeseries introduced. Basics are up and running, do not work everywhere yet.
  • getday() function.

Version 3.0.9 — 12/12 2019. Gekko 3.0 official release, patch #9

  • Statistics Denmark (Statistikbanken.dk) now requires TSL 1.2 for connections to their API. Therefore, DOWNLOAD is adjusted to accomodate that.

Version 3.0.8 — 5/12 2019. Gekko 3.0 official release, patch #8

  • Bugfix: scalars plotted with zero values.
  • Bugfix: small bug regarding dates

Version 3.0.7 — 26/11 2019. Gekko 3.0 official release, patch #7

  • SHEET <import list> and SHEET <import map> implemented. In the list version, you can use for instance #m[2][1] to get the value in row 2, column 1 (cell A2). The map version puts cells as %a1, %b1, %a2, … etc. into the map, so you can use for instance #m[‘%a2’] or #m.%a2 to get the value of cell A2.
  • EXPORT <xlsx> #m file = … for export of matrices now show row and column labels if present.
  • Selection (slicing) of nested lists finished, so that #m[2, 3], #m[2, 3..4], #m[3..4, 2] and #m[3..4, 5..6] now works matrix- and NumPy-like.
  • Plot labels can be empty and therefore not shown, for instance “PLOT x, y ”;”
  • split() function to split a string by means of a delimiter, for instance to split a string like ‘a, b, c’ into ‘a’, ‘b’ and ‘c’.
  • Frequencies allowed in naked lists, for instance #m = x!q, x!m;.
  • OPTION interface mute = yes|no, to suppress output on screen (or to pipe file).
  • New functions type() and null(). The type() functions returns the type of a variable or expression as a string, for instance type(%x) or %x.type(). The null() function returns a null variable. At the moment, null variables are mostly used to indicate empty “cells” in lists.
  • split() function for strings defaults to removing empty elements, and stripping the elements of blanks at start/end. There are two options to control removing and stripping.
  • t() transpose function works for nested lists, too
  • getparent() function, so that x[a].getparent() will point to x.
  • New functions int(), floor() and ceiling().
  • New Excel date functions: toExcelDate() and fromExcelDate()
  • In SHEET<import list> and SHEET<import map>, any string cell is stripped (has blanks removed at start/end).
  • Future-proofing regarding READ of future databanks in the 3.1.x series, with new variable types and frequencies.
  • Bugfix in RENAME, and also in y = timeless(…). Both related to the internal name in the series object.
  • Bugfix: BLOCK time %t1 %t2; … ; END; did not work when using a scalar.
  • Bugfix: PLOT had some alignment problems on x axis.
  • Bugfix: matrix transpose t(#m) handles row/column labels, too.

Version 3.0.6 — 29/10 2019. Gekko 3.0 official release, patch #6

  • Procedures and user-defined functions support default values and prompting (using ‘?’ symbol). You may for instance define a procedure with “PROCEDURE myproc val %x1, val %x2 ‘parameter 2’ = 1, val %x3 ‘parameter 3’ = 2; … END; In that case, “myproc 5;” will run the procedure with the parameters %x1 = 5, %x2 = 1, %x3 = 2, where the last two parameters attain their default values. If, instead, you call the procedure with “myproc? 5;”, Gekko will prompt the user for the values of %x2 and %x3. This works similarly for user-defined procedures, where myfunc(…) calls the function normally, and myfunc?(…) enables prompting, and where default parameters can be defined. See more under PROCEDURE and FUNCTION in the help system (F1).
  • SHEET <import list> and SHEET <import map> implemented. In the list version, the spreadsheet is loaded as a nested list (a list of rows of columns), where you can use for instance #m[2][1] to get the cell in row 2, column 1 (cell A2). The map version srores cells as %a1, %b1, %a2, … etc., so you can use for instance #m[‘%a2’] or #m.%a2 to get the cell A2.
  • Selection and slicing of nested lists implemented, so that #m[2, 3], #m[2, 3..4], #m[3..4, 2] and #m[3..4, 5..6] now works, if #m is a nested list (for instance representing a spreadsheet of rows and columns). This syntax is like matrices, and also complies with Python/NumPy arrays.
  • Lists and strings allow empty start/end values in ranges, for instance #m[..5], #m[3..], #m[..] or %s[..5], %s[3..], %s[..]. This complies with how matrix ranges work.
  • OLS with dump of results as a FRML, for use in models. You may use OLS<dump> to produce a ols.frm file. OLS<dump=eqs.frm> will use the filename eqs.frm instead. If you use OLS<dump=eqs.frm dumpoptions=’append’>, the results will be appended to an existing eqs.frm file.
  • OPTION interface mute = yes|no, to suppress output on screen (or to pipe file). This can be used instead of PIPE, if you need Gekko to keep quiet.
  • t() transpose function now works for nested lists, too (and not just matrices).
  • New functions type() and null(). The type() function returns the type of a variable or expression as a string, for instance type(%x) or %x.type(). The null() function returns a null variable. At the moment, null variables are mostly used to indicate empty “cells” in lists, for instance a nested list representing a spreadsheet.
  • New split() function to split a string by means of a delimiter, for instance to split a string like ‘a, b, c’ into the list (‘a’, ‘b’, ‘c’).
  • New currentFolder() function.
  • New getparent() function. For instance, if x is an array-series, and x[a] is a sub-series, x[a].getparent() will point to x.
  • Bugfix: Frequencies allowed in naked lists, for instance #m = x!q, x!m;.
  • Plot bugfixes, problems with alignment on x axis.
  • Some other bugfixes.

Version 3.0.5 — 16/9 2019. Gekko 3.0 official release, patch #5

  • Local options <dateformat=… datetype=…> introduced for commands IMPORT, EXPORT and SHEET. These control the formatting of dates in xlsx and csv files. For instance, for the Gekko date 2020q3, you  may alternatively indicate it with 2020-9-30 (the last day of the third quarter). Dates may be text (strings), or alternatively Excel dates (internally counting days since January 1, 1900). Regarding Excel dates, 2020-9-30 would correspond to 44104 of such days.
  • Allowing for instance x[007] to mean x[‘007’] not x[‘7’], if x is an array-series. If x is a normal series, x[007] is still interpreted as x[7], that is, year 7 A.D.
  • New string functions isUpper(), isLower(), isAlpha(), isNumeric(). New date/time functions: currentYear(), currentMonth(), currentDay(), currentHour(), currentMinute(), currentSecond().
  • For EXPORT<csv>, there is a new “OPTION interface csv delimiter = [semicolon | comma]”. The first one is default. Bugfix: “OPTION interface csv decimalseparator = comma” had a bug.
  • Bugfix regarding wildcard: a command like “export <csv> xy* file = data;” would match xy* variables, but prepend xy on the result (xyxy1, xyxy2 instead of xy1, xy2).

Version 3.0.4 — 2/9 2019. Gekko 3.0 official release, patch #4

  • Bugfix: Again possible to write DISP ‘import’ or some other string to get Gekko to search for that label. Will seach both in a loaded variable list (if loaded with a model), and in the series labels.
  • Bugfixes regarding these commands: ANALYZE, CLIP, DELETE<nonmodel>.
  • iif() function fix regarding the compare of two missing values.
  • VAL?, STRING?, DATE?, SERIES?, LIST?, MAP?, MATRIX? are working now.

Version 3.0.3 — 27/8 2019. Gekko 3.0 official release, patch #3

  • Ini: gekko.ini files are now run before statements given as parameters to gekko.exe
  • Introducting <l> and <dl> operators for both SERIES and PRT/PLOT. Note that you can also use for instance log(x) or dlog(x) on the left-hand side in SERIES.
  • New option series data missing = zero, treats missing value in an observation as if it was 0 (zero). The new local option <missing = ignore> can be used for SERIES and PRT/PLOT/SHEET. The local option sets “option series array print missing = skip; option series array calc missing = zero; option series data missing = zero;”, and reverts these options afterwards. The option makes Gekko work a bit like GAMS regarding missing subseries and missing data values.
  • Some FOR loop cleanup. The return type in FOR loops is now checked. And it is now possible to do a date loop if one or both of the … TO … variables is a positive integer (will be interpreted as year). For instance FOR date %d = 2001 to 2003 or FOR date %d = 2001 to 2003a1 both work.
  • You may now use x[#i] in list definitions and other places where you would write for instance x[a], x[b], etc. For instance, “#i = a, b, c; #m = x[#i], x[d];”, resulting in the list ‘x[a]’, ‘x[b]’, ‘x[c]’, ‘x[d]’. This can also be used in other commands that would accept items like x[a], x[b], etc.
  • Export of matrices to Excel now possible. For instance: “EXPORT <xlsx> #m file = matrix.xlsx;”. This will export the matrix #m to the file matrix.xlsx. Note that this only works for the default Excel engine (OPTION sheet engine = internal). Such a matrix can be imported from Excel with SHEET <import matrix>.
  • New OPTION model gams dep method = lhs | eqname for GAMS models. Default is ‘lhs’, where Gekko tries to find the dependent variable in an equations by looking at the left-hand side (lhs). If the option is set to ‘eqname’, Gekko will instead look at the equation name. If this is, for instance, ‘e_pc_tot’, Gekko will use ‘pc’ as dependent variable (so Gekko always takes the second element divided by ‘_’ characters). With MODEL <dep = …>, an additional list can overrule this if needed for some variables.
  • PC-Axis files (.px) can now use “time” instead of “tid” to indicate the time dimension.
  • Link to list of variables now given when Gekko is reporting that there are non-model timeseries in the databank or non-databank timeseries in the model.
  • Updated helpfile with syntax diagrams for the more visually inclined.
  • Some bugfixes.

Version 3.0.2 — 7/6 2019. Gekko 3.0 official release, patch #2

  • Bugfix: The combination of PRT<r>/<m>/<q> together with a summation like sum(#i, x[#i]) did not work.
  • Bugfix: exist() function did not work.
  • DOC<browser> now handles data generation programs with new 3.0 series syntax.
  • OPTION series failsafe. When this option is set, Gekko will abort with an error message, when a series statement like for instance y = x; or y[2020] = %v; tries to insert an observation containing a missing value into the left-hand series. The option can be practical for debugging Gekko command files (.gcm), if the source of a missing value is hard to track. The option is only intended for debugging purposes.
  • GAMS models: possibilities regarding how to identifiy left-hand side variables. See MODEL <dep=…>, MODEL<dump>, and OPTION model gams dep current = … .

Version 3.0.1 — 26/4 2019. Gekko 3.0 official release

  • Searching in Local/Global databanks is now activated for SIM-mode (and option databank search = no).
  • BLOCK command. The BLOCK command can set time and other options (including frequency) inside a BLOCK; … ; END; block. After the END statement terminating the block, the time period and other options are reset to their original values. Hence, BLOCK is practical for temporary settings, for instance inside procedure or function definitions. The BLOCK command is the only way to set the <dyn> option for several series statements at the same time, for instance: “BLOCK series dyn = yes; y1 = y1[-1] + 1; y2 = y2[-1] + 1; END;”.
  • Listfiles now used naked list logic to see whether elements like 007 or 1e5 should be understood as strings or values.
  • List expressions like “#m = a,;” are now legal, creating a 1-element list with the string ‘a’. Note the trailing comma.
  • “y = 1 rep *;” is now legal –> any rep * like that with no commmas are just ignored.
  • Disallowing #y = #x + %s, or #y = %s + #y, adding a list and a string. Will now fail with an error asking to use .suffix() or .prefix() instead.
  • OPTION system clone = yes|no. Set as yes as default. If no, if a user function or procedure has a series, list, map or matrix as input, and an element inside this is changed, there will be side-effects. Setting the option to yes (default) costs some speed for large objects, but pass-by-value is easier to understand and therefore used for now.

Version 2.21.11 — 9/4 2019. Gekko 3.0 beta #11.

  • Allowing y <2010 2020> = 100, as an alternative to <2010 2020> y = 100.
  • Naked lists now possible for simple numbers, e.g., “y = 1, 2, 3;” as a series statement.
  • Using/defining a local option field like “f(<2001 2002), x)” and “f <2001 2002> x” in user functions and procedures is now possible.
  • DECOMP improvements.
  • Use of <t1 t2> in these functions: avgt(), sumt(), hpfilter(), laspchain(), laspfixed(), pack(), unpack(), time(). The old way of calling them is still legal. For instance, instead of hpfilter(x, 1996 2004, 10, 0), the form hpfilter(<1996 2004>, x, 10, 0) is used instead, or in the UFCS variant: x.hpfilter(<1996 2004>, 10, 0).
  • TRANSLATE<move> and <remove> to move the option field in SERIES, or to remove superfluous parentheses, also in SERIES.
  • Series source: for instance “y = x + 5” will show up in the source metadata field.
  • Missings allowed in naked lists (for instance m()), and also rep. Some logic finetuned regarding naked lists, and assignemnts.
  • PRT of a pure list will now get formatted items.
  • Write of zip-files more robust (including .gbk files). Can be turned off with OPTION bugfix gbk = yes.
  • OPTION series dyn = yes|no — has a message that this option will be removed soon.
  • Removed qSUM, mSUM, etc. in PRT/SHEET. Will be implemented properly soon.

Version 2.21.10 — 25/3 2019. Gekko 3.0 beta #10.

  • Gekko can now automatically translate from 2.0/2.2/2.4 to 3.0. See TRANSLATE<gekko20>.
  • “option series dyn = yes;” and “<dyn> x = x[-1] + 1;” is implemented. When global or local dynamic option is set, periods are calculated one by one, so that lags accumulate. Dynamic mode costs performance, so it is not recommended unless really needed. Dynamic mode is only activated if the option is active AND both the left-hand and right-hand side of the expression are timeseries.
  • option model type = default | gams. This option will affect the way ENDO/EXO, UNFIX, DISP work.
  • The format() function now accepts both width and format, for instance format(%v, ’12:0.000′) to get a string 12 characters wide, with exactly three decimals. Alternatively, format(%v, ‘-12:0.###’) would get a string 12 characters wide, with at most three decimals, left-justified. The width, left- and right-justified also works with dates and strings, for instance format(%d, ’12’) or format(%s, ’12’). See more in the help under functions.
  • Use format with {}-curlies inside strings, cf. OPTION string interpolate format val = … ; For instance: set it to ‘6:0.00’. With this option, a string like ‘Value = {%v}’ will insert the value %v formatted with a 6 character wide field, where the value is shown with two decimals. The option works in the same way as ‘Value = {format(%v,’6:0.00′)}’. The option only works on {…}-expressions inside strings.
  • FOR bugs fixed, so that e.g. FOR val %i = (1, 2, 3, 4); … now works.
  • DECOMP improvements.
  • DELETE<nonmodel> working again
  • READ will again create model vars if not existing
  • Function getfile() renamed to readfile().
  • unpack() has reordered parameters regarding time period.
  • getfile() is now readfile(). Function writefile() added.
  • When naked lists like #m = 1, 2, 3; are used, the elements are always treated like strings, corresponding to (‘1’, ‘2’, ‘3’). There are now some guidance in the error messages, suggesting to add enclosing parentheses, like #m = (1, 2, 3); This should help avoid errors like x = 1, 2, 3; where x = (1, 2, 3); should be used.

Version 2.21.9 — 8/3 2019. Gekko 3.0 beta #9

  • First and foremost: the Gekko user manual for 3.0 has been thoroughly revised.
  • The user manual can now be read in a pdf version, too.
  • Bugfix: Fixing the problem with PRT {‘*’} not giving meaningful labels.
  • Bugfix: for instance “if(1==1); #m = [1, 2]; end;” did not work.
  • Bugfix: “x = 100; x = series(2); x[a,b]=100;” failed. Now, a new series is always created if rhs is an array-series
  • Bugfix: “procedure string #x; … ” did not produce error. Now such types are sigil-tested in the parser.
  • “TELL;” is now possible (empty line).

Version 2.21.8 — 26/2 2019. Gekko 3.0 beta #8

  • Breaking change: IMPORT and EXPORT without explicit period behave differently, since they now obey the global time period. You can use IMPORT<all>, EXPORT<all> to emulate old behaviour, or set OPTION bugfix_import_export = yes|no. The option is not really a bugfix, since the 3.0 changes regarding IMPORT and EXPORT without explicit period are intentional. If the option is set to yes, Gekko 3.0 will behave like pre-3.0 version
  • A new name type is introduced for function and procedure arguments. You may define for instance “FUNCTION series f(name %x); RETURN ref:{%x}; END; PRT f(a1);” Then f(a1) will find the series a1 in the the Ref databank. Prior to this, the following would have been the only way: “FUNCTION series g(string %x); RETURN ref:{%x}; END; PRT g(‘a1’);”. In that case, quotes would have to be used in g(‘a1’). Similarly regarding a procedure: “PROCEDURE f name %x; PRT ref:{%x}; END; f a1;”. Again, using the NAME type means that “f a1;” can be used instead of the more cumbersome “f ‘a1’;”. Inside the function/procedure, the name %x works just like a string %x, so the name type only has to do wish to be able to omit the quotes when calling a function/procedure.
  • You can now put a gekko.ini in the program folder (the folder that contains gekko.exe). Such a gekko.ini will be run before any gekko.ini in the working folder.
  • Wildcards like {‘a*b’} can now be written simply a*b in the relevant commands like COPY, INDEX, DISP, etc.
  • Lists now accept any letters and digits, so “#m = b12, a38, 23, 007, 1e10;” is equivalent to “#m = (‘b12’, ‘7z’, ’23’, ‘007’, ‘1e10’);”. Please note that a list like “#m = 1, 2, 3;” will contain the three strings ‘1’, ‘2’, ‘3’, not three values. For the latter, use “#m = (1, 2, 3);”.
  • Array-series algebra: you can now use +-*/ together with values, series or array-series, for instance x/1000, where x is an array-series.
  • “INDEX ***” is possible (all vars in all banks)
  • New inbuilt functions for dates: getyear(%d), getquarter(%d), getmonth(%d), getfreq(%d), getsubper(%d), date(%y, %f, %sub), date(%d, %f, %startEnd)
  • TIME now accepts dates that do not match the current frequency.
  • String indexing with integers and ranges allowed. If %s = ‘abcd’, we have %s[2] = ‘b’, and %s[2..3] = ‘bc’.
  • piece() function for strings renamed to substring()
  • EXPORT<gcm=…> changed syntax to EXPORT <gcm op=…>, and the operators ‘*’, ‘+’, ‘^’, ‘%’ are now ‘*=’, ‘+=’, ‘^=’, ‘%=’.
  • Function index() works for strings like for lists.
  • Fixed pchy(), dlogy(), dify()
  • In OLS, the parameters matrix is now #ols.param, not #ols.coeff. OLS labels now ok.
  • Bugfix: MODEL would crash the second time it was called, due to some caching bugs.
  • Rename: OPTION interface table printcodes –>  Option interface table operators.
  • DOC<browser> and IMPORT<collapse>, REBASE, COUNT works in 3.0
  • A lot of work on the Gekko help system. Also style changes, up to and including the command CREATE.

Version 2.21.7 — 16/1 2019. Gekko 3.0 beta #7.

  • Better error messages when there is a run-time error inside a function or procedure.
  • IMPORT<aremos> reads AREMOS dump-files, produced this way (can read lists, and series will get the right label/source and full decimals).
  • Fix info from .gdx files is stored, and shown in DISP. DISP can now show elements, DISP x[a]
  • replace() inbuilt function for series, replacing one value with another.
  • isopen() inbuilt function
  • Fixed minor bug related to missings and zeroes in COMPARE.
  • OPEN<create> introduced. If the .gbk databank already exists, OPEN<create> is identical to OPEN. But if the .gbk databank does not exist, OPEN<create> will open an empty databank. In this sense, OPEN<create> is similar to OPEN<edit>, but OPEN<create> does not open the databank in the first position, and it does not open the databank as editable. Therefore, UNLOCK may have to be used after an OPEN<create>.
  • Listfile improvements
  • Stack trace improvements, especially when calling user-defined functions and procedures. Procedures and functions now accept up to 14 arguments.
  • Bugfix related to #(listfile {%x}), where %x is a control variable
  • Smooth with overlay: SMOOTH ts3 = ts1 OVERLAY ts2;
  • Two bugs fixed: x[f()] did not work, since a function was not recognized if it was the only part inside indexer […]. Also, there was a problem with fixed period indexes, for instance x[2000q3], if this was used in expressions.
  • Fixed potential infinite regres in #alias renaming

Version 2.21.6 — 14/12 2018. Gekko 3.0 beta #6.

  • DECOMP is working again, but only for expressions at the moment (full DECOMP will soon be available).
  • Speedups of expressions, including sums like sum(#i, x[#i]), but also other timeseries operations. The speedups can be large, in some cases a factor 10 or more (especially for long time periods). DECOMP of expressions with many contributions benefit from this, too. If the speedups cause problems or crashes, set OPTION bugfix speedup = no.

Version 2.21.5 — 27/11 2018. Gekko 3.0 beta #5.

  • Bugfix related to domains set on array-series (the field did not get copied when a databank is cloned).
  • Printing of nested lists: “PRT (1, (2, 3));” etc. will now print correctly.
  • Bugfix: naked object functions like “#m.print();” work again.
  • Labels in PRT/PLOT etc. work again, for instance “PRT fy ‘gdp’;”, or “PRT fy %label;”, where %label contains the string.

Version 2.21.4 — 20/11 2018. Gekko 3.0 beta #4.

  • Compilation and running of large gcm files much faster, using “option system code split = 20” as default. Set this option to 0 is the version fails mysteriously.
  • SHEET works (still not 100% properly for quarters and months though).
  • Faster Excel engine implemented (switch off with “option sheet engine = excel”).
  • PLOT-buttons are activated with for instance PLOT<p> …
  • CUT-command to close all PLOT and DECOMP windows.
  • Menu button to do the above.
  • #(listfile …) now accepts filenames.
  • Function sec() now accepts two dates as input.
  • Using remote.gcm should now work more like direct input.
  • IMPORT and EXPORT works with options <gcm>, <flat>, <cols>, and xls(x) files are ok.

Version 2.21.3 — 13/11 2018. Gekko 3.0 beta #3.

  • For remote control of Gekko, you may use OPTION interface remote = yes, combined with OPTION interface remote file = … to indicate where remote.gcm is located.
  • You may use an #alias list to ease the transition between old and new variable names. For instance: “option interface alias = yes; global:#alias = ((‘fy’, ‘c[a]’), (‘fe’, ‘c[b]’)); c = series(1); c[a] = 100; c[b] = 200; prt fy, fe;”. The list #alias should be put in the Global databank, and should be a list of two-element lists (name before and name after). You may use a two-dimensional listfile instead, reading it with “global:#alias = #(listfile alias);”. This will look for the file alias.lst, where the first line could be “fy; c[a]”, and the last line “fe; c[b]”.
  • The simulation part is working again. The only command related to simulation that is known to not work is DECOMP.

Version 2.21.2 — 8/11 2018. Gekko 3.0 beta #2.

  • The version no longer says it is an alpha version, and the user manual has been updated regarding the LIST, INDEX, COPY and RENAME sections, especially regarding wildcards (more meaningful now).

Version 2.21.1 — 6/11 2018. Gekko 3.0 beta #1.

  • This is the first version in the Gekko 3.0 beta series. Version 3.0 contains a large number of changes relative to 2.3.12, too many to list here. You may consult the help system (F1), on the “New features” page.

Version 2.5.2 — 12/12 2019

  • Statistics Denmark (Statistikbanken.dk) now requires TSL 1.2 for connections to their API. Therefore, DOWNLOAD is adjusted to accomodate that.

Version 2.5.1 — 26/11 2019

  • Submodels possible, fetching equations from different .frm files.
  • Future-proofing regarding READ of future databanks in the 3.1.x series, with new variable types and frequencies.

Version 2.4.2 — 12/12 2019

  • Statistics Denmark (Statistikbanken.dk) now requires TSL 1.2 for connections to their API. Therefore, DOWNLOAD is adjusted to accomodate that.

Version 2.4.1 — 26/11 2019

  • Reading of Gekko 3.1.x and 3.0 databanks (databank version 1.2): extracts normal series, timeless series and array-series of all frequencies, including labels etc. Does not handle time-truncation like “READ <1990 2010> mybank;”, and will not extract vals, dates, strings, lists, maps or matrices (this could be done quite easily if needed, except for maps). The component is future-proof regarding future databanks in the 3.1.x series, with new variable types and frequencies.
  • Link to list of variables now given when Gekko is reporting that there are non-model timeseries in the databank or non-databank timeseries in the model.
  • OLS can dump results as equations, cf. OLS<dump=… dumpoptions=…>.
  • New “OPTION importexport = yes”. If set to yes, IMPORT and EXPORT will respect the global time period if no local time period is set in the IMPORT and EXPORT statements. Per default this is switched off. If activated, IMPORT and EXPORT will be similar to the behavior in Gekko 3.1.x / 3.0 and AREMOS.
  • IMPORT<all> and EXPORT<all> introduced, can be used together with OPTION importexport = yes.
  • READ<tsd> reports line number if something fails
  • Function and procedure overloads now possible (different number of parameters distinguished).
  • fromseries() functions accepts a series input.
  • Possible to put a gekko.ini next to gekko.exe. This gekko.ini is run before a gekko.ini in the working folder. Same logic as in 3.0.
  • Text and examples corrected in databank comparison and residual check windows.
  • Bugfix: function/procedure did not work with OPEN, READ and OPTION.
  • Bugfix: gekko.ini files were run AFTER parameters to gekko.exe (for instance: “gekko.exe RUN myfile.gcm;”). This does not make sense, such parameters should work just as if the commands were typed in the Gekko window.

Version 2.3.12 — 10/9 2018

  • A small fix regarding automatic J-factors.

Version 2.3.11 — 12/7 2018

  • This version allows importing Excel data with higher frequencies than months, and collapsing (aggregating) this into monthly, quarterly or annual timeseries, see IMPORT<collapse> and the examples in the help file under IMPORT. This is a step forward in regards to the use of higher-frequency data, until higher frequencies are built into Gekko.
  • EXPORT<cols> is now supported for .prn and .csv files.

Version 2.3.10 — 11/6 2018

  • PROCEDURE implemented. A procedure is kind of like a function without return values.

Version 2.3.9 — 16/5 2018

  • Robust newton, OPTION solve newton robust = yes.
  • Integrated xlsx import/export, via EPPlus open source project. More stable, faster, and independent of Excel being installed. OPTION sheet engine = internal (can be set to ‘excel’).
  • IMPORT<ser>. A series-like format that resembles SERIES statements.
  • Better abort with read square button on user interface
  • DOC<browser> for stand-alone html browser generation (equivalent to DISP).
  • Px read fix
  • Fix of DOWNLOAD with stored table.

Version 2.3.8 — 6/10 2017

  • Some fixes regarding read and write of gdx files.
  • Introduces m() as synonym for miss(). This creates a missing value.
  • The iif() function handles missing values better.

Version 2.3.7 — 25/9 2017

  • Faster GAMS gdx read, using the low-level GAMS API. Set “OPTION gams fast = no;” to revert to the slower and perhaps more robust API. Reads about 5-7 times faster than before. Can be even faster, but this has to wait for Gekko 3.0.
  • EXPORT<series> will now taste the .gcm file to see if it can be overridden safely without user intervention (if the file seems Gekko-generated). EXPORT without printcode will now omit the irritating ‘n’, so instead of SERIES <2010 2020 n> … it will become SERIES <2010 2020>…. .
  • TABLE now handles x[‘a’], etc.
  • SYS tries to do better cleanup regarding processes.

Version 2.3.6 — 20/9 2017

  • New options regarding GAMS (gdx) import: option gams time detect auto, option gams time offset, option gams time prefix, option gams time set. Sets are now imported from GAMS, only 1-dimensional though. See the help file regarding the IMPORT command. There is also a new OPTION series array ignoremissing.
  • PRT/PLOT of array-series possible, for instance PRT x[‘a’, #i], where the #i list is unfolded. Lags can be used, but not expressions in general.
  • Export of data to R can be done more easily (than via the R interface) with EXPORT<r>.
  • New time() function returns the time, for instance y = time(). Practical for constructing trend variables etc.

Version 2.3.5 — 7/7 2017

  • EXPORT<gdx> implemented. This will write array-timeseries to a gdx file (GAMS).
  • Remote control of Gekko possible. With OPTION interface remote = yes, if you create or change a command file named remote.gcm in the working folder, Gekko will run all the commands in the file. If you can set up a text editor to output selected text to such a remote.gcm file, this is a way to make the editor take control of a Gekko session (many editors, for instance Sublime Text, can do this).

Version 2.3.4 — 2/6 2017

  • Summation over array-timeseries, for instance sum(#i, x[#i]), where x is an array-timeseries, and #i is a list with dimension elements. Such summation works for PRT, PLOT, etc.
  • Possibility of DOWNLOAD<array> and IMPORT<px array> to get px-files into array-timeseries.
  • Note: array-timeseries are still very experimental!

Version 2.3.3 — 1/6 2017

  • MATRIX <rownames=… colnames=…> implemented. This is used to decorate a matrix with names/labels instead of raw row/column numbers.
  • Functions avgt() and sumt() perform averages/sums over time. For instance “PRT y, avgt(y);” will print ‘y’ and its average over the current period. The period can be indicated in the function arguments.
  • CLOSE works with a list of databanks, for instance CLOSE b1, b2, b3;
  • More help when a timeseries is not found, when for instance doing “PRT y;”. Gekko will now tell the user if ‘y’ exists in other open databanks, and/or exists with other frequencies than the current.

Version 2.3.2 — 31/5 2017

  • Some small bugfixes mostly related to IMPORT<px>

Version 2.3.1 — 22/5 2017

  • This version first and foremost implements array-timeseries (sparse arrays containing timeseries). For instance, with the sectors ‘a’ and ‘b’, an input-ouput cell may be stated like io[‘a’, ‘b’], that is, the flow from sector ‘a’ to sector ‘b’. In Gekko 2.2 and older, the user would have needed to come up with a naming scheme, for instance using ‘ioab’ or ‘io_a_b’ as the variable. But the array-timeseries are not just naming schemes: they enable, among other things, compact looping and summation. The array-timeseries are implemented for their own sake, and also to cope better with GAMS and multidimensional data in general (cf. the DOWNLOAD command).
  • The array-timeseries work normally on the right-hand side of expressions (like SERIES, PLOT, etc.), but at the moment, in order to use them on the left-hand side of a SERIES, you have to use ASERIES (or ASER) as the command name. SERIES and ASERIES will be merged eventually.
  • The following indicates how the array-timeseries can perform implicit looping over lists. So the last statement implicitly loops over 3 * 2 = 6 SERIES statements. Note the use of the $-condition. The term #i0[#i] restricts the y[#i, #j] expression to return 0 for the elements of #i that are not part of #i0. So the last statement is, in this case, equivalent to “ASER x[#i0, #j] = 1 + y[#i0, #j] + z[#j];”.
    RESET; MODE data;
    LIST i0 = a, b; LIST i = a, b, c; LIST j = x, y;
    ASERIES y['a', 'x'] = 100; ASERIES y['a', 'y'] = 101; 
    ASERIES y['b', 'x'] = 102; ASERIES y['b', 'y'] = 103;
    ASERIES z['x'] = 1000; ASERIES z['y'] = 1001;
    ASERIES x[#i, #j] = 1 + y[#i, #j] $ #i0[#i] + z[#j];
  • The $-operator can be thought of as an IF-condition. After the following statement, y will be = 3 if the VAL %v = 9. If not, y will be = 0: “SERIES y = 3 $ (%v == 9);”.
  • Note: the $ operator/sigil is no longer allowed for scalars. It was used to promote a NAME scalar to a STRING scalar, but the $ is needed for $-conditions, to comply more tightly with GAMS syntax. In any case, the former $ operator was a bit confusing, and instead of $x or $%x (where x is a NAME scalar), the user can just use ‘%x’ (single quotes) or string(%x).
  • Note: next in line of the development is the sum function, for instance sum(#i, y[#i, #j]), summing over the #i dimension.
  • IMPORT<px> is implemented (import of PC-Axis files). See the IMPORT command.
  • IMPORT<gdx> is implemented (import of GAMS-files). See the IMPORT command.

Version 2.2.5 — 29/4 2017

  • PLOT enhancements. You can use PLOT<bold=…>, PLOT<italic=…> and PLOT<gridstyle=…>. The gridstyle is changed to dashed per default. Fixed a bug with <ymirror> where the right axis labels did not have the right size.

Version 2.2.4 — 3/4 2017

  • Some PLOT improvements. Quarterly and annual frequencies now use labels between tics, whics is more natural. You can use “option plot decimalseparator = comma” to use commas instead of periods for numbers (on labels). Set “option plot xlabels annual = between” to put annual (and undated) labels between tics. Set “option plot xlabels nonannual = at” to put quarterly and monthly labels at tics (like version 2.2.3 and before). Set “option plot xlabels digits = 2” to use only two digits for years (17 instead of 2017 etc.). This option only applices to ‘between’-labels, not ‘at’-labels. Lastly, you may use PLOT<grid=xline> or PLOT<grid=yline> to fine-tune the grid.

Version 2.2.3 — 1/3 2017

  • Matrix functions divide(#a, #b) and multiply(#a, #b) now accept row- or column vectors for #b, even if #a is not a non-vector matrix.
  • Bugfix: “SERIES y = dif(x) + dif(x);” and similar did not work. The lag-handling code has been completely rewritten. To revert to the old version of this lag-handling code, you may use OPTION interface lagfix = no.

Version 2.2.2 — 24/2 2017

  • CREATE, DELETE, TRUNCATE and X12A now accept bank:name or bank:#list.
  • INDEX, RENAME and X12A accept <bank=…> option.
  • Function lag() introduced.
  • A few bugfixes.

Version 2.2.1 — 23/2 2017

  • Function pack() works with lists.
  • Functions laspchain() and laspfixed() will search for timeseries if in data mode.
  • Function chol() for Cholesky decomp.
  • Function rnorm() can be multivariate.
  • Improvement of how lag functions are handled internally. Consider for instance “PRT movavg(pch(y), 5);”. To keep this calculation minimal without creating intermediate objects (timeseries), this entails nested looping. First, there is the general time looping, then there is a 5-period loop with movavg(), and last there is a 2-period loop with pch(). This is now done consistently, so in the future such functions will be easier to implement. Switch this off with “option interface lagfix = no”.
  • Failed reading of .gbk banks will point to Gekko homepage for help.
  • Some minor bugfixes.

Version 2.1.10 — 3/2 2017

  • New REBASE command.
  • Functions dify(), diffy(), dlogy(), pchy(). These are yearly differences, relevant in quarterly or monthly settings. The functions work both in command and model files (and also on the left-hand side of model equations).
  • Functions movavg() and movsum() to provide moving averages/sums over time periods. The functions work both in command and model files (only on the right-hand side of model equations).

Version 2.1.9 — 27/1 2017

  • Improvements regarding SERIES: stuff like SERIES y = 1 -2 -3*x will now work.
  • Four new table options: option table mdateformat, option table decimalseparator, option table thousandsseparator, option table stamp. With these options, a number like 12345.67 can be printed as 12,345.67 or 12.345,67, and monthly dates can be formatted as for instance ‘Jan. 2020’ instead of ‘2020m1’.
  • Functions rseed(), runif(), and rnorm() for random numbers.
  • OPTION databank file gbk internal, set to ‘databank.data’.
  • “VARLIST;” in addition to “VARLIST$” possible in model files.

Version 2.1.8 — 15/11 2016

  • Improved PLOT, with many possibilities. Plots can be controlled via PLOT options, or via .gpt files (xml files containing graph settings). See the help system (F1), under PLOT. Used gnuplot version upgrated to 5.1. See the gallery page.
  • XEDIT command, calling up a dedicated xml editor (XML Notepad). The xml editor is included in the distribution, and can be used for PLOT files (.gpt) and TABLE files (.gtb).
  • SHEET<import matrix> to import a matrix from an external Excel file.
  • PIPE<pause> and PIPE<continue> for easier switching between piping and non-piping. PIPE<stop> to stop piping and write the file (synonym for “PIPE con;”).
  • Bugfix regarding PRT options.

Version 2.1.7 — 24/10 2016

  • OLS command has linear restrictions on parameters, by using IMPOSE. IMPOSE uses a restriction matrix, so the syntax is different from AREMOS. Use with some care, needs thorough testing. A constant term is now automatically added, unless <constant=no> is used. Parameter correlations are stored in the #ols_corr matrix.
  • The AREMOS translator has some enhancements, and perhaps most notably IF statements with ‘<‘ or ‘>’ will no longer confuse the translator into looking for <…> options.

Version 2.1.6 — 11/10 2016

  • OLS command improved. Nicer screen output, and parameters, predicted values, residuals, etc. are accessible.
  • EXIT now works when calling gekko.exe as a batch job.
  • Bugfix regarding Excel file reading/importing. Performance and memory issue seems solved, not leaving hidden Excel processes behind.

Version 2.1.5 — 7/10 2016

  • INTERPOLATE command. Converts from lower-frequency timeseries to higher-frequency timeseries, for instance from annual to quarterly.
  • MATRIX now works with all kinds of indexers on the left-hand side, for instance MATRIX m[ .. , 2 ] = … ; A bug is fixed so that you can now use a name like {i} on the left-hand side too, for instance NAME i = ‘m’; MATRIX {i}[ .. , 2 ] = … ;

Version 2.1.4 — 29/9 2016

  • DISP accepts banks and wildcards, and “DISP x” will (in data-mode) search for x in open databanks in the databank list.
  • EXPORT (and WRITE) now accepts banks and wildcards if variables are stated.
  • COLLAPSE works with bank names.
  • COPY <error=no> possible. Will just report if any timeseries are not found, but will not abort.
  • INDEX now accepts wildcards separated by comma (wildcards include the use of banknames with colon). INDEX<bank>, puts banknames on list items. Index can also put output in listfile with “INDEX …. listfile mylist;”.
  • LIST. Lists can be trimmed to remove any dublets: “LIST x = ….  TRIM;”. Listfiles allow colons and ‘//’-comments. Listfiles work on left-hand side of LIST statement, for instance “LIST listfile mylist = … ;”.
  • TIME with 1 period possible.
  • NA and “NA” allowed as missing for data IMPORT (prn, csv, etc.). Allows 199503 or 201507 for dates in prn, csv.
  • SPLICE changed, so that it now keeps the levels of the second data period (not the first).
  • LIBRARY command, points to a .gcm containg user functions. More on this soon, needs improvement!
  • gekko.exe parameters from system shell are now loaded BEFORE any local gekko.ini file is run
  • Bugfix: names ‘if’, ‘or’, ‘and’, ‘not’ gave problems, fixed.
  • Bugfix: regarding file names and line numbers when errors occur.
  • Bugfix: IMPORT<sheet> failed when the sheet name was stated.
  • Bugfix in nested parallel loops.
  • Bugfix: Successive PIPEs without PIPE con failed.
  • Quite a lot of work on PLOT, will emerge in version 2.1.5!

Version 2.1.3 — 6/9 2016

  • OPEN (without options) now opens the databank in the last position in the databank list (F2). In version 2.1.2 and before, OPEN opened up in position #2 in the databank list. This means that, for instance, OPEN b1; OPEN b2; in Gekko 2.1.3 will yield the following databank list: Work, b1, b2. The new OPEN logic is easier to remember and complies better with the new CLOSE logic described below.
  • CLOSE does not jump/skip the Work databank anymore. In Gekko 2.1.2 and before, if a non-Work databank was in position #1, closing that databank would make Gekko put the Work databank into position #1, no matter if Work was in position #2 or further down the list. This behavoir is dropped in Gekko 2.1.3, where CLOSE will never change the databank succession list.
  • With OPTION databank logic = [default | aremos], the user can turn on the ‘old’ AREMOS (or Gekko 2.1.2) behavior. This is not advised in general, but can be used as a quick fix if some large data revision setup fails because of the new logic.
  • Note that all of the above is not relevant regarding sim-mode.

Version 2.1.2 — 29/8 2016

  • IMPORT can use local time period, for instance IMPORT<2014 2015>, importing only data from 2014-15. For timeseries of a different frequency than given in the local time period, Gekko will try its best to convert the given local period to the frequency of the timeseries. Local time period works on READ, too, but is primarily intended for IMPORT.
  • Menus can now call command (.gcm) files. For instance, you may put this html link into your menu file: “<a href=”menutest.gcm”>Run menutest.gcm</a>”. When clicking the link, Gekko will behave like a “RUN menutest.gcm;” had been issued.
  • Bugfix: successive OPEN<edit> or OPEN<first> failed. This is fixed.
  • Better handling of null timeseries, for instance after SERIES<2010 2012>x = 5; TRUNCATE<2013 2013>x; This leaves a timeseries with no data, and such timeseries are handled better now (will not be written back to data files, for instance).
  • Undocumented command KILLEXCEL, to kill all Excel processes on the local computer. This command is unofficial, and should be used with care! (Can be practicel after many SHEET, WRITE<xlsx> etc. commands that tend to leave orphaned Excel processes behind).

Version 2.1.1 — 11/8 2016

  • OPEN now opens as editable (protected) per default. You may use LOCK/UNLOCK to change protection status.
  • OPEN<prim> is now OPEN<edit>, which opens up editable in first position.
  • You can use OPEN<first> to put a non-editable databank in first position.
  • You can use OPEN<pos=n> to open in a dedicated position, and OPEN<last> to open in last position.
  • OPEN<save=no> opens a databank that will never be written back to file, even if changed.
  • CLOSE<save=no> close a databank, but does not write it to file, even if changed.
  • READ<prim> is now READ<first>, and CLEAR<prim> is now CLEAR<first>.
  • There are some stability improvements in the R interface.
  • The SERIES statement returns a message if used in an interactive session.
  • New Gekko icons.

Version 2.0.3 — 2/3 2016

  • Bugfix: substitution of {s} and {%s} did not work inside strings. This meant that for instance “PRT x{s};” or “PRT x{%s};” showed this verbatim in the print labels, without in-substituting the name part.
  • Bugfix: There was a problem with calling multiple PLOT’s in a command file, and afterwards hitting for example the ‘%’ radion button.
  • The help file topics have been updated. So clicking ‘Index’ on the help file is now much more meaningful!

Version 2.0.2 — 22/2 2016

  • Fixing some minor glitches, mostly related to PRT/MULPRT and printcodes. Also some help file updates.

Version 2.0.1 — 12/2 2016

  • Gekko 2.0 is now official, no more beta’s and gammas (for now)! But there will probably be some patches in the 2.0 line…
  • New option ‘OPTION interface databank swap = yes|no’. If ‘yes’, databank swapping via the F2 windows is allowed, else not. The UNSWAP command is kept, since it has its purposes and does not harm in itself (it is similar to CLOSE *).
  • Improved layout regarding html tables and print-code clicking. Now, a link with the text ‘Transform options’ is provided, and the print-codes fold out when clicking. The printcodes are set up in a way that mimics the DECOMP window layout a bit. This link can be deactivated with OPTION interface table printcodes = no.
  • Bugfix: PRT<filter=avg> and these timefilters in general seem to work again (hopefully, not tested completely).
  • Bugfix: A bug made the input window stay gray after an error.
  • Bugfix: Table navigation with the new print-code buttons (in html mode) did not work properly when navigating back.
  • Bugfix: In command files, we might imagine having these commands: ‘DECOMP fy; DELETE fy.’. This should be possible, since ‘DELETE fy’ should wait for the decomp windows to finish loading data. But this is not what happened, because Gekko asked the window to open in parallel, while continuing the commands (the DELETE statement). This means that when the decomp window opened, the ‘fY’ variable had gone. This is fixed, so that the Gekko program waits for the decomp window to initialize.

Version 2.0 gamma 10 (technically version 1.21.20) — 10/2 2016

  • New COUNT command (simple version of INDEX command).
  • INDEX command will now print the found items (series) on screen, unless you use INDEX<mute>.
  • Flowcharts have been around for a while as an experiment, but are now made more visible to the user. Try DECOMP some variable, and choose either a ‘Time-change’ or ‘Multiplier’ option. After this, you may right-click a particular time period in the row of time periods. These flowcharts are still experimental, and should be further prettified. What they do is essentially to track the contributions recursively (the contributions shown when you choose ‘Show as shares’). Green arrows are positive contributions, and red arrows are negative contributions, and the arrow widths reflect their sizes.
  • Quitting Gekko through the user interface will now issue a warning box no matter how you do it (including Alt-F4). Still, the EXIT command will quit without warning (so that Gekko may run jobs without user intervention).
  • Bugfix regarding printcodes in tables fixed (sometimes the printcodes were unresponsive)
  • Bugfix regarding WRITE <xlsx> #list file=…. , and other types than xlsx, too. This did not work for quarterly and monthly frequencies.

Version 2.0 gamma 9 (technically version 1.21.19) — 8/2 2016

  • The mode colors have been removed from the input field and moved to the status bar instead.
  • When you hit ‘Close’ (X) on the main Gekko windows, you will have to confirm quitting. This is to avoid losing Gekko code/commands inadvertently.
  • The function fromSeries() can now return the start and ending dates of the actual (non-missing) data in the timeseries, using parameters ‘dataStart’ or ‘dataEnd’. Use for instance DATE d = fromSeries(‘fX’, ‘dataStart’).
  • Bugfix: there was a bug related to X12A and monthly data.
  • Bugfix: in the DECOMP window, you could not click on contributions (precedents) if you were not showing ‘raw’ data.
  • Bugfix in help files: You must use SERIES<keep=p>, and not just SERIES<keep>.

Version 2.0 gamma 8 (technically version 1.21.18) — 5/2 2016

  • The names of the file extensions have changed. So ‘gek’ is now ‘gcm’ (command files), ‘tsdx’ is now ‘gbk’ (databank files), and ‘tab’ is now ‘gtb’ (table defintion files). You should rename accordingly. At some point in the future, ‘frm’ will become ‘gfm’ or something similar.
  • The MODE command now sets colors: green for sim, blue for data, and yellow for mixed.
  • New ‘OPTION system code split’. This splits up generated C#-code internally into smaller methods, which makes long non-looping command files compile and run faster. Default value is 10, but the value of 0 switches this code-splitting off completely if it poses problems.
  • Bugfix: There were some problems with SERIES <%t1 %t2> #m = … . This has been resolved.

Version 2.0 gamma 7 (technically version 1.21.17) — 3/2 2016

  • New ANALYZE command (cross-correlations etc.)
  • New ACCEPT command (interactive user input)
  • Preliminary version of printcode-clicking on tables (for instance ‘p’ for percentage growth). Will be refined.
  • CLEAR of Work or Ref now reflects better on the status line at the bottom of the main window.
  • DELETE logic is changed a little bit, so that “DELETE var1;” only gives a warning and not en error, if var1 does not exist (it does give an error, however, if you are trying “DELETE bank1:var1;”, and bank1 is not open). This logic mirrors CREATE, where there is only a warning issued, if the variable already exists.
  • There were a couple of bugs related to NAMEs (or loop-variables). Firstly, you could not do VAL v%n = 100, and secondly, you could not do for instance CREATE %n. In both cases, %n is a NAME. This is fixed.

Version 2.0 gamma 6 (technically version 1.21.16) — 28/1 2016

  • Some bugfixes related to tables called from menus. Other minor bugs have been fixed, too.
  • Quite a lot of improvements regarding the AREMOS translator. See the help file under TRANSLATE (and follow the link to ‘details’) to see the newest capabilities.

Version 2.0 gamma 5 (technically version 1.21.15) — 25/1 2016

  • This version mostly contains TRANSLATE improvements. Both TRANSLATE<gekko18> and TRANSLATE<aremos> now report line and position if the translation breaks down. Both translators now have a detailed list of what is being translated in the help system, see the TRANSLATE help file (and the link to the detailed lists).
  • TRANSLATE<gekko18> now translates ADD to RUN. This translator is more or less done.
  • TRANSLATE<aremos> har quite a few improvements, and translates much of the tedious stuff by now. It is still in continuous development.
  • New iif() function, to avoid explicit time looping when you need to condition on the values of timeseries observations. For instance, SERIES y = iif(x1, ‘<=’, x2, 50, 100); This will compare timeseries x1 and x2 using the logical operator ‘<=’ for each observation, and if the condition is true, y will be set to 50, or else 100. The function accepts any kind of expressions as inputs, but the second argument must be a string. AREMOS has SERIES y = IF … THEN … ELSE …, and the iif() function fills in that gap. The name ‘iif’ comes from VBA and others; using if() would simply be too confusing, since we already allow IF(…) as an if-statement.

Version 2.0 gamma 4 (technically version 1.21.14) — 22/1 2016

  • Quite a few commands did not work properly with other frequencies than annual, due to limited testing on quarters and months. This has been fixed pretty thoroughly.
  • For frequencies quarterly and monthly, printing with PRT/MULPRT is now much nicer, separating the year and the quarter/month, cf. OPTION print freq = [pretty|simple], where ‘pretty’ is default.
  • With ‘pretty’ set (cf. above), you can now use PRT<collapse>,PRT<collapse=avg> or PRT<collapse=total>. This will show averages or totalled values for each year of data. Such collapsing can also be set globally with OPTION print collapse = [avg|total|none]. See also the similar COLLAPSE command.

Version 2.0 gamma 3 (technically version 1.21.13) — 18/1 2016

  • Importing data from Excel files cell-by-cell is now possible with SHEET<import>. SHEET<import> puts any sequence of Excel cells into timeseries, from any location in the spreadsheet. (Hitherho, the SHEET command could only export to Excel, and this means that the AREMOS procedures EXCELIMPORT and EXCELIMPORT are now both fully supported).
  • The databank logic has been changed somewhat. The distinction primary/secondary is dropped, and instead the secondary databank (which in Gekko 2.0 was called the baseline databank) is called thereference databank (the primary databank keeps its name). Syntax change is therefore READ<ref> instead of READ<sec>. Similarly, OPEN<ref> instead of OPEN<ref>, even though opening a bank like this is not really recommended. In the F2 window, the reference databank is in the second row as before, but it is now labelled ‘REF’ instead of ‘2’. This is because the reference databank is not searchable with OPTION databank search = yes. The reference databank is simply skipped when searching databanks for timeseries, which makes things a bit more simple especially in data-mode. So when databanks are searched, Gekko starts with row one on the F2 list (labelled ‘1’), then skips row two on the F2 list (labelled ‘REF’), then searches row three on the F2 list (labelled ‘2’), then searches row four on the F2 list (labelled ‘3’) and so forth.
  • As a concequence of the above, you may now use ref:x as an alternative to @x, and in general the ‘sec’ keyword is replaced with ‘sec’, for instance CLEAR <ref>. Some of the short printcods have been in concequence, so that it is no ‘r’, ‘rd’, ‘rp’, and ‘rdp’ instead of ‘s’, ‘sd’, ‘sp’, and ‘sdp’.
  • The reference databank is only shown in the F2 window when it contains variables. Hence, in data-mode, the reference databank usually does not show up in F2 at all.
  • EXPORT<gnuplot> has been added. It writes a prn-like format suitable for gnuplot.
  • “MODE ?” and “TIME ?” possible.
  • TRIMVARS is now DELETE<nonmodel>.
  • PLOT can (again) produce files with FILE=filename (.emf, .svg or .png).
  • A bug regarding EXPORT<xlsx> is fixed.

Version 2.0 gamma 2 (technically version 1.21.12) — 11/1 2016

  • The new MODE command switches between sim mode (model simulation), data mode (data revision programs etc.), and universal mode (a synthesis of sim and data mode). This command will be continuously refined.
  • UPD has been merged into SERIES, so please use SERIES (or SER) instead of UPD.
  • To supplement the former UPD operators ‘^’, ‘%’, ‘+’, ‘*’ and ‘#’, Gekko now has the possibility to also use the so-called short printcodes ‘d’, ‘p’, ‘m’, ‘q’, and ‘mp’, respectively. So you may use “SERIES y ^ 10;” or “SERIES <d> y = 10;” interchangeably. Please note that ‘*’ and ‘q’ must use different input, for instance “SERIES y * 0.85;” corresponds to “SERIES <q> y = -15;”. With the short printcodes, the SERIES and PRT commands are symmetric: for instance if “SERIES <d> y = 5;”, the command “PRT<d> y;” will print out ‘5’. This symmetry holds for all the other short printcodes, that is, ‘d’, ‘p’, ‘m’, ‘q’, and ‘mp’. The <keep> keyword corresponds to the ‘$’ operator, so “SERIES y %$ 7, 5, 4;” corresponds to “SERIES <p keep> y = 7, 5, 4;” (keeping the after-sample growth rate equal to what is was before).
  • UPDPRT has been removed, please use EXPORT instead. For instance, “EXPORT <series = ‘%’> data;” or “EXPORT <series = p> data;” both create a data.gek file with SERIES statements. Use “EXPORT <series>”, to get SERIES statements in levels.
  • LABEL has been renamed to TARGET. LABEL had too many associations to timeseries labels.
  • EDIT command to edit or view files from Gekko (opens up Notepad)
  • Damping in SIM is now defined as 1 minus the old damping, so if you use for instance OPTION solve gauss damp = 0.25, you should change this to OPTION solve gauss damp = 0.75.
  • Timeseries source (expressions) and time stamps are now recorded, when performing for instance SERIES or SIM commands. For instance, after the command “SERIES y = x * x;”, the DISP command will afterwards show this expression as source, and the current date (time stamp) will be kept, too, so that it is easy to see when a timeseries was last changed. Timeseries labels, source and time stamps are stored in .tsdx files, and can be read and written from those (and from .tsd files, see below).
  • When issuing a WRITE command, info regarding the model, last simulation period etc. is kept inside the .tsdx file. This is provided that a model has been loaded, and Gekko checks that all the endogenous variables of the model exists in the primary databank before such model info is written to the .tsdx file. After this, when READing the databank again, a link to this model info is provided, acccessing this information. This can be practical when in doubt about when the variables in a given databank were simulated, the simulation period, the model name and signature, etc.
  • Labels, source (expressions) and time stamps (last change) from .tsd files are now handled correctly, both when reading and writing .tsd files.
  • New DOC command to ‘manually’ change meta information on timeseries. For instance “DOC fY label=’Gdp’ source=’Statistics Denmark’  stamp = ’11-01-2015′;”. You may use empty string ” (two single quotes) to clear, for instance “DOC fy label=”;”.
  • When EXPORTing a .tsd file, the default is now to write the variable names with all caps. This is because AREMOS fails if this is not done. To avoid the caps, you may use option <tsd caps=no>.
  • Bugfix: SHEET or CLIP with more than about 6 times failed. This is fixed.

Version 2.0 gamma 1 (technically version 1.21.11) — 14/12 2015

  • This version is a first gamma version, that is, a so-called release candidate. So the version should be reasonably stable and bug-free, and the syntax is practically frozen (except for really minor stuff). It is expected that this version will soon be released as the official Gekko 2.0.
  • R interface. You can export matrices to R, use them there, and import the R results as Gekko matrices. See the commands R_FILE, R_EXPORT, and R_RUN. Since Gekko already allows easy conversion of timeseries into Gekko matrices (and vice versa), you can easily analyze your Gekko timeseries in R. (Strings and scalars will become transferable soon).
  • Seasonal adjustment of quarterly or monthly data with X12A. See the command X12A, with many parameter possibilities.
  • LINK has been renamed to DOWNLOAD.
  • You can use SERIES ? to see what kinds of series reside in all open databanks (including their frequencies).
  • TRANSLATE command translates files from Gekko 1.8 or AREMOS to Gekko 2.0. The translators are not just string substitution: they use some intelligence to try to figure out how to best translate. The Gekko 1.8 translator is probably reasonably comprehensive, whereas the AREMOS translator deals with much of the tedious stuff, but does not deal with AREMOS specialities or special options.
  • AREMOS translator: it is the intention to let this translator evolve, building upon practical experiences. So stay tuned for improvements!
  • Gekko will use the Gekko 1.8 translator to provide suggestions in the interactive interface, if it seems that you are entering a command in Gekkko 1.8 syntax.

Version 2.0 beta 8 (technically version 1.21.10) — 20/11 2015

  • Redesign of READ/WRITE and IMPORT/EXPORT. See the bullets below.
  • READ now only accepts .tsdx files, use IMPORT for other formats. You can use “READ filename TO bankname;” to put the .tsdx file into a stand-alone databank (use “TO *” to replicate the filename as bankname). So the READ command now suppports some of the OPEN functionality. NOTE: READ (without TO) loads the data into the primarydatabank (without merging), and creates the secondary databank as a ncopy afterwards. . If you need to emulate READ, you should use for instance “CLEAR<prim>; IMPORT<xlsx>data; CLONE;”.
  • WRITE only writes .tsdx files.
  • IMPORT is like READ for non-tsdx files. You can use “IMPORT filename TO bankname;” to put the file into a stand-alone databank (use “TO *” to replicate the filename as bankname). So the IMPORT command now suppports some of the OPEN functionality. NOTE: IMPORT (without TO)merges the data into the primary databank. If you need to emulate READ, you should use for instance “CLEAR<prim>; IMPORT<xlsx>data; CLONE;”.
  • EXPORT only writes non-tsdx files.
  • You may use ‘?’ on more variable types. For instance VAL ?, STRING ?, NAME ?, DATE ?, LIST ?, MATRIX ?. Also, this is possible: VAL ? %v, STRING ? %s, NAME ? %n, DATE ? %d, LIST ? #l, MATRIX ? #m.
  • CLEAR<prim>, CLEAR<sec> are possible, clearing the primary or secondary bank. CLEAR without options will clear the Work and Base databanks, regardless of their positions in the databank list. In addition, you may use “CLEAR mybank;” to clear a particular named databank (including Work and Base). Note that in Gekko 1.8, CLEAR has the same functionality as RESTART in Gekko 2.0, and CLEAR<all> in Gekko 1.8 has the same functionality as RESET in Gekko 2.0.
  • The logic regarding ENDO/EXO has been changed. In Gekko 1.8, setting ENDO/EXO goals would always be enforced, until an UNFIX was issued. In Gekko 2.0, ENDO/EXO goals will only be enforced with SIM<fix>. If you use normal SIM, no ENDO/EXO goals will ever be enforced, even if they are set. So in Gekko 2.0, you have to use SIM<fix> whenever you want the goals to be enforced, but as soon as you do not want them anymore, you can just switch to normal SIM. The reason for the change is that users tend to forget if goals are enforced, so it is better to be explicit about it. To emulate Gekko 1.8 behavior, you can just change all SIM to SIM<fix>, and things will work like in Gekko 1.8, including how UNFIX interacts with simulations. (In Gekko 2.0, the use of UNFIX is more limited than before, because after a SIM<fix>, you can drop the goals by just using a SIM instead of UNFIXing).
  • You can use SIM<static> as a local option (or use the global option OPTION solve static = yes). The option can also be <static=yes> or <static=no>. The static option means that lagged endogenous variables are never solved values, but always databank values.
  • Regarding IMPORT<tsd>, all values numerically < 1.0e-37 are set to 0. This is because numbers in single-precision software packages (like AREMOS) become very imprecise around that limit.
  • Models: you may now use [-1], [-2], … as lag instead of (-1), (-2), … The soft lag parentheses will still be allowed in models, for the time being.
  • You can use the function miss() to indicate a missing value. Useful in SERIES, SERIES, VAL.
  • UPD with $ operator works again.
  • INFO command changed to DISP<info>. No need to have separate INFO command, only used with SIM and failsafe option.
  • RESET and RESTART did not remove the model: this is fixed.

Version 2.0 beta 7 (technically version 1.21.9) — 4/11 2015

  • WPLOT/CPLOT work again. They had been defunct, because the PRT command internals were completely redesigned. But now they work, but they’ve godt new names: SHEET and CLIP. So “SHEET x, y;” opens up a Excel with these variables shown, whereas CLIP does the same thing, but sends the output to the clipboard for pasting.
  • PPLOT has been renamed to PLOT.
  • The SHOW statements now prints out a label/explanation (either the expression itself or a given label). For instance, “SHOW #m;” will print out ‘#m’ as label, whereas “SHOW #m ‘Experiment 1’;” will print out ‘Experiment 1’ as label.
  • You can now (again) use left-side functions in SERIES, for instance “SERIES dlog(y) = … ;”. Legal left-side functions are log, dlog, pch, dif and diff (the last two are synonymous).
  • More sensible errors reported when a function either does not exist, or is called with the wrong number of arguments.
  • Fixed a bug related to timeseries, when these had a stand-alone minus, for instance “PRT -x;”.
  • Using “PRT [*];” where only 1 item matched did not return the name of the item. This is fixed. Also, when “PRT [*];” returns 0 elements, this is reported.
  • There are some potential parsing issues regarding for instance [2*3] and [a*3]. The first one can be use to define a 1×1 matrix, MATRIX m = [2*3], whereas the second one should be understood as matching this wildcard, for instance PRT [a*3] which will find timeseries starting with ‘a’ and ending with ‘3’. To a human, this is not confusing, and it would never be possible to interpret MATRIX m = [a*3] as a 1×1 matrix, since a timeseries a could never produce a scalar unless indexed likea[2015]. But this confuses the parser, but it seems the issue is ok now, with some parser workarounds.

Version 2.0 beta 6 (technically version 1.21.8) — 20/10 2015

  • The major new improvement in this version is a new way of solving with forward-looking expectations, to supplement the existing Fair-Taylor algorithm that may sometimes get stuck iterating without seeming to do much progress. To solve such ‘difficult’ simulation problems, so-called stacked time (a Newton variant) has been tried, and it works fine for smaller models. But for large models, the stacked time Jacobi matrix becomes really large and time-consuming to invert. So instead of the stacked time solver, a new framework is proposed, building upon the Fair-Taylor algorithm. This solver is called Newton-Fair-Taylor (or ‘nfair’), and it works well, particularly for models without too many variables that contain leads. It has the same theoretical solving capabilities and precision as a ‘real’ stacked time solver, but the Jacobi matrix is only of dimension (k*n) x (k*n), where k is the number of variables with leads, and n is the number of time periods. The Newton-Fair-Taylor algorithm is not documented in the help files yet (will be done soon), but for now you can switch it on by simply setting this option: “OPTION solve forward method nfair;”. In the coming weeks, the algorithm will be tested and fine-tuned, but already now it should be a great deal more reliable than the standard Fair-Taylor algorithm, also for large models and large samples.
  • Fixed at bug that meant the you could not use PPLOT with more than 6 variables at a time.
  • Fixed a bug related to matrices, when these had a stand-alone minus, for instance “SHOW -#m;”.

Version 2.0 beta 5 (technically version 1.21.7) — 27/8 2015

  • MATRIX functionality. Quite a lot of matrix stuff implemented, and more to come.
    • Ones and zeroes: “MATRIX c = ones(5, 1);”, or “MATRIX z = zeros(5, 1);”. You may also use zeroes() instead of zeros().
    • Construction: “MATRIX x = [1, 2 || 3, 4];”. This is a 2×2 matrix with 1 and 2 in the first row, and 3 and 4 in the last row.
    • Concatenation: “MATRIX x = [#a, #b || #c, #d]. The sizes of the matrices on the right hand side must conform to each other. So the ‘,’ is used to concatenate row-wise, and the ‘||’ is used to concatenate column-wise.
    • Printing: “SHOW #a;”. The PRT and DISP commands are oriented towards timeseries, so a new command here makes sense.
    • Addition: “MATRIX a1 = #a2 + #a3;”.
    • Subtraction: “MATRIX a1 = #a2 – #a3;”.
    • Multiplication: “MATRIX a1 = #a2 * #a3;”. If one of the factors is a VAL or 1×1 matrix, all the elements of the other matrix are multiplied with this scalar.
    • Division:”MATRIX a1 = #a2 / %v;”. This is only possible if the denominator is a VAL or 1×1 matrix, in which case all the elements of the first matrix are divided with this scalar.
    • Transpose: “MATRIX a1 = t(#a2);”.
    • Identity matrix: “MATRIX m = i(5);”. This constructs a 5×5 identity matrix.
    • Indexing: “VAL x = #a[2, 1];”. If #a is a nx1 matrix, you can use #a[2] instead of #a[2,1]. This shortcut only works for such column vectors, not 1xn row vectors.
    • Sub-matrices: “MATRIX x = #a[1..2, 5..7];”. This will pick out rows 1, 2 and columns 5, 6 and 7, resulting in a 2×3 matrix. If you omit the first part of the range, the first row is assumed. Likewise with the last part of the range, so if if the matrix #x has 7 columns, you can use #a[..2, 5..]. Using #a[.., ..] will return #a itself!
    • You may combine selections with fixed rows/columns, for instance #a[2, ..] to select the full second row, or #a[.. , 3] to select the fulle third column.
    • For column vectors, you may use #a[2..4] to select rows 2, 3 and 4 from that vector. It is implicitly translated into #a[2..4, 1].
    • Packing/unpacking from timeseries to matrices. To pack the timeseries x, y and z into a matrix #m, use “MATRIX m = pack(2015, 2020, x, y, z);”. The rows will be the 6 periods, and the columns will be the 3 timeseries. To unpack the timeseries y again (with the new name ynew), use “CREATE ynew = unpack(2015, 2020, #m[.., 2]);”, using only the second column of matrix #m. When packing and unpacking, the time period and matrix dimensions must conform. If you omit the time period, the pack() and unpack() functions will use the current time period.
    • Element-by-element multiplication and division: “MATRIX m = multiply(#m1, #m2);” and “MATRIX m = divide(#m1, #m2);”.
    • Matrix inverse: “MATRIX m2 = inv(#m1);”. The function will fail if the matrix is singular or non-symmetric.
    • Matrix determinant: “VAL v = det(#m1);”. The function will fail if the matrix is non-symmetric.
    • Diagonal: “MATRIX m2 = diag(#m1);”. If #m1 is a n x n symmetric matrix, the method returns the diagonal as a n x 1 matrix. If #m1 is a n x 1 column vector, the method returns a n x n matrix with this column vector on the diagonal (and zeroes elsewhere).
    • Trace: “VAL v = trace(#m);” computes the trace of the matrix (the sum of the diagonal elements).
    • Sum, average, min, max. The functions sumr(), avgr(), minr() and maxr() performs these calculations on the rows of the matrix, whereas the functions sumc(), avgc(), minc() and maxc() performs these calculations on the columns.
    • Rounding: “MATRIX m2 = round(#m, 2);” will round each element in the matrix to two decimals.
    • In addition, you may also use log(), exp, and abs() on a matrix. This will perform the transformation on each element.
  • Labels are fixed in PPLOT, regarding quarterly and monthly data. An ‘intelligent’ labeling system is employed, trying to show not too many or too few labels.

Version 2.0 beta 4 (technically version 1.21.6) — 7/7 2015

  • You can now use GOTO and LABEL. For instance, inside a loop you may have this line: “IF(%x > 10); GOTO lbl1; END;”, and after the loop you may have the statement “LABEL lbl1;”. In that case, when %x is > 10 inside the loop, the remainder of the loop is skipped. (Please note that LABEL is called TARGET in AREMOS).
  • Reads .tsd files with variable labels, if these labels are positioned in position 17 and onwards (after the variable name, which is assumed max 16 characters long). Gekko issues an error if a variable name is malformed (for instance contains blanks etc.).
  • With frequency set to for instance quarterly, you may now use integers, for instance “TIME 2015 2016” or SERIES<2015 2016>… In that case,  the period is set from 2015q1 to 2016q4, so the quarters are set implicitly.
  • Fixed DISP with non-annual frequency. It simply printed out the dates wrongly.

Version 2.0 beta 3 (technically version 1.21.5) — 1/7 2015

  • Possibility of using LIST<direct>, for lists where the names can be integers or name parts starting with integers. For example, “LIST <direct> n = 117, a38, 007;”. Without the <direct> option, quotes around these elements would be mandatory: “LIST n = ‘117’, ‘a37’, ‘007’;”. The <direct> option is practical for long comma-separated lists containing such name parts.
  • READ<prn> and WRITE<prn> is possible. The first item (the ‘cell’ in row 1, column 1) should be either ‘name’ or ‘date’ to indicate whether the  first column contain names or dates. (The prn format resembles the csv format quite a lot, but the data are separated by blanks rather than semicolons).
  • UPDPRT has been fixed: the trailing semicolons were missing.

Version 2.0 beta 2 (technically version 1.21.4) — 28/5 2015

  • The changes are minor, mostly changes to conform with the latest version of the syntax blueprint.
  • (Under the hood, a lot has been changed to prepare for the upcoming stacked newton solver).

Version 2.0 beta 1 (technically version 1.21.3) — 4/12 2014

  • Quite a lot of bugfixes and improvements.
  • AREMOS-like logic enabled regarding OPEN<prim>. Gekko now implements a databank list, where the first databank (primary) is often Work, and the second databank (secondary) is often Base. But this may be changed by means of OPEN<prim> and OPEN<sec>, and multipliers etc. will now relate to the <prim> and <sec> databanks, and not necessarily to the Work and Base databanks. When an OPEN<prim> databank is closed, the contents are written back to the databank file. OPEN<prot> is also possible, to protect a databank from being altered.The F2 window is altered slightly to reflect the primary/secondary logic.
  • New option “OPTION databank autocreate = yes|no” and “OPTION databank search = yes|no”. Autocreate will create any timeseries stated in for instance the left side of a SERIES command (emulating AREMOS). Search will enable databank search (again emulating AREMOS), so that variables/timeseries are looked up in the databanks in the order they are listed (cf. the F2 window). Setting these two options is practical regarding databank revision programs.
  • Similarly to OPEN<prim> or OPEN<sec>, you may also use “READ<prim>bank” or “READ<sec>bank”. The latter replaces the “MULBK bank” command. Note that “READ<prim>bank” only reads into the primary bank, whereas “READ bank” reads into both the primary and secondary databanks. (The old MULBK without an argument is now called CLONE).
  • Command files are now expected to have extension .gek, so “RUN prg;” will look for prg.gek. Older .cmd files or other extensions must be called with explicit extension (for instance: RUN oldfile.cmd).
  • Gekko will no longer look for an isstart.cmd file to auto-run when Gekko starts up: only gekko.ini files can be used for that purpose.
  • CLEAR and CLEAR<all> for clearing the workspace are now replaced with RESTART and RESET commands, respectively. The CLEAR command is now only used for clearing particular databanks like “CLEAR bank;”. RESTART will run any gekko.ini file, so think of the command as resetting and starting the gekko.ini file (hence the name).
  • Parallel FOR loops possible (for string loops), for instance “FOR (i = a, b, c  j = x, y, x); PRT k{i}{j}; END;”. This will print the timeseries kax, kby and  kcx. The parallel loop may run more than two lists in tandem, if needed.
  • Percentile() function: “VAL p = percentile(gdp, 0.25)” will calculate the 25% percentile of all the values in the timeseries gdp (missings are ignored) over the global sample set by the TIME command.
  • Sqrt() function.
  • Format() function that formats a value corresponding to a given format. For instance: “TELL ‘Value is: ‘ + format(%v, ‘.000’);”. This will show %v with 3 decimals. You may use ‘.###’ instead to suppress any trailing 0’s in the value.
  • Sum() function that sums comma separated items, for instance “SERIES x = sum(a, b, c);” or “SERIES x = sum(#m1, #m2);”, where #m1 and #m2 are lists of names. You may sum any number of items, including only one.
  • COPY command can be used with COPY<from = …  to = …> to denote the databanks that the variables are copied between. So you may use “COPY<from = bank1  to = bank2> #m;” to copy the timeseries in the list #m from the databank bank1 to the databank bank2. Also COPY … TO … is possible, where wildcard ‘*’ can be used, for instance “COPY bank2:a* TO bank1:*;”. This copies all timeseries beginning with ‘a’ in bank2 to bank1.
  • Augmented the command FINDMISSINGDATA with a <replace = …> option, for instance: “FINDMISSINGDATA<1980 2010 replace = 0>#m;”. Here, any missing values in the timeseries in #m are replaced with the replace-value 0. If using the replace option, lists are not generated.
  • UPD with rep = … possible, for instance “UPD <2015 2050> x = 10 rep 5, 7 rep 4, 12 rep *;”. The last “REP *” fills out the remainder of the sample. So the result is x = 10, 10, 10, 10, 10, 7, 7, 7, 7, 12, 12, …  12. (The last 12 is in 2050).
  • Putting a simple scalar inside a string is possible, for instance STRING s = ‘My name is %s’, where %s = ‘Jones’. This is more convenient to write compared to the equivalent STRING s = ‘My name is ‘ + %s.
  • PPLOT fixed, so that the user can now again click for percentages etc. Note that when clicking, Gekko loads new data from the databanks, so any changes will be reflected in the graph (Gekko 1.8 could show percentages etc. on the original data, but this practice is discontinued). In most cases, this difference is academic.
  • In PPLOT, you may scale the y axis: for instance PPLOT<ymin = 50 ymax = 200> x1, x2;
  • READ <tsp> and WRITE <tsp> are now possible, reading and writing output from a TSP program in a particular format. Since both reading and writing of TSP files is possible, interfacing to TSP can be done with the SYS command and Gekko as a ‘host’ environment.
  • Printcodes ‘b’, ‘bn’, ‘bd’, bp’, ‘bdp’ are changed to ‘s’, ‘sn’, ‘sd’, sp’, ‘sdp’, since the background/multiplier bank does not necessarily have the name ‘Base’, but is now the secondary databank (hence ‘s’ instead of ‘b’). So to print for instance percentage growth in the secondary databank, use PRT<sp> instead of PRT<bp>.
  • Databanks are compressed after reading from file, so they use less RAM. Reading .tsd files improved regarding RAM, too (so much larger .tsd files can be read).

Version 2.0 alpha (technically 1.21.2) — 22/9 2014

  • This version is the first release in the 2.0 series. Gekko 2.0 marks a significant shift in syntax and capabilities, providing a richer environment for programming, data handling, data revision programs, etc. The changes relative to the 1.8 series are too numerous to list here (see the ‘New features’ list in the Gekko 2.0 help file).

Version 1.8.1 — 21/10 2013

  • This version is identical to 1.7.5, except for the version number.

Version 1.7.5 — 21/10 2013

  • This version is leading up to a stable version 1.8 release.
  • Conversion of .prn files to .csv files. The two file types are quite similar: the main difference is that spaces are delimiters in .prn files, whereas semicolons are delimiters in .csv files. Additionally, .prn files tend to be with the timeseries running downwards, whereas .csv files often have timeseries running outwards. Convert with “CONVERTPRN myfile”, where myfile.prn is a .prn file. A myfile.csv file will be produced, and this .csv file can be read by means of “READ <csv cols merge> myfile”. In the longer run, a READ<prn> will probably be done, but for now you may use the converter. See the help file under CONVERTPRN for more details.
  • List files: You may use “LISTmylist = #(listfile myfile)”, where the external file myfile.lst has an item on each line (extension .lst will be added to the filename as default). As of now, listfiles may only be used as in this example (i.e., in the LIST command), and not in PRT and other commands. This limitation will be relieved of course.
  • Font sizes on the three tabs in the main window can be set with “OPTION interface zoom = x”, where x is an integer (%). If set to 100, there is no zoom, and if for instance “OPTION interface zoom = 120”, the fonts will be 20% larger. If you accidentally set the zoom level to something nonsensical and have problems correcting this, just close and restart Gekko.
  • F2 window now shows all metadata when opening PCIM databanks.
  • A warning regarding PCIM databanks has been suppressed (for instance: “1 variables with empty string as name in PCIM bank (skipped)”). This is nothing to worry about, so the warning has been turned off.
  • Small change regarding Z-variables. If a model Z-variable does not exist when the databank is read, older Gekko version would create the variable and set it’s values to NaN (missing). This has been corrected, so that the values are now set to the corresponding variable. For instance: if the variable Zphk does not exist, it will be created and filled with values from the corresponding phk variable.
  • Bug: loading a cached model will now show the correct file name.
  • Tables (html): minus was shown as a non-breaking hyphen (with a special html code). This has now been corrected to a regular minus, so that copy-paste via right-clicking the table is more sensible. But in general, please use the Gekko Copy-button for copy-pasting tables.
  • If the cursor is located in the upper part of the split main Gekko window and you start typing, Gekko will shift the focus to the lower (input) window. This only works regarding chars from a-z or 1-9.
  • The help files have been updated.

Version 1.7.4 — 9/10 2013

  • PPLOT has a possibility to graph variables from Work and Base databanks in a convenient way, for instance: PPLOT<a> fY, where ‘a’ can be read as ‘all’. This will plot the variable fY from both banks. You may also use PPLOT<ap> for percentage plot, and PPLOT<ad> for time differences. The ‘a’ print code only works for PPLOT at the moment, but will be fully integrated in PRT, WPLOT etc. in the 2.0 series. Note that “PPLOT<a> fY” is functionally equivalent to “PPLOT fY @fY”.
  • Graphs may have point indicators omitted by means of: OPTION graph lines points = no.
  • In html tables, the width of columns has been fine-tuned. You can now use “option table html datawidth”, “option table html firstcolwidth”, and “option table html secondcolwidth”. These default to 5.5, which is approximatively 5.5 characters, but can be augmented to provide more spacing. The options firstcolwidth and secondcolwidth are used to adjust the width of the first and second column: these typically contain labels (first column), and possibly variable name (second column). Note that these widths are minimum widths, so if a particular cell is larger than that, the whole column will adjust to contain the cell. Another way of stating this is that text and numbers are never truncated in html tables. So to make different tables align regarding columns, you may have to finetune the column widths.

Version 1.7.3 — 3/9 2013

  • Some refinements regarding tables, for instance it is possible to add a gray vertical border between two particular periods. For instance: <col type=”expand”> <subcolborder period=”#sub1″/> </col> will insert a gray vertical border after period #sub1 (where scalar variable #sub1 is expected to be a date — you might also use period=”2020″ to hard-code the period). Note: in general, tables now accept scalar variables inside strings.
  • PPLOT can now export in .png or .svg file formats, too. For instance “PPLOT fY fX file=fig1.png” will produce the file fig1.png with the graph. Default format is still .emf, so “PPLOT fY fX file=fig1” will produce the file fig1.emf. The .png and .svg formats are convenient for html web pages (note: the .png format may lose some precision, since it is raster/pixel-based).

Version 1.7.2 — 11/4 2013

  • Introduced fixed parameters in the model (.frm) file. These may be indicated like this: “FRML _i  y = #c * x;”. The parameter #c must be defined with a VAL statement somewhere in the .frm file: “VAL c = 0.82;”. The parameters will be in-substituted when compiling the model, so there is no speed penalty and the equation will run just as fast as”FRML _i  y = 0.82 * x;”.
  • Reading from Excel is now possible. Use READ<xls> or READ<xlsx>. The <xls> or <xlsx> option also works with MULBK or OPEN. For now, the Excel workbook should only have one sheet, and the first row should be dates, whereas the first column should be variable names (you may use READ <xlsx cols> if you need to read data that has variables in columns (transposed)). The same is now possible regarding .csv files: READ<csv cols> etc.
  • Introduced a new frequency ‘undated’ alongside annual, quarterly and monthly: use “OPTION freq u”. The undated frequency works much as annual, but may more conveniently start at observation 1 (or 0 if preferred). It has for instance been used to simulate a hourly electricity model, on the period 1-8760 (which is the number of hours in a non-leap year). With ‘undated’ frequency, the lagged value of variable x in period 100 (that is, x(-1)) is the value of variable x in period 99. So in this sense, ‘undated’ works like ‘annual’.

Version 1.7.1 — 2/4 2013

  • Fixed problems with adding VAL and STRING, or DATE and STRING. “VAL v1 = 1; STRING s2 = ‘2’; VAL v = #v1 + #s2;” Gave v = 21, should be 12. “DATE d1 = 1990; STRING s2 = ‘2’; VAL v = #v1 + #s2;” Gave v = 21990, should be 19902. This is now corrected.
  • Function pow(a, b) did not work: is fixed. Also, you can now use ‘^’ as power function together with ‘**’. So x**0.5 and x^0.5 and pow(x, 0.5) are now all legal.
  • New HP-filter function: hpfilter(). Use for instance like this: “GENR <2000 2012> xxgdp_hp = hpfilter(gdp, 6.25);”. The 6.25 is the lambda parameter, recommended to be 6.25 for annual, 1600 for quarterly, and 129600 for monthly data (see here). You may include one more parameter that should be 0 or 1. If 0, raw data are used. If 1, log() is taken on the input values before the HP-filter is computed, and exp() is taken before the values are returned. Setting this parameter to 1 may thus make more sense regarding growth variables, since the HP calculation is performed on log levels (do not set to 1 for variables that may become 0 or negative). You may use assign-variables for the lambda and log arguments.

 


Version 1.6.8 — 2/5 2013

  • See this.
  • Fixed problems with the RETURN statement.
  • Fixed problems with adding VAL and STRING, or DATE and STRING.
  • Changed convergence settings for forward-looking models. Maybe these settings are better, but needs to be investigated further.

Version 1.6.7 — 6/3 2013

  • Added “OPTION model cache = [yes|no]” option, to turn off all use of cached models, forcing model parsing on all MODEL statements (like in Gekko 1.4). This is only intended to be used if problems show up regarding model caching.
  • A bug regarding failsafe mode was corrected. Some interactions between failsafe mode and cached models meant that failsafe mode would fail with an error. This is corrected now.

Version 1.6.6 — 6/3 2013

  • GMULPRT possible to use as synonym for MULPRT<v>. Many users are familiar with GMULPRT, but in the long run it should perhaps be VMULPRT then…

Version 1.6.5 — 26/2 2013

  • Table searching logic redone. Added more table folders: OPTION folder table/table1/table2.
  • Introduced ‘Home’ button on user interface. When in the Menu tab, the button will restart the Menu system. When in Main tab, the button will go back to the first DISP command, if DISP is used for equation browsing.

Version 1.6.4 — 25/2 2013

  • “OPTION table startfile” changed to “OPTION menu startfile”.

Version 1.6.3 — 22/2 2013

  • Help file: if “OPTION interface_help_copylocal” is set, Gekko will copy the gekko.chm file to a location on the user’s hard disk before opening it up. This eliminates some problems regarding opening up such files from a network drive.

Version 1.6.2 — 18/2 2013

  • Decomposition window (UDVALG) can show decompose and data errors. Percentages are shown with 2 decimals instead of 4.
  • Some options to control html tables (see “OPTION table html…”).
  • Suggestions can only be applied for OPTION commands. Using them for other commands proved too buggy. The suggestion system will be reconsidered, but for OPTION commands it is quite helpful.
  • In addition, some minor bugfixes.

Version 1.6.1 — 11/2 2013

  • Only minor changes relative to 1.5.12.

Version 1.5.12 — 5/2 2013

  • Updated help files, and a number of smaller bugfixes.
  • Fixing issue with “MULPRT jul05:fy”, where ‘jul05’ is a named databank opened by means of the OPEN command. This print will now correspond to “jul05:fy – Base:fy” (which is the most logical: earlier versions would print out “jul05:fy – jul05:fy” which is always 0…).
  • “LIST ?” produces more readable/unfoldable output when a model is loaded.

Version 1.5.11 — 21/1 2013

  • Reordering of equations when doing Gauss simulation is switched off as default (OPTION solve gauss reorder = no). Theoretically, reordering should reduce the number of Gauss iterations used, but in practice setting the option to ‘yes’ can yield annoying starting value problems. So better to switch the reordering off as default. In rare cases, this change may imply that some models that used to solve with older Gekko’s will no longer solve (in that case, try to set “OPTION solve gauss reorder = yes” and see if the model solves again). Or use the Newton solve method instead (it is more powerful).
  • Default databank format is now tsdx. The option controlling this (OPTION databank file format) has been changed from tsd to tsdx, so when typing “READ mybank”, Gekko will now look for the file mybank.tsdx, whereas older Gekko’s would look for mybank.tsd. So you may need to change existing “READ mybank” statements to “READ <tsd> mybank” (or set “OPTION databank file format = tsd”). The tsdx format will be used in the future, and some safety measures have been implemented as a result of this default format change. For some time onwards, you may now not READ a ‘mybank.tsdx’ file by means of “READ mybank”, if there is a ‘mybank.tsd’ file available in the same folder. In that case you will get an error, so that the possible ambiguity can be resolved. The remedy to this error is to (re)move or rename the .tsd file, or alternatively explicitly indicate which file you intend to use (for instance “READ <tsdx> mybank”, or by explicitly setting the databank format beforehand: OPTION databank file format = tsdx). These measures may seem cumbersome, but better safe than sorry (it would be very bad to accidently read mybank.tsdx when really mybank.tsd was intended).
  • New logic regarding swapping of databanks. Swapping is intended for being used to quickly compare three or more databanks (for instance different scenarios etc.), and swapping is done in the F2 window, by dragging the databanks. When databanks have been swapped, Gekko will enter ‘swap-mode’ where only viewing (but not altering) data is allowed. In this mode, you may use PRT/MULPRT/WPLOT/PPLOT/UDVALG and similar commands, but no UPD/GENR/READ/WRITE/SIM etc. To exit swap-mode, simply typeUNSWAP, or click the unswap button in the F2 window.
  • Suggestions in the user interface. This was available in some very old Gekko versions, and has been revived. Gekko will pop up a small window with available keywords when selecting options (OPTION command) or typing ‘<‘ to set options in a local option field. There is an ‘OPTION interface suggestions’ that is set to ‘some’ as default. Other possibilities are ‘none’ (no suggestions) or ‘all’ (suggestions in all places). Suggestions still need some improvements, but is intented to alleviate the need for looking up syntax in the help files. To use a suggestion, either double-click it, or select it and type [Enter]. You may force the suggestion popup to open at an arbitrary location by means of Ctrl + Enter.
  • Recording of commands. Gekko remembers all command issued in the command window, and these can be seen (and possibly copy-pasted to a command file) from the menu ‘Edit’ –> ‘Command history…’ (and cleared via the ‘Clear command history’ menu item). The command history is automatically cleared at Gekko startup, or after clearing of workspace (CLOSEALL). The command memory can be practical for reproducing a particular Gekko session (i.e. sequence of commands). The ‘recorded’ commands can either be executed as a block of commands in the command window (paste them, and mark them before hitting [Enter]), or alternatively put them in a command file and execute them by means of a RUN statement. (Note as a curiosity that calling a command file (“RUN myfile”) will wipe out the history of its own call, if the command file contains a CLOSEALL statement).
  • FOR loops improvements. Loops now work on strings, values or dates (FOR used only to work on strings). For values, you can use “FOR val v = 1 to 100 by 2” to get a secuence of values (1, 3, 5, …) whereas for dates you may use “FOR date d = 2000q1 to 2005q4 by 2” to get a sequence of dates (2000q1, 2000q3, 2001q1 etc.). Note that you have to use “FOR val” and “FOR date”, so that the scalar variables #v and #d have their type indicated. This is to avoid confusion (for string type, the type may optionally be omitted, so you may use “FOR string s = a b c” or the equivalent “FOR s = a b c”).
  • CLEARGOALS and GAUSS removed: the new command UNFIX should be used instead (also OPTION solve gauss goal switchback has been removed). A new logic is used instead of this: When simulating with goals (ENDO/EXO), if the solve method is set to “gauss”, Gekko willtemporarily use the Newton algorithm to solve with goals. But if the goals are removed (UNFIX), Gekko will revert back to whatever method (typically Gauss) was used to solve the model without goals (former Gekko versions switched permanently to the Newton method when doing goal search). The UNFIX is simply equivalent to an ENDO and an EXO command (clearing these lists).
  • IF statements improvement. IF is now working with OR, AND and NOT, and with comparinsons ‘<‘, ‘<=’, ‘==’, ‘>=’, ‘>’, ‘<>’. If statements can be used with scalar variables (strings, values or dates) or individual timeseries observations  (for instance ‘variable[2010]’). If you need to change a type into another type in order to compare them, you may need so-called casting. This can be done via the methods string(…), val(…) and date(…) which try to convert from one type to another (for instance from the value 2010.0 to the date 2010 or vice versa). There is also an exist(x)-function that returns 0 or 1 depending upon whether the timerseries ‘x’ exists in the Work databank.
  • WRITE<csv> and WRITE<xls> now work for quarterly and monthly frequencies, and READ<csv> (and MULBK<csv> and OPEN<csv>) is supported, too. So interfacing with a spreadsheet like Excel should be a little easier.
  • Laspeyres chain index function. Use for instance GENR (p,x) = laspchain(#p,#x, 2005), where #p is a list of prices, and #x is a corresponding list of quantities (the two lists multiplied together should provide the total costs of the quantities). An index period needs to be indicated (here 2005), and the resulting price index series (p) will be 1 in that period. You may alternatively use laspfixed(…) to get indices using fixed prices (fixed as the values in the period indicated).
  • Updating or closing all PPLOT or UDVALG windows. This can be done from the ‘Window’ menu.
  • Copy button. This button in the toolbar in the user interface copies the ‘cells’ from the last PRT/MULPRT statement to the clipboard (tab-separated). In this format, they can be pasted into a spreadsheet (e.g. Excel), or into a word processor like Word. But the primary function is spread-sheet pasting. Note that the number of decimals (or width of columns) will be lost when doing such copy-paste. The functionality is similar to the CPLOT command (which is in reality putting a WPLOT into the clipboard).
  • Change of INI file name. In the future, command files that are to be run when doing CLOSEALL or at Gekko startup should be calledgekko.ini instead of isstart.cmd. Using the name isstart.cmd will still work for some time though.
  • GMULPRT has been renamed to MULPRT<v> (‘v’ for ‘verbose’). You can also set “OPTION print mulprt = v”, and in that case all MULPRT statements will be issued as MULPRT<v> if this is preferred. Putting a <v> option in MULPRT overrides any other local print options in that option field.
  • “CLEAR all” command. This command works like a CLOSEALL, but without loading the INI file (gekko.ini/isstart.cmd). This command was named ‘NEW’ for some period, but “CLEAR all” seems more logical (like in Matlab for instance). Also, you may use “CLEAR” which is equivalent to CLOSEALL. In the longer run CLOSEALL will disappear, and there will be two and only two clearing commands: “CLEAR” (used normally and typically loads a model and databank) or “CLEAR all” (for a completely clean state). The two will be equivalent in the absence of an gekko.ini or isstart.cmd file in the working folder.
  • NYTVINDU command is obsolete: use CLS.
  • UNDO SIM is also obsolete (when simulations fail, you can instead click a link to undo the simulation).
  • Function pow(a,b) is supported (same as a**b or a^b).
  • When simulating with goals, Gekko will print the number of goals used (so there is less room for misunderstanding regarding whether the model is ‘fixed’ or not).
  • Commands FLAT, ZERO, DUMON and DUMOF will be removed at some point. At the moment they still work, but a warning is issued, and alternative syntax is suggested (UPD [*] % 0, UPD [*] = 0, UPD dummy = 1, UPD dummy = 0).
  • Commands ENDOGENIZE and EXOGENIZE have been removed (use ENDO and EXO insted, to reduce your risk of carpal tunnel syndrome).
  • IF can now only use ‘==’ and not ‘=’ to test for equivalence (for instance IF(#v == 10) or IF(#s == ‘abc’). This is consistent with AREMOS and many other languages.

Version 1.5.10 — 19/12 2012

  • Numerous changes in this version.
  • Run status window for tracking larger jobs. Open it from the ‘Utilities’ menu, or dobbel-click the traffic lights in lower right of the main Gekko window.
  • TIMEFILTER command has been changed from being ‘negative’ (choosing periods to be filtered out) to being ‘positive’. For instance, “TIMEFILTER 2010, 2012, 2014” will filter out the years 2011 and 2013 (and show all other years). Ranges can be used: “TIMEFILTER 2010:2014 by 2” has the same effect. A timefilter is switched on and off by means of “OPTION timefilter = yes|no”, and its type can be set with “OPTION timefilter type = avg|hide”. Option ‘hide’ here just out-filters the periods, whereas ‘avg’ averages up the missing periods. The options can be used locally, for instance “PRT <filter>…” or “PRT <nofilter>”, or PRT <filter=hide>…” or PRT <filter=avg>…”. By using the ‘avg’ filter, you get the same functionality as the VPRT command. In the above example, a “PRT<filter=avg>…” would show the average of 2011 and 2012, and the average of 2013 and 2014.
  • TELL command. Used like this: TELL ‘Hello’ (or TELL <nocr> ‘Hello’ to omit carriage return). Will replace the DISPLAY command in the longer run.
  • PIPE can pipe to html files, too. Use “PIPE <html> filename” or “PIPE <html append> filename”. When piping to html, you can use the TELL command: for instance “TELL ‘<p>Hello</p>’. As you see, you need to remember the html tags when adding to a html file. The funtionality will be useful when producing tables in html.
  • Model blocks supported. In a .frm file, a line like “// ### Consumption ###” can be used to indicate that the next block of equations is the ‘Consumption’ block. This block info is showed in the DISP command, and can be optionally used for residual check (Utilities –> Residual check…”).
  • UPDX and UPD are merged: so now there is only UPD.
  • “LIST mylist = null” supported (yields an empty list). Also, you may now put integers as items in a list: for instance “LIST mylist = 0  01  57e”.
  • Loop improvements, more on this when FOR and IF statemens are matured fully.
  • PRT and MULPRT wrap in case of many variables (didn’t work in 1.5.9).
  • Now ‘exp’ and ‘log’ are function keywords, so Gekko allows for instance exp(-1.5) or log(2.5) etc. in models and expressions (will no longer think ‘exp’ is a variable).
  • Truncated “WRITE <per1 per2>” did not work in 1.5.9: fixed.
  • Parser change, so that stuff like “VAL y = x” is no longer valid: must be “VAL y = #x”
  • Numerous other small changes and fixes, all pointing towards a version 1.6.

Version 1.5.9 — 22/11 2012

  • The version merges the PRTX command with the old PRT command (and removes PRTX completely). In addition, PCTPRT and MULPCT are removed (replaced with PRT<pch> and MULPRT<pch>). PRT and MULPRT can now be called with ‘long’ display codes, such as ‘lev’, ‘abs’, ‘dif’, ‘pch’, ‘gdif’ (the last one is growth differences).
  • Multiple display-codes are legal in the same <>-field: for instance “PRT<dif pch> fY” or MULPRT<lev pch> fY. (These are equivalent to “PRT<d p> fY” and “PRT<n q> fY” using short display codes).
  • Long display codes are hopefully easier to remember and are of the form <code={yes|no|append}>. If ‘yes’, it will only show the chosen code, whereas if it is ‘append’ it will add the code to the default codes. If ‘no’, the particular code is not shown. The defaults are set in “OPTION print prt …” and “OPTION print mulprt …”. Also, field width and number of decimals can be set globally: see “OPTION print fields …”.
  • In general, the ‘yes’/’no’/’append’ can be abbreviated, so for instance <pch=yes> can be written as <pch>, whereas <pch=no> can be written as <nopch>, and <pch=append> can be written as <_pch>. The underscore can be thought of as a glue character, indicating that the code is to be added to the existing codes.
  • As before in PRTX, display codes can be set either after PRT/MULPRT, or alternatively element-specific after the specific variable/expression/list/wildcard. So this is possible: “PRT<abs> fY fX fE<pch>”. Then fY and fX will be absolute values, whereas the <abs> is overridden with <pch> as regards fE (which is shown in percentage growth).
  • As in PRTX, it is possible to transpose the result (variables running downwards). Use PRT<rows> for that.
  • In case of a memory/RAM error, Gekko will include a list of active processes in the error message.

Version 1.5.8 — 13/11 2012

    • Menu folder: OPTION folder menu = [foldername]; Before, the location was the same as for tables (OPTION folder table), but now the two are separated, so that tables and menus can reside in separate folders.
    • Faster loading of models. The first time a model loads (MODEL statement), it loads with the ‘old’ speed. But the next and following times, the model will load much faster, since much of the model parsing information is now stored in a cache file. So if a model is known, Gekko will use the cached information instead of chewing on the same model once again (models are distinguished by means of signatures, see below). The cache file is stored in a temporary folder, and Gekko will try to avoid that this temporary folder becomes too bulky (by erasing some of the least recently used temp files from time to time). (Note by the way that the first simulation (SIM) after a model statement (MODEL) takes a bit longer time, because of some behind-the-scenes warmup of the compiler. Following SIMs run at full speed). The cachefiles are so-called protobuffer files, i.e. the fast binary file format used at Google and many other places. Using these cachefiles, there is a factor 8 speedup on loading an ADAM-type model.
    • Faster databanks. In Gekko 1.5.7 and before, the .tsdx file format consisted of a ‘normal’ tsd files (with more decimal places than usual though), and a xml file containg meta-information. These files were zipped, and the resulting file given the extension .tsdx. From version 1.5.8 and onwards, the datacontainer inside the zipped .tsdx file is a so-called protobuffer file, instead of a tsd file. Protobuffers is the fast binary file format used at Google and many other places, and binary files read much faster than tsd files (which are in text format). From version 1.5.8 and onwards, tsdx files are stored (WRITE command) this way. This means that Gekko versions 1.5.7 and earlier cannot read the newer .tsdx files, but versions 1.5.8 and later will read older tsdx files. The information stored in the old and new tsdx files is exactly the same, so there is no loss of information when converting the files from old to new format (conversion: simply READ<tsdx>oldfile; WRITE<tsdx>newfile;). Using the new .tsdx files, there is a factor 3 speedup on loading a large databank. (If the tsdx files were not zipped, the speedup would be a lot larger, since unzipping takes almost as much time as loading the unzipped datacontainer file itself. But then the users would end up with files 5-10 times larger. This is not considered acceptable, but an option for bulky high-speed tsdx files could be provided at a later point). The tsdx databank format in Gekko 1.5.8 and onwards is called version 1.1, and as always with tsdx files, data is stored in double-precision (15 significant digits). When comparing loading speed with PCIM databanks (READ<pcim>), please remember that PCIM databanks are single-precison (8 significant digits), and unzipped.
    • CLOSEALL speedup. The speedups regarding models and databanks imply that a CLOSEALL with an isstart.cmd file loading a model and databank will perform much faster than before (expect a factor 6-8 speedup). Starting up Gekko with a model and databank will be similarly faster.
    • Model signatures. Gekko 1.5.8 introduces model signatures, i.e. a kind of check-sum or fingerprint regarding .frm files. The signatures are technically so-called MD5 hashes, and are put into the .frm file as commentaries (for example: “// Signature: fp88RzyZfJNaoTi3I4X3Ww”). This string of characters and digits (note: the hash code is case-sensitive!) identifies a specific model file, so altering the model file will result in a different hash code. The motivation behind the signatures is two-fold: (a) To be able to make sure that an official model version (e.g., a specific ADAM .frm file) has not accidently been changed, and (b) The signatures are used to identify models for caching (faster loading). When calculating the signature (hash code), empty lines and comment lines are ignored, so you may insert full-line comments any way you like in the .frm file and preserve the signature (any variable list after the VARLIST$ tag will be ignored, too). But changing the equations (FRML) in any way will result in a new hash code. The hash code is technically 128 bits, and this means that the probability of two different model files having the same hash code is 2^(-128) = 2.9E-39 (that is, effectively zero). See also the SIGN command below.
    • SIGN command. This command prints out information regarding the model signature in the model file, and the ‘true’ hash code corresponding to the model file (and whether they are identical). You can use the SIGN command to obtain  the hash code for signing a new (or changed) model.
    • Info, Date and Signature in model files. As for databank files (cf. HDG command), you may now put meta-information into the model file (.frm). As of now, Info, Date, and Signature fields are supported. Example:
      • // Info: Model used for forecasting 2012-2030
      • // Date: 7-11-2012 15:37:00
      • // Signature: fp88RzyZfJNaoTi3I4X3Ww

Gekko will complain if this format deviates, for instance the Info field is to be written with capital ‘I’, with no blank before the colon, and one blank after the colon. This rigorousness regarding form is to make it easy to spot the information in different .frm files. The Info and Date fields will be displayed when loading the model (MODEL command), and the Signature field is used for verifying that .frm files have not been changed relative to an ‘official’ version.

Version 1.5.7 — 2/10 2012

  • Forward looking models can be solved by means of the Fair-Taylor algorithm. The algorithm is still being tested, so please use with a little care. Fair-Taylor switches automatically on with a SIM on a model containing leaded variables. There are a lot of options related to this: see ‘OPTION ?’, under ‘OPTION solve forward…’ (or type ‘HELP option’).
  • TABLE can provide HTML in addition to text format, if you indicate it with ‘TABLE <html>’. If so, the table is shown in the ‘Menu’ tab. This is still work in progress, and more finetuning of the HTML tables will be done. The table itself can be seen as ‘__table.html’ in the working folder, and can be opened in a browser. From the browser, it can be copy-pasted (Ctrl-A + Ctrl-C + Ctrl-V) pretty intact to Word or Excel.
  • TIMEFILTER command. This command identifies periods that are to filtered out in output like TABLE, DISP, PRT and PRTX (the commands PPLOT, WPLOT, CPLOT etc. do not react to this filter). The out-filtered periods are simply omitted, and the TIMEFILTER command has the same syntax as the TIMESPAN command. On the annual period 2012-2030, you might use: “TIMESPAN 2016 2017, 2019 2019, 2021 2024, 2026 2029;”. This way, the periods 2016-2017, 2019, 2021-2024 and 2026-2029 are filtered out, leaving the years 2012-2015, 2018, 2020, 2025 and 2030. Note that this command only affects how printing is laid out (so SIM, UPD, GENR etc. are unaffected by TIMEFILTER settings).
  • New OPEN command: opens up a databank that can later be referred to by means of [databank]:[variable], i.e. with a colon. For instance, “OPEN adam” opens the ‘adam’ databank, and a variable ‘fY’ can be printed like this: “PRT adam:fY”. As before, variables without databank indicator are taken from the Work databank, and variables with ‘@’ indicator are taken from the Base databank. The OPEN databanks can be closed by means of the CLOSE, and you can open a databank with an alias, using the AS keyword: “OPEN adbk2014 AS adam”. OPEN-databanks are read-only.
  • There is a new databanks window that can be opened by means of the’F2′ key. The window shows a list of open databanks, including Work ad Base. The window implements swapping, i.e. it is possible to drag a databank to another position. For instance, dragging an OPEN databank  to the first line in the list will turn it into the Work databank.
  • The graph window (PPLOT) can now be updated (“Update graph” button) with new values from databanks. So now both the PPLOT and UDVALG windows can be updated, and this will also work if databanks are swapped by means of the databanks window (‘F2’ key).
  • COLLAPSE command for transforming higher-frequency data into lower frequency. For instance: “COLLAPSE fY.a = fY.q total” transforms the quarterly fY series into an annual fY series, where the quarters are summed. Other methods are ‘average’, ‘first’ (first quarter) and ‘last’ (last quarter). Transformations from months to quarters or months to annual are also possible.
  • The UDVALG (decomposition) window now has frozen (non-scrolling) headers regarding variable names and time periods. Also, variables are now clickable/browsable.
  • New help system, using a more standard searchable .chm file. The help system can be opened by means of ‘F1’, or typing HELP in the command line (or choosing ‘Help’ –> ‘Help Contents’ in the menu). Also, you may jump directly to the specific command by means of typing for instance “HELP sim” (to get help for the SIM command). Last but not least, the content of the help system is now up to date!
  • In the user interface, when writing “READ *”, “MULBK *”, or “OPEN *”, Gekko will replace the ‘*’ with the file name chosen. This makes it easier to rerun the lines at a later point (or copy them to a command file).
  • An old bug regarding line numbers in error messages is fixed. Before, when a run-time error occurred in a command with no arguments (like for instance SIM or STOP), line number 0 was reported regardless of where the line actually occured in the file.
  • The ‘Menu’ tab uses a browser component that seemed to have some problems on some computers (the graphical user interface would not start up at all). The component is replaced, and Gekko should (again) be able to work on any .NET version 3.0 or better (since .NET 3.0 was introduced in 2006, more than 95% of all Windows users have .NET 3.0 or better).
  • A bug in relation to the ‘colspan’ attribute in XML tables has been fixed. When doing a new table row, code like <text colspan=”3″>AAA</txt> <txt>BBB</txt> should make ‘BBB’ appear in the fourth column. This is not how it works in versions prior to Gekko 1.5.7, where you would have had to add two “placeholder” elements: <text colspan=”3″>AAA</txt> <txt/> <txt/> <txt>BBB</txt>. In Gekko 1.5.7 the colspan logic works like it does regarding HTML tables, everything else would be too confusing. This change may break prior tables, and the remedy is to delete such “placeholder” elements (typically <txt> tags).
  • There was a bug related to convergence check of damped variables in the Gauss algorithm. Convergence checks were done on damped values, whereas it is really more meaningful to do it on non-damped values. The bug mostly shows up with hard damping (damp < 0.3) and in small models. Perhaps the ideal fix for this problem is to do a full non-damped iteration, and check that this iteration does not change too much.

Version 1.5.6 — 15/8 2012

  • Fixed a bug that meant that an expression like “@variable(-1)” could not be parsed.
  • Else, the work regarding 1.5.6 is mostly regarding unit testing. That is, a lot of tests that automatically check different functionality before the code is released.

Version 1.5.5 — 23/7 2012

  • Introduced command TRIMVARS. This command removes all non-model variables from the Work and Base databanks. The command is handy if the databank contains a lot of superflous or irrelevant variables that are not part of the model.
  • Opened up the possibility of running tables written in C#. This will not be supported in the long run, but until then, the C# tables can be called with the TABLEOLD instead of TABLE.

Version 1.5.4 — 4/7 2012

In the following list, more details regarding chances since version 1.5.3 are listed. Note that this list is not changes since version 1.4 (last stable version). To see what happened in versions 1.5.1-1.5.3, please consult the Gekko download pages.

(Below the list below, you can find a detailed list of new options in version 1.5.4, relative til version 1.4).

  • Banknames are shown with smarter truncation in the user interface, and tooltip on status bar is introduced.
  • When a command fails, you may click a link that provides more technical information regarding the error. I.e., the type of error, and where the error occured in the C# source code. You may copy-paste this information and send to the Gekko editor for review and possible fixing.
  • Error report can be produced/packed when simulation fails. You may click a link and have Gekko pack a zip file containing model, databank and options to reproduce the problem. The zip file may be sent to the Gekko editor for review and possible fixing. This makes it much easier to cut out a problematic simulation from a system of command files. Also, when simulation fails, you now always get a link that when clicked reverts all variables to their pre-simulation values (before this had to be done via an option and command UNDOSIM, so this is now much easier).
  • DISP can now search variable labels: for instance DISP ‘import’. Note that the search text must be in single quotes (‘).
  • Option solve fast yes|no. Default: yes. Switches to faster implementation of solvers. The speedup has mostly to do with the way data is read from in-RAM databanks. The trick is to create an intermediate twodimensional array (variables x periods) to use while simulating, and reading in and out of this array. This mode may still be buggy, but has been tested quite a lot. But please still use with care.
  • Option solve data init growth yes|no. Default: yes. Uses more intelligent starting values for Gauss, looking at historical growth rates (only works with ‘fast’ option).
  • Option solve data init growth min/max = value. See above. Default: -0.02 and 0.06, which seems best. The options makes Gekko look at historical growth rates when setting starting values. Reduces the number of iterations in many cases, especially models with stable long-term growth.
  • Option solve newton invert = lu|iter. Default: lu. This is a faster and more precise way to invert the Jacobi matrix in the Newton algorithm. But it is also more strict, so it may protest where the other one does not (for instance if the model contains an equation like X = X, which means that the value of X is completely undetermined).
  • Option solve newton invert fast yes|no. Default: yes. This is better in all cases, and the option will soon disappear.
  • Option solve print iter yes|no.  Default: no, so iterations are not printed anymore. (However, there is always a link to click for seeing the iterations).
  • Option patch zvar. Default: no. Will be set to ‘yes’ in version 1.6. It has to do with equations with for instance _D__D of _G__D codes. These equations have D- and Z-variables, but no J-variables. Unless ‘yes’ is set, the Z-variable did not follow the left-hand side variable after simulation, but this is corrected now. Mostly relevant when doing experiments/multipliers, not scenarios.
  • Caching of models in memory. When ENDO/EXO variables were set (or removed), the older Gekko versions had to recompile (part of) the model. This information is now kept in memory, so if you are using the same ENDO/EXO variables on the same model (in the same session), Gekko will respond much more quickly (and run the simulations faster). This may consume memory, so if memory becomes problematic, you may use OPTION model cache mem max = 0 (or some low number). Default is 20, corresponding to 20 cached models.
  • Fixed large memory consumption problem while reading tsd files. A RAM area of 100 MB was used. This has been changed, so that only an area corresponding to the databank file size is used. Also, memory errors will be better reported in 1.5.4.
  • Fixed two bugs related to timeseries objects. The timeseries use arrays to contain data, and with many observations (>200), these arrays resize. This scheme contained some bugs that have not been exposed until now. The bugs just make Gekko stop (for instance while writing a databank), but they are still annoying.
  • Target icon: when EXO/ENDO goals/means are set, an icon indicates this (including the number of goals). The icon is next to the red/yellow/green traffic lights in the status bar.
  • Can use WRITE<caps> in addition to WRITE<caps=yes>. This is necessary for AREMOS to be able to read the tsd file.
  • OPTION interface csv decimalseparator = period|comma. Default: period. Can set comma/period for WRITE<csv>.
  • OPTION solve gauss goal switchback = yes|no can be used. Default: no. If set to yes, a goal search (via. EXO/ENDO command) started from the gauss algorithm will revert to gauss when finished (with no goals set). This is actually the way PCIM behaves regarding goals/means.
  • Command GAUSS sets gauss method (and clears any EXO/ENDO goals)
  • Command CLEARGOALS clears any EXO/ENDO goals.
  • You can now set a pipe folder, for piping files (PIPE). Use OPTION folder pipe = [folder]. As usual, you can use relative paths (relative to working folder), for instance “OPTION folder pipe = \output”.
  • Second level of the OPTION hierarchy can be shown. For instance, instead of “OPTION ?”, try “OPTION folder ?”.

To get some kind of overview regarding options, below are listed new options since version 1.4 (i.e., the last stable version):

  • option calc ignoremissingvars = no. In 1.4 an UPD statement with a missing variable would just issue a warning and be skipped. In 1.5.4 Gekko stops (if this option is ‘no’).
  • option folder pipe = [empty]. See above.
  • option folder working = [empty]. Sets working folder.
  • option interface csv decimalseparator = period. See above.
  • option interface excel decimalseparator = period. Can be set to ‘comma’ for Danish Excel. The setting is actually only used for CPLOT, since WPLOT copies data via so-called interop.
  • option interface excel language = danish. Actually only used for CPLOT — will write “ikke.tilgængelig()” for cells with missing values.
  • option model cache mem max = 20. See above.
  • option patch zvar = no. See above.
  • option print disp maxlines = 3. How many data lines are shown in DISP.
  • option solve data init growth = yes.  See above.
  • option solve data init growth min = -0.02.  See above.
  • option solve data init growth max = 0.06.  See above.
  • option solve fast = yes.  See above.
  • option solve gauss goal switchback = no. See above.
  • option solve newton invert = lu.  See above.
  • option solve newton invert fast = yes. See above.
  • option solve print details = no. If ‘yes’, a lot of details will be printed in the Newton algorithm.
  • option solve print iter = no.  See above.
  • option table ignoremissingvars = yes. If yes, cells with missing variables are shown with ‘N’, indicating a missing variable (‘M’ means missing data in existing variable).
  • option table startfile = menu.html. Startfile regarding menu files.

Removed options:

  • option solve newton feedback = yes. This is always much faster, so no need to be able to disable feedback methodology for Newton solving.

 


Version 1.5.3 — 2/5 2012

This is point where the detailed changelog starts. For changes in older versions, i.e. versions 1.5.3 and before, please see the descriptions on the  download pages.