Wednesday, February 21, 2018

Guided Tour

BTAnalytics Guided Tour

Article Index

This is a tour showing some of the BTAnalytics Features. It's recommended to follow the topics in the order specified.

By following this tour you will be able to learn about the basic operation of BTAnalytics.


Overview

BTAnalytics has been designed as a tool to be used in conjunction with your current trading and backtesting tools. Operations on almost any type of instrument (Stocks, Futures, Forex, CFD, ETF...) are supported.

The main BTAnalytics function involves storing trades lists (both real and fictionally generated through backtesting) generated by other trading software along with information about the trader or trading system that generated them in order to proceed to its rigorous analysis, comparison and refinement of the strategies and methods used in their generation. BTAnalytics comes with tools to easily automate the importing process and make it work for your current Trading Software.

The imported trades must have at a minimum the following fields:

  • Instrument.
  • Entry Date/Time.
  • Entry Price.
  • Exit Date/Time.
  • Exit Price.
  • Side. (If it is not included then a Long position is assumed)

Optionally the trades may also contain information about the size of the position (Quantity) and many other fields that will allow to accomplish a deeper analysis of the data.

Once the trades have been imported, depending on whether the Quantity field was defined, one or two nodes will be generated and added to the data tree structure that contains the data of all the simulations and analysis (shown in the "Studies Explorer" component in BTAnalytics). The generated nodes will be:

  • A "Raw Simulation Study" node that contains information about the "Raw Trades" or trades without position sizing, and some other information and analysis data.
  • A child of type "Simulation Study" node (only if the Quantity field was specified, and only for the trades where it was > 0) that contains the Sized Positions and other data about the result of applying position sizing to the Raw Trades and more analysis data.

Importing Trades Flow Chart

It is better to separate the Raw Trades and the Sized Positions in order to be able to analyze the underlying trading methods and position sizing methods independently.

There are a total of 5 different types of node that can hold and organize the information in the "Studies Explorer". Those nodes can be generated using different tools included with the software:

Folder Node"Folder Node": Node utilized to store and organize the other nodes.

Raw Strategy StudyComposite Raw Simulation Study"Raw Simulation Study" (can be a simulation of a single strategy or a combined strategy): Contains the Raw Trades, Trading System Info and their analysis.

Derived Raw Simulation"Derived Raw Simulation Study": obtained modifying or applying filters to the "Raw Simulation Study". Contains the derived Raw Trades, derivation configuration, and their analysis (same as "Raw Simulation Study").

Simulation Study"Simulation Study". Contains the Sized Positions, info about the Position Sizing method, and their analysis.

Monte Carlo Study"Monte Carlo Study": Contains data about a set of simulation runs executed using the same Position Sizing parameters and their analysis.

The nodes can contain other nodes as children, using the following rules:

  • A "Folder Node" can only contain as its immediate children other "Folder Nodes" or "Raw Simulation Study" nodes.
  • A "Raw Simulation Study" node can contain as its immediate children:
    • "Derived Raw Simulation Study" nodes.
    • "Simulation Study" nodes.
    • "Monte Carlo Study" nodes.
  • A "Derived Raw Simulation Study" node can contain as its immediate children the same sub nodes that the "Raw Simulation Study" node, including other "Derived Raw Simulation Study" nodes (derivation can be applied recursively)
  • A "Simulation Study" node can't contain any node as children.
  • A "Monte Carlo Study" node can't contain any node as children.

 

Backtests and Trading Results Organized in the BTAnalytics Studies Explorer

BTAnalytics includes among other the following tools:

 

New Simulation"New Simulation". Can be used whenever there is a "Raw Simulation Study" selected in the "Studies Explorer". This tool enables the user to generate new "Simulation Studies" specifying the position sizing and other parameters. Once it is executed, a new "Simulation Study" will appear as child of the selected "Raw Simulation Study".

Strategy Builder"Raw Simulation Builder". A "Raw Simulation Study" can contain the Raw Trades generated by one or more Trading Strategies, which can be organized in a hierarchical tree. This tool allows the user to generate new "Raw Simulation Studies" by selecting strategies included in other "Raw Simulation Studies", and thereby create hierarchical combinations of other strategies and a analyze them.

New Derivation"New Derived Raw Simulation". Can be used whenever there is a "Raw Simulation Study" selected in the "Studies Explorer". A derivation of a "Raw Simulation Study" can be created by different methods, such as by applying filters to the Raw Trades to remove the incorrect ones, or by modifying the slippage that was used when the simulation was done, or by adding filters based on variables included with the trades data to optimize the Trading System, etc. The derivation can be applied recursively and they behave as a normal "Raw Simulation Study". The derivations will appear as child of the selected "Raw Simulation Study".

