ScalABM / auctions

A functional API for auction simulations
Apache License 2.0
13 stars 1 forks source link

Move tick to auction #92

Closed davidrpugh closed 7 years ago

davidrpugh commented 7 years ago

This PR moves the tick from the Tradable trait to the various auction traits. Reasoning is that different auctions mechanisms might trade the same Tradable but with different tick sizes.

This change is significant in that it impacts the insert method of the various auction traits. In particular, that method now returns Try[A] instead of A. Specifically if the order has a limit price that is a multiple of the tick size, then Success(A) is returned; else Failure

This allows users to pattern match on the response from calling the insert method. This will be particularly useful when we have multiple ways in which inserted an order could case a failure.

davidrpugh commented 7 years ago

@bherd-rb This is a substantial change to the API that I do not want to merge without discussing pros and cons with you. @EconomicSL/core-devs feel free to provide input if interested...

davidrpugh commented 7 years ago

@bherd-rb Any feedback to this proposed change?

bherd-rb commented 7 years ago

@davidrpugh Sorry for my late response, I'm drowning in work. That sounds good. I don't see any reason why that should be problematic in our use cases.

davidrpugh commented 7 years ago

@bherd-rb Thanks no worries. I am making progress. Let me know when you are ready to re-engage.