Skip to main content

Python bindings for the Flox indicator library

Project description

flox-py

Python bindings for the Flox indicator library. Tested against TA-Lib.

Install

pip install flox-py

Usage

import flox_py as flox
import numpy as np

close = np.array([...])
high = np.array([...])
low = np.array([...])

ema50 = flox.ema(close, 50)
atr14 = flox.atr(high, low, close, 14)
rsi14 = flox.rsi(close, 14)

signal_long = (rsi14 > 70).astype(np.int8)
signal_short = ((rsi14 < 30) * -1).astype(np.int8)

returns = flox.bar_returns(signal_long, signal_short, log_returns)
trades = flox.trade_pnl(signal_long, signal_short, log_returns)
pf = flox.profit_factor(returns)
wr = flox.win_rate(trades)

Indicators

Function Description
flox.ema(input, period) Exponential Moving Average
flox.sma(input, period) Simple Moving Average
flox.rma(input, period) Wilder Moving Average
flox.rsi(input, period) Relative Strength Index
flox.atr(high, low, close, period) Average True Range
flox.adx(high, low, close, period) ADX, +DI, -DI
flox.macd(input, fast, slow, signal) MACD line, signal, histogram
flox.bollinger(input, period, stddev) upper, middle, lower bands
flox.stochastic(high, low, close, k, d) %K and %D
flox.cci(high, low, close, period) Commodity Channel Index
flox.slope(input, length) price slope
flox.kama(input, period) Kaufman Adaptive MA
flox.dema(input, period) Double EMA
flox.tema(input, period) Triple EMA
flox.chop(high, low, close, period) Choppiness Index
flox.obv(close, volume) On-Balance Volume
flox.vwap(close, volume, window) rolling VWAP
flox.cvd(open, high, low, close, volume) Cumulative Volume Delta

Metrics

Function Description
flox.bar_returns(sig_long, sig_short, log_ret) per-bar returns with signal shift
flox.trade_pnl(sig_long, sig_short, log_ret) per-trade PnL array
flox.profit_factor(returns) sum positive / abs sum negative
flox.win_rate(trade_pnls) fraction of winning trades

Project details


Download files

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

Source Distribution

flox_py-0.5.0.tar.gz (24.2 kB view details)

Uploaded Source

Built Distributions

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

flox_py-0.5.0-cp313-cp313-win_amd64.whl (375.8 kB view details)

Uploaded CPython 3.13Windows x86-64

