My current strategy pauses trading during bearish market conditions to lock in profits and reduce exposure. Trading resumes only once signs of market recovery are confirmed.

I'm considering integrating an alternative tradable asset such as fixed income securities or other instruments that are either less correlated with equities or exhibit lower volatility during downturns. The goal is to continue generating value during periods when the primary equity strategy is inactive, without being significantly impacted by market declines.

I’ve analyzed multiple asset classes during previous bearish periods (e.g., Russia-Ukraine conflict, 2022–2023), and found that most—including traditional hedges like gold and oil underperformed or declined alongside equities.

I’d appreciate any suggestions for suitable instruments and example code that would allow the strategy to dynamically switch from stock trading to the chosen alternative during bearish conditions.