Release of SQX 139 Dev 1 and what’s planned for year 2024
We’d like to announce the release of the new SX 139 Dev 1 version – note that this is a development version for testing, not the final 139 version. Most …
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’d like to announce the release of the new SX 139 Dev 1 version – note that this is a development version for testing, not the final 139 version. Most …
Dive into Algorithmic Trading Without the Coding Headache! Are you intrigued by algorithmic trading but dread the thought of coding? Today marks the beginning of our exciting series that’s about …
In this interview, we catch up with Naoufel, a seasoned trader, to explore his journey through the stormy market of 2023. Naoufel is successful trader with verfied track record who …
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/