Coder Social home page Coder Social logo

deeptendies / legacy-deeptendies-library Goto Github PK

View Code? Open in Web Editor NEW
8.0 3.0 1.0 19.36 MB

Open source stock price forecast bringing quantitative trading to the masses!

License: GNU Affero General Public License v3.0

Python 0.14% Jupyter Notebook 99.86%
stonks quant tendies open-source python-libraries machine-learning

legacy-deeptendies-library's Introduction


deeptendies

image image Documentation Status

Bringing quantitative trading to the masses!

The most difficult part of quantitative analysis is getting started. This project has you covered ;)

It is a one-stop shop for obtaining historical data, engineering features, and fitting the data through a pipeline.

Features

Let's open a blank colab and try out this library: https://colab.research.google.com/#create=true

# 1 Liner easy install
!pip install git+https://github.com/stancsz/deeptendies && pip install -r https://raw.githubusercontent.com/stancsz/deeptendies/main/requirements.txt
import deeptendies as dt

# Look and feel of pandas usage & get a pd.DataFrame
df = dt.DataFrame.from_yf('GME')
print(type(df))

# Builtin Pipeline class for mass features processing
pipeline = dt.Pipeline(
    [
        dt.Feature.get_x_high,
        dt.Feature.get_x_low,
        dt.Feature.get_x_ma,
        dt.Feature.get_diff
    ]
)
df = pipeline.run(df=df, x=50, interval='day')
df = pipeline.run(df=df, x=100, interval='day')
df = pipeline.run(df=df, x=200, interval='day')
df = pipeline.run(df=df, x=13, interval='week')
df = pipeline.run(df=df, x=26, interval='week')
df = pipeline.run(df=df, x=52, interval='week')
df[['50_day_ma','200_day_ma']].plot()

happy quanting :)

Additional Features: Feature engineering

Easy to use feature engineering methods

df = dt.Feature.get_x_low(df, x=52, interval='week')
df = get_x_ma(df, x=50, interval='day')

learn more @ deeptendies/feature.py

img.png

Jupyter

or use it in a notebook

Development guide

git clone https://github.com/deeptendies/deeptendies.git
pip install -e deeptendies

Credits

  • This package is redesigned from the legacy deeptendies package, credits to original authors.
    • @mklasby @bgulseren @KBehairy @hasnil @Karenzhang7717
  • This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

License

legacy-deeptendies-library's People

Contributors

bgulseren avatar hasnil avatar karenzhang7717 avatar kbehairy avatar mklasby avatar stancsz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

sudotejas

legacy-deeptendies-library's Issues

Evalute MLOps Workflow Tools

  • Argo - Container-native workflow engine
  • MLRun - Orechestration Framework
  • KubeFlow - Machine Learning Toolkits for Kubernetes
  • Prefect - Workflow managment system
  • ZenML - MLOps framework to develop reproducible pipelines

TODO: Provide pros/cons list for each and a recommendaiton for the best solution for our usecase

add gridsearch with autokeras

def of done

  • make a makeshift poc
  • make it more robust

grid search on

  1. dataset range
  2. epoch
  3. batch size

each autokeras timeseries trial should log the performance

Evaluate AutoArima , pmdarima

wrote a minimalist/lite fork of deeptendies. just single column autoarima (R's autoarima's python rewrite)
https://pypi.org/project/pmdarima/

        stock='gme',
        start='2021-05-10',
        end='2021-05-27',
        forecast_days=5,
        filter=['High']
>> 
/usr/bin/python3.8 /home/stan/github/deeptendies-lite/main.py
[272.1088269  279.6325006  287.15617429 294.67984799 302.20352168]

Process finished with exit code 0

image

Evaluate GlueonTS

Evaluate https://ts.gluon.ai/
figure out if it is suitable for statistical arbitrage use case, write some blurb about it for sharing the knowledge

  • read the documentation
  • follow the quick start
  • run the quick start and share code
  • write a blurb about the evaluation, write on medium
  • pros/cons list, what does it looks like it's best for

Implement technical indicators

rescope needed
We came across this library https://twopirllc.github.io/pandas-ta/, it seems like it has most of the technical indicators we need. let's add the library to our stack for now and only write our own ta logics if needed.

Let's think about how can we "grid search" a couple of indicators for each dataset (stocks). I think we can try something like:

  • correlation analysis
  • strategy evaluation

We can pick a couple of clusters, then based on each cluster, we pick the most correlated metric and use them as feature columns to train our timeseries.

image

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.