A machine learning-based cryptocurrency prediction tool that utilizes real-time crypto data to generate price insights and visualizations.
- Offline mode to skip network calls (use CSV data only)
- Time-series enrichment: moving averages (5/20), RSI, recent price returns
- Volatility features: rolling volatility at multiple scales (7/14/21 days) and per-symbol z-scores
- Volatility Index: model‑informed, percentile-based index (Low / Medium / High)
- Permutation Feature Importance (PFI) support for explainability
- Visualizations: price charts, prediction vs actual, volatility series and volatility index charts
- CoinGecko API: Primary data source for Crypto prices
- Binance API: Secondary data source
- CSVHelper: For fallback data handling from files
- .NET 8.0 SDK or newer
- Visual Studio 2022 or VS Code with C# extension
- Clone this repository
- Open the solution in Visual Studio or VS Code
- Restore NuGet packages
- Build and run the application
dotnet run -c Release
To run without hitting APIs (use CSVs only), set:
PowerShell
$env:DEEP_OFFLINE="1"
dotnet run -c Release
Outputs are written to the output/ directory with timestamped filenames.
https://github.com/mars-rift/deep-space.git
cd deep-space
dotnet restore
dotnet build
dotnet run-
Data Collection: The application connects to cryptocurrency APIs to fetch Ethereum market data
- First attempts to use CoinGecko (more reliable in most regions)
- Falls back to Binance if needed
- Can use local CSV files as a final fallback
-
Data Preprocessing:
- Removes outliers and invalid values
- Applies transformations (log, normalization)
- Generates technical indicators (moving averages, etc.)
-
Model Training:
- Trains an ML.NET regression model
- Uses feature engineering to improve predictions
- Implements cross-validation and evaluation metrics
-
Visualization:
- Creates price charts with indicators
- Displays prediction vs. actual comparison charts
- Visualizes model residuals for error analysis
The application uses CoinGecko's free API to fetch OHLCV (Open-High-Low-Close-Volume) data:
var url = $"{BaseUrl}/coins/ethereum/market_chart?vs_currency=usd&days={days}&interval=daily";As a fallback, the application can use Binance's API:
var url = $"{BaseUrl}/klines?symbol=ETHUSDT&interval={interval}&limit={limit}";When run successfully, the application will:
- Download the latest Ethereum price data
- Generate technical indicators
- Create a price chart in the output directory
- Train a price prediction model
- Display prediction accuracy metrics
- Create a prediction vs. actual visualization
- Provide a sample prediction for a given Ethereum price
Contributions are welcome! Here's how you can help:
- Add support for additional cryptocurrencies
- Implement more technical indicators
- Improve model accuracy
- Add more visualization options
MIT License
Note: This project is for educational purposes only. Cryptocurrency investments carry high risk, and predictions should not be used as financial advice.