파이썬에는 백테스트를 위한 수많은 패키지들이 존재하며 대표적인 패키지는 다음과 같다.
- backtesting: 각종 트레이딩 전략에 최적화된 인터페이스를 제공하며 파라미터에 대한 최적화 기능도 제공한다. 최근가지도 업데이트가 잘 되는 편이다.
GitHub - kernc/backtesting.py: Backtest trading strategies in Python.
:mag_right: :chart_with_upwards_trend: :snake: :moneybag: Backtest trading strategies in Python. - GitHub - kernc/backtesting.py: Backtest trading strategies in Python.
github.com
- Backtrader: 구글에서 파이썬 관련 백테스트를 검색하면 가장 많이 검색되는 패키지이지만, 2021년 이후 업데이트가 중단되었다. 대부분의 기능은 무난하게 사용 가능하나 간혹가다가 오류가 발생할 수 있다.
GitHub - mementum/backtrader: Python Backtesting library for trading strategies
Python Backtesting library for trading strategies. Contribute to mementum/backtrader development by creating an account on GitHub.
github.com
- bt: 앞의 패키지들과는 다르게 트레이딩 전략 뿐만 아니라 포트폴리오 기반의 백테스트를 하는데도 유용한 기능들을 제공한다. 최근 업데이트가 이루어졌다.
GitHub - pmorissette/bt: bt - flexible backtesting for Python
bt - flexible backtesting for Python. Contribute to pmorissette/bt development by creating an account on GitHub.
github.com
bt 패키지의 함수는 대부분 ffn 패키지를 기반으로 제작되어 ffn도 찾아보는것을 추천한다.
ffn - Financial Functions for Python — ffn 0.3.6 documentation
ffn - Financial Functions for Python ffn is a library that contains many useful functions for those who work in quantitative finance. It stands on the shoulders of giants (Pandas, Numpy, Scipy, etc.) and provides a vast array of utilities, from performance
pmorissette.github.io
'Investment' 카테고리의 다른 글
Value at Risk (VaR) (0) | 2023.11.01 |
---|---|
Polygon.io (0) | 2023.10.24 |
ebest 투자증권 OPEN API (0) | 2023.10.23 |
미국 주식 티커 불러오기 (0) | 2023.04.13 |
한국투자증권 Open API 서비스 KIS Developers (0) | 2023.04.11 |