Code Monkey home page Code Monkey logo

qtalib's Introduction

QTALIB: Quantitative Technical Analysis Library

Latest update on 2022-08-16

Technical indicators implemented in Cython/C. This is supposed to be a faster technical analysis library with perfect integration to Python.

Available technical indicators

  • Simple Moving Average (SMA)

  • Exponential Moving Average (EMA)

  • Moving Average Convergence Divergence (MACD)

  • True Range (TR)

  • Absolute True Range (ATR)

  • (Parabolic) Stop and Reverse (SAR)

  • Super Trend (ST)

  • Time Segmented Volume (TSV)

Installation

You may run the folllowing command to install QTalib immediately:

# Virtual environment is recommended (python 3.8 or above is supported)
>> conda create -n qtalib python=3.8
>> conda activate qtalib

# Install stable version from pip (currently version 0.0.1)
>> pip install qtalib

# Alternatively, install latest version from github 
>> pip install git+https://github.com/josephchenhk/qtalib@master

Usage

import numpy as np
import qtalib.indicators as ta

values = np.array([12.0, 14.0, 64.0, 32.0, 53.0])

# Simple Moving Average
# [30.         36.66666667 49.66666667]
print(ta.SMA(values, 3))

# Exponential Moving Average
# [12.         13.33333333 42.28571429 36.8        45.16129032]
print(ta.EMA(values, 3))

Contributing

  • Fork it (https://github.com/josephchenhk/qtalib/fork)
  • Study how it's implemented.
  • Create your feature branch (git checkout -b my-new-feature).
  • Use flake8 to ensure your code format complies with PEP8.
  • Commit your changes (git commit -am 'Add some feature').
  • Push to the branch (git push origin my-new-feature).
  • Create a new Pull Request.

qtalib's People

Contributors

josephchenhk avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.