Skip to main content

Pine Script-style trading library built on top of pyqqq

Project description

PyQQQ Script

"우리는 누구나 자신의 투자 아이디어를 현실로 만들 수 있다고 믿습니다."

환경설정

1.1 설치

pip install pyqqq-script

1.2 API Key 발급

PyQQQ는 금융 데이터 분석과 자동화된 거래 전략을 제공하는 플랫폼입니다. 회원가입 후 API Key 를 발급받아 환경변수를 설정합니다. 보다 자세한 안내는 공식 가이드 문서를 참고하세요.

export PYQQQ_API_KEY="발급받은_API_KEY"

Quick Start

몇 줄의 코드로 동작하는 백테스트 코드를 보여드리겠습니다.

from pyqqq3 import Backtest, Strategy, ta
from pyqqq3.infra.presentation import print_result


class Simple(Strategy):

    def next(self):
        sma5 = ta.sma(self.close, 5)
        sma20 = ta.sma(self.close, 20)

        if sma5 > sma20 and self.position.size == 0:
            self.buy(amount=1_000_000)
        elif sma5 < sma20 and self.position.size > 0:
            self.sell()


bt = Backtest(strategy=Simple, symbol="005930", start="2026-04-01", end="2026-04-07")
print_result(bt.run())

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyqqq_script-0.0.2.tar.gz (39.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyqqq_script-0.0.2-py3-none-any.whl (56.1 kB view details)

Uploaded Python 3

File details

Details for the file pyqqq_script-0.0.2.tar.gz.

File metadata

  • Download URL: pyqqq_script-0.0.2.tar.gz
  • Upload date:
  • Size: 39.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.7 Linux/6.12.68+

File hashes

Hashes for pyqqq_script-0.0.2.tar.gz
Algorithm Hash digest
SHA256 adfdd668446a77119c19dc5866a211847c90d3b2abda0bd88bf0915497cf05c5
MD5 c4c490ef831e9287d808aa32db9f898f
BLAKE2b-256 843afc86dbac537a53fc65ba14f46f7056eede060d2075c22968b5aede9db099

See more details on using hashes here.

File details

Details for the file pyqqq_script-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: pyqqq_script-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 56.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.7 Linux/6.12.68+

File hashes

Hashes for pyqqq_script-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 10a8c2e5858768cf296dfd6208aec6c182fb250f276e588bf7c01b40a283f247
MD5 ee8f246b70a1da666cd503731ca34d38
BLAKE2b-256 e6b35e60f1dff5678fb40872b9e524887dbd08ea99276d72f0f4666b9de87c0f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page