RandomForestRegressor Model – Up to 99% Accurate Forex Prediction

  1. It splits the data into training and testing sets using train_test_split, with 80% of the data used for training and 20% for testing.
  2. It creates a RandomForestRegressor model with 100 decision trees (n_estimators=100) and trains it on the training data.
  3. It makes predictions for the test data using the trained model.

Output Sample:

  1. It calculates the model’s accuracy using two metrics: R-squared (r2) and Mean Squared Error (MSE).
  2. It calculates the accuracy percentage by multiplying the R-squared score by 100.
  3. It prints the R-squared score, Mean Squared Error, and accuracy percentage to evaluate the model’s performance.
  4. It predicts the next date and price based on the last known price. It uses the last known price in the dataset to make a one-day-ahead prediction. The date is parsed and incremented by one day, and the predicted price is formatted to have four decimal places.
  5. It prints the last known date, the predicted next date, and the predicted next price.


The program is developed in Python. You will need to install Python 3.10. All instructions included.

Prediction 1 Won


  • jonnydd
    October 31, 2023

    Made 92% in 2 days! I cannot belive it!

  • Michael D
    October 31, 2023

    wow this is next level trading!

  • robthekvant
    October 31, 2023

    so far 5 wins out of 5 trades

  • Nenad
    October 31, 2023

    very accurate trades i am impressed!

Leave a Reply

New Sale Alert