Skip to main content

A package for predicting buy and sell signals

Project description

Evx regpredict mlbot

This is a simplified version of evxpredictor package used to generate buy and sell signals for crypto and conventional stock markets based on the excess volume indicator(EVX). EVX is a concept where the bid-ask spread is estimated inherently from current market prices.

You can read more about Evx in the whitepaper here

Installation

Install regpredict with python3 -m pip install regpredict

Usage

In your python script simply import the module and use as follows:

from regpredict.regbot import signal
print(signal(20,65,85,78,45,0.7))

The above methods take an assets a,b,macd,macdsignal,grad_histogram,close_gradient,close_gradient_neg based on the time interval you have chosen. A zero classification output would instruct the user to sell, while one output means don't sell or buy if the asset is not already present in the orders.

Testing an entire dataframe

Testing of a dataframe for correct buy, sell signals is as simple as applying the function as follows:

import pandas as pd
from regbot import signal
#from regpredict.regbot import signal
df = pd.read_csv('../path/to/your_validation.csv')

y_pred = []
def getSignal(a,b,macd,macdsignal,grad_histogram,close_gradient,close_gradient_neg):
    return signal(a,b,macd,macdsignal,grad_histogram,close_gradient,close_gradient_neg)

Where thr is a user defined threshold.


df = df[df['enter_long'] == 1]
print(df.head())

df['result'] = df.apply(lambda row: getSignal(row['a'],row['b'],row['macd'],row['macdsignal'],row['grad-histogram'],row['close-gradient']row['close-gradient-neg']), axis=1)

print(df.head())

print(len(df[df['result'] == df['enter_long']]), len(df))

Your original data must already have some presumed 'buy' signal.

Warning

This is not financial advise. Regpredict is entirely on its preliminary stages. Use it at your own risk.

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

nlp_project-0.0.1.tar.gz (13.9 kB view details)

Uploaded Source

Built Distribution

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

nlp_project-0.0.1-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nlp_project-0.0.1.tar.gz
  • Upload date:
  • Size: 13.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.4

File hashes

Hashes for nlp_project-0.0.1.tar.gz
Algorithm Hash digest
SHA256 e64609f574c803f63582e35f945c4d4010dcb87eb51e9c7a37ec6d16cac6bda3
MD5 a2024e6abe6880e24c7c2732790c212c
BLAKE2b-256 c99cd551a60d60575c55ba6bbfb8b1e81b044621d5868478759020c0eead41af

See more details on using hashes here.

File details

Details for the file nlp_project-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: nlp_project-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 14.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.4

File hashes

Hashes for nlp_project-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d1e1176f853d6e565c6a70f233bc7b42bfa9d4238605b8006514aa2f245a68ea
MD5 271a2278f9438be9e25c6f0e8d9c893c
BLAKE2b-256 ba73c938614dcbe2c00a84dc1b828f87da0ce79b4597b7e991525897afe1c20c

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