New Monte Carlo Study"New Monte Carlo Analysis". Can be used whenever there is a "Raw Simulation Study" selected in the "Studies Explorer". This type of analysis allows to perform an elevated number of simulations with the same parameters of Position Sizing, and is useful to evaluate the reliability and variability of the simulation results.

 


User Interface

The BTAnalytics User Interface is very flexible and configurable, being built using a dockable architecture that allows the user to arrange the components in the most convenient layout.

 

BTAnalytics Main Window Explained

The Main Window consists of 3 different zones:

  • Control Ribbon.
  • Studies Explorer. This is the zone where the hierarchical structure that stores the simulations and analysis is shown. This component is dockable and can be dragged to another window position and even outside of the main window.
  • Opened Studies Zone: In This zone is where different studies can be shown in a tabbed layout. The studies zone layout can be modified and can show several stacked or side by side studies concurrently. The studies can also be dragged out of the Main Window and even into another monitor. This is a very handy feature that allows to compare side by side several studies.

The Studies have a tabbed and dockable interface, where different Data Analysis Visualizers (DAV) for different kinds of analysis are shown. Also, there is a component in the studies called "View Selector" that allows the user to filter the data shown in the DAVs by side (long / short /all) or by sub strategy

 

 

Study window in more detail

Some of the windows of BTAnalytics also implement an advanced feature that allows the user to arrange inside the window the individual controls (such as a grid, a text box or a chart) in a customized layout. This feature can be accessed in some windows by right clicking in an empty zone of the window and selecting the "Customize Layout" option. Then the user can drag and drop the controls and rearrange them using the desired layout.

 

Customizing the Layout of a window

 

 


Studies Explorer

The Studies Explorer is the BTAnalytics component that allows to keep organized and accessible the data used by the program. Through this component, you can access all the studies and compare their performance metrics with each other a glance.

The performance metrics shown in the Studies Explorer can be fully configured by dragging the columns headers or by right clicking on a column header and then in the "Columns Selector" menu item.
There is also available the possibility to store different layouts of the Studies Explorer in profiles (called "Views") managed in the "Studies Explorer Views" group in the Ribbon.

Depending on the selected Study in Studies Explorer certain options are enabled in the Ribbon that allows to:

  • Generate child Studies for the selected Study.
  • Rename the Study.
  • Change the short description ("Note") of the Study.
  • Cut / Copy the study to another folder (only if the selected node in the tree is a folder, a Raw Simulation Study or a Derived Raw Simulation Study)

The studies can also be moved by dragging and dropping them on the tree.

The shown studies can also be ordered by clicking on the columns headers and filtered.

Studies Explorer in more detail

 

 


Data Importing

BTAnalytics has extensive data importing features in order to seamlessly integrate with other trading software. Among those features are the following:

  • Importing of arbitrary trades lists in text files. The text files formats can be defined with high flexibility in the "Import Settings" dialog, under the "Text Files Importing Formats" tab.
  • Importing of custom binary files that can be generated by plugins developed for the 3rd party software. This method allows the most powerful integration, enabling to import not only the trades lists, but also the Trading System configuration info, the source code or any other information associated with the system that generated the trades. Depending upon the 3rd party trading software architecture this method can be implemented more or less easily.
  • Automation of the selection of the file format depending on the file extension
  • Automation of the importing process by monitoring certain folders on the computer and processing all the files with certain extensions that are dropped on them.
  • Files can also be imported manually.

 

Import Settings: Text Files Importing Formats

 

Text Files Importing Format Configuration

 

Import Settings: Monitored Folders

 

Manually Import File

 

 


Raw Simulation Study

The Raw Simulation Studies store the Raw Trades, details about the Trading System that generated them and its configuration. All that information along with the analysis data derived from them are shown in the Data Analysis Visualizers (DAVs).

This study has a "View Selector" component that enables the user to filter the data shown in the DAVs by side and by sub-strategy.

For this type of study the following DAVs are provided by BTAnalytics:

  • Details DAV: This DAV shows information about the Trading System and its configuration that generated the Raw Trades. The information shown in this DAV is heavily dependent on the importation mode. If the Raw Trades are imported from text files, then the information shown may be more limited. Below an image of this Visualizer is shown.

 

