tulipy
Python bindings for Tulip Indicators
Tulipy requires numpy as all inputs and outputs are numpy arrays (dtype=np.float64).
Installation
You can install via pip install tulipy.
If a wheel is not available for your system, you will need to pip install Cython numpy to build from the source distribution.
When building from source on Windows, you will need the Microsoft Visual C++ Build Tools installed.
Usage
import numpy as np
import tulipy as ti
ti.TI_VERSION
'0.8.4'
DATA = np.array([81.59, 81.06, 82.87, 83, 83.61,
83.15, 82.84, 83.99, 84.55, 84.36,
85.53, 86.54, 86.89, 87.77, 87.29])
Information about indicators are exposed as properties:
def print_info(indicator):
print("Type:", indicator.type)
print("Full Name:", indicator.full_name)
print("Inputs:", indicator.inputs)
print("Options:", indicator.options)
print("Outputs:", indicator.outputs)
print_info(ti.sqrt)
Type: simple
Full Name: Vector Square Root
Inputs: ['real']
Options: []
Outputs: ['sqrt']
Single outputs are returned directly. Indicators returning multiple outputs use
a tuple in the order indicated by the outputs property.
ti.sqrt(DATA)
array([ 9.03271831, 9.00333272, 9.10329611, 9.11043358, 9.14385039,
9.11866218, 9.1016482 , 9.16460583, 9.19510739, 9.18477 ,
9.24824308, 9.30268778, 9.32148057, 9.36856446, 9.34291175])
print_info(ti.sma)
Type: overlay
Full Name: Simple Moving Average
Inputs: ['real']
Options: ['period']
Outputs: ['sma']
ti.sma(DATA, period=5)
array([ 82.426, 82.738, 83.094, 83.318, 83.628, 83.778, 84.254,
84.994, 85.574, 86.218, 86.804])
Invalid options will throw an InvalidOptionError:
try:
ti.sma(DATA, period=-5)
except ti.InvalidOptionError:
print("Invalid Option!")
Invalid Option!
print_info(ti.bbands)
Type: overlay
Full Name: Bollinger Bands
Inputs: ['real']
Options: ['period', 'stddev']
Outputs: ['bbands_lower', 'bbands_middle', 'bbands_upper']
ti.bbands(DATA, period=5, stddev=2)
(array([ 80.53004219, 80.98714192, 82.53334324, 82.47198345,
82.41775044, 82.43520292, 82.51133078, 83.14261781,
83.53648779, 83.8703237 , 85.28887096]),
array([ 82.426, 82.738, 83.094, 83.318, 83.628, 83.778, 84.254,
84.994, 85.574, 86.218, 86.804]),
array([ 84.32195781, 84.48885808, 83.65465676, 84.16401655,
84.83824956, 85.12079708, 85.99666922, 86.84538219,
87.61151221, 88.5656763 , 88.31912904]))
If inputs of differing sizes are provided, they are right-aligned and trimmed from the left:
DATA2 = np.array([83.15, 82.84, 83.99, 84.55, 84.36])
# 'high' trimmed to DATA[-5:] == array([ 85.53, 86.54, 86.89, 87.77, 87.29])
ti.aroonosc(high=DATA, low=DATA2, period=2)
array([ 50., 100., 50.])
Metadata
Release files for tulipy 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tulipy-0.4.0.tar.gz | 110.3 kB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tulipy-0.4.0-cp37-cp37m-win_amd64.whl | CPython 3.7 | CPython 3.7 pymalloc | Windows x86-64 | Details |
| tulipy-0.4.0-cp37-cp37m-win32.whl | CPython 3.7 | CPython 3.7 pymalloc | Windows x86-32 | Details |
Total release size: 326.8 kB
Release files / tulipy-0.4.0.tar.gz
| Download URL | tulipy-0.4.0.tar.gz |
|---|---|
| Size | 110.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fbc31727ef7657c93ad910bfdce65fecc6aaa7a5e961fe00240718e7a3fc79d8
|
|
BLAKE2b-256 checksum How to use checksums |
2cfc685a3fe73a66ed35332058c2e22b2ed63b7725ec32817753f11c06f48792
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2
|
Release files / tulipy-0.4.0-cp37-cp37m-win_amd64.whl
| Download URL | tulipy-0.4.0-cp37-cp37m-win_amd64.whl |
|---|---|
| Size | 133.2 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Windows x86-64 |
|
SHA-256 checksum How to use checksums |
95542e40537afdd345d875baf37485eac993c6a819d00c51432e9de8df21eba8
|
|
BLAKE2b-256 checksum How to use checksums |
27bafe5e9c1de77c3bc6892d67f3f2ef3246604f66918a37c8f9ac416b662f5c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2
|
Release files / tulipy-0.4.0-cp37-cp37m-win32.whl
| Download URL | tulipy-0.4.0-cp37-cp37m-win32.whl |
|---|---|
| Size | 83.4 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Windows x86-32 |
|
SHA-256 checksum How to use checksums |
540704956b5b940a5f6306aa393a37536a6d7c3cbc07efe47512f3496e5203ab
|
|
BLAKE2b-256 checksum How to use checksums |
69ebbcc11e171eb73a80f55eea8199ac61186dab63e4c0062a99312a8992f9bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2
|