Skip to content

This repository implements the KNeighbors Regressor (KNN) model for predicting financial instrument prices such as stocks, currencies, and cryptocurrencies. It leverages gradient boosting techniques to improve accuracy by capturing complex patterns in price movements.

License

Notifications You must be signed in to change notification settings

taleblou/KNeighborsRegressor-Price-Prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KNeighbors Regressor (KNN) Model for Financial Predictions

This repository contains an implementation of an KNeighbors Regressor (KNN) model, specifically designed for predicting the prices of financial instruments such as currencies, stocks, and cryptocurrencies. The KNeighbors Regressor (KNN) algorithm leverages gradient boosting techniques, enabling it to capture intricate patterns in price movements and handle various dataset characteristics effectively. This approach enhances the accuracy and robustness of price forecasts across various datasets.

This is the original code sample for the KNeighbors Regressor (KNN) model. Explore my GitHub repository for additional models and implementations that cater to different financial prediction needs.

Performance Metrics

BTC-USD (Bitcoin)

Metric Open High Low Close
Mean Squared Error 0.000958 0.000921 0.001383 0.000946
Mean Absolute Error 0.0215 0.0197 0.0245 0.0214
R-squared 0.9594 0.9616 0.9406 0.9609
Median Absolute Error 0.0137 0.0125 0.0150 0.0144
Explained Variance Score 0.9608 0.9629 0.9445 0.9623

GC=F (Gold Futures)

Metric Open High Low Close
Mean Squared Error 0.001217 0.000794 0.000946 0.001139
Mean Absolute Error 0.0263 0.0216 0.0231 0.0263
R-squared 0.9393 0.9599 0.9528 0.9428
Median Absolute Error 0.0191 0.0150 0.0170 0.0227
Explained Variance Score 0.9504 0.9637 0.9589 0.9512

EURUSD (Euro/US Dollar)

Metric Open High Low Close
Mean Squared Error 0.000365 0.000271 0.000293 0.000349
Mean Absolute Error 0.0151 0.0129 0.0128 0.0149
R-squared 0.9197 0.9416 0.9367 0.9225
Median Absolute Error 0.0127 0.0101 0.0107 0.0130
Explained Variance Score 0.9198 0.9416 0.9368 0.9225

GSPC (S&P 500 Index)

Metric Open High Low Close
Mean Squared Error 0.000486 0.000401 0.000479 0.000637
Mean Absolute Error 0.0170 0.0154 0.0168 0.0205
R-squared 0.9644 0.9720 0.9646 0.9551
Median Absolute Error 0.0148 0.0125 0.0128 0.0185
Explained Variance Score 0.9688 0.9760 0.9675 0.9626

Related Websites

Free AI-powered short-term (5/10/30 days) and long-term (6 months/1/2 years) forecasts for cryptocurrencies, stocks, ETFs, currencies, indices, and mutual funds.

Get free trading signals generated by advanced AI models. Enhance your trading strategy with accurate, real-time market predictions powered by AI.

Discover free trading signals powered by expert technical analysis. Boost your forex, stock, and crypto trading strategy with real-time market insights.

About This Project

This KNeighbors Regressor (KNN) model is an initial implementation, released for public use. The project demonstrates the potential of deep learning models for financial predictions. While this repository focuses on KNeighbors Regressor (KNN), I have also utilized other models, the code for which is available on my GitHub[https://github.com/taleblou/].

How to Use

  1. Clone this repository.
  2. Install the required libraries: pip install -r requirements.txt
  3. Prepare your dataset and follow the instructions in the notebook or script.
  4. Run the model and evaluate its performance using the provided metrics.

License

This project is open-source and available for public use under the MIT License. Contributions and feedback are welcome!

About

This repository implements the KNeighbors Regressor (KNN) model for predicting financial instrument prices such as stocks, currencies, and cryptocurrencies. It leverages gradient boosting techniques to improve accuracy by capturing complex patterns in price movements.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages