Crude Oil Predicts Equity Strategy (Python)
Get Started
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
Lookbackperiod 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
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.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.