Multimarket analysis in SQX

One of the most important goals in analyzing the strategies generated in StrategyQuantX is to eliminate the risk of overfitting. StrategyQuant provides a wide range of tools for filtering and analyzing strategies.

One approach to determine if a strategy is overfitting for only certain historical data is to know what works in multiple markets.

In StrategyQuant X, you can do this by setting up multiple markets in the Additional Markets section. Performance in multiple markets can then be determined by looking at the performance of the entire portfolio.  (databank values with portfolio setting). For some indicators, we get the cumulative value, for others the average value.

However, this approach has some weaknesses that we have tried to address by adding new snippets. These are the median values of selected indicators in each of the additional markets. Why did I use median values and not average values?

Below is a brief comparison of the two approaches.

Source:  https://www.diffen.com/difference/Mean_vs_Median

Let us imagine a situation where we test the strategy on 20 additional markets. We will have a situation where the strategy performs poorly in 18 markets and very well in 2 markets. The arithmetic mean will be much more optimistic than the median. The arithmetic mean is not appropriate in this case because it tends to give more positive data than reality.

A similar example of the condition i is when you have fewer relatively good results and more negative results.

How do you install these snippets: https://strategyquant.com/doc/programming-for-sq/import-export-custom-indicators-and-other-snippets/

How do you add a snippet to a databank view?

First, you create a new databank view or modify an existing one.

Then use add columns to select the AddmarkestNetProfitMedian …

Here it is important to set the portfolio computation for each snippet so that we get the correct results.

 

You can download snippets here.

 

 

clonex

clonex

0 Comments
Inline Feedbacks
View all comments

Continue reading

New indicators are available

clonexSeptember 23, 2021

We have added several new indicators and snippets to the sharing server in recent months. In today’s blog post, we’ll briefly go through each of them. TTM Squeeze TTM Squeeze …

We are hiring – Quality Engineer / Tester

Kornel MazurSeptember 14, 2021

We are looking for a new colleague to oversee product testing. He will be responsible for development of automatic tests for all our products, mainly StrategyQuant X (desktop software version) …

edge ratio

Edge Ratio and True Out of Sample Analysis

clonexAugust 25, 2021

In the opening episode, we explained what the Edge Ratio is and outlined the basic methodology for using it to develop strategies in StrategyQuant X. The sequel to this article …