Skip to content
All library documents

Constructing and Managing Synthetic Trading Portfolios with OLS and PCA

Article MQL5 articles

Summary

This introduction explains portfolio trading as a synthetic position formed from multiple instruments, with their directions and lot sizes managed together. It distinguishes this from simply running independent systems on several symbols. Portfolio construction starts by selecting instruments and expressing each series in comparable deposit-currency profit terms. Ordinary least squares (OLS) can then find weights that make the combined series approximate a chosen target curve, such as a rising trend or a flat profile. Principal component analysis (PCA) is offered as another way to derive weights, including for spread portfolios.

The article describes converting contract values across currencies and calculating virtual profit and loss from price changes, then discusses basket adjustment, entry and exit approaches, and combining portfolios. It cautions that correlated portfolios can suffer simultaneous drawdowns and that conventional pending orders, intraday use, and chart indicators may be difficult to apply. The examples are implementation guidance rather than evidence of strategy performance; the author frames the coverage as introductory and recommends deeper statistical study. Results will depend on symbol selection, target behavior, weighting, and subsequent management.

Key ideas

  • A synthetic portfolio combines positions across instruments and manages them using a shared result.
  • OLS weights can be fitted to make a basket's profit series approximate a specified target curve.
  • PCA provides an alternative weighting approach based on the instruments' covariance structure.
  • Virtual profit calculations require comparable currency-denominated series and contract values.
  • Highly correlated portfolios may share drawdowns, and synthetic baskets have practical trading and charting limitations.

Tags

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