Raw Simulation Study: Details Data Analysis Visualizer (DAV)

  • Raw Trades DAV: This DAV shows in an advanced and feature rich grid all the Raw Trades. The grid allows to select the shown columns, filtering and ordering the rows, saving the layout, exporting the data, etc.

 

Raw Simulation Study: Raw Trades Data Analysis Visualizer (DAV)

  • Performance Metrics DAV: This DAV shows the performance metrics calculated over the Raw Trades. In order to make comparisons among the performance of the sub-strategies easier, it is possible to show side by side the performance of several sub-strategies. This can be achieved making right click and selecting in the contextual menu the option desired.

 

Raw Simulation Study: Performance Metrics Data Analysis Visualizer (DAV)

  • Contribution DAV: This DAV allows to analyze the contribution of several factors to the end results of the simulation (winning trades, bars held, profit/loss...). Among them:
    • The contribution for each instrument.
    • The contribution by entry/exit date/time: (by year, by month, by quarter, by week, by hour...)
    • Contribution by sub-strategy.
    • Contribution by entry/exit signal.

 

Raw Simulation Study: Contribution Data Analysis Visualizer (DAV)

  • Trades Distribution DAV: Allows to analyze:
    • The distribution of trades by profit.
    • The distribution of trades by duration.
    • The trade profit stability. (Dispersion analysis about the trades profit)
    • The trade duration stability. (Dispersion analysis about the trades duration)

 

Raw Simulation Study: Trades Distribution Data Analysis Visualizer (DAV)

  • MAE/MFE DAV: This DAV is designed to analyze the Maximum Adverse Excursion and Maximum Favorable Excursion of the trades.

 

Raw Simulation Study: MAE & MFE Data Analysis Visualizer (DAV)

  • Metrics by Period DAV: With this DAV, the user is allowed to get insights about the number of trades, trades duration, trades profit and other metrics depending upon the entry/exit time of the trade. For example, with this DAV it is possible to analyze the trades by hour of day, month, day of week, etc.

 

Raw Simulation Study: Metrics By Period Data Analysis Visualizer (DAV)

  • Trades Life DAV: This DAV is designed to study the evolution of Trades in time (profit/loss by duration.) This can be very useful for setting timeouts for the trades.

 

Raw Simulation Study: Trades Life Data Analysis Visualizer (DAV)

  • Slippage Analysis DAV: With this component the user is able to analyze the impact of distinct levels of slippage in the trading strategies and their results.

 

Raw Simulation Study: Slippage Analysis Data Analysis Visualizer (DAV)

  • Analysis Vars DAV: Using this DAV there is possible to check the impact in the Trading Systems of applying different filters over indicators and variables. This is a tool that enables to visually make powerful optimizations to the Trading Systems, limiting the over optimization and curve fitting of the automatic optimizers used by some software.

For example, with this DAV, the user can evaluate the result of applying an additional filter to the Trades Entry Conditions such as RSI(15) < 20.

In order to be able to apply the filters, it is necessary to include the Analysis Variables values along with all the other data for the trades. This enables a new method to visually optimize Trading Systems with little effort and less prone to over optimization.

 

Raw Simulation Study: Analysis Variables Data Analysis Visualizer (DAV)

 


Simulation Study

A new Simulation Study can be made using the Ribbon Button while there is a Raw Simulation Study selected in the Studies Explorer.

The Simulation Studies store the Sized Trades resulting from applying the Position Sizing Rules to the Raw Trades stored by the Raw Simulation Study, along with details about the Position Sizing parameters, Commissions configuration, etc. that generated them. All that information together with the analysis data derived from them are shown in the Data Analysis Visualizers (DAVs).

This study has a "View Selector" component that enables the user to filter the data shown in the DAVs by side and by sub-strategy.

For this type of study the following DAVs are provided by BTAnalytics:

 

  • Details DAV: This DAV shows information about the Position Sizing and other parameters that generated the Sized Positions.

 

Sized Simulation Study: Details Data Analysis Visualizer (DAV)

  • Positions DAV: This DAV shows in an advanced and feature rich grid all the Positions (sized trades). The grid allows to select the shown columns, filtering and ordering the rows, saving the layout, exporting the data, etc.

 

Sized Simulation Study: Positions (Sized Trades) Data Analysis Visualizer (DAV)

  • Performance Metrics DAV: This DAV shows the performance metrics calculated over the Positions. In order to make comparisons among the performance of the sub-strategies easier, it is possible to show side by side the performance of several sub-strategies. This can be achieved making right click and selecting in the contextual menu the option desired.

 

