Skip to content

driemworks/agatha

Repository files navigation

MYNT

alt-text
Mynt is a tool to help you predict future close prices for any given stock tickers.

Should I have faith in the predictions?

Absolutely not.

How it works

Mynt uses an LSTM network to predict close prices for a user-specified number of days in the future. The training data is downloaded via Alpha Vantage.

Usage

First get an API key from Alpha Vantage. To train a model for a particular ticker, use

model = getOrTrainModel(alpha_vantage_api_key, ticker, alphavantage_data,
						model_data, weights_data, epochs=epochs, look_back=look_back)
  • alphavantage data is downloaded as a csv and then pickled (saved as .pkl)
  • the model_data is saved as json
  • the weights file is saved as .h5

Predictions for future close prices for a stock can have output type as json or plot (will show pyplot)

prediction_output = predictFuture(model, num_days_to_predict, ouptut_type)

Ex JSON output:

[
   {
      "price":"8.105009",
      "day":"1"
   },
   {
      "price":"7.9884334",
      "day":"2"
   },
   ...
   },

Refer to app.py, for a working example.

Future Enhancements

  • Allow multiple data sources, including for cryptocurrencies (only alphavantage at the moment)
  • Any suggestions?