|
<< Click to Display Table of Contents >> Details |
![]() ![]()
|
The current source code documentation does not cover all parts of the code in depth. This is obviously a trade-off, but it should be emphasized that large parts of the Gekko code is not too difficult to read for someone reasonably proficient in C# (or Java, C++, C, etc. for that matter). Large parts of the Gekko source code revolve around static methods with understandable input and output parameters, and with a well-defined purpose. Such methods can be read more or less as is, whereas other methods are harder to comprehend.
Perhaps 80% of the Gekko source code is a question of relatively "easy" transformations and computations, whereas 20% of the code needs more in-depth explanations. In this section, and its sub-pages, the harder parts are identified, and the sub-pages try to explain these parts.
It should be emphasized that the "easy" parts of Gekko may still feel complicated enough. For instance, in Estimation.cs, there is quite a lot of code dealing with linear regression. This is in itself a bit complicated, and an external linear algebra module is used, but it is not the C# code itself that is complicated, but rather the math. But still, it is linear regression and linear algebra coded in a straightforward way in C#, and no unfamiliar concepts used. Much of it is static methods operating on arrays of data, and the same goes for a lot of the other "easy" code parts.
Another example of "easy" code is that there is quite a lot of time period and calendar stuff in Gekko, converting between for instance the internal Gekko date format and the C# DateTime format, together with UNIX and Excel data conventions. All this code is voluminous enough, but even though that part of the source code is not particularly well documented, with some effort it is comprehensible, because it is in its essence more tedious than complicated.
In contrast, Gekko also contains some hard-to-understand parts. These are explained on the following pages, starting with an explanation of the parser.