Skip to content
All library documents

Optimizing One Trading Strategy Across Multiple Instruments

Article vn.py community

Summary

This Chinese-language forum exchange distinguishes between optimizing a strategy separately for each instrument and optimizing it as a combined portfolio. One reply suggests looping over instrument symbols, initializing the backtest within each iteration, and completing each backtest before running optimization. That workflow produces separate optimization results for each instrument rather than shared portfolio parameters.

The questioner clarifies that they want a single combined optimization and raises a limitation: the portfolio strategy template may not support stop orders or the desired mode. A reply points to a portfolio backtesting example that includes optimization as a reference. The discussion offers a direction for implementation, but it does not explain the example's objective function, parameter handling, or how portfolio constraints are represented. It provides no results or code-level walkthrough, so readers would need to inspect the referenced example and verify that its capabilities match their strategy and order requirements.

Key ideas

  • A loop can run separate backtests and optimizations for each instrument after reinitializing the process each time.
  • Separate per-instrument optimization does not produce one shared portfolio parameter set.
  • The discussion points to portfolio backtesting as a route to combined optimization.
  • The questioner flags possible limitations around stop orders in the portfolio strategy template.
  • No optimization results or detailed implementation are provided.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.