YAML Metadata Warning: empty or missing yaml metadata in repo card (https://huggingface.co/docs/hub/model-cards#model-card-metadata)

crypto-trend-predictor-lstm-v1

Model Overview

The crypto-trend-predictor-lstm-v1 is a sequential recurrent neural network model designed for time-series forecasting of cryptocurrency prices. Specifically, this model is trained to predict the normalized closing price of Bitcoin (BTC) one day in advance, using historical financial indicators.

Model Architecture

The core of the model is a Stacked Long Short-Term Memory (LSTM) network, which is highly effective for processing sequential data and capturing long-range dependencies in time series.

  • Model Type: Custom Stacked LSTM (implemented in PyTorch).
  • Input Layer: Expects a sequence of daily features. The input size is 7 (for the features listed below) and the sequence length is 30 (30 days of historical data).
  • Hidden Layers: Three stacked LSTM layers, each with a hidden_size of 128.
  • Dropout: A dropout rate of 0.3 is applied between the LSTM layers to prevent overfitting.
  • Output Layer: A final fully-connected (Dense) layer that maps the last hidden state of the LSTM to a single output value (the predicted normalized closing price).
  • Features Used (Input Size = 7):
    1. Normalized Open Price
    2. Normalized High Price
    3. Normalized Low Price
    4. Normalized Close Price
    5. Normalized Trading Volume
    6. 50-Day Moving Average (MA_50)
    7. 14-Day Relative Strength Index (RSI_14)

Intended Use

  • Prediction: Forecasting the next-day price of Bitcoin, one day ahead.
  • Feature Engineering Research: Studying the impact of various technical indicators (MA, RSI) on short-term price movements.
  • Algorithmic Trading Backtesting: Providing a core prediction signal for testing simplified trading strategies.

Limitations and Ethical Considerations

  • Forecasting Difficulty: Cryptocurrency prices are highly volatile and influenced by macroeconomic events, regulatory news, and market sentiment, which are external to this time-series model.
  • Normalization Dependence: The model predicts a normalized price. The user must correctly apply the same normalization scheme (e.g., MinMax Scaling) used during training to both the input data and the output prediction to get the actual price.
  • Lagging Indicators: The model is based on historical data; it cannot predict sudden, news-driven market crashes or spikes.
  • Not Financial Advice: This model does not guarantee profit and its outputs should not be used for live trading without extensive backtesting and risk management. Cryptocurrency prediction is inherently high-risk.

Example Code (Conceptual PyTorch Usage)

This example shows the forward pass setup, assuming the model weights and data pre-processing are handled externally.

import torch
import torch.nn as nn

# Model parameters (matches config.json)
INPUT_SIZE = 7
HIDDEN_SIZE = 128
NUM_LAYERS = 3
DROPOUT = 0.3
SEQ_LENGTH = 30 # Time steps (30 days)

class SequentialLSTMModel(nn.Module):
    def __init__(self, input_size, hidden_size, num_layers, dropout):
        super().__init__()
        self.lstm = nn.LSTM(input_size, hidden_size, num_layers, 
                            batch_first=True, dropout=dropout)
        self.linear = nn.Linear(hidden_size, 1)
    
    def forward(self, x):
        # x shape: (Batch_Size, Seq_Length, Input_Size)
        lstm_out, _ = self.lstm(x)
        # We only care about the last time step's output
        last_step_output = lstm_out[:, -1, :] 
        prediction = self.linear(last_step_output)
        return prediction

# Load weights and instantiate (Conceptual)
# model = SequentialLSTMModel(INPUT_SIZE, HIDDEN_SIZE, NUM_LAYERS, DROPOUT)
# model.load_state_dict(torch.load("pytorch_model.bin"))
# model.eval()

# Dummy input data (Batch_Size=1, Seq_Length=30, Input_Size=7)
# This represents 30 days of the 7 features
dummy_input = torch.randn(1, SEQ_LENGTH, INPUT_SIZE) 

# with torch.no_grad():
#     normalized_prediction = model(dummy_input)
# print(f"Normalized Price Prediction: {normalized_prediction.item()}")
# (Must be de-normalized externally)
Downloads last month
18
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support