Sized Simulation Study: Performance Metrics Data Analysis Visualizer (DAV)

  • Equity DAV: In this visualizer it is shown the equity curve of the simulation along with a grid with the data.

 

Sized Simulation Study: Equity Data Analysis Visualizer (DAV)

 

  • Drawdown DAV: This DAV shows charts for the equity curve, the drawdown and the time elapsed since the last maximum of the equity value, along with a grid with the data.

 

Sized Simulation Study: Drawdown Data Analysis Visualizer (DAV)

  • Profit by Period DAV: This DAV shows the profit/loss by selected period along with a distribution of the profit/loss by periods and the grid with the data. The periods that can be selected include yearly, quarterly, monthly, weekly, daily, hourly.

 

Sized Simulation Study: Profit By Period Data Analysis Visualizer (DAV)

  • Portfolio Evolution DAV: In this DAV it is shown the daily evolution of the equity and performance metrics along with the trades active, opening, closing and discarded for the given day. The current day can be chosen from a calendar or selected clicking in the equity chart or in a date in the dates grid.

 

Sized Simulation Study: Portfolio Evolution Data Analysis Visualizer (DAV)

 

 


Monte Carlo Study

A new Monte Carlo Study can be made using the Ribbon Button while there is a Raw Simulation Study selected in the Studies Explorer.

The Monte Carlo Studies store the Simulation Runs executed in order to make a true portfolio Monte Carlo Analysis along with the Position Sizing Rules, Commissions configuration, etc. that generated them. All that information together with the analysis data derived from them are shown in the Data Analysis Visualizers (DAVs).

When a Monte Carlo analysis is performed, BTAnalytics allows to set the number of runs that will be executed. More runs mean more accurate results but also more time to run and more disk space occupied. The Position Sizing parameters, commission's settings and others should be also set.

This study has a "View Selector" component that enables the user to filter the data shown in the DAVs by side and by sub-strategy.

For this type of study the following DAVs are provided by BTAnalytics:

 

  • Details DAV: This DAV shows information about the Position Sizing and other parameters that generated the simulation runs.

 

Monte Carlo Study: Details Data Analysis Visualizer (DAV)

  • Average Performance DAV: This DAV shows information about the average performance of all the performed runs.

 

Monte Carlo Study: Average Performance Data Analysis Visualizer (DAV)

  • Metrics Distribution DAV: In this DAV is shown the distribution of metrics such as Net Profit, APR, Draw Down, Sharpe Ratio, etc. along with a chart showing the probability of the selected metric being greater or lower that any value.

 

Monte Carlo Study: Metrics Distribution Data Analysis Visualizer (DAV)

  • Simulation Runs DAV: With this DAV the user is allowed to see the performance of the individual runs executed in the Monte Carlo Simulation. This DAV includes a button that allows to generate a Simulation of the parent Raw Simulation matching the currently selected run. The main views include:

 

    • All Runs Equity: Shows the compared Equity Charts of several runs.

 

Monte Carlo Study: All Runs Equity - Simulation Runs Data Analysis Visualizer (DAV)

    • Performance Metrics: Shows the Performance Metrics of the selected run.

 

Monte Carlo Study: Selected Run Performance Metrics - Simulation Runs Data Analysis Visualizer (DAV)

    • Charts: Shows the Equity and Drawdown charts for the selected run.

 

Monte Carlo Study: Selected Run Equity and Drawdown - Simulation Runs Data Analysis Visualizer (DAV)

 

 


Raw Simulation Derivations

The Raw Simulation Derivations can be accessed using the Ribbon Button while there is a Raw Simulation Study selected in the Studies Explorer.

In BTAnalytics it is possible to build derivations based on a Raw Simulation Study. These derivations are nothing more than a regular Raw Simulation Studies made by altering the base Raw Simulation Study Raw Trades one way or another.

The Derivations (or derived Raw Simulation Studies) contains the same information than a regular Raw Simulation Study plus some information defining the parameters used to make the derivation.

In the following window the user can select the type of derivation that want to be made.

 

Derivations Builder: Selecting the derivation type

The Derivation Builders included in BTAnalytics are:

  • General Trades Filter Derivation Builder: This Derivation Builder allows to make derivations by removing some trades following an arbitrary condition. The condition can be stated in a filter component. This Derivation Builder allows for example to delete erroneous trades or some symbols, or the trades where the entry price is less than 1, etc.

 

