Optimal Order Execution in Intraday Markets: Minimizing Costs in Trade Trajectories
OOptimal Order Execution in Intraday Markets: Minimizing Costsin Trade Trajectories
Christopher Kath a,* , Florian Zielb a University Duisburg-Essen, Chair for Environmental Economics b University Duisburg-Essen, Chair for Environmental Economics
Abstract
Optimal execution, i.e., the determination of the most cost-effective way to trade volumes incontinuous trading sessions, has been a topic of interest in the equity trading world for years.Electricity intraday trading slowly follows this trend but is far from being well-researched.The underlying problem is a very complex one. Energy traders, producers, and electricitywholesale companies receive various position updates from customer businesses, renewableenergy production, or plant outages and need to trade these positions in intraday markets.They have a variety of options when it comes to position sizing or timing. Is it better totrade all amounts at once? Should they split orders into smaller pieces? Taking the Germancontinuous hourly intraday market as an example, this paper derives an appropriate modelfor electricity trading. We present our results from an out-of-sample study and differentiatebetween simple benchmark models and our more refined optimization approach that takesinto account order book depth, time to delivery, and different trading regimes like XBID(Cross-Border Intraday Project) trading. Our paper is highly relevant as it contributesfurther insight into the academic discussion of algorithmic execution in continuous intradaymarkets and serves as an orientation for practitioners. Our initial results suggest that optimalexecution strategies have a considerable monetary impact.
Keywords:
Intraday electricity market, Market Microstructure, Optimal Execution,Algorithmic Trading ∗ Corresponding author
Email addresses: [email protected] ( Florian Zielb ), [email protected] ( Florian Zielb ) Preprint submitted to Elsevier October 6, 2020 a r X i v : . [ q -f i n . T R ] O c t
1. Introduction
Intraday markets are of tremendous importance in German electricity trading. Traded vol-umes rise from year to year and set a new record in 2019 (EPEX Spot SE [9]). The growingshare of renewable energy requires market participants to balance their positions in veryshort-term intraday markets and causes more traded volume close before delivery (Kochand Hirth [27]). Intraday trading is usually used for rebalancing after power plant out-ages, updated consumption forecasts, or speculative trading approaches, as demonstratedby Maciejowska et al. [29]. This paper refers to hourly continuous intraday trading, leavingquarter-hourly trading and intraday auctions aside. The German market allowed for trad-ing up to five minutes before delivery in mid-2020 coupled with other European intradaymarkets, as Kath [24] analyzed and worked on a pay-as-bid basis, meaning that orders werecontinuously matched and executed at their respective prices. Figure 1 displays the differenttime lines of German hourly intraday trading, including the coupling among markets underthe Cross-border intraday project (XBID). More information on the German market is alsoprovided by Viehmann [42].While the German intraday market itself has develoed into a central market-place, itsmany simultaneously traded hours have also brought another topic to the agenda: auto-mated and algorithmic trading. The term describes the algorithm-aided execution of tradesor liquidity provision strategies, as mentioned by Hendershott and Riordan [20]. Herein, wewill drill down our focus to optimal execution and leave liquidity provision strategies aside.The continuous matching process is crucial in understanding the main issue of optimal ex-ecution. Energy companies face a practical problem: Their trading books are flooded withvolumes, which may stem from outages, renewable generation, or trading decisions. But howcan they execute the volumes in an optimal way? A market participant could trade the entirevolume at once, wait for a better point in time with more favorable prices, or even slice thevolume into many small portions to be traded. The slicing aspect, or the determination ofan optimal trading trajectory, is what optimal execution aims to identify.There is a rich body of literature on analytical aspects that discuss market determinants,such as Kiesel and Paraschiv [26], Hagemann [18], Narajewski and Ziel [33], Pape et al. [35],and forecasting approaches, like Uniejewski et al. [41], Janke and Steinke [23], Kath and Ziel[25], and [25]. From a practical perspective, these papers only discuss reasons for the pricemovements and predictability of intraday trading but leave the question of ’how to trade’open. The problem of executing orders in the most optimal way was referred to by Garnierand Madlener [12] and Aïd et al. [1] with a strict focus on renewable energy source (RES) .1 Why Order Book Data are Different Day-Ahead
Intraday
Balancing energyDelivery08:00Local trading 13:45 – 14:30Trading freeze 18:00XBID start, coupling with Nordic markes -60 Min.*Decoupling, Local trading across Germany Stop of trading-5 Min.* *Minutes prior to delivery
Figure 1:
Chronological order of the German hourly intraday market. generation. However, what the current academic discussion misses is a more generic discus-sion of optimal execution strategies in the German electricity intraday market. While thereare many stochastic models under the umbrella of equity trading (e.g., Almgren and Chriss[2], Almgren [3], Bertsimas and Lo [4]), there were only three electricity trading approachespresent when this paper was written. The first one, provided by von Luckner et al. [43],discusses optimal market-making strategies in the context of the German intraday market.Meanwhile, Glas et al. [14] and Glas et al. [15] addressed a more general numerical execu-tion approach for both renewable and conventional generation output. Finally, Coulon andStröjby [7] presented a preliminary model on executing volumes of renewable generation inan optimal manner.We aim to position the topic of optimal execution more prominently in the current dis-cussion of German intraday markets and analyze various approaches in the remainder of thispaper. Our work is structured as follows: Section 2 takes a deeper look at order books andthe underlying data. Most of the time, actual trades are analyzed in the context of intradaytrading which is why we need to address what distinguishes order book data from trades. Inthe course of the data discussion, we will derive the problem of optimal execution in a moreformal way. Section 3 introduces execution approaches and discusses, which weaknesses theyexhibit in the context of electricity markets. Leaving the theoretical part aside, we computetrading trajectories under different scenarios and evaluate the results in an empirical out-of-sample study in Section 4 and summarize our findings and the contributions of this paper inSection 5.
Price in EUR/MWhVolume in MW37 39 431002030 Sell Order (Ask)Buy Order (Bid)38 40 41 42
Bid-Ask Spread
Figure 2:
Schematic depiction of a typical intraday continuous order book for a specific delivery hour. Thebest bid is the order that is willing to buy at the highest price, while the best ask is that ready to sell at thelowest price. Please note that there can be multiple orders at the same price level, as shown at the best bidorder.
2. Order Book Data and the Problem of Optimal Execution
If one takes a historic view of intraday papers, the evolution of complexity and availabil-ity in the research data becomes evident. Early articles like Hagemann [18] solely usedvolume-weighted average prices of the entire trading period. This modus operandi ignoresthe characteristics of continuous trading and takes a more time series-oriented approach.Later papers dealt with individual intraday trade data (e.g., Janke and Steinke [23]). Theyfocused on individual transactions and derived partial averages. However, this is only oneside of the coin since these papers focused on trades, i.e., the buying and selling of ordersthat could be matched. Better availability of data has allowed researchers to analyze orderbook data. These data-sets comprise not only trades but also unmatched orders. Ordersgrant new insight into continuous trading and the market microstructure behind it.In a limit order book (LOB), orders are continuously sorted based on the price per buyingand selling direction for each delivery hour. Thus, a typical LOB for one delivery hour canbe imagined like a t-account with buy and sell sides. Figure 2 represents an order book ina graphical manner. All buy orders, or the "bid" side, are sorted in descending order, whileall sell orders, or the "ask" side, are ordered in ascending order, such that the best sell orderin the market is the one with the lowest price.The next crucial aspect of understanding LOB data is timing. Figure 2 displays a snap-shot of one specific second. However, we need to define a describing element that discretizescountless snapshots and aggregates the information. The bid-ask spread (BAS) serves this .1 Why Order Book Data are Different Median Bid/Ask spread in € /MWh Trading Date model training out-of-sample test Figure 3:
Median bid-ask spread from January 2018 to November 2019. The data were aggregated inminute buckets and reflect the development of spreads under the trading volume, i.e., the typical cost oftrading averaged for one minute of order book activity for the first 0 to 10 MW, 10 to 25 MW, and the next25 to 75 MW. The data are separated into a model training phase and an out-of-sample section to realisticallybenchmark the execution models. aspect well as it compresses buy and sell orders into one numerical figure. However, LOBdata are not one-dimensional. Figure 2 reveals the connection of volumes available at differ-ent price levels. It makes no sense to focus on the best bid and ask for the BAS computationif the volume sums up to 0.1 MWh. Therefore, we aggregate the BAS into different volumebuckets, i.e., BAS per first 1 MW traded, BAS for the volume between 1 and 5 MW, and soon (see Section 2.2 for the mathematical formulation). Last but not least, we need a secondlevel of discretization to cover the aspect of time. We can aggregate our data into minutebuckets such that we can identify the best 1 MW BAS over an interval of one minute oftrading, for instance.We used LOB data from 01.01.2019 to 27.11.2019 provided by EPEX Spot SE. The datacan be purchased from EPEX Spot SE. For more information on EPEX order book data andthe required data preparation, refer to Martin and Otterson [32]. Unfortunately, the dataare not completely available for the year 2019, which is why Figure 3 ends in late November2019. We also split the data into training (year 2018) and out-of-sample testing (year 2019).Some execution algorithms require historic data for model training. We used the entire yearof 2018 for model training. All data of 2019 were used to benchmark the models in an out-of-sample manner.The series of median BAS data, as shown in Figure 3, does not suggest any yearly sea-sonality. There are some spikes, but, all in all, the spreads seem to be stable across the year.Figure 4 zooms in and shows the median BAS per weekday and delivery hour as well asthe corresponding traded volume. A similar pattern evolves for both the weekly and hourly .2 Discretization Methodology
The amount of data with LOB requires different handling than that with trade data. Ourdataset is around 60 GB, it does not allow for simple calculation on an order basis anymorebut demands an aggregation approach. Orders need to be aggregated by time and tradingvolume . We will start with time . To understand the concept of time aggregation, a fewnotations need to be introduced. Imagine one line in our data frame as Z : { y t,d , v t,d , s t,d , e t,d , d t,d | t = 1 , ..., T ∧ d = [buy , sell] } . (1)Let this be the set of all buy and sell orders at delivery time t comprising its price y t,d ,the volume of an order denoted as v t,d , its start s t,d , and expiry time stamp e t,d in secondsfrom the start of the observation. We divide the difference between the reception of anyposition to be traded at i and the delivery at time t in equidistant steps k = 1 , ..., N ,where N = (cid:106) t (24 × × − i (24 × × (cid:107) . Thus, we have k buckets of one minute in length. Theparameter k is a dynamic one depending on the arrival of the position at i . That meansthat if the time of arrival changes, the computation of the optimal execution likewise differs,as the length of k is different. Based on k , it is possible to define time discretization buckets .2 Discretization Methodology O t,k,d O t,k,d = { y t,d , v t,d , s t,d , e t,d , d t,d ∈ Z | ( s < × k × ∧ e (cid:62) k − } , (2)which comprise all active orders in the k -th minute interval bucket for each delivery timestamp t and direction d . Note that this automatically filters out unnecessary informationpresent before the position arrival at i , which reduces the memory space used. The choiceof minute buckets seems suitable for the EPEX intraday market as with lower granularity,one faces many instances with missing data as there are simply no new activities, e.g., onewill face many buckets with no trades every second. However, decreasing the resolution to15-minute buckets lessens the trading abilities of the algorithms and might turn out to bea poor choice, as the volume is split on fewer buckets with less trades but more volume pertrade and, as a consequence, higher spreads. Therefore, one-minute buckets appear to be agood compromise. Other approaches like Glas et al. [15] use five minute intervals, but webelieve that a finer grid causes the results to be more realistic.As a next step, we need to filter by cumulative sum CS t,d of volume v t ordered by price y t,d in an ascending (in the case of buy orders) or descending manner (in the case of sell orders).First, we define auxiliary volume buckets b r with r = 1 , ..., for our aggregation logicas b = [0 , , b = [1 , , b ,.., = [5 , , ..., [25 , , b ,.., = [30 , , ..., [90 , , b ,.., =[100 , , ..., [175 , , b , = [200 , , [250 , , b , = [300 , , [400 , and b =[500 , ∞ ] . This leads to a refined version of Eq. (2) that allocates not only based on the k -thtime bucket but also on the r -th volume bucket in O t,k,r,d = { y t,d , v t,d , s t,d , e t,d , d t,d ∈ Z | ( s < × k × ∧ e (cid:62) k − ∧ CS ∈ b r } . (3)The buckets b r serve as separators for the cumulative volume. Obviously, trading costsvary over time. However, they also change with the designated trading volume, as depictedin Figure 5. The LOB is ordered by price in the case of both buying and selling. Unlessall orders are entered with identical prices, a price ladder will emerge. The best buy andsell prices might feature only a small share of the total volume. As a consequence, tradingusually gets more expensive with large quantities. We can take this aspect into considerationby aggregating buckets by volume as well.One could argue that the aspect of time-weighted orders is missing in this approach. It Note that we need to remove cancellations from the set of all active orders in order to avoid countingany orders twice. .3 Underlying Market Assumptions and Problem Formulation Average traded volume per day in GWhMedian Bid/Ask spread in €/MWh Weekday
Average traded volume per hour in MWhMedian Bid/Ask spread in €/MWh Delivery Hour
Figure 4:
Evolvement of weekly and hourly patterns in median BAS and volumes of aggregate minute clipsranging from January 2018 to November 2019. makes a difference if an order exists for a few seconds or for the entire bucket range of 60seconds. We have neglected this aspect, as the additional volume weighting ensures that smallorders that just exist for a few seconds do not count too much. A limited simulation showedthat there were no substantial differences if we added another time weighting component,which is why we have left it out for the sake of a faster computational time.
The market microstructure of intraday markets requires more consideration as well. There-fore, we assume the following for our optimal execution analysis:• The algorithms can only accept existing orders in the LOB and actively pay the BAS. Tounderstand this concept, we need to discuss the two execution alternatives. A marketplayer can initiate an order by quoting a price and volume pair. Say, for instance, thebest buy order is at 50 €/MWh, and the best sell order is at 51 €/MWh. A tradercan initiate another buy at 50.10 €/MWh and wait for execution, Or they can activelyaccept an existing order by entering a buy at 51 €/MWh, which results in immediateexecution as there is a corresponding sell order available. Technically speaking, thelatter can be seen as an active click in the LOB. We assume it as the only way to trade,since waiting for other traders to accept the order is very complex to depict. It requiresmodeling other traders who are willing to accept the order.• We ignore further trading costs (such as fees), as they are usually constant in timeand volume and should not influence our optimal execution path. In addition, theyare counter-party specific and vary based on bilateral agreements between traders, theexchange, and clearing banks. .3 Underlying Market Assumptions and Problem Formulation Median traded volume per minute in MWhMedian Bid/Ask spread in €/MWh Time to delivery
XBID trading non-XBID tradingcutover phase
Figure 5:
Median BAS and median volume of minute clips, i.e., all orders aggregated every minute oftrading with respect to time to delivery. The x-axis shows the time in minutes until physical delivery. Thedashed lines reflect the in-sample fit of the spline-based market impact model described in section 3.1 andemphasize how well our optimization model can anticipate costs measured as median spreads. • The optimal execution is probed for a fixed trading volume. This is, for instance, thecase for plant outages that need to be covered in the intraday market. Generation up-dates for renewable energy sources imply uncertainty in forecasts and changing positionsizes, which add another dimension of complexity and are ignored in this paper.• Following Narajewski and Ziel [33], the intraday market is considered as efficient in thispaper. Thus, we do not have any view or opinion on price developments and only focuson execution.• All algorithms stop their activities 30 minutes before delivery. Kath [24] showed thatthis is the time when intra-control area trading starts. Therefore, it makes sense tosee this threshold as an operational barrier, as no Germany-wide trading is possibleanymore. Apart from that, the EPEX indices ID3 and ID1 stop 30 minutes beforedelivery (for an ID3 example, see Uniejewski et al. [41]), which makes our approachtime-congruent with the EPEX data. This implies that, for instance, k = 180 means180 minutes of trading starting from 210 minutes before delivery up to 30 minutesbefore delivery.• We round all volumes stemming from the trading trajectories to one digit wheneverpossible since this is the minimum tick size at the exchange. It is important to understand the chronological differences. The trading time stops 30 minutes beforedelivery. Thus, we can define trading time=lead-time minus 30 minutes.
3. Optimal Execution Strategies
The first model on optimal execution was provided by Bertsimas and Lo [4]. Their contri-bution was a consideration of market impact, meaning the temporary and constant changeof prices due to own trading activity. Almgren and Chriss [2] expanded the idea by takinginto account the traders’ risk appetite. They proposed a mean-variance-based approach thatlocates an optimum between minimizing the trading costs and minimizing the variance ofcosts. Later on, Almgren [3] expanded the existing model with a non-linear market impactfunction. All models share that they were applied on equity markets and have not been fullytested in electricity intraday markets for optimal execution yet. Herein, we borrow basicprinciples from the above mentioned papers and derive a suitable model for intraday powermarkets.First, we need to introduce some further notations that are important for our model (seeTable 1 for a detailed description of the model parameters). We have• a price y k (meaning a more general notation of prices here than the one of Section 2.2,where we referred to the prices of individual orders),• an overall amount of X we need to sell or buy in the continuous intraday market beforeits physical delivery at time t ,• the volumes traded in each time step k denoted as n k and s.t. X = (cid:80) Nk =1 n k and x k = X − (cid:80) kj =1 n j , • the trade inventory position x k describing how much volume is still to be traded ateach time bucket k (it follows that x o = X and x N = 0 ), and• the volatility of y k given by σ k .In the case of buying positions, n k shall be positive and in the case of selling positions n k shall be negative. This assumption allows us to have a position-neutral notation, as buyingand selling changes with the positive or negative position input of n k .Another very important concept is the idea of market impact. A common approach (e.g., .1 Proposed Execution Model Approach Determinant Description Value Calculation/Derivation S Initial price ofelectricity[€/MWh] 47.22 Average price of all 2018 trades X Total position totrade [MWh] changing To be adjusted per scenario σ Daily volatility[€/MWh] 20.57 Yearly volatility µ Annual growth[€/MWh] 0 No price growth/drift isassumed λ Risk aversion[no specific unit] 2x10^(—5) Slightly less risk averse thanAlmgren and Chriss [2]
Table 1:
Optimization model parameter used in the empirical study and the means of derivation. Theauthors tried to estimate most of the parameters based on empirical data from the training period in year2018. However, some parameters had to be guessed based on experience or applications in the financial world. in Almgren and Chriss [2]) is to divide it into two parts such that the market impact I k isdenoted by I k ( n k , k, t ) = I tempk ( n k , k, t ) + I permk ( n k − , k − , t ) , (4)where I tempk is the temporary component that is due to the order book depth and less favor-able prices that market participants receive for large volumes; I permk describes the permanentchange in market prices after trading has happened. It is important to note that the per-manent market impact is only observable in the following epoch after the liquidity providershave re-entered their orders, which is why its determinants n k − and k − are lagged inEq. (4). The underlying price model, based on Almgren and Chriss [2], is assumed to follow y k = y k − + σ k ξ k − I permk − ( n k − , k − , t ) , (5)where ξ j is an independent random variable with E [ ξ k ] = 0 and i.i.d. as well as V ar [ ξ k ] = 1 .We acknowledge that these assumptions are not totally perfect, as Narajewski and Ziel [34]showed, but they seem to be reasonable for our application.The permanent market impact refers to the most recent time lag as the latest order isassumed to influence the current prices in the form of its permanent market impact function.Note that we have left out any drift term in Eq. (5). However, since electricity tends to bemean-reverting, a drift term does not seem to be suitable for intraday markets. We define .1 Proposed Execution Model Approach C ( x , ..., x N ) = N (cid:88) k =1 n k y + N (cid:88) k =1 n k ( σ k ξ k ) (cid:124) (cid:123)(cid:122) (cid:125) volatility + N (cid:88) k =1 n k I tempk ( n k , k, t ) (cid:124) (cid:123)(cid:122) (cid:125) temporary impact + N (cid:88) k =1 n k I permk ( n k − , k − , t ) (cid:124) (cid:123)(cid:122) (cid:125) permanent impact . (6)The costs are given by the volatility of prices and the two market impacts. In additionto just optimizing costs, Almgren and Chriss [2] proposed a mean-variance approach toexecute volume under the constraint of risk aversion. Based on the idea of a mean-varianceoptimum such as the one in the modern portfolio theory of Markowitz [31], one can computethe expected costs E ( C ) and its variance V ( C ) from Eq. (6) and derive a mean-varianceoptimization in min x k ( E ( C ) + λV ( C )) , (7)where λ is the risk aversion parameter. The solution of Eq. (7) yields our two novel executionapproaches Opti C and Opti σ(cid:118) , whereas the first model only optimizes costs and sets λ = 0 while the second assumes a certain level of risk aversion with λ = 2 x ( − . Thus, wepresent two different models suitable for different levels of risk appetite. However, to finallycompute a solution for Eq. (7), we need to determine the market impact model in the nextsub-section. Market impact models determine the mathematical complexity of Eq. (6) to a great extentbut are also the core of the execution approach as they determine the costs. Financialmarkets often assume less repercussions from individual trading and imply a linear influence,as done by Almgren and Chriss [2]. Exponential approaches are also utilized (see Almgren[3]). Another frequently applied approach is the square-root impact model. It is versatile andworks in many diverse markets such as crypto or options trading as Tóth et al. [40] pointedout. Gatheral et al. [13] proposed a transient yet linear price impact model that decays overtime. However, there is no blueprint ready for intraday electricity markets, which is why wefollow a data-driven approach herein and derive a numerical model based on the intradaydata of the year 2018. But how can we measure permanent and temporary market impact Our choice of lambda shall ensure an appropriate level of risk aversion. We tried more aggressive levelsand found that they do not cause large differences as more traded volume means much higher costs. Thealgorithm always tries to balance the costs, even if less volatility in costs is desired. Hence, we believe thecurrent selection is appropriate, as the other values do not change the path too much. .1 Proposed Execution Model Approach Time in secondsVolume in MW a) Temporary Market Impact Approximationb) Permanent Market Impact Approximation
Individual OrdersMedian aggregation of bid-ask spreads, i.e., the difference between the bid and the ask of valid orders
Time in secondsVolume in MW
Difference = permanent Impact
Median aggregation of the prices of all trades in the aggregation window, also aggregated by volume Permanent market impact derived from difference between trades and bid-ask spreads with a 40-second interval in between to let the order book normalize
Figure 6:
Derivation of a) temporary and b) permanent market impact from EPEX order book data depictedin a schematic representation. The plot is limited to the dimensions volume and time and does not showany price levels. Obviously, all orders are sorted by prices as well, but this is irrelevant to understandingthe discretization approach. Both plots depict a one-minute interval and highlight how the minute intervalis used to derive the impact data. based on an LOB? Permanent market impact is that which evolves after a trade and is oftencaused by liquidity providers that adjust their price levels after the arrival of transactions.As an approximation, we first compute the mean of all trades happening within a range of10 seconds, as shown in Figure 6. After another 40 seconds of time delay, assuming thatthe order book normalizes again, we compute the median BAS averaged over 20 seconds andcompare its level to the aggregated BAS before the arrival of trades. We also group theoutput in volume buckets to reflect that the market impact depends on the traded volume.The resulting data derivation is also shown in Figure 6.Temporary market impact vanishes immediately after trading and can be described as aliquidity premium that is demanded for higher volumes in the current order book. Tradersare less willing to quote at the best possible price if the volumes are very large. The impact is .1 Proposed Execution Model Approach k , delivery hour, and weekday (see Figure 7). As mentioned above, we receive twocost structures that increase with higher volumes of n k and less time to delivery based onthe minute buckets k and—minding the seasonality of electricity prices—vary slightly acrossdelivery hours and weekdays (see Wolff and Feuerriegel [44] for seasonality). We model theevolving relationship between impact in euros/MWh and the mentioned determinants as adistribution in I permk ( n k − , k − , t ) ∼ N O ( µ, σ )) , (8) I tempk ( n k , k, t ) ∼ N O ( µ, σ )) , (9)where (specifically for I tempk ( n k , k, t )) log ( µ ) = β + M (cid:88) m =1 f m ( n k , k, t ) , (10) log ( σ ) = β + M (cid:88) m =1 f m ( n k , k, t ) , (11)for n k (cid:54) = 0 . If n k = 0 , the impact function’s result has to be zero, as no costs occur. Theabove is the generalized additive model (GAM) of Hastie and Tibshirani [19] and tries tomodel the parameters of a distribution—in our case the normal distribution—with a linearmodel that consists of an intercept coefficient β and m additional functions f m ( n k , k, t ) depending on the input factors n k , k, t. Other applications of GAMs were supplied by Wood[45] and Gaillard et al. [11]. In general, a GAM tries to model distribution parameters witha linear model that is connected closely to the well-known ordinary least squares model.However, instead of just adding linear input variables, it is a linear model consisting ofdifferent functions. Thus, the functions f m replace the usual linear coefficients. The functionscan take a variety of forms, from simple polynomials to more complex splines. We have triedboth and found that splines model the market impact much more precisely than polynomialsor linear functions. The model itself is fitted with the R-package gamlss of Rigby andStasinopoulos [37] and the splines are computed using the pb function. We use the log as alink function for both ˆ µ and ˆ σ in our GAM. The model was determined in a limited tuningstudy on 2018 in-sample data using polynomials, cubic splines, and monotonic p-splines. .1 Proposed Execution Model Approach Figure 7:
Derived cost curves for permanent and temporary market impact. The permanent market impactis derived from BAS adjustments after trading, and the temporary market impact derives a cost curve basedon order book depth in MW. Note that both plots assume symmetric order book volumes as we do not dividethem into buying and selling. All computations were done with LOB data from the year 2018.
The most simplistic form of splines are cubic ones, meaning an ensemble of piecewisepolynomials of order three that join each other at different knots (see Stasinopoulos et al.[39] for more insight into splines in the context of GAMs). The more knots used, the more“fitted” the resulting curve is. Obviously, the choice of an appropriate spline setting is nottrivial and could lead to overfitting. A way to overcome this issue is presented by Eilers andMarx [8]. Penalization removes unsuitable polynomial fits and helps to avoid a misconstructedmodel. Let ψ k,r ( x k ) be a cubic spline on input vector x k for time bucket k and number ofknots r . Penalized splines (or p-splines) try to minimize the smoothing parameters γ in N (cid:88) k =1 (cid:32) y t R (cid:88) r =1 f m ( x k,r ) (cid:33) + R (cid:88) r =1 γ (cid:90) (cid:107) f (cid:48)(cid:48) m ( x k,r ) (cid:107) dx. (12)In a limited backtest study, p-splines modeled the impact curves of Figure 7 best. The gen-eral goodness of fit is also reflected by the dashed lines in Figure 5.The non-linear, complex modeling of market impact distinguishes our approach from stud-ies like Glas et al. [15], which applied a simpler polynomial fit. The other novelty of ourapproach is the explicit consideration of trading characteristics. Figure 7 shows the relation-ship between impact in euros per MWh and its determinant volume (denoted as n k ) andlead-time (minute buckets k ) in a three-dimensional way. Figure 5 plots the relationshipin a more detailed way. Another important aspect to note is the striking increase around .1 Proposed Execution Model Approach t XBID = k ≤ N − t cutover = N − , N − t local = k > N − , with N being the number of k minute buckets. Note that we define the cutover phase as2 minutes, starting from 59 to 60 minutes before delivery and ending in the minute bucketstarting from 60 and ending 59 minutes prior to delivery. The data suggest that both minuteaggregates feature a special impact behavior. Combining the formal definition of Eq. (8) aswell as the timing separation from above leads to our approximation ˆ µ of the true parameter µ in (exemplarily for I tempk ( n k , k, t ) : log ( µ tempk ) = f XBID ( n k , k, t ) + f cutover ( n k , k, t ) (13) + f local ( n k , k, t ) ,log ( σ tempk ) = f XBID ( n k , k, t ) + f cutover ( n k , k, t ) (14) + f local ( n k , k, t ) , for n k (cid:54) = 0 . In the case of the permanent market impact function I permk ( n k − , k − , t ) , weneeds to consider the lagged relationship in ( n k − , k − ). If n k = 0 , we have µ tempk = 0 and σ tempk = 0 since no volume means no cost of trading and no variance of such. Thus,we have different functions for the three trading phases in our GAM model. The differentfunctions themselves are given by f XBID ( n k , k, t ) = { t XBID } ( β ,XBID + g ,XBID ( k ) (15) + g ,XBID ( n k ) + β ,XBID we ( t ) + β ,XBID h ( t )) ,f cutover ( n k , k, t ) = { t cutover } ( β ,cutover + β k + g ,cutover ( n k ) (16) .1 Proposed Execution Model Approach + β ,cutover we ( t ) + β ,cutover h ( t )) ,f local ( n k , k, t ) = { t local } ( β ,local + g ,local ( k ) (17) + g ,local ( n k ) + β ,local we ( t ) + β ,local h ( t )) . Note that the variance of each model is also computed by the GAM model in the form ofestimated parameter ˆ σ. Due to the separation into the three regimes, we have three differentsigmas per impact function: one for XBID, one for local trading, and one for the cutoverphase.The term g ( x ) denotes a penalized spline function of the input variable x discussed earlierin the context of Eq. (12). The function g ( x ) does not depend on lead time in the case ofthe cutover regime, as the model requires at least four distinct values to compute a spline.During cutover, we only have two individual k values. The functions h ( t ) and we ( t ) of Eqs.(15)—(17) extract peak/off-peak hours and weekend information out of delivery time stamp t and transform it into a binary dummy variable such that the model separates betweendifferent times. With Eqs. (12) and (14) in mind, we can compute the expected costs and variance of Eq.(6) in more detail: E ( C ) = y ( n + n + ... + n N ) (cid:124) (cid:123)(cid:122) (cid:125) intraday price + N (cid:88) k =2 n k µ permk (cid:124) (cid:123)(cid:122) (cid:125) permanent impact + N (cid:88) k =1 n k µ tempk (cid:124) (cid:123)(cid:122) (cid:125) temporary impact , (18) = N (cid:88) k =1 n k y (cid:124)(cid:123)(cid:122)(cid:125) intraday price + N (cid:88) k =2 n k µ permk (cid:124) (cid:123)(cid:122) (cid:125) permanent impact + N (cid:88) k =1 n k µ tempk (cid:124) (cid:123)(cid:122) (cid:125) temporary impact . Note that we assume independence of the three cost components in Eq. (18) such that thecovariance of the three terms is assumed to be zero. Since all components are deterministicand do not depend on a random variable, their expectation is simply the function itself.Minding the deterministic character leads to the variance given by
V ar ( C ) = N (cid:88) k =1 n k σ k k (cid:124) (cid:123)(cid:122) (cid:125) price variance + N (cid:88) k =1 n k σ perm ( n k , k, t ) (cid:124) (cid:123)(cid:122) (cid:125) permanent impact variance + N (cid:88) k =1 n k σ temp ( n k , k, t ) . (cid:124) (cid:123)(cid:122) (cid:125) temporary impact variance (19)Putting this all together leaves the optimization problem in .2 Simple Benchmark Strategies min n k (( N (cid:88) k =2 n k µ permk (cid:124) (cid:123)(cid:122) (cid:125) permanent Impact + N (cid:88) k =1 n k µ tempk (cid:124) (cid:123)(cid:122) (cid:125) temporary Impact ) + λ ( N (cid:88) k =1 n k σ k k (cid:124) (cid:123)(cid:122) (cid:125) price variance (20) + N (cid:88) k =1 n k σ perm ( n k , k, t ) (cid:124) (cid:123)(cid:122) (cid:125) permanent impact variance + N (cid:88) k =1 n k σ temp ( n k , k, t )) (cid:124) (cid:123)(cid:122) (cid:125) temporary impact variance ) , subject to n k ≥ , N (cid:88) k =1 n k = X. (21)We tried a variety of different approaches such as simulated annealing or gradient-basednon-linear optimizers and found that a genetic algorithm (see Holland [21] or Goldberg andHolland [16]) works well in our case. It is readily implemented in the R-package GA of Scrucca[38] and—inspired by genetic processes—mutates an initial population on a random basis.Only the parameter combinations that generate the best values for the objective function inEq. (20) survive, and the process is repeated again until no more decrease of cost is reachedgiven a certain amount of iterations—in our case 650. The last section introduced our novel execution approach tailor-made for intraday markets.Section 3.2 will present more general execution strategies that serve as a performance bench-mark. The first approach is not a strategy per se but the most simplistic form of tradeexecution. Instant order book execution (
IOBE ) does not require any computation or pre-defined trade trajectory. Instead, an energy trader just accepts existing orders in the orderbook and trades the full volume at once. In mathematical terms, this strategy is n = X, (22)with n , ..., n N = 0 . From a technical perspective, this is equal to a click in the EPEXtrading system on either the bid or the ask side. It implies a willingness to pay the BAS forthe sake of instant execution. Figure 7 indicates the downside of such simplicity. The higherthe volume, the higher the BAS is. Prices are less favorable, as the trader has to accept notonly the first few orders on top of the order book but a number of deeper ones as well. This .2 Simple Benchmark Strategies Another very common strategy is an equidistant allocation of the entire volume on eachvolume bucket. Almgren and Chriss [2] referred to this as a minimum-impact strategy, butin the world of trading, such algorithms are commonly denoted as time-weighted average price(
TWAP ) execution. The idea is very simple. Regardless of empirical volume distributions,volumes are equally distributed over time such that n = n = ... = n N or x k = ( N − k ) XN , (23) n k = XN . (24)The term minimum impact might be correct at first sight since we slice the volume into asmany small pieces as possible (depending on the number of k = 1 , ..., N trading buckets)and try to tackle the factor market influence with position size. However, the strategy doesnot need to be the one with the smallest market impact, as this disregards the distributionof the trading volume or lead time. If one trades equal amounts and the trading volume isdistributed very unequally over time, an order can cause a larger market impact in a low-liquidity time frame, leading to an overall larger impact than desired. However, Figure 5shows that the trading volume is constant for a long time and only changes substantially inthe late trading phase, which is why we think the strategy can still be a simple enhancementto IOBE. .2 Simple Benchmark Strategies The thoughts of sub-section 3.2 bring us to a closely connected strategy. While TWAPapproaches do not consider deviations in trading volumes, volume-weighted average price(
VWAP ) algorithms explicitly do. Papers like Konishi [28] propose a VWAP algorithm thattries to minimize the difference between the actual VWAP of all trades and the trader’s ownVWAP. We deliberately deviate from this as our goal is not index replication but optimalexecution. For more information on index replication strategies and pricing of such con-tracts, the interested reader might refer to Guéant and Royer [17], Humphery-Jenner [22]and Białkowski et al. [5]. Recall that the VWAP itself is given by
V W AP t = 1 (cid:80) Nk =1 v k N (cid:88) k =1 y k v k . (25)It describes the volume-weighted average price from reception of the position update i untiltime of delivery t. It is impossible to achieve VWAPs if parts of the measured time lie in thepast, i.e., you cannot replicate a VWAP of three hours of trading only by being active solelyin the last hour. Some VWAPs do not comprise the full trading session, which is why theyare sometimes called partial VWAPs as by Narajewski and Ziel [33] and Kath [24]. In orderto trade near or equal to the VWAP, we assume x k = ( N − k ) (cid:18) XN F k (cid:19) , (26) n k = XN F k , (27)where F j is a volume reallocation factor that should ensure a distribution based on thetraded volume per minute bucket k in F k = ˆ v k N (cid:80) Nk =1 ˆ v k . (28)The actual traded volume v k is not known ex ante which is why we assume v k = ˆ v k , where ˆ v k is defined as an estimation for the true volume v k . In our case, ˆ v k is simply the empiricalvolume per bucket of the year 2018. Hence, F k does not change per trading hour or dayand is static throughout the entire out-of-sample test. Also, recall that index k changeswith the arrival time of each position to be traded. Thus, the allocation factor F k requiresa new computation if the arrival time changes. The algorithm should ideally start to trade1 Residual Position in MWh Minute bucket k Trading trajectories
IOBE TWAP Opti_C Opti_sigma VWAP
XBID trading local trading
Figure 8:
Trading trajectories of all algorithms of Section 3 for k = 1 , ..., , i.e., trading from 300 to 30minutes before delivery assuming a volume of 270 MWh to be traded. Note that we have decided to plotthe trajectory for peak-load and weeks in case the optimization algorithms Opti C and Opti σ(cid:118) , weekend, oroff-peak trajectories partially differ. However, the overall difference is negligible. immediately, which is why it can be very useful to compute a set of factors F k for differentchoices of k in advance. It also follows that N (cid:89) k =1 F k = 1 , (29)such that sufficient volume is traded. Since the strategy allocates higher volumes to tradingphases with large traded volumes, it could be a profitable way to execute positions.
4. Intraday Market Execution Simulation
Different algorithms result in different trading trajectories. Section 3 focused on a mathe-matical formulation. In addition, we want to discuss trading behavior to sharpen the under-standing of the numerical results. The easiest way to understand volume allocation behavioris by inspecting a trade path plot. Figure 8 shows the trading trajectories of all algorithms. It .1 Resulting Trading Trajectories . The two optimizationalgorithms Opti σ(cid:118) and Opti C yield different paths per total position to be executed. However,the differences are marginal, and only very large positions lead to a slightly smoother curve.Therefore, we have decided to plot 270 MWh as a compromise. Positions around 200—300MWh apply to many market participants and depict an industry-wide optimal executionproblem.Here, IOBE executes the entire volume in the first minute bucket. This is arguably thesimplest form of execution and leads to one big trade. In contrast to that, the TWAPapproach equally splits the volume in equidistant steps, which yields a straight and linearexecution reflected by a black dashed line. It serves as a good reference path to compare allother algorithms against. The TWAPs try to minimize the impact by means of the smallestequidistant steps possible. This sounds rather naive but could prove profitable if we recapthe sharp exponential growth of BAS with the higher volumes depicted in Figure 5. Hence, itis interesting to see how other approaches deviate from this. The VWAP algorithm allocatesbased on historic volume distributions over time. This leads to an interesting pattern. Thetrading volume increases with time to delivery, as shown in Figure 4. The VWAP algorithmshifts a bit of volume into later trading phases. In the middle of the selected trading win-dow, its inventory position is around 10 MWh higher compared to the TWAP allocations.However, the overall change is small and does not lead to a drastic change.Another interesting pattern evolves with Opti C . Recall that this algorithm purely opti-mizes costs based on a GAM trained on 2018 data. The algorithm starts with slower tradingrates than all other approaches and leaves a higher position open in the early and mid-trading phases. A striking behavior happens shortly before the switch from pan-EuropeanXBID trading to local German trading. Starting at around k = 185 , positions are closedmore aggressively compared to TWAP and all other models, which results in a smaller openposition when local trading starts. Taking a look at Figure 5, this makes perfect sense as thisdecision avoids the high BAS levels in local trading. Figure 8 makes it almost impossible tosee, but both optimization approaches avoid the very expensive cutover phase entirely.Opti σ(cid:118) is closely connected to the pure cost optimization but considers risk aversion in theform of the volatility of prices and bid-ask spreads. If one recalls, that this approach balancesbetween expected trading costs (which means equally sized small volumes per bucket) and We stop trading 30 minutes before delivery as there is only intra-grid area trading allowed from this pointonwards. However, this means that a lead time (i.e., the nominal time to delivery) of 300 minutes results in270 minutes of trading. .1 Resulting Trading Trajectories Volume [MWh] Lead time [Minutes] IOBE TWAP VWAP Opti C Opti σ Table 2:
Median BAS per strategy, lead time, and volume. The lead time is connected to the choice of k. If, for instance, k = 30 , then the corresponding lead time is 60 minutes to delivery. The unit of the Bid-Askspread is €/MWh. In addition to the median, we report mean values in brackets. the variance of expected costs, it becomes evident that the algorithm tries to avoid additionalvariance at the cost of slightly higher market impact. This leads to an almost TWAP-liketrading path. One could ask why there is no remarkable change in the trajectories as shownby Almgren and Chriss [2], wherein mean-variance approaches resulted in very different tradetrajectories. The answer is given by the market impact functions. The mentioned paper as-sumed a linear impact. Thus, risk aversion does not cause the trader to pay a large premiumin the form of bid-ask spreads for the sake of less variance in costs and execution prices. Anoptimization algorithm could easily shift trading volumes into early trading phases withoutcausing an exponential cost increase. This is different from intraday trading and our marketimpact models. Every time trading is shifted away from a late trading point to an early one,this causes an exponential growth in costs while reducing volatility in an exponential wayas well. Our parameter choice for λ seems to be very conservative. Thus, Opti σ(cid:118) carefullybalances between expected costs and volatility. However, we found that even more aggressivechoices for λ do not create substantially different trading trajectories. This is interesting asintraday markets feature price spikes and a generally high level of volatility, as mentionedby Wolff and Feuerriegel [44]. Although there is a high level of volatility, a mathematicallyoptimized execution seems to deviate only partially from the benchmark path of TWAP al-location.Despite the fact that we have a diverse set of algorithmic trading models that differ in trad-ing, computational complexity, and consideration of market impact, the trading trajectoriesare less heterogeneous than expected. In fact, this leads to the first interesting conclusion.In trading areas with sparse order books and exponential growth in the temporary and per- .2 Realized Execution Costs and Variance Volume [MWh] Lead time [Minutes] TWAP VWAP90 0.12 0.11300 <0.0001 <0.000190 1 0.96300 <0.0001 <0.000190 1 1300 <0.0001 <0.0001
Alternative Hypothesis: Opti C BAS less than TWAP/VWAP
Single-sided t-test for Opti C results Table 3:
Results of a single-sided t-test testing for sta-tistical significance of the alternative hypothesis thatOpti C results are lower than the compared alternatives. Section 4.1 demonstrated how consideringdifferent aspects such as market couplingleads to different execution paths. It is im-portant to note that all models were solelytrained on 2018 data. Thus, all assump-tions and optimizations might turn out tobe incorrect for the year 2019. Followingthe aggregation logic of section 2.2, we com-pare how each algorithm trades volumes andbenchmark the trades against the aggregatedBAS and prices of each individual minutebucket of 2019. The aggregation averagesout all spikes and outliers while still being very granular so that we have detailed results.Apart from that, we analyze different trading volumes (100, 300, 1,000) and different timesto contract expiry, i.e., k = { , } , to reflect the behavior under changing conditions. Toour knowledge, this paper is the first one that reports out-of-sample results for the Germanintraday market.We want to first focus on realized execution costs in the form of BAS, more formallydefined as BAS t,k,r = ( y t,k,r,sell − y t,k,r,buy ) . (30)Hence, the BAS is aggregated per delivery date t , minute bucket k, and accumulated vol-ume r . Using it as a benchmark also covers the most important trade execution aspectsmentioned by Perold [36]. Table 2 grants a first overview of our empirical simulation. Sincethe mean is not a robust measure in the case of outliers, we have decided to focus on themedian and only report the mean in brackets for the sake of completeness. The first strikingobservation is the high level of BAS if IOBE execution is concerned. It becomes obviousthat actively “clicking away” the entire volume at once leads to a dramatic cost level thatno company should aim for. Simple approaches like TWAP that do not require massivecomputation already beat IOBE by far. The VWAP strategy is also much better than IOBE .2 Realized Execution Costs and Variance C performs as expected when the volumes perbucket are low and beats all other approaches. However, this is only the case if there is lotsof time to close positions, i.e., when the lead time is 300 or when there is less volume to betraded. But why is that so? We can think of two reasons. Taking a closer look at Figure 5,we can see that the dashed black line is below the actual spreads in the late trading phasesbefore XBID. That means that the costs in local trading are slightly overestimated. Ourchoice of 60 minutes to trade seems to underline the model limitations. The optimizationmodel exhibits weaknesses if applied in late trading and forced to trade large volumes. Theother explanation is more pragmatic. We have used 2018 data to train the models, but thatdoes not necessarily mean that identical patterns will evolve for 2019. Parts of the differencesmight also be due to the random noise that is present with all empirical approaches.Opti σ(cid:118) expands Opti C by a certain level of risk aversion that flattens the trading volumes.Consequently, there is a shift in performance. In phases where Opti C performs well, a pre-mium in the form of slightly lower performance is paid. In the case of Opti C suffering fromlimitations, the risk-averse approach Opti σ(cid:118) loses less. All models struggle to keep their spreadlevel when volumes increase. This observation makes sense, as the resulting orders hit deeplayers in the order book and more spread is paid. There is no difference between the TWAPresults in the cases of 100- and 300-MW volume for a lead time of 90 minutes. While thisis contradictory at first, a deeper look gains more insight. We have aggregated into timeand volume buckets, and 300 MW/100 MW allocated into 60 time buckets means trades of5 MW and 1.1 MW each. It is important to note that our second volume bucket spans from1 to 5 MW, meaning that both orders result in the same out-of-sample spread simply due toour aggregation logic being too gross in that specific scenario. That is the reason why somealgorithms’ results equal each other.We can see that the optimization approach makes sense in many scenarios. However, doesthat postulation hold true under a stricter statistical analysis? A one-sided t-test that checksfor the significance of Opti C BAS levels being lower than the TWAP and VWAP brings moreclarity (see results in Table 3). All scenarios with 300-MW positions are clearly significant.The results for 100 MW and 90 minutes of lead time are a bit better but do not persistunder our stricter framework. The differences could also be random-based. Higher volumesand 90 minutes of lead time are clearly not significant, which further underlines the inherentOpti C model’s limitations. But what does that mean in terms of monetary effects? Ouroptimization model outperforms all other models by around 15 ct/MWh if we stick to the .2 Realized Execution Costs and Variance BAS t,k,j / . We acknowledge that this assumption requires symmetricsavings for buy and sell trades, but for simplification matters, this should suffice. The traderwill then save 100 MW*24 hours*365 days*8 ct, the latter value being roughly the differencebetween Opti C and TWAP. The approach saves 70,080 euros per year due to an optimizedexecution. Assume a volume of 300 MW 300 minutes before delivery, the alternatives beingIOBE and the optimized model. This comparison results in savings of 2,775 euros for eachindividual delivery hour and underlines that optimal execution can be an important perfor-mance driver.Last but not least, the variance of cost requires discussion. Equations (19) and (20) re-flect how Opti σ(cid:118) balances between minimizing cost and variance. Inevitably, mean-varianceapproaches introduce subjectivity since the risk-aversion parameter λ is chosen by the user.One could argue that with just a few hours of trading, variance does not play a major role. Ifequity trading is concerned, there are usually much longer holding periods and daily volatil-ity reports of open position, but in intraday trading, positions are closed within minutes orhours. However, we want to inspect if Opti σ(cid:118) achieves the goal of lower variance. Our measureof choice is the weighted standard deviation of BAS, defined as Std
BAS = (cid:118)(cid:117)(cid:117)(cid:116) (cid:80) Tt =1 ( BAS t,k,r − µ t,r ) ( T − T ) (cid:80) Tt =1 v algot,k,r , (31)where T equals the length of our backtest time series and v algot,k,r the volume allocated byeach algorithm per delivery date t , minute bucket k, and accumulated volume r . It iscrucial to conduct a volume-weighting as the volumes are not distributed symmetrically. Forinstance, IOBE trades just once but with 100% of the position. Without taking volumes intoconsideration, the results would be biased. Table 4 demonstrates a mixed performance. Insome cases, the variance of Opti σ(cid:118) is low or even the lowest across all models. However, thedifference is small and comes at the price of a higher BAS. The overall trade trajectory issmoother and volumes are split more equally if we compare Opti σ(cid:118) with Opti C . Unfortunately,both models share the same shortcomings. Opti σ(cid:118) does not deliver less variance in problematicscenarios (low lead time and large positions). All in all, the goal of lower variance is achieved.However, the trade-off between higher spreads and lower variance does not seem to be tooconvincing in intraday markets. .3 Trade Price Benchmarking and Randomization of Volumes Volume [MWh] Lead time [Minutes] IOBE TWAP VWAP Opti C Opti σ
90 568.14 61.51 62.17 60.84 60.31300 135.98 23.41 25.84 18.66 22.9990 1386.04 61.51 64.96 67.24 66.02300 590.04 24.67 27.27 19.22 23.5390 2043.59 127.12 121.35 167.85 159.44300 1187.32 24.68 28.35 19.73 24.931003001000
Table 4:
Volume weighted standard deviation of BAS per strategy, lead time, and volume. The lead timeis connected to the choice of k. If, for instance, k = 30 then the corresponding lead time is 1 hour beforedelivery. The unit of the Bid-Ask spread is €/MWh. The median BAS is a suitable measure as it allows for a compressed overview of performance.However, it features two drawbacks. First, the BAS is a symmetrical measure and does notcontain any information on buy- or sell-side performance. If a company is a net seller, lookingat spreads has limited value. Second, spreads are not as easily interpretable as prices, forinstance. Many other papers utilize plain prices or averages like the ID3 or ID1 as a reference.We want to exploit these two aspects and, additionally, benchmark our algorithms againstbuy and sell prices. One might argue that the BAS is a direct result of prices, as shown inEq. (29). This is basically true, but for this second benchmark, we have computed the pricesfrom scratch following the logic of section 2.2. The findings of the price results in section4.3 and BAS tables of section 4.2 might slightly differ due to different roundings, i.e., a priceresult will not 1:1 add up to the BAS results. While this could be perceived as confusing, wesee it as an additional layer of verification as we apply a newly computed measure.Table 5 reports all findings separated into buy and sell as well as the known scenarioswith different trading volumes and lead times. In addition, we report two volume-weightedreference prices published by EPEX Spot SE. For a lead time of 300 minutes, that is, theID3, for 90 minutes until delivery, we apply the ID1. These indices do not comprise therelevant time frames 1:1 but serve as an appropriate and reproducible benchmark. Note thatwe only report the indices as a reference point but not as a measure per se. For readersinterested in index-tracking or VWAP pricing, we refer to Frei and Westray [10] and Carteaand Jaimungal [6]. Unsurprisingly, Table 5 confirms the overall impression of our spreadanalysis. Opti C yields convincing results with longer lead times, or—if forced to liquidatepositions with shorter lead times—only in the case of small values. Moreover, TWAP alsoshows favorable prices.Taking a deeper look at buying and selling separately, some interesting patterns emerge. .3 Trade Price Benchmarking and Randomization of Volumes Volume [MWh] Lead time [Minutes] Reference Price* IOBE TWAP VWAP Opti C Opti σ IOBE TWAP VWAP Opti C Opti σ (73.33) (40.11) (40.09) (40.02) (40.06) (12.81) (36.55) (36.54) (36.62) (36.59) (57.99) (39.26) (39.30) (39.16) (39.24) (24.76) (37.33) (37.22) (37.41) (37.35) (226.43) (40.11) (40.34) (40.45) (40.42) -(117.17) (36.55) (36.27) (36.18) (36.19) (107.31) (39.38) (39.39) (29.26) (39.33) -(15.57) (37.19) (37.17) (37.30) (37.25) -130.41 (580.61) (42.88) (42.64) (43.22) (43.74) -(444.71) (33.68) (34.01) -(33.16) (32.76) -30.99 (195.77) (39.38) (39.49) (39.34) (39.51) -(98.37) (37.19) (37.06) (37.22) (37.06) *Average ID3 price for 300 minutes lead time, average ID1 price for 90 minutes lead time Sell
Buy
Table 5:
Average BAS per strategy, lead time, and volume. The lead time is connected to the choice of k. If, for instance, k = 60 , then the corresponding lead time is 90 minutes before delivery. The unit of theBid-Ask spread is €/MWh. In low-volume scenarios, the benefits of our optimization approach are stronger when buyingvolumes. This effect cancels out with higher volumes. In the case of medium volumes, onecan observe slightly better sell than buy prices (e.g., considering the difference between Opti C and TWAP). However, this effect is negligible. Overall, the LOB imbalance in terms of pricesis rather low. It does not seem to make a difference if one is buying or selling, which deliversevidence to the fact that quoted volumes and resulting execution prices are symmetrical.There might be times where this conclusion does not hold anymore, such as large plantoutages or renewables forecast updates that cause the entire market to sell generated power.However, these go beyond our considerations and obviously seem to cancel out with a samplesize of almost one year of out-of-sample data.Another interesting insight is connected to reference prices. Many intraday papers likeKath and Ziel [25] just apply index prices published by EPEX Spot. However, if we comparethe realized price levels to the reference price, the difference is striking. No algorithm cantrade at the reference price. Instead, an additional mark-up (selling at lower prices or buyingat higher ones) of around 0.70—1.20 €/MWh is required. But why is that so? We must keepin mind that the reference price is a mid-price between buys and sells. So, in order to trade ator near an ID3, a trader has to—at least partially—earn the BAS. This contradicts one of ourcore assumptions, namely the active trading of positions meaning accepting orders directly inLOBs. Our algorithms explicitly pay the BAS as they do not want to wait for execution andface the risk of non-trading over a longer period of time. Additionally, earning the BAS, i.e.,waiting for others to accept their own orders, requires one to be always on top of the orderbook. This aspect is a trading strategy on its own, as one needs to define price aggression,9position sizes, and inventory risks in a different way than is done in this paper. However, thesimple comparison with reference prices reveals a major finding with large academic impact.Even complex execution algorithms trade far from ID1 and ID3. Thus, the assumption oftrading at index prices is an unrealistic one or needs at least a proper discussion of indexreplications algorithms and optimal execution. The topic itself is beyond the scope of thispaper, but the naive comparison of our results and the reference prices emphasizes a corelimitation of the majority of papers on intraday trading.Last but not least, we want to examine if the results persist under changing conditions.Assuming fixed positions amid all days and hours of the year is a strong assumption that willonly account for a number of very large market players. However, what if smaller tradersutilize the execution algorithms only occasionally? In addition to gaining more realisticresults, we introduce an additional robustness check by manipulating the sample. Do thealgorithms deliver a constant performance, or are the results of Table 5 only due to somevery specific events? Based on the described out-of-sample tests, we can erratically removedays from the sample to find answers to these questions. Figure 9 plots the modus operandi.Based on 100% of the out-of-sample data, we randomly delete 60% and then another 40%or, first, 25% followed by 50%, which results in four different randomization paths for twodifferent lead-time and volume scenarios. Inspecting the results, we find that the robustnesscheck by sampling confirms the previous results: TWAP and VWAP are generally moreprofitable in high-volume, low-lead-time scenarios, while the optimization approaches showsuperior performance if given more time to trade. Thus, we have delivered evidence of thefact that the results of Tables 2 and 5 hold true under more general conditions. They arevalid for the entire data set as well as randomly sampled parts of it, which renders them asa good line of orientation for market players.
5. Contributions and Outlook
Optimal execution of positions in intraday markets, despite its importance with regard to atrader’s performance, has only come to academic attention recently. Recent papers like Glaset al. [15] use LOB data, aggregate information into discrete time steps, and solve numericaloptimization problems, aiming for an appropriate trade trajectory that minimizes bid-askspreads. Equity markets supply a rich body of literature but lack certain characteristics likedifferent trading regimes, short lead-times, and exponential growth of costs due to liquidity .1 Conclusion Buy Sell Buy SellOpti C C σ σ C C C σ σ σ C C C σ σ σ C C σ σ Lead time 90 minutes300 MWhLead time 300 minutes300 MWh
Figure 9:
Out-of-sample scenario analysis given randomly sampled days of the year 2019. The calculationemphasizes whether the results persist under changing conditions or erratic occurrences of positions to beexecuted, e.g., plant outages. restrictions. We provide a more refined optimization approach. Our model minimizes ex-pected costs as well as—if desired—expected variance and outputs an optimal trading pathper minute.Based on aggregated minute buckets, we have fitted two GAM models to consider per-manent and temporary market impact. Our calculations have shown that penalized splineswork well for modeling the relationship between spreads and lead time, trading volumes, andtimes of trading in German continuous intraday markets. Thus, the GAMs comprise mul-tiple p-splines and model the exponential growth of median bid-ask spreads depending onthe aforementioned variables. Another important thing unprecedentedly considered by ourapproach is European market coupling. A simple lead time analysis showed that BAS levelsdramatically increase when the European coupling of intraday orders under XBID stops onehour before delivery. Although trading costs normalize shortly after this cut-over phase, theiroverall level tends to be higher without coupling. Our approach takes this chronological char-acteristic into account and models XBID trading, local German trading, and the cut-overphase separately. To our knowledge, it is the first optimization method to incorporate somany market-specific determinants based on 60-second data.But is it worth the effort? We compared the model performance in an out-of-sample study .2 Outlook
The previous analysis has shown that optimal execution, whilst not being extensively dis-cussed in the literature yet, can be an interesting value driver. However, what role willoptimal execution play in the future, and how could further research promote its impor-tance? We encourage trading-oriented forecasting approaches like that of Maciejowska et al.[30] or Maciejowska et al. [29] to discuss execution as well. Benchmarks like ID3 are a suitablefirst approximation but neglect the trading character and the fact that a trader often has topay bid-ask spreads. Future research should steer backtests in that direction and use order ibliography
Bibliography [1] René Aïd, Pierre Gruet, and Huyên Pham. An optimal trading problem in intraday electricitymarkets.
Mathematics and Financial Economics , 10(1):49–85, 2016.[2] Robert Almgren and Neil Chriss. Optimal execution of portfolio transactions.
Journal of Risk , 3:5–40,2001.[3] Robert F Almgren. Optimal execution with nonlinear impact functions and trading-enhanced risk.
Applied mathematical finance , 10(1):1–18, 2003.[4] Dimitris Bertsimas and Andrew W Lo. Optimal control of execution costs.
Journal of FinancialMarkets , 1(1):1–50, 1998.[5] Jędrzej Białkowski, Serge Darolles, and Gaëlle Le Fol. Improving vwap strategies: A dynamic volumeapproach.
Journal of Banking & Finance , 32(9):1709–1722, 2008.[6] Álvaro Cartea and Sebastian Jaimungal. A closed-form execution strategy to target volume weightedaverage price.
SIAM Journal on Financial Mathematics , 7(1):760–785, 2016.[7] M. Coulon and Jonas Ströjby. Wind park valuation and risk management in the german intradaypower markets, January 2020. URL ibliography . fime-lab . org/wp-content/uploads/2020/01/EDFParisCoulon . pdf . accessed on23.08.2020.[8] Paul HC Eilers and Brian D Marx. Flexible smoothing with b-splines and penalties. Statistical science ,pages 89–102, 1996.[9] EPEX Spot SE. New trading record on epex spot in 2019, 2020. URL . epexspot . com/en/news/new-trading-record-epex-spot-201926A . accessed on 26thJanuary 2020.[10] Christoph Frei and Nicholas Westray. Optimal execution of a vwap order: a stochastic controlapproach. Mathematical Finance , 25(3):612–639, 2015.[11] Pierre Gaillard, Yannig Goude, and Raphaël Nedellec. Additive models and robust aggregation forgefcom2014 probabilistic electric load and electricity price forecasting.
International Journal offorecasting , 32(3):1038–1050, 2016.[12] Ernesto Garnier and Reinhard Madlener. Balancing forecast errors in continuous-trade intradaymarkets.
Energy Systems , 6(3):361–388, 2015.[13] Jim Gatheral, Alexander Schied, and Alla Slynko. Transient linear price impact and fredholm integralequations.
Mathematical Finance: An International Journal of Mathematics, Statistics and FinancialEconomics , 22(3):445–474, 2012.[14] Silke Glas, Rüdiger Kiesel, Sven Kolkmann, Marcel Kremer, Nikolaus Graf von Luckner, LarsOstmeier, Karsten Urban, and Christoph Weber. Intraday renewable electricity trading: advancedmodeling and optimal control. In
Progress in industrial mathematics at ECMI 2018 , pages 469–475.Springer, 2019.[15] Silke Glas, Rüdiger Kiesel, Sven Kolkmann, Marcel Kremer, Nikolaus Graf von Luckner, LarsOstmeier, Karsten Urban, and Christoph Weber. Intraday renewable electricity trading: advancedmodeling and numerical optimal control.
Journal of Mathematics in Industry , 10(1):3, 2020.[16] David E Goldberg and John Henry Holland. Genetic algorithms and machine learning. 1988.[17] Olivier Guéant and Guillaume Royer. Vwap execution and guaranteed vwap.
SIAM Journal onFinancial Mathematics , 5(1):445–471, 2014.[18] Simon Hagemann. Price determinants in the german intraday market for electricity: an empiricalanalysis.
Journal of Energy Markets , 8(2):21–45, 2015.[19] Trevor J Hastie and Robert J Tibshirani.
Generalized additive models , volume 43. CRC press, 1990.[20] Terrence Hendershott and Ryan Riordan. Algorithmic trading and the market for liquidity.
Journal ofFinancial and Quantitative Analysis , 48(4):1001–1024, 2013.[21] John H Holland. Genetic algorithms.
Scientific american , 267(1):66–73, 1992.[22] Mark L Humphery-Jenner. Optimal vwap trading under noisy conditions.
Journal of Banking &Finance , 35(9):2319–2329, 2011.[23] Tim Janke and Florian Steinke. Forecasting the price distribution of continuous intraday electricitytrading.
Energies , 12(22):4262, 2019.[24] Christopher Kath. Modeling intraday markets under the new advances of the cross-border intradayproject (xbid): Evidence from the german intraday market.
Energies , 12(22):4339, 2019.[25] Christopher Kath and Florian Ziel. The value of forecasts: Quantifying the economic gains of accuratequarter-hourly electricity price forecasts.
Energy Economics , 76:411–423, 2018. ibliography [26] Rüdiger Kiesel and Florentina Paraschiv. Econometric analysis of 15-minute intraday electricity prices. Energy Economics , 64:77–90, 2017.[27] Christopher Koch and Lion Hirth. Short-term electricity trading for system balancing: An empiricalanalysis of the role of intraday trading in balancing germany’s electricity system.
Renewable andSustainable Energy Reviews , 113:109275, 2019.[28] Hizuru Konishi. Optimal slice of a vwap trade.
Journal of Financial Markets , 5(2):197–221, 2002.[29] Katarzyna Maciejowska, Weronika Nitka, and Tomasz Weron. Day-ahead vs. intraday-forecasting theprice spread to maximize economic benefits.
Energies , 12(4):631, 2019.[30] Katarzyna Maciejowska, Bartosz Uniejewski, and Tomasz Serafin. Pca forecast averaging-predictingday-ahead and intraday electricity prices.
Energies , 13(14):3530, 2020.[31] Harry Markowitz. Portfolio selection.
The Journal of Finance , 7(1):77–91, March 1952.[32] Henry Martin and Scott Otterson. German intraday electricity market analysis and modeling based onthe limit order book. In ,pages 1–6. IEEE, 2018.[33] Michał Narajewski and Florian Ziel. Econometric modelling and forecasting of intraday electricityprices.
Journal of Commodity Markets , 19:100107, 2020.[34] Michał Narajewski and Florian Ziel. Ensemble forecasting for intraday electricity prices: Simulatingtrajectories.
Applied Energy , 279, December 2020.[35] Christian Pape, Simon Hagemann, and Christoph Weber. Are fundamentals enough? explaining pricevariations in the german day-ahead and intraday power market.
Energy Economics , 54:376–387, 2016.[36] Andre F Perold. The implementation shortfall: Paper versus reality.
Journal of Portfolio Management ,14(3):4, 1988.[37] R. A. Rigby and D. M. Stasinopoulos. Generalized additive models for location, scale and shape,(withdiscussion).
Applied Statistics , 54:507–554, 2005.[38] L Scrucca. Ga: A package for genetic algorithms in r. journal of statistical software.
Foundation forOpen Access Statistics , 53(4), 2013.[39] Mikis D Stasinopoulos, Robert A Rigby, Gillian Z Heller, Vlasios Voudouris, and FernandaDe Bastiani.
Flexible regression and smoothing: using GAMLSS in R . CRC Press, 2017.[40] Bence Tóth, Zoltán Eisler, and J-P Bouchaud. The square-root impace law also holds for optionmarkets.
Wilmott , 2016(85):70–73, 2016.[41] Bartosz Uniejewski, Grzegorz Marcjasz, and Rafał Weron. Understanding intraday electricity markets:Variable selection and very short-term price forecasting using lasso.
International Journal ofForecasting , 35(4):1533 – 1547, 2019.[42] Johannes Viehmann. State of the german short-term power market.
Zeitschrift für Energiewirtschaft ,41(2):87–103, 2017.[43] Nikolaus Graf von Luckner, Álvaro Cartea, Sebastian Jaimungal, and Rüdiger Kiesel. Optimal marketmaker pricing in the german intraday power market. House of Energy Markets and Finance, Essen,Germany, 2017.[44] Georg Wolff and Stefan Feuerriegel. Short-term dynamics of day-ahead and intraday electricity prices.
International Journal of Energy Sector Management , 4(4):557–573, 2017.[45] Simon N Wood.