Files
Superalgos/docs/_includes/network/forward-testing-session.md
T

4.3 KiB

{% assign title = "Forward Testing Session" %} {% assign definition = site.data.network.forward_testing_session %} {% assign preposition = "a" %} {% assign plural = "s" %}

{% if include.heading != "" %} {{include.heading}} {{title}} {% endif %}

{% if include.icon != "no" %}

{% if include.table == "yes" and include.icon != "no" %}

{% endif %}

{% if include.table == "yes" and include.icon != "no" %}

{% endif %}

{% endif %}

{% if include.definition == "bold" %}

{{ definition }}

{% else %}

{{ definition }}

{% endif %}

{% if include.table == "yes" and include.icon != "no" %}

{% endif %}

{% if include.more == "yes" and include.content == "more" %}

Click to learn more about {{ title | downcase }}{{plural}} {% endif %}

{% if include.content != "no" %}

A forward testing session node must reference a trading system to gain access to the trading logic to be applied during the session. Other considerations framing the session come from the set of parameters attached to it.

{% endif %}

{% if include.more == "yes" and include.content != "more" %}

Click to learn more about {{ title | downcase }}{{plural}} {% endif %}

{% if include.adding != "" %}

{{include.adding}} Adding {{preposition}} {{title}}

To add a forward testing session, select Add Forward Testing Session on the trading process instance node menu. When a session is added, it is created with the full set of parameters.

{% include note.html content="After adding a session node, make sure you establish a reference to the trading system you want it to work with." %}

{% endif %}

{% if include.configuring != "" %}

{{include.configuring}} Configuring the {{title}}

Select Configure Session on the menu to access the configuration.

{ 
"folderName": "Session-Name",
"balancePercentage": 1
}
  • folderName allows you to set a significant name to the folder in which the data products—and logs—generated by the session are stored. If left blank, the system names the folders with the session id. This may be handy when you intend to consult the raw data generated by the session, as, otherwise, the folder would be hard to identify.

  • balancePercentage is a number defining the percentage of the initialBalance specified in the base aset configuration that will be used for trading. For instance, "balancePercentage": 1 means that 1% of your balance will be made available. Just like the initialBalance is scaled down, the minimumBalance and maximumBalance are also scaled down accordingly (see base asset).

Let's draw a quick example:

Your base asset is USDT and your initialBalance is USDT 10,000.

If you set up your forward-testing session with "balancePercentage": "1", then USDT 10,000 * 1% = USDT 100. This is the balance that will be available to your forward-testing session.

{% include important.html content="You need to take this into account at the time of defining your positionSize formula. If the formula is a constant, you may easily run out of balance, as only a fraction of the balance will be available for the strategy to use. It may be a good idea to set up your positionSize as a function of your available balance instead." %}

{% endif %}

{% if include.starting != "" %}

{{include.starting}} Starting {{preposition}} {{title}}

Before you start a forward testing session, the corresponding task needs to be running, as it is the task that puts the trading bot instance to run. Once the trading bot instance is running, select Run on the menu to start the session.

To stop a backtesting session, select Stop on the menu.

{% endif %}

{% if include.more == "yes" %}

{% endif %}