new-strategy

Scaffolds Python trading strategy modules and tests for Phase 1 migration.

2|2|Updated Feb 12, 2025
One-click install
npx skills add https://github.com/kimrejstrom/alpacalyzer-algo-trader --skill new-strategy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: new-strategy
Source: https://github.com/kimrejstrom/alpacalyzer-algo-trader/tree/main/.claude/skills/new-strategy
Command: npx skills add https://github.com/kimrejstrom/alpacalyzer-algo-trader --skill new-strategy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enables teams to scaffold and migrate trading strategies by organizing Python strategy modules under src/alpacalyzer/strategies/{name}.py and corresponding tests under tests/test_{name}_strategy.py.

Core Features & Use Cases

  • Strategy scaffolding and migration guidance for new strategy implementations.
  • Defines the StrategyConfig interface and BaseStrategy integration to ensure consistent behavior.
  • Tests and registry integration aligned with Phase 1 migration workflow and risk management requirements.

Quick Start

  • Create the strategy module at src/alpacalyzer/strategies/<strategy>.py and implement <Strategy>Strategy
  • Add tests in tests/test_<strategy>_strategy.py
  • Register the strategy in src/alpacalyzer/strategies/registry.py

Frequently Asked Questions about new-strategy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scaffold a new Python trading strategy for migration?

To scaffold a trading strategy migration, create a Python module at src/alpacalyzer/strategies/{name}.py implementing your strategy class, then add corresponding tests in tests/test_{name}_strategy.py to ensure coverage.

What is a StrategyConfig and BaseStrategy integration in Python?

StrategyConfig defines the configuration interface for a trading strategy, while BaseStrategy integration ensures consistent behavior across implementations by enforcing standardized entry and exit evaluation logic during the migration process.

How do I register a new trading strategy in the Strategy Registry?

Register a trading strategy by adding it to src/alpacalyzer/strategies/registry.py, which enables the Strategy Registry to recognize and route requests to your newly scaffolded Python strategy module during execution.

Do I need to implement risk management artifacts when adding a trading strategy?

Yes, implementing risk management artifacts is required. Each trading strategy migration must define stop_loss and target parameters within the StrategyConfig to ensure proper risk controls are in place before registry integration.

Can I use Scope Constraints to limit trading strategy behavior in Python?

Yes, Scope Constraint usage is enforced during the strategy migration process to constrain trading behavior. This ensures new implementations adhere to defined boundaries while integrating with the Strategy Abstraction layer.

What are the limitations of the Phase 1 Strategy Abstraction migration?

The Phase 1 Strategy Abstraction migration targets only initial scaffolding and registry integration. It requires complete test coverage and risk management artifacts, limiting simultaneous migration of complex or legacy strategies outside this scope.