|The testing environment node organizes trading sessions involving testing of trading systems.|
Thorough and comprehensive testing of strategies is at the core of successful trading. Superalgos strives to put you in control of the testing process providing you with flexible tools to fit your criteria.
Depending on how you use the system, how many markets and exchanges you work with, the number of trading systems you use, or the way you choose to test your strategies, you may find yourself with a large number of testing sessions. As explained in the sorting of tasks page, the testing environment helps you organize large numbers of tasks sorting them by exchange, market, and trading mine.
Superalgos handles two types of simulated tests: backtesting and paper trading. Backtesting involves testing over historic data, while paper trading is about testing on a live data stream, but without placing orders at the exchange.
Trading sessions are controlled by a number of parameters that determine how the session is run. The built-in parameters provide great control and flexibility as to how to handle data sets and how to produce the resulting simulations.
Exchange Trading Tasks
|The exchange trading tasks node organizes trading tasks by exchange. That is, each exchange installed in the system has an exchange trading tasks node grouping all market trading tasks corresponding to the said exchange.|
The exchange trading tasks node must reference the exchange of choice. This reference constraints the rest of the definitions to the context of the said exchange.
When representing an exchange featured in the system’s icons library, the standard exchange trading tasks icon is replaced by the exchange’s logo.
Click to learn more about exchange trading tasks
Adding an Exchange Trading Tasks Node
To add a specific exchange trading tasks node, select Add Exchange Trading Tasks on the parent node menu.
You may also add exchange trading tasks node in bulk for all exchanges that may have been previously defined in the Crypto Ecosystem hierarchy. To do that, select Add Missing Exchanges on the parent node menu. An exchange trading tasks node is created for each defined exchange, each with the corresponding reference.
Starting an Exchange Trading Tasks
Select Run All Market Trading Tasks or Stop All Market Trading Tasks on the menu to start and stop all tasks under this node.
Market Trading Tasks
|A market trading tasks node groups trading tasks operating in a specific market.|
The market trading tasks node must reference a market defined in the Crypto Ecosystem hierarchy.
This node may spawn individual data products or may deploy data products in bulk organized by data mine and by bots. See the data products node for the details.
Click to learn more about market trading tasks
Adding a Market Trading Tasks Node
To add a market trading tasks node, select Add Market Data on the parent node menu.
You may also add market trading tasks nodes in bulk for all markets that may have been previously defined in the Crypto Ecosystem hierarchy. To do that, select Add Missing Markets on the parent node menu. A market trading tasks node is created for each defined market, each with the corresponding reference.
Starting a Market Trading Tasks
Select Run All Trading Mine Tasks or Stop All Trading Mine Tasks on the menu to start and stop all tasks under this node.
Trading Mine Tasks
|The trading mine tasks node is an organizational device that groups tasks corresponding to the referenced trading mine.|
The market trading tasks node must reference the definition of a data mine. The node may spawn tasks for each bot in the data mine.
Click to learn more about trading mine tasks
Adding a Trading Mine Tasks Node
To add a trading mine tasks node, select Add Trading Mine Tasks on the parent node menu. This action adds the node but does not establish a reference with any data mine.
The smarter use of the node involves using the Add Missing market trading tasks option on the parent node menu. This action creates a market trading tasks node for each data mine in the workspace, establishing a reference with the corresponding data mines. This is the first step in the direction of quickly setting up tasks for each bot in a given data mine.
Starting a Trading Mine Tasks
Select Run All Task Managers or Stop All Task Managers on the menu to start and stop all tasks under this node.
|A task manager is a device used to organize and control any number of tasks, which, in turn, control bot instances. You use a task manager to start or stop several tasks at the same time.|
Task managers are used both in the context of data mining and trading operations, to facilitate the organization of tasks.
For example, you may set up a task manager to handle tasks related to a particular set of indicators used with a certain strategy. Or, for example, to organize multiple backtesting sessions.
Click to learn more about task managers
Adding a Task Manager Node
To add a task manager, select Add Task Manager on the parent node menu.
Starting a Task Manager
Select Run All Tasks or Stop All Tasks on the menu to start and stop all tasks respectively.
|A task is the device used to control bot instances, that is, to start and stop bots, including sensors, indicators and the trading bot.|
Each task controls a single bot. A bot instance running on its own task is independent from other bots at the operating system level, thus, may not be affected by errors ocurring on those other bots.
Click to learn more about tasks
Adding a Task Node
To add a task, select Add Task on the task manager node menu.
Starting a Task
Select Run on the menu to start a task. When a task is started, the process instance of the bot instance attached to the task is started. Also, a visual indication that both the task and the process instance are running appear surrounding the corresponding nodes, in the form of a progress ring.
To stop a task, select Stop on the menu.
Trading Bot Instance
|A trading bot instance is a reference to the trading bot as defined in the Masters data mine. The instance of the bot runs the defined processes and generates the defined data products.|
Based on datasets exposed as products by other bots (counting sensors, indicators and even other trading bots), a trading bot applies the trading logic defined on a trading system to, on one side, generate a complete trading simulation (outputting datasets that include trades, the action of strategies, validation of conditions, etc.), and on the other side, manage the execution of orders when on a forward testing or live trading session.
The trading bot instance holds no definitions as to what the bot does. Instead, its process instance references the process definition in the Masters data mine. That is how the indicator bot instance obtains the information of what it needs to do once it is run.
Click to learn more about trading bot instances
Adding a Trading Bot Instance Node
To add a trading bot instance, select Add Trading Bot Instance on the task node menu. When a trading bot instance is added, it is created with one trading process instance, and a market reference.
Starting a Trading Bot Instance
You do not start or stop a trading bot instance directly. Instead, you start or stop the corresponding task.
Trading Process Instance
|A trading process instance is a reference to the process definition of the trading bot, as defined in the Masters data mine.|
The trading process instance must reference the Multi-Period process definition of the Jason trading bot in the Masters data mine.
Click to learn more about trading process instances
Adding a Trading Process Instance Node
To add a trading process instance, select Add Trading Process Instance on the trading bot instance node menu. When a trading process instance is added, it is created with a market reference.
Starting a Trading Process Instance
You do not start or stop a trading process instance directly. Instead, you start or stop the corresponding task.
|A backtesting session is a trading mode by which the trading bot instance reads historic market data in a user-defined datetime range, applies the rules defined in the associated trading system, and generates a trading simulation.|
A backtesting 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.
Click to learn more about backtesting sessions
Adding a Backtesting Session Node
To add a backtesting session, select Add Backtesting Session on the trading process instance node menu. When a session is added, it is created with the full set of parameters.
Starting a Backtesting Session
Before you start a backtesting 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.
After a few seconds, a literal indication of the progress of the calculations appears below the session node, displaying the date that is currently being processed. Once the calculation is finished, the session stops and the date below the session node dissapears.
To stop a backtesting session, select Stop on the menu.
Paper Trading Session
|A paper trading session is a trading mode by which the trading bot instance reads a live market data feed, applies the rules defined in the associated trading system, and generates a trading simulation.|
A paper trading 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.
Click to learn more about paper trading sessions
Adding a Paper Trading Session Node
To add a paper trading session, select Add Paper Trading Session on the trading process instance node menu. When a session is added, it is created with the full set of parameters.
Starting a Paper Trading Session
Before you start a paper trading 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.
|Parameters are properties of trading sessions, defined by users, to determine their behavior and improve the quality of simulations.|
The behavior of parameters may vary depending on the type of session.
Each testing session has its own set of parameters. This allows you to configure different trading sessions with different parameters, and go back and forth between them as required. For instance, you may have different backtesting sessions with different date ranges, different exchange fees or different slippage settings to account for different possible scenarios.
Click to learn more about parameters
Adding a Parameters Node
To add a parameters node, select Add Parameters on the session or the trading system menu, depending on the context. When a parameters node is added, the full set of parameters are created with it.
If you already have a parameters node but are missing some of the parameters, then select Add Missing Params on the menu.
Trading System Reference
|A trading engine reference determines which trading system shall be evaluated by the trading bot to run the trading session.|
In other words, the trading system reference lets the process instance know which trading rules to process for the given session.
Click to learn more about trading system references
Adding a Trading System Reference Node
To add a trading ensystemgine reference, select Add Missing Children on the trading session node menu.
Trading Engine Reference
|A trading engine reference determines which trading engine the trading bot shall use to structure the data it processes while running the trading session.|
In other words, the trading engine reference lets the process instance know which data structure to use to store information related to the trading session. This means that a workspace may have more than one trading engine.
Click to learn more about trading engine references
Adding a Trading Engine Reference Node
To add a trading engine reference, select Add Missing Children on the trading session node menu.
Execution Started Event
|The execution started event is the event that triggers the execution of a process. It usually references the execution finished event of another process on which the process depends on.|
These references determine when a process is due for another run. By listening to the execution finished event of the process it depends on, it may wake up just in time to process the new batch of data the dependency has just delivered.
Bots form a sort of multi-branched execution sequence with an indeterminate number of dependencies. Every time the bot further down the tree of dependencies finishes a cycle, it triggers the execution of multiple bots listening to its execution finished event.
In the context of a trading process instance running a trading session on the network hierarchy, the execution started event may be used to force the trading process to run only after the last indicator bot dependency finishes its job. This guarantees that all dependencies are up to date and that the trading bot will evaluate the information corresponding to the same candles for all indicators used by the trading system.
Not setting up this event on a trading session may result in eventual data inconsistencies, as—in theory—the trading bot may run with some indicators up to date and some slightly delayed.
Click to learn more about execution started events
Adding an Execution Started Event Node
To add an execution started event, select Add Missing Items on the process definition node menu. Items that may be missing are created along with the basic structure of nodes required to define them.