Machinelearning: Which model type should I use for financial price prediction?

Created on 5 Jul 2018  路  2Comments  路  Source: dotnet/machinelearning

First of all thank you for the great library!
My question is simple: I want to predict next period price with pre-computed history values.
I have over 30 rows data for each price.
Price and datas are decimal.

For example history:
Indicator1 - Indicator 2 - Indicator 3 - Price - Trend
10,01121 - 23,56540 - 12.00001 - 12,23321 - UP
9,00001 - 3,00040 - 2.00001 - 1,23300 - DOWN
...
...
And data to predict coming like
8,11211 - 1,00020 - 0.00021 - 3,5555 - ?
I want to get TREND field.

Which model should I use? Any example will be perfect?
Regards!

question

Most helpful comment

You turned this into a binary classification problem (UP vs. DOWN), so any of the binary classifiers should give you a working model.

I'm unsure which are exposed w/ a nice ML.NET interface, but the repo has code for these:

  • AveragedPerceptron: Averaged Perceptron
  • BinaryClassificationGamTrainer: Generalized Additive Model for Binary Classification
  • BinarySGD: Hogwild SGD (binary)
  • FastForestClassification: Fast Forest Classification
  • FastTreeBinaryClassification: FastTree (Boosted Trees) Classification
  • FieldAwareFactorizationMachine: Field-aware Factorization Machine
  • LightGBMBinary: LightGBM Binary Classifier
  • LinearSVM: SVM (Pegasos-Linear)
  • LogisticRegression: Logistic Regression
  • PriorPredictor: Prior Predictor
  • RandomPredictor: Random Predictor
  • SDCA: Fast Linear (SA-SDCA)
  • WeightedEnsemble: Parallel Ensemble (bagging, stacking, etc)

Also, of notable importance, you'll want to ensure that your Train & Test datasets are split on time (all newer rows are in the test set). Splitting on company (train & test dataset don't have any companies in common) is almost as good, but will still leak some information like raising tide effects.

All 2 comments

You turned this into a binary classification problem (UP vs. DOWN), so any of the binary classifiers should give you a working model.

I'm unsure which are exposed w/ a nice ML.NET interface, but the repo has code for these:

  • AveragedPerceptron: Averaged Perceptron
  • BinaryClassificationGamTrainer: Generalized Additive Model for Binary Classification
  • BinarySGD: Hogwild SGD (binary)
  • FastForestClassification: Fast Forest Classification
  • FastTreeBinaryClassification: FastTree (Boosted Trees) Classification
  • FieldAwareFactorizationMachine: Field-aware Factorization Machine
  • LightGBMBinary: LightGBM Binary Classifier
  • LinearSVM: SVM (Pegasos-Linear)
  • LogisticRegression: Logistic Regression
  • PriorPredictor: Prior Predictor
  • RandomPredictor: Random Predictor
  • SDCA: Fast Linear (SA-SDCA)
  • WeightedEnsemble: Parallel Ensemble (bagging, stacking, etc)

Also, of notable importance, you'll want to ensure that your Train & Test datasets are split on time (all newer rows are in the test set). Splitting on company (train & test dataset don't have any companies in common) is almost as good, but will still leak some information like raising tide effects.

DRI RESPONSE : Looks like question has been answered. Plan to close this issue in the next 1-2 days

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aslotte picture aslotte  路  3Comments

rebecca-burwei picture rebecca-burwei  路  3Comments

daholste picture daholste  路  4Comments

bs6523 picture bs6523  路  4Comments

ddobric picture ddobric  路  4Comments