Skip to main content

Financial Technical Analysis Indicator Library. Python bindings for https://github.com/TulipCharts/tulipindicators

Project description

tulipy

Forked by Drakkar-Software for the only purpose of keeping dependencies version up to date.

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 OctoBot-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.])

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

octobot_tulipy-0.4.11b7-cp314-cp314-win_amd64.whl (103.5 kB view details)

Uploaded CPython 3.14Windows x86-64

octobot_tulipy-0.4.11b7-cp314-cp314-macosx_11_0_arm64.whl (81.6 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

octobot_tulipy-0.4.11b7-cp314-cp314-macosx_10_15_x86_64.whl (87.6 kB view details)

Uploaded CPython 3.14macOS 10.15+ x86-64

octobot_tulipy-0.4.11b7-cp314-cp314-macosx_10_15_universal2.whl (156.4 kB view details)

Uploaded CPython 3.14macOS 10.15+ universal2 (ARM64, x86-64)

octobot_tulipy-0.4.11b7-cp313-cp313-win_amd64.whl (101.1 kB view details)

Uploaded CPython 3.13Windows x86-64

octobot_tulipy-0.4.11b7-cp313-cp313-macosx_11_0_arm64.whl (81.4 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

octobot_tulipy-0.4.11b7-cp313-cp313-macosx_10_13_x86_64.whl (87.3 kB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

octobot_tulipy-0.4.11b7-cp313-cp313-macosx_10_13_universal2.whl (156.0 kB view details)

Uploaded CPython 3.13macOS 10.13+ universal2 (ARM64, x86-64)

octobot_tulipy-0.4.11b7-cp312-cp312-win_amd64.whl (101.3 kB view details)

Uploaded CPython 3.12Windows x86-64

octobot_tulipy-0.4.11b7-cp312-cp312-macosx_11_0_arm64.whl (81.8 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

octobot_tulipy-0.4.11b7-cp312-cp312-macosx_10_13_x86_64.whl (87.7 kB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

octobot_tulipy-0.4.11b7-cp312-cp312-macosx_10_13_universal2.whl (156.8 kB view details)

Uploaded CPython 3.12macOS 10.13+ universal2 (ARM64, x86-64)

File details

Details for the file octobot_tulipy-0.4.11b7-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b7-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 7963ed53084cb2f05f09826e5d96db6852eb0bf886501a303ffed1e74a7c2fee
MD5 acd7d726494cc55902f64ff8802d9e0a
BLAKE2b-256 290abb8a8f418832e2c2679f6d4243a037d7123f56daa5bd70468901eecf03b9

See more details on using hashes here.

File details

Details for the file octobot_tulipy-0.4.11b7-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b7-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0ad0788f5634172b786ca4e4b24841d3135f1936a605cc5a9aad7b15de7e0cfc
MD5 749a265068430ec2d1acd2dc0bf01b89
BLAKE2b-256 e8e9e73b040460c5732121076967b69bb08ad2a28586b51922d78a81b81c1114

See more details on using hashes here.

File details

Details for the file octobot_tulipy-0.4.11b7-cp314-cp314-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b7-cp314-cp314-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 4a48e32299edf6cd9d4bfcd54710cea3345aa9254ae17afe2eec122846be32cc
MD5 d64785b0bc42f3194c1b690925f54329
BLAKE2b-256 5bcab871585138b4bed4250a61f77669eae51afdf36ab2eecba41a4df7c93926

See more details on using hashes here.

File details

Details for the file octobot_tulipy-0.4.11b7-cp314-cp314-macosx_10_15_universal2.whl.

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b7-cp314-cp314-macosx_10_15_universal2.whl
Algorithm Hash digest
SHA256 368ae78b789c39e141f6365eb6bdeaaf3988ffab7eb94c8a3fc17a52911551e5
MD5 8ea42ae9c5d3cffd99eb242169ef47cf
BLAKE2b-256 71aa2dd73dc11527f67d6702c66b640960d75cb361f45268e5b9253f4abde91c

See more details on using hashes here.

File details

Details for the file octobot_tulipy-0.4.11b7-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b7-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 835e423158908bcc91077143ebc9a26f8692f479d49b6a0f833c3547c13b9c03
MD5 7a971e093a0bded8ab89f4564f522f02
BLAKE2b-256 d59aa3637bdba04ccce1677a4e50e32356111de8731ab820ce4d9b7081f99689

See more details on using hashes here.

File details

Details for the file octobot_tulipy-0.4.11b7-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b7-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fa21a3016f6d2ed0952ccf705b29b6695040a1bebe44777a5615ad910b26cef5
MD5 2d5ac6c993c9942f8fe85ff9531c77b3
BLAKE2b-256 d5682c015e72de9c386ff6dc9206a1717ed17f7337d8a64a5b5518ea6fbe9b06

See more details on using hashes here.

File details

Details for the file octobot_tulipy-0.4.11b7-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b7-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 47404295eaa6ab80125cdc9792a9eb27987f38b7422c250169b65276a0637e11
MD5 5ba06692512e33cb8f6723d84db3ff8f
BLAKE2b-256 421aa6ba566b2acd7599114d92ff48fd987f6264c471e2eef65934e076453672

See more details on using hashes here.

File details

Details for the file octobot_tulipy-0.4.11b7-cp313-cp313-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b7-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 23f594510da03ac7a89f7cb45f68aef78b20325ddc01d5b1aaae0e5271617ccc
MD5 b7b614d721068ac57e9df4470720f8b8
BLAKE2b-256 ce8132fddba90cff508ebf95e78082cafb1e6745cd8cdadef3e7955c5b1f8503

See more details on using hashes here.

File details

Details for the file octobot_tulipy-0.4.11b7-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b7-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 66f7c92cf55a384699fceb3d6b976d2f8cc3b69e9a6444e8f1c0b2dbbced3b7e
MD5 748f4367e7733f0aee5f3551d8d7bd90
BLAKE2b-256 be2966be00ed08c06be4a029dcc526ddb627e324d56de6d66bfb62d043bd69c4

See more details on using hashes here.

File details

Details for the file octobot_tulipy-0.4.11b7-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b7-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1bb702bd97466a98dfdc313687cb81eee31ae2029bac7a6c0386025c13750993
MD5 47e681b02270820f6b74ac448e4adc05
BLAKE2b-256 1c80362166479ee4d1f1770ff89e3861018556290c1a1b49011eccbda6209414

See more details on using hashes here.

File details

Details for the file octobot_tulipy-0.4.11b7-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b7-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 bf883db54c93510caed5f49b654806a5bc82896c127fcfe8f85a92d6756547ad
MD5 093b8b5003d0dd0933ff6b22ccd07b7a
BLAKE2b-256 3d7f92192201ef7faddb64b851a92a181b52fb0d1790dad1f984f8d65e3963bf

See more details on using hashes here.

File details

Details for the file octobot_tulipy-0.4.11b7-cp312-cp312-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b7-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 41970fd2c657996440e85c36ebb8b712012551021280f71e5fdde9ce983658c9
MD5 3dda637f6ae6c813ee507756fea26920
BLAKE2b-256 1f61d85763a08f67163a1b548aaf6e24a04860a6d77261dda438c070415c7372

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