Skip to main content

A package for predicting buy and sell signals

Project description

Machine Learning Evx

This is a simplified version of regpredict 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 mlevx with python3 -m pip install mlevx

Usage

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

from mlevx.regbot import signal
print(signal(20,65,0.5,'enter'))

The above methods take an assets opening and closing prices of the asset based on the time interval you have chosen. The third option is the threshold, and the last option is the decision to enter or exit the trade. 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.

NB: The arguments can only be one between 'enter' or exit.

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 mlevx.regbot import signal

df = pd.read_csv('../../../path/to_your.csv')

y_pred = []
def getSignal(open,close):
    return signal(open,close)


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

df['signal'] = df.apply(lambda row: getSignal(row['open'], row['close'], 0.5, 'enter'), axis=1)

print(df.head())

print(len(df[df['signal'] == df['buy']]), len(df))

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

Warning

This is not financial advise. MlEVX 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

mlevx-0.0.3.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

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

mlevx-0.0.3-py3-none-any.whl (1.4 MB view details)

Uploaded Python 3

File details

Details for the file mlevx-0.0.3.tar.gz.

File metadata

  • Download URL: mlevx-0.0.3.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for mlevx-0.0.3.tar.gz
Algorithm Hash digest
SHA256 efd4dbdf43155abc0ae98c0cbf38f58afb2ff8d9049bb68b6c0bdc31b49d8ab1
MD5 ef7b2d88ac3031757d83109cee13b0d4
BLAKE2b-256 1f47886ccd566ca8a96628176ac6c9fb000f79844bf834af82128ff664115429

See more details on using hashes here.

File details

Details for the file mlevx-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: mlevx-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for mlevx-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3246a8f99357210965bef7eaa6db79fce29f170648351f1a1c2028499735ed03
MD5 9a5c6941d354c52e4b02da0b1da8defa
BLAKE2b-256 b07dcd8d170d7fd07e4fc2ed8a9494aaa492c8a46fb4a1fa6a0959db6bcbdd72

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