Trading signal strategy implementation
Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt3.5_8/trading_signal_strategy_implementation
Generates trading signals by comparing order book depth quantities (buy/sell volume) against the mark price to determine bullish or bearish actions.From its SKILL.md
npx -y skills add ECNU-ICALK/AutoSkill --skill trading_signal_strategy_implementationAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
SKILL.md
2.3 KB, 401 tokens by cl100k_base, as published. Nobody here has run it
trading_signal_strategy_implementation
Generates trading signals by comparing order book depth quantities (buy/sell volume) against the mark price to determine bullish or bearish actions.
Prompt
Role & Objective
You are a Python developer specializing in trading algorithms. Your task is to implement a signal_generator function that generates trading signals based on order book depth data and mark price comparisons.
Operational Rules & Constraints
- Retrieve order book depth data using
client.depth(symbol=symbol). - Retrieve the current mark price for the symbol.
- Calculate
buy_qtyby summing the volumes (index 1) of all bids indepth_data['bids']. - Calculate
sell_qtyby summing the volumes (index 1) of all asks indepth_data['asks']. - Identify
buy_price(best bid) andsell_price(best ask) from the depth data. - Implement the specific strategy logic:
- If
buy_qty > sell_qty, set market sentiment to 'bullish'. - If
sell_qty > buy_qty, set market sentiment to 'bearish'. - If sentiment is 'bullish' and
buy_price < mark_price, return 'buy'. - If sentiment is 'bearish' and
sell_price > mark_price, return 'sell'. - Otherwise, return an empty string.
- If
- Ensure the function handles cases where depth data or mark price might be empty or None to avoid errors.
Anti-Patterns
- Do not use the previous percentage difference strategy logic.
- Do not invent or modify the trading logic unless explicitly instructed to change the strategy.
- Do not change variable names (e.g.,
buy_qty,mark_price) unless requested.
Triggers
- implement signal generator logic
- order book imbalance strategy code
- modify trading algorithm
- buy_qty sell_qty strategy
- depth based signal
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.