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.11b3-cp314-cp314-win_amd64.whl (103.5 kB view details)

Uploaded CPython 3.14Windows x86-64

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

Uploaded CPython 3.14macOS 11.0+ ARM64

octobot_tulipy-0.4.11b3-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.11b3-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.11b3-cp313-cp313-win_amd64.whl (101.1 kB view details)

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

octobot_tulipy-0.4.11b3-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.11b3-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.11b3-cp312-cp312-win_amd64.whl (101.3 kB view details)

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

octobot_tulipy-0.4.11b3-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.11b3-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.11b3-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b3-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 88ad3966851fe258a3479da82d27929099ec3d5af8518fb302061af88773b513
MD5 b95b62a332859a3830fa8896e341cf9d
BLAKE2b-256 b6df2803293f106c449d3673930ea47a5ebf1898afa6728530d620a26a98422f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b3-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 74b55c79712665708ec58fe7eb97f0eac96b685522b1346c8e3c150b762ba07a
MD5 83e9dc8ab4471c096f32bbea877246c9
BLAKE2b-256 6eeca318b3cd09bc7537978dab7e450fd6a19187b76ed324d3444262326787c6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b3-cp314-cp314-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 3abaab2df5617c14f59cb3e6b5168a037d3f36b0d680702f8c5d5e6bd7ee47ee
MD5 8448965b6462c191c9d8501ed0c59d7d
BLAKE2b-256 33825c6306cc07dcae3743a19c03723b2901bb5f9ab5322ce2f3c0f848335a9b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b3-cp314-cp314-macosx_10_15_universal2.whl
Algorithm Hash digest
SHA256 8d4e64441ffca78bd2c8996557e866ab2b378285699cfdc81a59313136d82c62
MD5 ed61020084c744bcc25b431c3864ad11
BLAKE2b-256 82af5f5e6c5e69ee1f86756aa016bd26abed740e5c9666eb477de26c34c8499a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 aaa3bb3d2d7216ecc93d594df5699fadaa92047e76b72eafe29ed7a3624b5c89
MD5 1eabcfbada7f7d42e8b2f9c7af24604f
BLAKE2b-256 d6a9a5eaa74278bc3214784eb0ba02f5a625640e1e6ee1e847643a16c60a5ce8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b3-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 06988d75fc21c52f15c9596d3b553d5ff1d7eed5949e7f7611564075f5918b69
MD5 c07ea6b932a3053a15e61c60a9ea0d4a
BLAKE2b-256 13f028eb9cd6db43706c476e9940da8b979a8471a536aaa66a1417f7af81c437

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b3-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 f5fe4f3d9ba7cd530817733bd0957b39e36b680f40329344ebee35d72d850dc0
MD5 a4e2ff6b7e7636184da94494b3295996
BLAKE2b-256 06632b31afc42774837a96c8c064ddf3355dad6cf525d1ad217d0ecd138939a5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b3-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 5b3200f9da91319ca4a839309b7f3f431538dd7ad573b41eff3fd459cadb9282
MD5 a113b89477b5ec21671d72b7ee5e6141
BLAKE2b-256 779ab3992536408fb75b49c918f5898f007184a2357e6d2c6f1a4557517da978

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 70b680617ea9ed21c78e99596e69c397880c6435331a45623b7795ce5249c8e9
MD5 d7f44ee6b18d204a799e4c23c6b41e14
BLAKE2b-256 516a2b6c60d0fe478b354bdcfcbf7f788732453548b9e2646a53103cb17cfe29

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bbe9efb73f535a9c12f68dd50e59735a59d2d1c5b7c1b981cbbd718dfb47a283
MD5 2226965312c342e34f8e69066ea07ba8
BLAKE2b-256 3a562ca6f8aa74f74241648c50e354d744e426c3c20f1904e067b0b924a51e52

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b3-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 00a07655ea737346da3eb6c23f01a245bf5e500c926ced97dd958e58a327051a
MD5 a2b71d1a4eebd24b06ac3f61984e5537
BLAKE2b-256 6ac5d2a155202b43936f8f29fb68091a63bad4f683c86a390d9e9cb20262d178

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b3-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 394c3ae42d3c5b57131040fe6cede30d557233e767234ac9927ed7ef34fab618
MD5 9fa621ed871e03f81ce0736f090e7073
BLAKE2b-256 1db359b1b5d3fda8f3a62b7811e6c0f349e4a4bed2fc9950395a91f9aa4723f4

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