SPARK-311 (IQuoterStateWorker name change)

This commit is contained in:
Taha Afzal committed 2017-12-27 13:34:11 -05:00
1 parent 97eefceec0
commit 6dca404da2
17 files changed
+20 -19

No files matched your search

@@ -45,6 +45,7 @@ void SingleLegQuoter::init()
}
void SingleLegQuoter::update_order_status(const SpreaderChildOrderState& u)
{
bts_assert (u.order_key() == _order.order_key());
LOG(OrderMan, Diag, "SingleLegQuoter::update_order_status key: {} state: {} order status: {} fills: {}",
_order.order_key().value(), _worker->state_text(), static_cast<int>(u.status()), u.last_update_filled_quantity().value());
_worker->on_order_update (u);
@@ -57,7 +58,7 @@ void SingleLegQuoter::update_other_leg_fills(size_t leg_index, Quantity filled_q
{
LOG(OrderMan, Diag, "SingleLegQuoter::update_other_leg_fills key: {} state: {} leg_index: {} filled_quantity: {}",
_order.order_key().value(), _worker->state_text(), leg_index, filled_quantity.value());
_worker->other_leg_quoter_fill (leg_index, filled_quantity);
_worker->on_other_leg_quoter_fill (leg_index, filled_quantity);
}
void SingleLegQuoter::update_order_price_quantity(Price price, Quantity quantity)
{
@@ -6,8 +6,8 @@
namespace bts {
namespace orderman {
// this represents the state of the child orders
// submitted by the spreader; this includes
// this represents the state of the child order
// submitted by the spreader (both quoter and hedger); this includes
// i. order key
// ii. filled price/qty
// iii. last update filled price/qty
@@ -31,7 +31,7 @@ public:
// time update from the infrastructure
virtual void on_time(const TimeStamp&) = 0;
// on a quoting fill on one of the other legs
virtual void other_leg_quoter_fill (size_t leg_id, Quantity fill_quantity) = 0;
virtual void on_other_leg_quoter_fill (size_t leg_id, Quantity fill_quantity) = 0;
// when a spreader order gets updated, it could be that the one of
// the price or quantity does not change
virtual void update_spreader_order (Price price, Quantity quantity) = 0;
@@ -35,7 +35,7 @@ void QuoterEndStateWorker::terminate()
{}
void QuoterEndStateWorker::on_time(const TimeStamp&)
{}
void QuoterEndStateWorker::other_leg_quoter_fill (size_t, Quantity)
void QuoterEndStateWorker::on_other_leg_quoter_fill (size_t, Quantity)
{}
void QuoterEndStateWorker::update_spreader_order (Price, Quantity)
{}
@@ -28,7 +28,7 @@ public:
void cancel() override;
void terminate() override;
void on_time(const TimeStamp& ts) override;
void other_leg_quoter_fill (size_t leg_id, Quantity fill_quantity) override;
void on_other_leg_quoter_fill (size_t leg_id, Quantity fill_quantity) override;
void update_spreader_order (Price price, Quantity quantity) override;
};
}}
@@ -39,7 +39,7 @@ void QuoterStartStateWorker::terminate()
}
void QuoterStartStateWorker::on_time(const TimeStamp&)
{}
void QuoterStartStateWorker::other_leg_quoter_fill (size_t leg_index, Quantity filled_quantity)
void QuoterStartStateWorker::on_other_leg_quoter_fill (size_t leg_index, Quantity filled_quantity)
{
// if the other leg has been filled the quoting size gets reduced.
// it can potentially get reduced all the way to 0, and since an
@@ -56,7 +56,7 @@ void QuoterStartStateWorker::_analyze_and_act ()
{
if (_quoter->_price_quantity_state.target_reached())
{
LOG(OrderMan, Diag, "QuoterStartStateWorker::other_leg_quoter_fill key: {}, target reached, transforming to end", _quoter->_order.order_key().value());
LOG(OrderMan, Diag, "QuoterStartStateWorker::on_other_leg_quoter_fill key: {}, target reached, transforming to end", _quoter->_order.order_key().value());
_quoter->_transform_to_END ();
}
}
@@ -28,7 +28,7 @@ public:
void cancel() override;
void terminate() override;
void on_time(const TimeStamp& ts) override;
void other_leg_quoter_fill (size_t leg_id, Quantity fill_quantity) override;
void on_other_leg_quoter_fill (size_t leg_id, Quantity fill_quantity) override;
void update_spreader_order (Price price, Quantity quantity) override;
private:
void _analyze_and_act ();
@@ -39,7 +39,7 @@ void QuoterWaitingForCancelAckStateWorker::on_time(const TimeStamp&)
{
// TODO check threshold
}
void QuoterWaitingForCancelAckStateWorker::other_leg_quoter_fill (size_t leg_index, Quantity filled_quantity)
void QuoterWaitingForCancelAckStateWorker::on_other_leg_quoter_fill (size_t leg_index, Quantity filled_quantity)
{
_quoter->_incorporate_other_leg_fill (leg_index, filled_quantity);
}
@@ -29,7 +29,7 @@ public:
void cancel() override;
void terminate() override;
void on_time(const TimeStamp& ts) override;
void other_leg_quoter_fill (size_t leg_id, Quantity fill_quantity) override;
void on_other_leg_quoter_fill (size_t leg_id, Quantity fill_quantity) override;
void update_spreader_order (Price price, Quantity quantity) override;
};
}}
@@ -44,7 +44,7 @@ void QuoterWaitingForFirstAckCancelledWorker::terminate()
}
void QuoterWaitingForFirstAckCancelledWorker::on_time(const TimeStamp&)
{}
void QuoterWaitingForFirstAckCancelledWorker::other_leg_quoter_fill (size_t leg_index, Quantity filled_quantity)
void QuoterWaitingForFirstAckCancelledWorker::on_other_leg_quoter_fill (size_t leg_index, Quantity filled_quantity)
{
_quoter->_incorporate_other_leg_fill (leg_index, filled_quantity);
}
@@ -30,7 +30,7 @@ public:
void cancel() override;
void terminate() override;
void on_time(const TimeStamp& ts) override;
void other_leg_quoter_fill (size_t leg_id, Quantity fill_quantity) override;
void on_other_leg_quoter_fill (size_t leg_id, Quantity fill_quantity) override;
void update_spreader_order (Price price, Quantity quantity) override;
};
}}
@@ -41,7 +41,7 @@ void QuoterWaitingForFirstAckWorker::terminate()
}
void QuoterWaitingForFirstAckWorker::on_time(const TimeStamp&)
{}
void QuoterWaitingForFirstAckWorker::other_leg_quoter_fill (size_t leg_index, Quantity filled_quantity)
void QuoterWaitingForFirstAckWorker::on_other_leg_quoter_fill (size_t leg_index, Quantity filled_quantity)
{
_quoter->_incorporate_other_leg_fill (leg_index, filled_quantity);
_analyze_and_act ();
@@ -29,7 +29,7 @@ public:
void cancel() override;
void terminate() override;
void on_time(const TimeStamp& ts) override;
void other_leg_quoter_fill (size_t leg_id, Quantity fill_quantity) override;
void on_other_leg_quoter_fill (size_t leg_id, Quantity fill_quantity) override;
void update_spreader_order (Price price, Quantity quantity) override;
private:
// checks if the target is reached, and cancels
@@ -39,7 +39,7 @@ void QuoterWaitingForSizeStateWorker::terminate()
}
void QuoterWaitingForSizeStateWorker::on_time(const TimeStamp&)
{}
void QuoterWaitingForSizeStateWorker::other_leg_quoter_fill (size_t leg_index, Quantity filled_quantity)
void QuoterWaitingForSizeStateWorker::on_other_leg_quoter_fill (size_t leg_index, Quantity filled_quantity)
{
_quoter->_incorporate_other_leg_fill (leg_index, filled_quantity);
_longpath_analyze_and_act (bts::orderman::NullTickToTradeCorID);
@@ -29,7 +29,7 @@ public:
void cancel() override;
void terminate() override;
void on_time(const TimeStamp& ts) override;
void other_leg_quoter_fill (size_t leg_id, Quantity fill_quantity) override;
void on_other_leg_quoter_fill (size_t leg_id, Quantity fill_quantity) override;
void update_spreader_order (Price price, Quantity quantity) override;
private:
// checks to see if target has reached and goes to end
@@ -45,7 +45,7 @@ void QuoterWorkingStateWorker::terminate()
}
void QuoterWorkingStateWorker::on_time(const TimeStamp&)
{}
void QuoterWorkingStateWorker::other_leg_quoter_fill (size_t leg_index, Quantity filled_quantity)
void QuoterWorkingStateWorker::on_other_leg_quoter_fill (size_t leg_index, Quantity filled_quantity)
{
_quoter->_incorporate_other_leg_fill (leg_index, filled_quantity);
_longpath_analyze_and_act (bts::orderman::NullTickToTradeCorID);
@@ -28,7 +28,7 @@ public:
void cancel() override;
void terminate() override;
void on_time(const TimeStamp& ts) override;
void other_leg_quoter_fill (size_t leg_id, Quantity fill_quantity) override;
void on_other_leg_quoter_fill (size_t leg_id, Quantity fill_quantity) override;
void update_spreader_order (Price price, Quantity quantity) override;
private:
// this does the following in this order