flox_py-0.5.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (710.1 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

flox_py-0.5.0-cp313-cp313-macosx_14_0_arm64.whl (401.1 kB view details)

Uploaded CPython 3.13macOS 14.0+ ARM64

flox_py-0.5.0-cp312-cp312-win_amd64.whl (375.7 kB view details)

Uploaded CPython 3.12Windows x86-64

flox_py-0.5.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (710.1 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

flox_py-0.5.0-cp312-cp312-macosx_14_0_arm64.whl (401.1 kB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

flox_py-0.5.0-cp311-cp311-win_amd64.whl (374.6 kB view details)

Uploaded CPython 3.11Windows x86-64

flox_py-0.5.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (705.9 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

flox_py-0.5.0-cp311-cp311-macosx_14_0_arm64.whl (396.0 kB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

flox_py-0.5.0-cp310-cp310-win_amd64.whl (373.9 kB view details)

Uploaded CPython 3.10Windows x86-64

flox_py-0.5.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (704.8 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

flox_py-0.5.0-cp310-cp310-macosx_14_0_arm64.whl (394.8 kB view details)

Uploaded CPython 3.10macOS 14.0+ ARM64

File details

Details for the file flox_py-0.5.0.tar.gz.

File metadata

  • Download URL: flox_py-0.5.0.tar.gz
  • Upload date:
  • Size: 24.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for flox_py-0.5.0.tar.gz
Algorithm Hash digest
SHA256 6412d18aa8eb97a4c06b4a84b74ddd8a2dcb212fc0aec52980c90fd0fee4ae63
MD5 3e2cd9fa7fd603ab09e26b5d36cfda07
BLAKE2b-256 4233ca436673aebfad2ab03636500823dffabe5d621e2bba5646a830aa326bb8

See more details on using hashes here.

Provenance

The following attestation bundles were made for flox_py-0.5.0.tar.gz:

Publisher: python-wheels.yml on FLOX-Foundation/flox

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flox_py-0.5.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: flox_py-0.5.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 375.8 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for flox_py-0.5.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 6d633da7b9b1fc4c3c93fb327fe3b6d4bf6e64699bba957b32283c92cf48afc4
MD5 e8d29b9cd4bb1314722d25b7a510e49e
BLAKE2b-256 844749c685ab471da1c1182b473e0b41ff33e4c1fadbe0ebbdf899be08ad3f1b

See more details on using hashes here.

Provenance

The following attestation bundles were made for flox_py-0.5.0-cp313-cp313-win_amd64.whl:

Publisher: python-wheels.yml on FLOX-Foundation/flox

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flox_py-0.5.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for flox_py-0.5.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b9f37c37f87050cab7b8d49a58f678a838fb8ff15aba6152ce0ff134c9044ea5
MD5 6b19e76a1d0ac95d402ab40d6c29ec12
BLAKE2b-256 f38131921a591649e47208d1fb371acaaacec5b06e3f41545eff51ff658e3619

See more details on using hashes here.

Provenance

The following attestation bundles were made for flox_py-0.5.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: python-wheels.yml on FLOX-Foundation/flox

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flox_py-0.5.0-cp313-cp313-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for flox_py-0.5.0-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 72480b524ca956f72c6c0429871fa8f7f9689d1baf831bd1238c33d1a94083c3
MD5 a6dac8b1b6bd74e75c4a888cb26dc2d1
BLAKE2b-256 6e5e192ed485f99eed6d1c93d21149a29339c85db4df47184d821bd8e44b1d1b

See more details on using hashes here.

Provenance

The following attestation bundles were made for flox_py-0.5.0-cp313-cp313-macosx_14_0_arm64.whl:

Publisher: python-wheels.yml on FLOX-Foundation/flox

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flox_py-0.5.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: flox_py-0.5.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 375.7 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for flox_py-0.5.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 570db62413b31eb797f80465aadcd73c51da4006921a66319580e84a69b2bd40
MD5 802723745a5ac06839722399f803b990
BLAKE2b-256 fda17b762b7631232b8d2c980ac6c6a17e48b7a750972d08dcb3c4fe487fe722

See more details on using hashes here.

Provenance

The following attestation bundles were made for flox_py-0.5.0-cp312-cp312-win_amd64.whl:

Publisher: python-wheels.yml on FLOX-Foundation/flox

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flox_py-0.5.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for flox_py-0.5.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 110ab3dfacbf36923f7d5805ebaa8f19e0982bfbb412041e3b45fa0ac47a7754
MD5 be3b3769ce959007dbe2cb11b1ca6ce4
BLAKE2b-256 6d9b11997f4e934bb3f1592ef710194420d3a543977cbaba68b939b72c355cea

See more details on using hashes here.

Provenance

The following attestation bundles were made for flox_py-0.5.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: python-wheels.yml on FLOX-Foundation/flox

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flox_py-0.5.0-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for flox_py-0.5.0-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 c9e098d5217a47ba12f39dd3acaa9a3125ff09dec0b254e06e739b43a4675df2
MD5 a216fb59ea3a4bbdfff7bb6e7dbe1633
BLAKE2b-256 6ba2faab88ed067a534d29fe6d29c3012ecf22ccb74a86dd28498ec42688453f

See more details on using hashes here.

Provenance

The following attestation bundles were made for flox_py-0.5.0-cp312-cp312-macosx_14_0_arm64.whl:

Publisher: python-wheels.yml on FLOX-Foundation/flox

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flox_py-0.5.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: flox_py-0.5.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 374.6 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for flox_py-0.5.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 185e2493ce45c73d33c01f0ff42597975af595d67b0fb7c02598f778a61dfa9b
MD5 894d6ced5cfcdd92c73aa2133a9112dd
BLAKE2b-256 b338b849ecdfe888ff56f5e54584be05150c118eabdaceda42a7d3ce7a853bcb

See more details on using hashes here.

Provenance

The following attestation bundles were made for flox_py-0.5.0-cp311-cp311-win_amd64.whl:

Publisher: python-wheels.yml on FLOX-Foundation/flox

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flox_py-0.5.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for flox_py-0.5.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 80cf04cac77415066c055e8213500515bcea0ab79bb23ebccab670119e6398ef
MD5 cfc53b2df0ed0b00ef66ea33716abea6
BLAKE2b-256 f03928967a45aa228fc5efce518f79e6cd98cfbfdfaebbbebd1bbb458561aee1

See more details on using hashes here.

Provenance

The following attestation bundles were made for flox_py-0.5.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: python-wheels.yml on FLOX-Foundation/flox

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flox_py-0.5.0-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for flox_py-0.5.0-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 c5342b48f7241641ced3af6b33a47838e3f59a4c23955cbe2a9041eb058d681d
MD5 6c81c545a570f3f2c7d58ccc26034d97
BLAKE2b-256 b290be1a448496a41864d816eba4ffc642d327d0f7444ef715408389d8331302

See more details on using hashes here.

Provenance

The following attestation bundles were made for flox_py-0.5.0-cp311-cp311-macosx_14_0_arm64.whl:

Publisher: python-wheels.yml on FLOX-Foundation/flox

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flox_py-0.5.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: flox_py-0.5.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 373.9 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for flox_py-0.5.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 3d151b14604cd2a6ddc8df0d91bc28818687cab6855a8cca83835d69935bfc0b
MD5 e5a145d6e2b8d09b139b41719ff8a92a
BLAKE2b-256 630bff6f389e12f5c36fe5ba32df7cde1916d4028c99418893c1cf109b83e22a

See more details on using hashes here.

Provenance

The following attestation bundles were made for flox_py-0.5.0-cp310-cp310-win_amd64.whl:

Publisher: python-wheels.yml on FLOX-Foundation/flox

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flox_py-0.5.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for flox_py-0.5.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 23e737bfdfa7d0a2093df4290e2e02bc3850a69d7f4e2bb165b4562ac77e332d
MD5 4a0628a185f30600d1dfcf1bc00a66c2
BLAKE2b-256 49fa19ea1ee84ba4573fec1a1d274a2acc10cbc8419f8bd023a703e6d4c85be7

See more details on using hashes here.

Provenance

The following attestation bundles were made for flox_py-0.5.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: python-wheels.yml on FLOX-Foundation/flox

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flox_py-0.5.0-cp310-cp310-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for flox_py-0.5.0-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 2ea950d5695cf0a9c14173a74a27015144d314533b3cfe641ade597184840af0
MD5 699940d29320a017c664ae74d997380f
BLAKE2b-256 7650a4254f2a4242690e3bae310a38deb2c18a3e00fd936efd29eb9cd4d8f235

See more details on using hashes here.

Provenance

The following attestation bundles were made for flox_py-0.5.0-cp310-cp310-macosx_14_0_arm64.whl:

Publisher: python-wheels.yml on FLOX-Foundation/flox

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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