Hello!

I'd like you to create two codes for a stock price prediction model using a Transformer architecture. Id like you to use every bit of your super advanced
 knowledge to Devoelop and come up with what i will call "the training code" for the most advanced transformer model architechure that is possible in 
all the entire universe.

Here is the Data that i have to use for training:

    Historical Daily Data (cleaned_spy_historical_data.csv):daily time frame from 2006 till 10-11-2024 
    Example: Date,Open,High,Low,Close,Volume
2006-06-26,124.540001,125.059998,124.25,124.989998,37899600
2006-06-27,125.010002,125.290001,123.769997,123.910004,69780200   
    Intraday Data (intraday_data_tradier.csv):5 minute time frame from 6-27-2024 until 10-11-2024
        Example: Date,Open,Close,High,Low,Volume,Time
2024-06-27,545.37,545.91,546.0,545.37,598321,09:30:00
2024-06-27,545.91,546.6899,546.77,545.86,584336,09:35:00
        
Preprocessing:

    Standardize both datasets to have the same format (e.g., Daily: Open, High, Low, Close, Volume; Intraday: Date, Time, Open, High, Low, Close, Volume).
    Handle missing values and inconsistencies (if any).
    Note: Avoid data normalization unless it significantly improves training. Normalization might hinder interpretability of the model's output. Do whatever is best

Features:

    Use the existing features (Open, High, Low, Close, Volume) for now.
    You can suggest alternative features (placeholders with comments are welcome). I'll find the data to incorporate them later.
    Avoid technical indicators unless absolutely necessary because I want the AI model to learn and think for itself because thats what its suppose
 to do and thats what it will do if we design it this way. 

Model Training:

    Splitting: Implement a time-series cross-validation method to preserve temporal relationships while splitting data into training, validation, and testing sets.
    Architecture: Design a state-of-the-art Transformer architecture for time series forecasting unlike nothing anyone has ever seen before. Optimize hyperparameters (layers, hidden units, attention heads) for best performance.
    Training Summary: Include a comprehensive and thorough training summary at the end, summarizing metrics like loss, accuracy, and validation performance.

The second code I would like you to create for me I will call "the prediction code"

    This code should load the trained model and the preprocessed features (ensure compatibility with the training code).
    Predict the closing price for the next day (e.g., run on Monday after market close to predict Tuesday's close price).
    Also output any other predictions or information  that could be benificial in assisting me in my live SPY day trading decisions.
Output:

    Print the predicted closing price to the console.
    Save the prediction along with a timestamp and any additional relevant information (e.g., confidence score) to a CSV file for further analysis.

Additional Notes:

    Feel free to suggest improvements or alternative approaches you think would benefit the model.
    Prioritize functionality and avoid unnecessary pre-processing that might negatively impact prediction accuracy.

Overall Goal:

I aim to have you create a robust and accurate stock prediction model using a Transformer architecture that will run flawlessly and flow smoothly and without errors so this will be the best in the world and better than anyone elses stock prediction model