Derivation Builder: General Trades Filter

  • Slippage Modifier Derivation Builder: This Derivation Builder allows to make derivations by adding some slippage to the base Raw Simulation Study Raw Trades, and to visually see the effects of the slippage upon the simulation results.

 

Derivation Builder: modifying Slippage to create a derivation

  • Analysis Variables Derivation Builder: This Derivation Builder allows to make derivations by applying filters over the Analysis Variables included along the Trades. For example, with this Derivation Builder, the user can generate a Derivation that is equivalent to the base Raw Simulation Study plus applying an additional filter to the Trades Entry Conditions such as RSI(15) < 20. Then the derived Study will have only the Raw Trades of the base Raw Simulation Study that meet the stated condition.

In order to be able to apply the filters, it is necessary to include the Analysis Variables values along with all the other data for the trades. This enables a new method to visually optimize Trading Systems with little effort and less prone to over optimization.

 

Derivation Builder: Adding an Analysis Variable filter to create a derivation

 


Raw Simulation Builder

The Raw Simulation Builder can be accessed using the Ribbon Button:

This tool allows to combine Strategies and Raw Simulations forming new Composite Raw Simulations, identifiable in the Studies Explorer by the symbol .

The Raw Simulation Builder dialog is as follows:

 

Raw Simulation Builder: Building a composite simulation

There are two types of strategies: Intermediate () and Terminal (). Allocation rules can be applied to both, but Position Sizing rules can only be applied to Terminal Strategies.

The procedure to follow to create new Composite Raw Simulations (or single ones) is:

  1. Select a Raw Simulation Study in the "Raw Simulations Explorer" control. Then the Strategies Tree for the selected Study is shown in the "Selected Raw Simulation Strategy Tree" control.
  2. Select a Strategy in the "Selected Raw Simulation Strategy Tree" control.
  3. Add the selected Strategy to the "New Strategy Tree" control using Drag and Drop. Intermediate Strategies can also be created in order to better organize the Strategies Tree. Also, the Intermediate Strategies will enable to better define the money allocation method to be enforced when doing a Simulation or Monte Carlo Study.
  4. See the resulting statistics for the new Strategy Tree in the Strategy Inspector.
  5. Build the new Raw Simulation Study.

 


Multi Currency Features

With BTAnalytics you can make Simulations or Monte Carlo Simulations that include instruments whose base currencies are different.
For example you can make a simulation of Stocks denominated in EUR, USD and GBP and set the simulation base currency to any of then or even another currency such as JPY.
In such a scenario, the exchange rates between the instrument currencies and the simulation currency can be set in one of two ways:

  • A fixed exchange rate between the instrument currencies and the simulation base currency. For example, 1 USD = 100 JPY, etc.
  • A variable exchange rate based on the historical evolution of the currency pairs. In order to do so, those historical exchange rates data should be imported into BTAnalytics using the "Currency Exchange Rates" ribbon button.


This feature also allows to accurately simulate FOREX strategies for several Currency Pairs even when the base currencies of the pairs are different.

 

Multi Currency: All Currency Pairs

 

Multi Currency: Currency Pair Configuration

 


Exporting Features

BTAnalytics allows to export all the data, plots and charts in any given Study/DAV in a variety of formats, including PDF, DOC and XLS or be directly sent to the printer. This can be achieved using the Reports Generator button and the print button while a Study is open.

 

Generating a report for an Analysis

 

The data, plots and charts can also be easily copied to the clipboard.

 


Extensibility

BTAnalytics is designed using a very extensible architecture that allows to create new modules (Plugins) that extends its functionality. The types of Plugins than can be created are:

  • Position Sizers: These extensions allow to create custom Position Sizing Strategies that can be used when generating Simulations and Monte Carlo Analysis.
  • Raw Simulation Study DAVs: Data Analysis Visualizers that shows analysis for this type of Study.
  • Simulation Study DAVs: Data Analysis Visualizers that shows analysis for this type of Study.
  • Monte Carlo Analysis Study DAVs: Data Analysis Visualizers that shows analysis for this type of Study.
  • Derivation Builder: Components that enable BTAnalytics to create Raw Simulation Studies derivations.

 

 

Quality Products

Microsoft BizSpark Partner
 
Applications Digitally Signed with COMODO Certificate

Risk Disclosure:

Futures and other instruments trading contains substantial risk and is not for every investor. An investor could potentially lose all or more than the initial investment. Risk capital is money that can be lost without jeopardizing ones financial security or life style. Only risk capital should be used for trading and only those with sufficient risk capital should consider trading. Past performance is not necessarily indicative of future results.

Payment Processing by: