This directory contains manual trading strategy definitions that can be systematically converted into Jesse framework implementations using the AI Dev Tasks workflow.
- Create a new strategy: Copy
template.mdand rename it to[your-strategy-name].md - Fill in strategy details using the comprehensive template structure
- Convert to implementation using the AI Dev Tasks workflow:
- Use
create-prd.mdto generate a Product Requirements Document - Use
generate-tasks.mdto create implementation tasks - Use
process-task-list.mdfor step-by-step development
- Use
/cj-strat/
├── template.md # Comprehensive strategy template
├── README.md # This file
├── [strategy-name].md # Your strategy definitions
├── [another-strategy].md # Additional strategies
└── ...
-
Copy the template:
cp template.md golden-cross-strategy.md
-
Fill in all sections:
- Overview: Strategy type, timeframe, risk level
- Core Logic: Entry/exit conditions with specific rules
- Technical Indicators: Required indicators from Jesse's library
- Data Requirements: Timeframes and historical data needs
- Testing Parameters: Backtest configuration
-
Be specific and detailed:
- Use exact indicator parameters:
RSI(14) < 30 - Define clear conditions:
SMA(20) crosses above SMA(50) - Specify risk management:
Stop loss at 2% below entry
- Use exact indicator parameters:
- Overview: High-level strategy description
- Core Logic: Entry/exit conditions for long/short positions
- Technical Indicators: All indicators needed with parameters
- Data Requirements: Timeframes and lookback periods
- Performance Expectations: Expected returns and drawdown
- Testing Parameters: Backtest and optimization settings
- Risk Considerations: Potential issues and mitigation
- Implementation Notes: Jesse-specific considerations
The template includes examples of Jesse's 100+ indicators:
ta.sma(candles, period=20) # Simple Moving Average
ta.ema(candles, period=20) # Exponential Moving Average
ta.rsi(candles, period=14) # Relative Strength Index
ta.macd(candles, fast=12, slow=26, signal=9) # MACD
ta.atr(candles, period=14) # Average True Range
# See /jesse/indicators/ for complete listYour strategies will be implemented as:
class YourStrategy(Strategy):
def should_long(self) -> bool:
# Entry logic from your strategy.md
def should_short(self) -> bool:
# Entry logic from your strategy.md
def go_long(self):
# Position management from your strategy.md
def go_short(self):
# Position management from your strategy.mdUse the create-prd.md process to convert your strategy.md into a detailed Product Requirements Document:
# Reference your strategy file when using create-prd.md
# This converts strategy logic into technical requirementsUse generate-tasks.md to break down the PRD into implementation tasks:
# Points to your PRD file
# Creates step-by-step development tasks
# Identifies relevant Jesse framework filesUse process-task-list.md for systematic implementation:
# Guides through each implementation task
# Ensures proper Jesse framework integration
# Includes testing and validation steps- Be Specific: Use exact parameters and clear conditions
- Consider Edge Cases: Define behavior in different market conditions
- Plan Risk Management: Include stop loss and position sizing rules
- Think About Data: Ensure required timeframes and indicators are available
- Check Indicators: Verify all indicators exist in
/jesse/indicators/ - Plan Data Access: Use
self.candlesfor historical data - Implement Risk Management: Leverage Jesse's built-in tools
- Plan Testing: Use Jesse's comprehensive backtesting system
- Start Simple: Begin with basic strategy logic
- Test Early: Run backtests frequently during development
- Optimize Carefully: Use systematic parameter optimization
- Document Everything: Keep detailed notes on decisions and results
# Golden Cross Strategy
## Overview
- **Strategy Type**: Trend Following
- **Timeframe**: 4h
- **Market Conditions**: Trending markets
- **Risk Level**: Medium
## Core Logic
### Long Entry
- **Primary Signal**: SMA(50) crosses above SMA(200)
- **Confirmation**: Volume > 1.5 * average volume
### Short Entry
- **Primary Signal**: SMA(50) crosses below SMA(200)
- **Confirmation**: Volume > 1.5 * average volume
## Technical Indicators Required
- **SMA(50)**: 50-period simple moving average - Short-term trend
- **SMA(200)**: 200-period simple moving average - Long-term trend
- **Volume**: Trading volume - Confirmation signal- Strategy files: Will be created in
/jesse/strategies/[YourStrategy]/ - Tests: Corresponding test files in appropriate test directories
- Backtests: Results stored via Jesse's built-in metrics system
# Install Jesse in development mode
pip install -e .
# Run backtests
jesse backtest [strategy-name] [exchange] [pair] [timeframe] [start-date] [end-date]
# Run tests
pytest tests/
# Start web interface for analysis
jesse run- Missing Indicators: Check
/jesse/indicators/for availability - Data Requirements: Ensure sufficient historical data
- Parameter Conflicts: Verify strategy logic is consistent
- Performance Issues: Consider numpy array operations for efficiency
- Review Jesse documentation
- Check existing strategy examples in
/jesse/strategies/ - Use the AI Dev Tasks workflow for systematic development
- Test with small datasets first
- Create your first strategy using the template
- Test the workflow with a simple strategy like moving average crossover
- Iterate and improve based on backtest results
- Scale up to more complex strategies once comfortable with the process
The goal is systematic, repeatable strategy development that leverages Jesse's powerful framework while maintaining clear documentation and testing practices.