アルゴクラウドポートフォリオの内部で何が起きているのか?
AlgoCloudは最近、多岐にわたる大規模な改良と完全に新しい機能の提供を開始しました。最も重要な追加機能の一つが新しいアナリティクスセクションであり、これにより大幅に明確な…
コンテンツへスキップ | メインメニューへ移動 | 検索に移動
What-If scenarios is a feature in Quant Analyzer tool that allows you to test various hypothesis of trading your strategy.
For example, what if:
Why to use What-If scenarios?
You can find how different scenarios would improve or damage your strategy performance.
In combination with Trade analysis you can pick days or hours that are not profitable for your strategy and test the strategy performance without these days.
The power of Quant Analyzer is that it allows you to try different ideas quickly. You can create new What-If scenario in less than a second, so you can experiment with various options and their combinations.
Let’s import try a simple example. We’ll start with the following strategy that we’ll import to Quant Analyzer.
It looks ok, but it has quite long period of stagnation. Can it be improved by using a few simple filters?
Trade analysis of this strategy
Let’s check how this strategy looks like in Trade analysis. We can see that trades on Monday and Wednesday generate loss instead of profit.
Let’s try to make a scenario where the strategy will be not traded during these days.
In the What-If tab just uncheck Monday and Wednesday and click on Create What If alternative.
This will compute new statistics from this strategy with trades opened on Monday and Wednesday removed from the results. The new strategy results will be added to the databank below.
We can see immediately that this strategy has bigger profit and much smaller drawdown (12% vs 21%). So by just not trading these two days we might be able to improve the strategy results.
The strategy equity was also improved.
Trying something else
An useful trick that works many times is to limit the number of trades per day. Often strategies have much better results if you set maximum of trades per day they should open.
Again, we can simulate it using What-If analysis. Let’s check all trading days to start from the initial state and this time check also Take maximum 1 trade per day. This means that strategy should not open more than one trade daily.
Click on “Create What If alternative” and new what-if scenario is created in the databank.
We can clearly see that this filter has even better results than the previous one. The net profit increased almost 2x with drawdown reduced to half. By using this condition the strategy is now even profitable on Wednesday!
The equity curve looks also much better than the original strategy:
And the stagnation period is also 4x shorter now.
If you import the history of real or demo account to Quant Analyzer it often contains balance transactions – that means deposits and withdrawals. These transactions are loaded by EAA too and they distort the equity chart, making it less readable.
An example of account history with big deposit transaction:
Fortunately, there is an easy way to ignore this balance transaction using What-If scenario. Just check the Remove balance transactions and generate new What-If alternative.
The result is the same strategy, but with normally looking equity curve:
In this example we’ll use our original strategy example and we’ll try a different scenario – we’ll see how the results would change if the EA misses 5 best trades.
We can see that just by missing 5 biggest trades the strategy has much worse performance. This is common for trend following strategies that try to get as much profit from one trade as possible.
It is not something to worry about if your strategy depends on a very few great trades, so this scenario can act also as a strategy robustness test of a sort.
There are more things you can try as what-if scenarios – you can set it to use fixed lots size, don’t take trade when another one is opened (remove overlapping trades), etc.
I believe that after this article you have the idea of possibilities of What-If scenario and how you can use it to analyze and improve your trading.
Please note that some of the improvements you can see using What-If scenario might be just pure luck or they might not work the same in real trading because trades might influence each other (depending on your strategy). For example, if you don’t take one trade it might influence subsequent trades and it could lead to different results.
You should always retest your strategy with these settings incorporated to make sure it works as expected.
AlgoCloudは最近、多岐にわたる大規模な改良と完全に新しい機能の提供を開始しました。最も重要な追加機能の一つが新しいアナリティクスセクションであり、これにより大幅に明確な…

リボールは長年にわたり、株価指数先物の手動トレードを行ってきた。彼はエクセルで自身のシステムを取引ごとに慎重にテストし、その結果は素晴らしいものに見えた。実際の……

滑らかなエクイティカーブは人を惑わせるものだ。ポートフォリオは安定しているように見えるかもしれないが、もしすべての戦略が同時にトレードに参加し、損失を出し、そして同時に回復するのだとすれば、それは本当の意味で…