In Quantacula parlance, a model is a collection of rules that specify when to enter and exit the market. In this article we’ll concentrate on building models on the Quantacula.com web site using drag and drop building blocks.
When you select Create/Building Block Model from the main menu, you start with a template model. The lists along the left contain the different kinds of building blocks you can use to compose your model. You will drag building blocks from these lists onto the model’s surface to the right.
These block control when your model enters and exits the market. There are separate blocks for long (buy, sell) and short (short, cover) positions. Quantacula pairs an Entry Block with the Exit Blocks it finds below the Entry. Each Entry Block can be paired with one or more Exit Blocks.
In the example below, we paired one Buy at Market Open Entry Block with both a Sell at Profit Target and a Sell at Stop Loss Exit Block. We modified the default value of the Stop Loss parameter from 10% to 20%. Many building blocks expose parameters that you can modify by clicking the gear icon () on the block.
You can drop one or more Condition Blocks onto an Entry or Exit to add conditional logic to your model. Typical Conditions involve indicators crossing each other, crossing price, or penetrating a specific value. You will often need to adjust the parameters of Condition blocks to achieve the results you want. Some of the parameters are expressed as indicators. When modifying an indicator, Quantacula presents a new user interface that lets you select all the available technical indicators, as well as the standard price components of open, high, low, close and volume.
In the example below, we implement the classic moving average crossover system. We use two Indicator Crosses Indicator Condition blocks, and set the period of the moving averages to 20 for the fast average, and 50 for the slow average.
Here you can control the various settings of the backtest simulation. Establish a Data Selection to determine what data to backtest. Specify a Benchmark Symbol to compare your results against an appropriate market proxy (for example SPY for US stocks or BTC.USD for cryptocurrencies.) Specify a simulated Starting Capital and a Margin Factor to use in the simulation. Select your desired Position Sizing method, and the Data Range to determine the length of history to backtest.
When you are satisfied with your model's composition and settings, click the green Run Backtest button to begin the simulation. The backtest results appear here in the Backtest tab, and include an equity curve, metrics report, and lists of simulated positions and trade signals.