Investment Studio > Views > System > Overview
The System view is used to define and optimize rules for mechanical trading in the selected portfolio.
| When no portfolio is selected in the Portfolios view, the System view is empty. |
Transactions generated by the portfolio's system are added to the Transactions view and treated just like ordinary, manually entered transactions (though they are distinguished by the soft transaction flag). Their effects are immediately reflected by the Portfolios, Assets and Quotes views. The System view therefore doesn't contain any separate tools for performance analysis. That is a task left to the other views.
To help you keep the complexity of trading systems under control, the System view is structured in three tabbed sections: Rules, Symbols and Parameters.
![]()
| Rules are the "tip of the iceberg".
They are directly responsible for transaction generation.
Rule records therefore closely reflect the structure of
transaction records: each rule must specify an Asset,
a number of Units, a Principal
value and Fees. It can also set an
optional Flag (a string which can be
read using the asset_flag and portfolio_flags functions) and leave a Message
(to be displayed as a comment in the Transactions view). A boolean Condition determines
when a transaction is generated. Condition, units, principal, fees and flags can be full-fledged expressions but are usually symbols defined in the Symbols section (see below):
The date range controls in the Rules toolbar, |
![]()
are used to specify the date range over
which the system is applied. Upon system execution, the
dates in this range are stepped through in chronological
order. For each step, the system is evaluated and
transactions are generated for every rule satisfying Condition
= TRUE.
To disable the entire system, simply enter a date range well into the future (e.g. a start date somewhere in the 24th century). Note also that rules can be individually Enabled and disabled. |
||
| Symbols are the real workhorses of most
systems. In principle, each rule's condition, number of units, principal, fees and message can be a full-fledged expression entered directly in the Rules grid. In practice, this makes rules hard to read and to modify, and there are limits to what can be done with a single expression. It is therefore preferable to build systems using named building blocks and only specify references to them in the Rules grid. The Symbols section is where these building blocks are declared. Each one must be labeled with a unique Symbol and must contain an expression (Definition) which evaluates to a numerical result or to an array. The symbol can be used to access the expression's result from other expressions throughout the System view: |

| In the screenshot above, the definition of the symbol _crosses (an array) contains references to the symbols _closes and _sar (also arrays), which in turn use references to the asset symbol qqq; to the built-in symbols from_date and to_date; and to the parameters (see below) _min_af and _max_af. All of the above are available in expressions throughout the Systems view. | |
| Parameters are a special kind of symbols. Like other symbols, they can be referenced in expressions throughout the Systems view, but they are not themselves defined using expressions. Instead, each parameter has a constant float Value, which is specified explicitly in the Parameters grid: |
![]()
| The grid also allows the specification of
a range of parameter values (Low, High,
Steps) to be scanned for the optimal
value according to some user-defined performance measure,
e.g. final portfolio NAV. Parameters which you want to be
excluded from such scans can be marked as Locked. Click |