Skip to main content
Total Downloads
750
750
Published
Aug 7, 2025
1y ago

Get Started

dotnet add package StockSharp.Strategies.0361_Crude_Oil_Predicts_Equity.py --version 5.0.0

No framework information available.

README

Crude Oil Predicts Equity Strategy (Python Version)

This strategy uses the relationship between crude oil and equity returns. If the trailing one‑month return on crude oil is positive, the strategy invests in an equity ETF. Otherwise it rotates the capital into a cash or bond ETF, staying out of equities when oil is weak.

The algorithm monitors daily candles and checks the signal on the first trading day of each month. Orders are submitted at market prices and respect a minimum trade size to avoid tiny fills.

Details

  • Universe: One equity ETF, one crude oil instrument, and a cash or bond ETF.
  • Signal: Go long the equity ETF when crude oil's Lookback period return is greater than zero; otherwise hold the cash ETF.
  • Rebalance: Monthly, at the start of the month.
  • Positioning: Long equity or cash, never both.
  • Parameters:
    • Equity – target equity ETF.
    • Oil – crude oil security for the signal.
    • CashEtf – defensive asset when oil return is negative.
    • Lookback – number of candles used to compute oil return.
    • CandleType – candle timeframe (default: 1 day).
  • Note: The sample focuses on structure and omits transaction costs and slippage.

Downloads by Version

Not enough data for chart

Similar & Alternative Packages

Hand-picked matching NuGet libraries based on tags & ecosystem

Depended On By

Find packages that declare this package as a dependency. NuGet does not provide a reverse-dependency endpoint, so candidates are checked on demand.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

No SPDX license expression is published. Review the license text and your organisation's policy before redistribution.No target framework metadata is available. Confirm compatibility in a representative project before standardising on this package.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.