Skip to content

quantpylib

DISCLAIMER None of the information contained here or on hangukquant.substack.com or its affiliated platforms constitutes an offer (or solicitation of an offer) to buy or sell any currency, product or financial instrument, to make any investment, or to participate in any particular trading strategy, or a recommendation for any security or any third party. Trading involves real risks of loss and is solely your responsibility. Past performance is not indicative of future performance; material enclosed herein is for educational purposes only. There is absolutely no warranty or guarantee implied with this product. Use at your own risk. Trading is a risky operation.
COPYRIGHT Sharing and distribution of any material taken herein is not allowed without express and written approval by HangukQuant, and is only intended for private usage. The code is meant for subscribers of hangukquant.substack.com and any member expressly allowed by HangukQuant.

Welcome to the quantpylib repository! This repository is a Python package for quantitative trading and research, with in-house tools for powerful, fast, flexible and batteries-included quantitative backtesting, data retrieval and all things quant trading. The library is not specific to any strategy or trading instrument. Members are encouraged to participate in the contribution of the code.

The code requires a 3.8+ version of Python to run.

Table of Contents

  1. Installation
  2. User Documentation and Examples,
  3. Running Tests

Installation

To install this library, users need to obtain access to the private Github repo by leaving your Github id on our post or directly requesting to be shortlisted (for unpaid readers) to HangukQuant by email (hangukquant@gmail.com).

Alternatively, obtain an access pass.

You can use quantpylib in your local Python environment after cloning our repository and running bash script:

chmod +x install.sh
./install.sh
in the working directory with the setup.py Python script.

User Documentation and Examples

You can jump into our examples here, or go through official documentation hosted here.

Running Tests

Our test suites can be run using the pytest framework. To run all tests, run

python3 -m pip install pytest
python3 -m pytest quantpylib/tests 
For more verbose test information, run
python3 -m pytest quantpylib/tests -vs 
You can choose specific modules or scripts to test by specifying the path to the test suite
python3 -m pytest quantpylib/tests/simulator
python3 -m pytest quantpylib/tests/simulator/test_operators.py
Contributors who modify the codebase should run all tests and verify the tests pass before submitting a Pull Request.