## 1 Introduction  
### Motivation  
The number of electric vehicles (EVs) is seen to be increasing globally in line with carbon neutrality targets, and it is estimated to reach 145 million by 2030 [1]. Many EVs contain lithium-ion batteries, which are generally retired after 8-10 years as their capacity is reduced to around 70-80% of the initial value [2]. It can be said that retired batteries still hold significant energy capacity. Additionally, lithium-ion production can have significant negative environmental impacts, requiring approximately 250 tons of ore or 750 tons of mineral-rich brine to produce 1 ton of lithium ions [3]. Producing 1 kWh of battery requires 1900 tons of water and consumes 50-65 kWh of energy. From this perspective, the use of retired batteries in a second life and leveraging them whenever possible becomes important.  
Second-life batteries (SLBs) are preferred in various applications in power systems. For example, they are beneficial for peak load reduction, facilitating the integration of renewable energy, supporting carbon neutrality goals, and engaging in arbitrage in electricity markets. Furthermore, SLBs can be beneficial for both sellers and buyers. EV owners can reduce upfront costs by selling their retired batteries, while facilities purchasing these batteries can save significant costs compared to purchasing fresh batteries.  
When considering the participation of SLBs in electricity markets to profit from price differentials between different rates, it is inevitable to address the process of price prediction. In other words, electricity is bought at relatively cheap rates and then sold at higher prices, generating profit. According to market clearing procedures, bids for buying and selling energy over the next 24 h are typically collected until noon the day before. Then, the market clearing price is announced, and physical deliveries are made at the relevant rates. However, accurate price prediction is key for profiting in electricity markets.  
In the literature, prediction methods can be categorized into three main types: statistical time-series analysis, traditional machine learning models, and deep learning (DL) models. Statistical time-series analysis methods are often limited due to theoretical premises. Additionally, traditional machine learning models may be inadequate for predicting high-frequency data with long memory. In contrast, deep learning models can overcome these limitations and offer high-precision advantages for intelligent price predictions. Moreover, it is noted that deep learning models demonstrate superiority under suitable data conditions [4].  
In light of the above information, it should be emphasized that a facility with many SLBs can profitably participate in electricity markets after predicting prices using deep learning methods. This approach also offers various benefits for the grid, including alleviating grid constraints during peak hours and ensuring uninterrupted fulfillment of regional energy demand. Therefore, in this study, after predicting Turkiye's day-ahead electricity market prices using deep learning models, the subject of participation in electricity markets is addressed through an optimal energy trading model.