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

Uploaded CPython 3.14Windows x86-64

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

Uploaded CPython 3.14macOS 11.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b2-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 fe260ed5607538f0528da317f5748ae654f90cd5f28e56c32bb8d267c3365593
MD5 9be434998c666238759a4fd17a0e6552
BLAKE2b-256 fceb3daae0321fc57cd83d44e344a0be798e8ce4e3a9faebe793b3df12a0e097

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b2-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fac29111825b266c8f239720b3290df87cc84d28c155b4dea3ddef0f9336134b
MD5 1ae615903dedff1044a2c2de865ba4b7
BLAKE2b-256 65ebc3cd08fbd92978f17a328e5301b77bbb982130bbb57bd23ccbd339436bfe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b2-cp314-cp314-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 7060f166cc494fd42a58814e0ac92c2e1ae5b21e3a785da5787a955db6261dfa
MD5 cebe8bb346ae18fdd9e34ea185128e1c
BLAKE2b-256 f666acb8a46be5ac8ca9bdce2e0bd107421cb6a499867afc105aa91a34ff5467

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b2-cp314-cp314-macosx_10_15_universal2.whl
Algorithm Hash digest
SHA256 2d3477e425965e281d4f3eb141ddac612c45b40055a91a7df9234e479967a19a
MD5 6e324f0f6d98af24195b19b077133440
BLAKE2b-256 d007fe1c5168f1ca65c54299208676dda8ae86589fbe2d68d4c76731d8fb4f1e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 7c550fe956353e5a92b3f180879664016314eabc5402ba78aa36041ec971a705
MD5 3c225dbbfd98fd7c6380a58099c21eda
BLAKE2b-256 b391928e2fa7ff7725d4be2b0d3708e0b2038479f55da68aba8f96bb47123ce2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b2-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2fb8cf4c0ef75a8ce06e83e72f297a0aaa9e0b0130ccf26f6c9e6eb6f11ee2c3
MD5 5bf0a77eba695c31da0f3d7f0e656350
BLAKE2b-256 05e2d4da2b2da5e9d5d444f7bb59e3de9080b4dc97c9a00b077408e2c3fa5ee3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b2-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 f7c564cbfcba82d6e450497b22d3817afa6f473a3372c2d23f3470afed352258
MD5 b48671519629d02a0880b7a24eeaaed5
BLAKE2b-256 629c68c436b93fdcc510b441e2e8e97526463259f7a329ed2a3bda13724f05ea

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b2-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 8edc422e28fc344ab6b51e03e92834916a53f6b88c46efa6f501529c6a56d7bd
MD5 127bace30b34b299d8845d12fd85ec8c
BLAKE2b-256 468e75c3705f3542ebad7dbb49064f33fd214b07ae2e0ae472d0ca06248b52e3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 05c0341cba04d3c0c7ea3bfb220f046e7d385845558e8c3f8ba47ee9dd1de23f
MD5 f3076c1840fd8a7473672049d3cd23ce
BLAKE2b-256 e40131355f7b9565dfdb36fc9df265d466c9cd289047adcdfbf8fb0ae84063e7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cb2b5cc51b7a4cd442dc90fe5f8d473bbed4406eb694fd64017b3fba60d97c74
MD5 c8cd4cc862db8710c81970304319b0dd
BLAKE2b-256 19a35a176f3a7fefcfdf12e5bb2a2ce8a6fcbc93941773e8716a333d7d9d3d5d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b2-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 7921620f032952def579756ccffc0cf1f5e053ab3d0f67efb862222ab53d12d8
MD5 eb7c3aaa2164bc8315dfa2ea149b1bbc
BLAKE2b-256 07f320c77431f8dc2c0106ea7772f63c2e90e9a96e7a3afc92da74ccb044e06f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b2-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 e2d2140fc735e3846a16e28b1a9ccd7dff90e8b6782369d0aa818a8cc5b12d96
MD5 55979d6c1e95fc403ce47b550ce4c809
BLAKE2b-256 166c2aee67ec0e8f02028f56e97142bc7754e982050c8103eb3761f258de6b3b

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