Giter Club home page Giter Club logo

ohlcvish's Introduction

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.