I am working on a strategy that involves improvements and changes, and to maintain order in the strategy releases, it is versioned, for example v1, v2, v3, etc.
The question is: Is it possible to define a series of tests for the functionality of version v1, so that when version v2 arrives, we can apply the tests from version v1 plus the new tests from version v2? And so on for the other versions.
For example, if a feature is the crossing of two EMAs in v1, how can I test or perform a test to verify that the strategy is indeed entering the moving average crossover correctly? And how can I verify in real-time that a position is being opened at the mentioned crossover?
Now, if we add a feature in v2, how can I evaluate whether the test for the v1 feature and the v2 feature is running correctly in both backtesting and live trading?
This is a very simple example, of course, but the strategies I work with are much more complex, and I only used it to help you understand.
Furthermore, I used to manually verify the correct execution of orders by looking at the chart and specifically checking if the conditions were met. However, with multiple projects and their growth, this becomes very time-consuming and impractical.
Is there any option to solve the scenario I am presenting to you?
Thank you very much.

Comment