mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-27 12:40:35 +00:00
PREDICTION TECHNIQUES
This menu aims to predict the share price of a pre-loaded stock, and the usage of the following commands along with an example will be exploited below.
- sma
- simple moving average
- knn
- k-Nearest Neighbors
- linear
- linear regression (polynomial 1)
- quadratic
- quadratic regression (polynomial 2)
- cubic
- cubic regression (polynomial 3)
- regression
- regression (other polynomial)
- arima
- autoregressive integrated moving average
- prophet
- Facebook's prophet prediction
- mlp
- MultiLayer Perceptron
- rnn
- Recurrent Neural Network
- lstm
- Long-Short Term Memory
Note: Use this at your own discretion. All of these prediciton techniques rely solely on the closing price of the stock. This means that there are several factors that the models aren't aware of at the time of prediction, and may - drastically - move the price up or down. Examples are: news, analyst price targets, reddit post, tweets from Elon Musk, and so on.
sma
usage: simple_moving_average [-l N_LENGTH] [-d N_DAYS]
- -l : length of SMA window. Default 20.
- -d : prediciton days. Default 5.
knn
usage: knn [-i N_INPUTS] [-d N_DAYS] [-j N_JUMPS] [-n N_NEIGHBORS]
- -i : number of days to use for prediction. Default 40.
- -d : prediciton days. Default 5.
- -j : number of jumps in training data. Default 1.
- -n : number of neighbors to use on the algorithm. Default 20.
linear
usage: linear [-i N_INPUTS] [-d N_DAYS] [-j N_JUMPS]
usage: regression -p 1 [-i N_INPUTS] [-d N_DAYS] [-j N_JUMPS]
- -i : number of days to use for prediction. Default 40.
- -d : prediciton days. Default 5.
- -j : number of jumps in training data. Default 1.
quadratic
usage: quadratic [-i N_INPUTS] [-d N_DAYS] [-j N_JUMPS]
usage: regression -p 2 [-i N_INPUTS] [-d N_DAYS] [-j N_JUMPS]
- -i : number of days to use for prediction. Default 40.
- -d : prediciton days. Default 5.
- -j : number of jumps in training data. Default 1.
cubic
usage: cubic [-i N_INPUTS] [-d N_DAYS] [-j N_JUMPS]
usage: regression -p 3 [-i N_INPUTS] [-d N_DAYS] [-j N_JUMPS]
- -i : number of days to use for prediction. Default 40.
- -d : prediciton days. Default 5.
- -j : number of jumps in training data. Default 1.
regression
usage: regression -p N_POLYNOMIAL [-i N_INPUTS] [-d N_DAYS] [-j N_JUMPS]
- -i : number of days to use for prediction. Default 40.
- -d : prediciton days. Default 5.
- -j : number of jumps in training data. Default 1.
- -p : polynomial associated with regression. Required.










