Metadata-Version: 2.1
Name: regpredict
Version: 0.0.17
Summary: A package for predicting buy and sell signals
Home-page: https://nkrtech.com
Download-URL: https://github.com/moinonin/regpredict/archive/refs/heads/main.zip
Author: Nicolus Rotich
Author-email: nicholas.rotich@gmail.com
License: MIT
Project-URL: Bug Tracker, https://github.com/pypa/regpredict/issues
Platform: any
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE

# Evx regpredict mlbot

This is a simplified version of [evxpredictor](https://pypi.org/project/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](https://www.researchgate.net/publication/345313655_DeFiPaper)  
# 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, '2022-01-08 20:00:00+00:00', 'long'))
```
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 time in utc as as string, and the last option is the direction, are you going 'long' or 'short' on the asset. A zero classification output would instruct the user to sell (short), while one output means don't sell or buy (long) 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 regpredict.regbot import signal

df = pd.read_csv('../../../path/to_your.csv') # the csv must contain open, close, datetime (utc), and 'enter_short' or long signal, or both 

y_pred = []
def getShortSignal(open,close,utctime,dir):
    return signal(open,close,'2022-01-08 20:00:00+00:00','short')


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

df['signal'] = df.apply(lambda row: getShortSignal(row['open'], row['close'], row['date'], 'short'), 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. Regpredict is entirely on its preliminary stages. Use it at your own risk.
