Skip to main content

A Python application with a Dash frontend, services to fetch market data, and an API server.

Project description

Machine Learning Models

Tradestream uses a variety of machine learning models to predict the future price of a stock. The models are trained on historical data and use a variety of features to make predictions. The models are trained on a daily basis and the predictions are made on a minute-by-minute basis.

Machine Learning Libraries

Tradestream researched the following machine learning libraries:

- [TensorFlow](https://www.tensorflow.org/)
- [LSTM](https://www.tensorflow.org/api_docs/python/tf/keras/layers/LSTM)
- [GRU](https://www.tensorflow.org/api_docs/python/tf/keras/layers/GRU)
- [Transformer](https://www.tensorflow.org/api_docs/python/tf/keras/layers/Transformer)
- [PyTorch](https://pytorch.org/)
- [LSTM](https://pytorch.org/docs/stable/generated/torch.nn.LSTM.html)
- [GRU](https://pytorch.org/docs/stable/generated/torch.nn.GRU.html)
- [Transformer](https://pytorch.org/docs/stable/generated/torch.nn.Transformer.html)
- [Scikit-learn](https://scikit-learn.org/)
- [Ridge](https://scikit-learn.org/stable/modules/linear_model.html#ridge-regression)
- [Lasso](https://scikit-learn.org/stable/modules/linear_model.html#lasso)
- [ElasticNet](https://scikit-learn.org/stable/modules/linear_model.html#elastic-net)
- [RandomForest](https://scikit-learn.org/stable/modules/ensemble.html#random-forests)
- [GradientBoosting](https://scikit-learn.org/stable/modules/ensemble.html#gradient-boosting)
- [AdaBoost](https://scikit-learn.org/stable/modules/ensemble.html#adaboost)
- [Stacking](https://scikit-learn.org/stable/modules/ensemble.html#stacking)
- [Voting](https://scikit-learn.org/stable/modules/ensemble.html#voting)
- [Bagging](https://scikit-learn.org/stable/modules/ensemble.html#bagging)
- [ExtraTrees](https://scikit-learn.org/stable/modules/ensemble.html#extra-trees)
- [IsolationForest](https://scikit-learn.org/stable/modules/ensemble.html#isolation-forest)
- [LocalOutlierFactor](https://scikit-learn.org/stable/modules/neighbors.html#local-outlier-factor)
- [XGBoost](https://xgboost.readthedocs.io/en/stable/)
- [XGBRegressor](https://xgboost.readthedocs.io/en/stable/python/python_api.html#xgboost.XGBRegressor)
- [XGBClassifier](https://xgboost.readthedocs.io/en/stable/python/python_api.html#xgboost.XGBClassifier)
- [LightGBM](https://lightgbm.readthedocs.io/en/latest/)
- [LGBMRegressor](https://lightgbm.readthedocs.io/en/latest/pythonapi/lightgbm.LGBMRegressor.html)
- [LGBMClassifier](https://lightgbm.readthedocs.io/en/latest/pythonapi/lightgbm.LGBMClassifier.html)
- [CatBoost](https://catboost.ai/)
- [CatBoostRegressor](https://catboost.ai/docs/concepts/python-reference_catboostregressor.html)
- [CatBoostClassifier](https://catboost.ai/docs/concepts/python-reference_catboostclassifier.html)
- [Prophet](https://facebook.github.io/prophet/)
- [ProphetRegressor](https://facebook.github.io/prophet/docs/python/python_api.html#prophet.ProphetRegressor)
- [ProphetClassifier](https://facebook.github.io/prophet/docs/python/python_api.html#prophet.ProphetClassifier)

Contributing to Tradestream

We welcome contributions to Tradestream! Please open an issue or submit a pull request with your changes. You can find the pull request template in the .github/pull_request_template.md file. If you have any questions, please open an issue and we will be happy to help. You can also find us on the Tradestream Discord if you have any questions. It is very important that you follow the Contributing Guidelines when contributing to Tradestream. We look forward to seeing your contributions!

Project Structure

Tradestream is a Python application that uses the Dash framework for the frontend and the Flask framework for the backend. The application is deployed to Heroku. The project is organized as follows:

tradestream/                 # Main directory for the application

├── dash_app/                # Directory for the Dash app (frontend)
   ├── __init__.py          # Initialize the Dash app, include authentication
   ├── layout.py            # Define the layout of the Dash app
   ├── callbacks.py         # Define callbacks for interactivity
   └── authentication.py    # Handle user authentication

├── services/                # Directory for services that fetch real-time market data
   ├── __init__.py          # Initialization for services
   ├── market_fetcher.py    # Code to fetch real-time data from the markets
   └── scheduler.py         # Schedule tasks to fetch data at intervals

├── api/                     # Directory for the API server
   ├── __init__.py          # Initialization for API server
   ├── routes.py            # Define API routes
   ├── models.py            # Define MongoDB models using ODM (like PyMongo or Motor)
   └── views.py             # API views (logic to handle requests)

├── config.py                # Configuration file (environment variables, DB settings, etc.)
├── Procfile                 # Define process types for Heroku (e.g., web, worker)
├── requirements.txt         # Python dependencies
└── wsgi.py                  # Entry point for the application (for Heroku to run the app)

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

tradestream-0.4.4.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

tradestream-0.4.4-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file tradestream-0.4.4.tar.gz.

File metadata

  • Download URL: tradestream-0.4.4.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Darwin/23.4.0

File hashes

Hashes for tradestream-0.4.4.tar.gz
Algorithm Hash digest
SHA256 f20e7bfd39cf5c439de3565d31530f296c0f8ba9c8c4f7f96c9aea03477bda19
MD5 3026d239a90c9fe62268379330f342bf
BLAKE2b-256 8df905c38da77dd432a4a3f42957b9a153e203fd0643eb7bacbd0229ae0824af

See more details on using hashes here.

File details

Details for the file tradestream-0.4.4-py3-none-any.whl.

File metadata

  • Download URL: tradestream-0.4.4-py3-none-any.whl
  • Upload date:
  • Size: 16.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Darwin/23.4.0

File hashes

Hashes for tradestream-0.4.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f65c55c85e8b9c4951d951df07a76c49a52e5cd6f861e60aa1ca4a1b8fd41cec
MD5 eac2052de0c321e13bd0e86a7059f6e2
BLAKE2b-256 13ee4ae031a76c7cfeeada9c81f680797a2ffce15ba5735c8045e4ab77f5d2cf

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page