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

Uploaded CPython 3.14Windows x86-64

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

Uploaded CPython 3.14macOS 11.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b5-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 bb45a05cd20a131a2f691912adde0e41c9c49e0059e7eb3d59955968b90977f5
MD5 79b9fa9ba0c70a4a2638140919ee814f
BLAKE2b-256 c737ef75f28ad46e951b0dd1d9f538278ad6f7d2d498974da64149bc1d5eb585

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b5-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 94fb66206e7918fe2a714eebe555cc0e85bca26a79baba08a0a5fb88beeb5cb5
MD5 56b10140e58f110a3a332d1c1fa5df89
BLAKE2b-256 3e5e7945a1aa18c84b00667c9c6356d92adcef39fe781ba593736794977583f3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b5-cp314-cp314-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 8b7b76244f85856e6c649d3025a18c9155d08174809f535e7ea54ee04ed274c0
MD5 0964dcf1a8889d80f26190040eb6be9a
BLAKE2b-256 abc54ab60eef21db0a58766f6d0e25ccc4698c4a5b8ff0c00a435ea940f26a9a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b5-cp314-cp314-macosx_10_15_universal2.whl
Algorithm Hash digest
SHA256 a8d9a6c1d63ed79813f8c1f114914a0bd5f7fdf703c4f2a21ef1d2c2008a0b67
MD5 30ecf8bfd194fbdc45be248ac8925917
BLAKE2b-256 238710ff58c86b9aa33cdbea67065efe5d730e370743c3eaba7e7272b43fa1e7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b5-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 fdcf0c1f042b8da9f736110cc864e0ee3fd5a2c67e77379399e090622517134c
MD5 84f5fbd5073f3e95118e648a21f7b937
BLAKE2b-256 fb64d35533d63ab42510c4560d6247a0b00791daba84a5581d61a6cca2d6d518

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b5-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cc322f421a99a242581d1702090350387836a7a949b85c7aff2458ce590a6ac6
MD5 25c4e7e02d8fe16f77fc47b149b9a3a0
BLAKE2b-256 cbeb49e78039f34d3ac2e6d3a38094507830b4ff72a3ee3135cb7c3774f977bd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b5-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 af860edd223373487ee42c1819a66fbfe2931211ca860af3ce75a1fb8d4bc72f
MD5 b590d8783f179d84119c4e036a473688
BLAKE2b-256 786bb2be7dd70816de180f829d89e63ba8d7a8a8786852c75b6378dbe191ce39

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b5-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 f2d11364f52d404aed89de8acdd4baea8d61255f92ad5344954ae859098e0d07
MD5 04fd4b0e6c9da1c267a3378fa55ee945
BLAKE2b-256 9783cd6c3df5e0dc4897cb20a2170e1b560bcdee0601ed2e15d862b90fe2c181

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b343eadf9c8bc06ffa58a14c68091acd08654813e9dc1f93371029ff0fc983d9
MD5 238aade845039303385237585506fbd9
BLAKE2b-256 a9855827242da318423988393ede56926876b94e996064052760bf8efbfff9ac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b5-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7e0c71311cb565e04d5f2bfaae6f618f775a8c3ddbd4bca20e2177db49832dc6
MD5 75fc168fd52cdbf6f99c44770d6c0330
BLAKE2b-256 4ddcb2e909b5571e5bc07b75ecacda7f1186e37063d0beb03dd33f7a7d401115

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b5-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 1dcccd235615a196f30cc53bd0e1e308b2fd0a797474030e0345640f9ca5b8f6
MD5 488ff5458d7286995a9748fba7881778
BLAKE2b-256 57a337b61fbdd558e4df3cfcb7ddcd36daf5cf43b31822a9b3f9158d17a13f0e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for octobot_tulipy-0.4.11b5-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 641209589ef02d41908f04867cd76ab5488d1d005bdb4a1c40e969b2b95771b6
MD5 088c2ab643103ec09ed6bcaeba6b2a55
BLAKE2b-256 b49b0becf6c63ea62721581218a8f7550a44d7e6cdf0af4ad7c35baadb57a355

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