Skip to main content

Algorithmic Trading System3

Project description

yQuant

Python version PyPI version Test Build Coverage Docs License: GPL v3

Table of Contents

yQuant is an automatic trading system supporting backtest and trading engine with algorithmic trading strategy.

For detail on why I've been working on this project and what is the ultimate goal, take a look at the vision statement and features.

Installation

Install Python 3.10 on Ubuntu

$ sudo apt-get install software-properties-common
$ sudo add-apt-repository ppa:deadsnakes/ppa
$ sudo apt install python3.10 python3.10-venv

Clone repository from Github

$ git clone git@github.com:yoonbae81/yquant
$ cd yquant

Prepare Python runtime and virutal enviorment

$ python3.10 -m venv venv
$ source venv/bin/activate
$ pip install -r requirements.txt

Preparation

Fetching symbols of KOSPI and KOSDAQ exchanges:

$ python -m backtest.symbols.korea_symbols.json
Fetched 2,820 symbols
Saved in symbols.json

Usage

The following will execute the backtest with the symbols file, symbols.json in the same directory.

$ python backtest.py

Sample output as follows:

DEBUG monitor.bootstrap              Initializing...
DEBUG monitor.adapters.file_fetcher  Loading: 1.txt
DEBUG monitor.adapters.file_fetcher  Parsing: 091990 1000 1 1234512340
DEBUG monitor.messages               Created: TickFetched(chains=[], symbol='091990', price=1000.0, qty=1.0, timestamp=1234512340)
DEBUG monitor.facade                 Handler: <lambda> for TickFet hed(chains=[], symbol='091990', price=1000.0, qty=1.0, timestamp=1234512340)
DEBUG monitor.messages               Created: MarketClosed(chains=[], total_ticks=2)
DEBUG monitor.facade                 Handler: market_closed for MarketClosed(chains=[], total_ticks=2)

Support

Please open an issue for support.

Contributing

Please contribute using Github Flow. Create a branch, add commits, and open a pull request.

Testing

Test codes are prepared in tests/ based on PyTest framework.

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

yquant-0.0.2a0.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

yquant-0.0.2a0-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file yquant-0.0.2a0.tar.gz.

File metadata

  • Download URL: yquant-0.0.2a0.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for yquant-0.0.2a0.tar.gz
Algorithm Hash digest
SHA256 0cfc94124e61a4b09f278e451e8e185676aa198fe57d354b2f7be81933b4189e
MD5 339b35c709a9efc1a728386e056acadb
BLAKE2b-256 c538167c45ca1be8746ef780815b54f34bb619b1102ad59d2f0b12463f2e8dd1

See more details on using hashes here.

File details

Details for the file yquant-0.0.2a0-py3-none-any.whl.

File metadata

  • Download URL: yquant-0.0.2a0-py3-none-any.whl
  • Upload date:
  • Size: 15.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for yquant-0.0.2a0-py3-none-any.whl
Algorithm Hash digest
SHA256 ed8ac2192e34d3dab4a20454ae10cef4a4cbdbbf3d403c355ebf502c17439d09
MD5 dc1c98c99c265aa7da45328631879cb4
BLAKE2b-256 931e968e98f8c900c5464ffba287c1eba62f6fb215bcf0e7d8c1615ddbdc2ca5

See more details on using hashes here.

Supported by

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