
New StrategyQuant X Build 136 Dev 2 is out
We are glad to announce that new Dev 2 build of an upcoming 136 version of StrategyQuant X was just published. You can download it from our Download page under …
Přejít k obsahu | Přejít k hlavnímu menu | Přejít k vyhledávání
Two new What If snippets, which allow us to test how strategy can be managed, depending on its current performance, have been added to the sharing server. The first is Equity MA Trading, which simulates trading strategies based on the performance of the stock curve. The second snippet Profit Factor MA Trading allows you to simulate trading a strategy based on its profit factor. Both snippets are an introduction to the topic of managing the intermediate performance of a strategy.
This what-if snippet allows you to simulate trading a strategy based on whether the current equity is below or above the equity curve. In practice, the snippet works by calculating the moving average balance over x trades. If the equity curve falls below its moving average, the strategy will not trade. While still calculating the moving average (even in the case of trades that are after the moving average.). And once the equity gets back below the moving average the strategy starts trading.
My preliminary tests indicate that this simple implementation does not produce positive results in general. Kevin Davey came to similar conclusions in his theses which you can find here . This functionality is also implemented in QuantAnalyzer and colleagues have come to similar conclusions in this article
Let us show a simple system that turns on and off depending on whether its equity is above or below the average equity of the last 10 trades.
In the figure below, we see the strategies with filtered equity.
However, it is possible to extend the snippet by tracking only long or only short equity or using a different type of moving average.
What if snippet Profit Factor MA Trading calculates the profit factor of the strategy, and when the profit factor is lower than the threshold you have set, the strategy does not trade. Snippet still calculates the profit factor of the strategy, even if the current profit factor is below the threshold. Right at the moment when the profit factor gets above the threshold that we have chosen, the strategy starts trading again.
There are two modes you can use
Let’s see an example of a simple RSI market reverse strategy on EURJPY.
I apply a snippet that will enable the strategy when its current profit factor is above 1.3.
We see improvement. The strategy has reduced the number of trades, better stability, and much lower DD.
Implementing both snippets into live trading is quite difficult. In reality, it could work like this: on one demo account, the strategy trades, and you use the copy script to trade on the other account. Or you could have a sort where the values are stored in a CSV file on the demo account, and on the real account, the strategy reads the values from the CSV file and trades accordingly. The easiest is probably to simulate money management, and this is the topic we will cover in the following article.
You can donwload boath snippets :
We are glad to announce that new Dev 2 build of an upcoming 136 version of StrategyQuant X was just published. You can download it from our Download page under …
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. BH Ergodic The formula …
Clone Army is a fully automated algorithmic trading system, that trades a portfolio of strategies on different markets and time frames. The strategies are mined and robustness tested with a …
Good idea !!! Thank you Clonex !!
thank you clonex i think this has great potential are you going to do futher work on this
clonex would these snippets not help with the following or am i delusional
i think its a great idea from a trade management point of view as well as risk point of view when you trade a large portfolio
doesnt this allow the market to switch the strats on and off
Hi I’m out of office till 30.1 I will answer once I’ll be here.
Where can I download please?
Go to our codebase https://strategyquant.com/codebase/what-if-profit-factor-trading-moving-average-money-management-simulation/