Merge branch 'spartan_tas' of bitbucket.org:bluetradesys/spark into spartan_tas

This commit is contained in:
Pedro Pinto committed 2020-12-24 10:44:43 -05:00
commit e413ad216e
1 file changed
+12 -16
@@ -340,22 +340,18 @@ void PolygonOpportunityFinder::on_real_time_event(MDP3Event const &ev) {
return os::nan();
};
// auto compute_synthetic = [](PolygonValuation& pv){
// std::vector<std::tuple<MDP3Quantity, md::IntPrice, Book, Book>> legs;
// size_t i=0;
// for (const auto& ip : pv.polygon.parts){
// auto leg_qty = MDP3Quantity(ip.ratio);
// BookReference& bk_ref = pv.books_used[i++];
// legs.push_back(std::make_tuple(leg_qty,
// md::IntPrice(),
// bk_ref.bid_book,
// bk_ref.ask_book));
// }
// book_utils::compute_synthetic_books(pv.poly_bid_book,pv.poly_ask_book,legs,5);
// };
auto compute_polygon_book = [](PolygonValuation&){
// TODO
auto compute_polygon_book = [](PolygonValuation& pv){
std::vector<std::tuple<MDP3Quantity, md::IntPrice, Book, Book>> legs;
size_t i=0;
for (const auto& ip : pv.polygon.parts){
auto leg_qty = MDP3Quantity(ip.ratio);
BookReference& bk_ref = pv.books_used[i++];
legs.push_back(std::make_tuple(leg_qty,
md::IntPrice(),
bk_ref.bid_book,
bk_ref.ask_book));
}
book_utils::compute_synthetic_books(pv.poly_bid_book,pv.poly_ask_book,legs,5);
};
for (auto pid : to_recalc) {