GPT-4 Algotrading Guide Part 1: Sourcing Ideas
Turn GPT-4o Into a Money Printing Machine by Creating an Army of Bots That Trade For You While You Sleep
Sourcing trading ideas with GPT-4 tutorial video
In order to design an army of bots that trade for you, you first need to source trading ideas.
I source ideas from books, youtube videos, and doing trail and error with indicators I find interesting.
The problem is reading 1000 page books on quantitative trading is time consuming, boring, and confusing.
And most “educational” trading videos on Youtube are full of discretionary chart analysis which is completely subjective and full of hindsight bias.
So I turned ChatGPT 4o into an endless fountain from which to source trading ideas since it can
Effortlessly access every book on trading in existence
Save you years of reading boring and confusing texts
Here’s my prompt to source hundreds of best trading ideas instantly.
Just copy/paste this into GPT-4 and hit enter
Objective:
Help me design a unique quantitative trading algorithm for futures markets using principles from expert books on trading strategies. Provide a random unique trading strategy every time from a different book. Do not use the strategy from the example.
Books to Source Ideas From:
"Trading Systems and Methods" by Perry J. Kaufman
"A Guide to Creating a Successful Algorithmic Trading Strategy" by Perry J. Kaufman
"Algorithmic Trading: Winning Strategies and Their Rationale" by Ernest P. Chan
"Quantitative Trading: How to Build Your Own Algorithmic Trading Business" by Ernest P. Chan
"Systematic Trading: A Unique New Method for Designing Trading and Investing Systems" by Robert Carver
"Cybernetic Analysis for Stocks and Futures: Cutting-Edge DSP Technology to Improve Your Trading" by John F. Ehlers
"Rocket Science for Traders: Digital Signal Processing Applications" by John F. Ehlers
"Evidence-Based Technical Analysis: Applying the Scientific Method and Statistical Inference to Trading Signals" by David Aronson
"Building Winning Algorithmic Trading Systems: A Trader's Journey From Data Mining to Monte Carlo Simulation to Live Trading" by Kevin J. Davey
Instructions:
Hypothesis:
State a hypothesis about market behavior that the strategy will be based on. For example, "ES futures markets tend to be mean reverting."
Market:
Specify the market the strategy will apply to. For example, "ES (E-mini S&P 500 futures)."
Timeframe:
Specify the timeframe for the strategy. For example, "Daily."
Strategy Type:
Specify the type of strategy. For example, "Mean Reversion."
Source:
Provide quoted evidence from one of the books that the hypothesis is based on. For example, "According to Kaufman in 'Trading Systems and Methods,' mean reversion strategies work well in markets that exhibit cyclical behavior."
Setup:
Detail the technical indicators, patterns, or statistical methods used in the strategy. Explain how these components are calculated or identified using historical price data.
Entry Signals:
Describe the conditions under which a buy signal is generated.
Exit Signals:
Detail the conditions under which a sell signal is generated.
Risk Management:
Discuss risk management techniques, such as stop-loss orders, position sizing, and portfolio diversification, to protect against adverse price movements.
Summary:
Write a summary of everything the strategy does in plain English.
Example:
Hypothesis:
ES futures markets tend to be mean reverting.
Market:
ES (E-mini S&P 500 futures)
Timeframe:
Daily
Strategy Type:
Mean Reversion
Source:
According to Kaufman in "Trading Systems and Methods," mean reversion strategies work well in markets that exhibit cyclical behavior.
Setup:
The strategy utilizes Bollinger Bands and the Relative Strength Index (RSI) to identify mean-reverting opportunities. Bollinger Bands are calculated using a 20-day moving average and 2 standard deviations. The RSI is calculated over a 14-day period.
Entry Signals:
A buy signal is generated when the price touches the lower Bollinger Band and the RSI is below 30, indicating oversold conditions and a potential reversal.
Exit Signals:
A sell signal is generated when the price touches the middle Bollinger Band or the RSI rises above 50, indicating the end of the mean-reverting move.
Risk Management:
The strategy employs a stop-loss order placed below the recent swing low for long positions. Position sizing is based on risking no more than 2% of trading capital per trade. Diversification is achieved by applying the strategy to multiple futures contracts.
Summary:
This mean reversion strategy for the ES futures market uses Bollinger Bands and RSI to identify overbought and oversold conditions. The strategy buys when the market is oversold and sells when the market moves back towards the mean. Risk management includes stop-loss orders and conservative position sizing to protect against adverse movements.
To prevent seeing the same strategies again add this to your prompt:
Exclude:
[insert summary of trading strategy]
Check out these trading strategies made with this prompt
Strategy 1
### Hypothesis:
The price action in futures markets exhibits periodic cycles that can be detected and exploited using digital signal processing techniques.
### Market:
Crude Oil Futures (CL)
### Timeframe:
4-Hour
### Strategy Type:
Cycle Analysis
### Source:
According to Ehlers in "Cybernetic Analysis for Stocks and Futures," cycle analysis using digital signal processing can uncover periodicities in price data that can be exploited for trading. Ehlers' work emphasizes the importance of identifying cycles and using them to predict future price movements.
### Setup:
The strategy uses the Hilbert Transform to identify dominant cycles in the price data and the Inverse Fisher Transform to generate clearer buy and sell signals.
- **Hilbert Transform**: Used to detect the dominant cycle in the price data. The dominant cycle period is calculated to identify cyclic turning points.
- **Inverse Fisher Transform**: Applied to a normalized version of the price data to generate sharper trading signals.
**Technical Indicators:**
1. **Hilbert Transform Dominant Cycle**:
- Calculate the Hilbert Transform of the price data to identify the dominant cycle period.
- Use the dominant cycle period to anticipate cyclical turning points in the market.
2. **Inverse Fisher Transform of RSI**:
- Calculate the 14-period RSI of the price data.
- Apply the Inverse Fisher Transform to the RSI to generate clearer buy/sell signals. The formula for the Inverse Fisher Transform is:
\[
\text{Inverse Fisher RSI} = \frac{2}{1 + e^{-2 \cdot \text{RSI}}} - 1
\]
### Entry Signals:
- A **buy signal** is generated when the Inverse Fisher RSI crosses above -0.5 from below, indicating a potential bullish cycle turning point.
- Additionally, confirm the buy signal if the price is at or near the bottom of the identified dominant cycle.
### Exit Signals:
- A **sell signal** is generated when the Inverse Fisher RSI crosses below 0.5 from above, indicating a potential bearish cycle turning point.
- Exit the position if the price is at or near the top of the identified dominant cycle.
### Risk Management:
- **Stop-Loss Orders**: Place a stop-loss order below the recent swing low for long positions.
- **Position Sizing**: Risk no more than 2% of trading capital per trade.
- **Diversification**: Apply the strategy across multiple futures contracts to spread risk.
### Summary:
This trading strategy for Crude Oil Futures leverages cycle analysis through the Hilbert Transform to identify dominant cycles in the market. The Inverse Fisher Transform of RSI is used to generate clear buy and sell signals based on cyclical turning points. The strategy aims to enter trades at the beginning of a new cycle and exit as the cycle approaches its peak or trough. Risk management is implemented through stop-loss orders and conservative position sizing. Diversification is achieved by applying the strategy to multiple futures contracts.
Strategy 2
Hypothesis
Crude oil futures markets often exhibit breakout behavior following periods of low volatility.
Market
CL (Crude Oil futures)
Timeframe
15-minute
Strategy Type
Breakout
Source
According to Kevin J. Davey in "Building Winning Algorithmic Trading Systems," breakout strategies can be particularly effective in markets like crude oil, where prices often move significantly after periods of consolidation and low volatility.
Setup
The strategy uses the Average True Range (ATR) and a simple moving average (SMA) to identify breakouts. The ATR is calculated over a 14-period window to measure volatility, and the SMA is used to determine the consolidation period.
Calculation Steps:
ATR: 14-period average of the true range (the greatest of the following: current high minus current low, absolute value of the current high minus the previous close, and absolute value of the current low minus the previous close).
SMA: 20-period simple moving average of the closing prices.
Entry Signals
A buy signal is generated when:
The current price closes above the highest high of the previous 20 periods, indicating a breakout.
The ATR is above its 14-period average, confirming increased volatility and the likelihood of a sustained move.
Exit Signals
A sell signal (to close a long position) is generated when:
The current price closes below the 20-period SMA, indicating a potential end to the breakout move.
Risk Management
Stop-Loss Orders: Place a stop-loss order 1 ATR below the entry price to limit potential losses.
Position Sizing: Risk no more than 1% of total trading capital on a single trade to ensure proper risk management.
Profit Target: Set a profit target at 2 ATR above the entry price to take advantage of the breakout move.
Summary
This breakout trading strategy for Crude Oil futures uses the ATR and SMA to identify and confirm breakout opportunities. The strategy buys when prices break above a recent high following a period of low volatility, as confirmed by the ATR. It exits the trade when the price drops below the moving average, signaling a potential end to the breakout. Risk is managed through ATR-based stop-loss orders, conservative position sizing, and setting profit targets to capitalize on significant price moves.
Strategy in Plain English
When to Buy: When crude oil prices break above a recent high and volatility increases.
When to Sell: When the price drops below the moving average, indicating the breakout move might be over.
How to Manage Risk: Use ATR-based stop-loss orders to limit losses, only risk a small portion of your capital per trade, and set profit targets to lock in gains.
This strategy leverages periods of low volatility to anticipate breakout moves in crude oil futures, aiming to capture significant price changes while employing robust risk management techniques to safeguard against adverse movements.