Skip to main content

analyse trading signals in OHLCV data

Project description

ohlcvish

ohlcvish takes OHLCV data, generate multiple technical indicators on it and then gives you all existing Buy-Hold-Sell combinations in the dataset. Mean, median, min and max are the clustered results of the respective signal combination.

How to use

To use ohlcvish you need your OHLCV data to be in a pandas.DataFrame like this:

import pandas as pd

eth = pd.read_csv("data/ETH.csv", index_col="datetime", parse_dates=True)

eth.head()
            close  high     low    open   volume
datetime                                        
2015-08-07   3.00   3.0  0.6747  0.6747   123.93
2015-08-08   1.20   3.0  0.1500  3.0000  2119.43
2015-08-09   1.20   1.2  1.2000  1.2000     0.00
2015-08-10   1.20   1.2  1.2000  1.2000     0.00
2015-08-11   0.99   1.2  0.6504  1.2000  9486.09

Use ohlcvish() function to get all signals:

from ohlcvish import ohlcvish

signals = ohlcvish(eth)

signals.head()
   macd  rsi  stoch  adx  aroon  bbands  sar  ma  amount  forecast_mean  forecast_median  forecast_min  forecast_max
0    -1   -1      0    0      0       0   -1   0       1      59.947906        59.947906     59.947906     59.947906
1    -1    0      0   -1     -1       0    0   0       1      -2.904930        -2.904930     -2.904930     -2.904930
2    -1    0      0   -1      0       0   -1   0       3      -7.415414        -6.642701    -11.645688     -3.957853
3    -1    0      0   -1      0       0    0   0       1     298.919554       298.919554    298.919554    298.919554
4    -1    0      0    0     -1       1   -1  -1       1     -54.082750       -54.082750    -54.082750    -54.082750

Define forecast_period to change forecast for mean, median, min and max.

signals = ohlcvish(eth, forecast_period=10)

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

ohlcvish-0.0.1.tar.gz (3.7 kB view details)

Uploaded Source

File details

Details for the file ohlcvish-0.0.1.tar.gz.

File metadata

  • Download URL: ohlcvish-0.0.1.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.20.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.4

File hashes

Hashes for ohlcvish-0.0.1.tar.gz
Algorithm Hash digest
SHA256 a4358f231a0b0aa25bf8218761047e8075491ec8bac26605a4c7e48dc8322fd5
MD5 816700ec8cdf28155b4fc4f896b9e172
BLAKE2b-256 516f8f4c6ebb73560e5857360ae0b8388cc4ded6e38b41689123126e2e8532bf

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