  This paper presents an integrated model for bidding energy storage in
day-ahead and real-time markets to maximize profits. We show that in integrated
two-stage bidding, the real-time bids are independent of day-ahead settlements,
while the day-ahead bids should be based on predicted real-time prices. We
utilize a transformer-based model for real-time price prediction, which
captures complex dynamical patterns of real-time prices, and use the result for
day-ahead bidding design. For real-time bidding, we utilize a long short-term
memory-dynamic programming hybrid real-time bidding model. We train and test
our model with historical data from New York State, and our results showed that
the integrated system achieved promising results of almost a 20\% increase in
profit compared to only bidding in real-time markets, and at the same time
reducing the risk in terms of the number of days with negative profits.
