jealous / stockstats

Supply a wrapper ``StockDataFrame`` based on the ``pandas.DataFrame`` with inline stock statistics/indicators support.
Other
1.29k stars 299 forks source link

Generating feature vector for stock market price prediction #114

Closed dshetyo closed 2 years ago

dshetyo commented 2 years ago

I am new to machine learning. One of the first project I am tying is predicting stock price.

I have features as follows in my data frame for daily interval.

open, low, high, previous_open, previous_close, vol, previous_volume, rsi, prevous_ris, close

I want to predict close at some time during the day (earlier during the day the better) before the market closes for the day. It works nicely on train, test data. But the problem is when I want to actually predict for today period for the day is not yet closed (market is not yet closed). Hence volume, low, high, rsi values in input are not as accurate as for for other train/test data.

Question A) What value should I use for values like low, high, rsiduring actual prediction? Eg for high, low (since the day is not yet closed). Should i use high so far for the day ? B) Any other way out/ ideas here? C) What indicators are completely independent of current period (current day)?

jealous commented 2 years ago

Nice question. But I think they are out of the scope of this project. You may need to find someone who is familiar with machine learning to answer these questions.