Reconstructing Trading Strategy Objects from Serialized Parameters
Summary
This article explains how to rebuild trading-system objects from parameter strings stored in a database. It distinguishes strategy parameters from tester inputs, noting that the stored strategy representation contains properties needed to recreate an object, including details absent from the inputs column. The design parses class descriptions and values, then extends the approach to nested strategy groups and advisor objects whose configurations could be loaded from text rather than hard-coded.
To support this, the author introduces a common base class for constructible objects and a factory pattern that selects and creates the appropriate class. Parsing routines read structured components such as arrays, nested objects, numbers, and strings, while validity checks flag malformed initialization data. A comparison between two EA versions using the same set of strategy instances produced identical test results, supporting the claim that the new construction method preserves behavior in that example. This is an infrastructure method, not a trading strategy; the reported comparison is limited to one stated setup and does not establish broader equivalence or performance.
Key ideas
- Serialized parameter strings can store enough configuration to recreate trading strategies and related objects.
- A factory can parse class descriptions and construct the appropriate object, including nested groups.
- Validation state and parsing errors help detect malformed initialization strings.
- The article reports identical tester results for two EA versions using the same strategy instances in its example.
- The approach improves configuration and optimization workflow but does not itself define a trading edge.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.