Market Transactions and Market charges

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Market Transactions and Market charges

grampajohn
Administrator
Colleagues -

I recently deployed a snapshot that includes a fix for issue #474, with the result that payments for wholesale market transactions are made when power is delivered, rather than when the market clears. However, the MarketTransaction instances are still sent when the market clears, with the result that you can no longer just add up all the transactions in a timeslot and expect the amount to match the change in the broker's bank account.

On the other hand, market positions for future timeslots are now reliably sent whenever those positions change; this was not the case earlier. Also, the MarketTransactions can be matched up with the cleared Orders that were sent during the previous timeslot.

So I want to give the community a chance to discuss this issue. Is it correct now, or should the MarketTransactions be held back until the charges are applied? I am not (currently) a broker developer, so I do not have a strong opinion on this one way or the other. Unless there is a consensus to defer the MarketTransactions, I will assume the desired behavior is the current one -- the broker will receive them when its Orders clear, rather than when the corresponding charges are applied to its bank account.

Cheers -

John
Reply | Threaded
Open this post in threaded view
|

Re: Market Transactions and Market charges

iBuljevic
Hi John,

I think that sending MarketTransaction messages when market clears is ok, but it would be great if there was some field in MarketTransaction class that shows in which timeslot order was made. I thought that postedTimeslot contains that information, but apparently that indicates timeslot in which MarketTransaction was dispatched.

BR,
Ivo
Reply | Threaded
Open this post in threaded view
|

Re: Market Transactions and Market charges

grampajohn
Administrator
iBuljevic wrote
I think that sending MarketTransaction messages when market clears is ok, but it would be great if there was some field in MarketTransaction class that shows in which timeslot order was made. I thought that postedTimeslot contains that information, but apparently that indicates timeslot in which MarketTransaction was dispatched.
Thanks, Ivo. This is a good idea, and it's exactly the kind of feedback I was looking for. This should be easy to implement, but the updated message format might crash brokers unless they are re-compiled against the new library. I'll check that out. If it breaks existing brokers, I would prefer to defer it until after the April tournament.

Cheers -

John
Reply | Threaded
Open this post in threaded view
|

Re: Market Transactions and Market charges

grampajohn
Administrator
In reply to this post by iBuljevic
iBuljevic wrote
I think that sending MarketTransaction messages when market clears is ok, but it would be great if there was some field in MarketTransaction class that shows in which timeslot order was made. I thought that postedTimeslot contains that information, but apparently that indicates timeslot in which MarketTransaction was dispatched.
Hi, Ivo -

Actually, the information you want is already there. The "posted-timeslot" attribute tells you when the order was cleared, and the "timeslot" attribute tells you when power is to be delivered.

Does this help?

John
Reply | Threaded
Open this post in threaded view
|

Re: Market Transactions and Market charges

iBuljevic
Hi John,
I've noticed those methods, but I would like to know in every market transaction when the bid that was cleared was posted (timeslot in which order was placed). Is that possible?
Reply | Threaded
Open this post in threaded view
|

Re: Market Transactions and Market charges

grampajohn
Administrator
iBuljevic wrote
I've noticed those methods, but I would like to know in every market transaction when the bid that was cleared was posted (timeslot in which order was placed). Is that possible?
At the beginning of every timeslot, the market clears all the Orders (bids and asks) that have arrived since the beginning of the previous timeslot. Note that this is the time when the Orders arrive in the server, and not necessarily the time your agent sends them. So if you send an order within a few milliseconds of the end of timeslot n, it may not get cleared until the start of timeslot n+2. But I suspect that's a very rare occurrence.

There's a detailed description of the server's time-management process on the developer's wiki. See the bottom of the page for the part that's relevant to market clearing.

Cheers -

John