huseinzol05 / Stock-Prediction-Models

Gathers machine learning and deep learning models for Stock forecasting including trading bots and simulations
Apache License 2.0
7.84k stars 2.78k forks source link

Streaming support #31

Closed archenroot closed 5 years ago

archenroot commented 5 years ago

Hi,

nice collection, all together. Maybe one suggestion to add ARIMA model, looks good on some stocks.

I have question, I created account at https://iexcloud.io/docs/api/#streaming to get updates in real-time on stock, so I would like to try the models run not only on daily, but per hour/minute basis. I will store the data in some kind of database or even CSV with range timestamp.

Q: Is there any issue I should expect when adapting from daily to higher time resolution on models (parameters changes, etc.)? Q: Are agents at moment ready to update trained model on latest data continuously? (I am still discovering from yesterday this repo :-) ). Lets say I will stream 100 stocks, and 30 stocsk I will use for testing, but the models need to be continuously updated(or new versions of those, we can always store each version, so we can also see convergence between versions in time to discover accuracy change) on sime interval basis)

archenroot commented 5 years ago

I can get per minute data in following form, can extract anything into CSV: data: [{"symbol":"SPY","companyName":"SPDR S&P 500 ETF Trust","calculationPrice":"close","open":277.11,"openTime":1559655000050,"close":280.53,"closeTime":1559678400369,"high":280.68,"low":276.62,"latestPrice":280.53,"latestSource":"Close","latestTime":"June 4, 2019","latestUpdate":1559678400369,"latestVolume":77035534,"iexRealtimePrice":280.57,"iexRealtimeSize":100,"iexLastUpdated":1559680485474,"delayedPrice":280.65,"delayedPriceTime":1559679000001,"extendedPrice":281.65,"extendedChange":1.12,"extendedChangePercent":0.00399,"extendedPriceTime":1559724682001,"previousClose":274.57,"change":5.96,"changePercent":0.02171,"iexMarketPercent":0.018740546408103045,"iexVolume":1443688,"avgTotalVolume":77727251,"iexBidPrice":0,"iexBidSize":0,"iexAskPrice":0,"iexAskSize":0,"marketCap":0,"peRatio":null,"week52High":294.95,"week52Low":233.76,"ytdChange":0.1192}]

Can stream lets say top 1000 stocks and will share the data. Maybe from here? https://www.barchart.com/stocks/indices/russell/russell1000

huseinzol05 commented 5 years ago

yes you can, I use the same code for crypto but just a little tweak to accept websocket from different exchanges. I believe you can do the same.