trading-strategies은(는) 무엇을 하나요?
예측 시장을 위한 거래 전략을 개발, 테스트 및 배포하기 위한 프레임워크입니다. 새로운 전략을 만들거나, 신호를 구현하거나, 백테스팅 로직을 구축할 때 사용하세요.
주요 기능
- 전략 개발: 새로운 거래 전략을 쉽게 생성하고 정의
- 신호 구현: 다양한 시장 신호를 통합하여 거래 결정 지원
- 백테스팅: 과거 데이터를 기반으로 전략 성능 검증
- 배포: 라이브 시장에서 전략 실행
사용 예시
from trading_strategies import Strategy, Backtester
class MyStrategy(Strategy):
def __init__(self):
super().__init__()
self.name = "예시 전략"
def on_data(self, data):
# 시장 데이터 처리 로직
if data['signal'] > 0.8:
self.buy()
elif data['signal'] < 0.2:
self.sell()
strategy = MyStrategy()
backtester = Backtester(strategy)
backtester.run(start_date="2024-01-01", end_date="2024-12-31")
설치 방법
pip install agentmc15-trading-strategies
문서
자세한 내용은 전체 문서를 참조하세요.