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 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.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 ‘’.
  • “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.