SlideShare a Scribd company logo
1 of 30
Trading at market
speed
with the latest
KAFKA features
Íñigo González Ponce
@exocert
• Didn’t like databases, stats
• Very critical about so-called ‘big-data’
stacks. Tell me why later.
• Sysadmin for more than 20 years.
• Data & ML Product @One2One
• Data Science Awards 2016: Best data
Engineer.Íñigo González
@exocert
$> whoami
Disclaimer
•VERY HIGH RISK
• Don’t risk money you cannot
afford to loose.
• You’ll be trading high volatility
markets. Easily manipulated, too.
• Software bugs might make you
loose money.
6/6Inversión de muy alto riesgo.
Ud. Puede perder hasta la camisa por un
error en su código o por situaciones que
están fuera de su control.
Tenga miedito. Es más seguro.
This talk reflect my views and opinion, not my employer’s.
Automated trading (late 80’s)
The ability of trading in a market without continuous human
intervention.
You need:
Something that watches the market
Something able to execute orders based on your instructions.
High Frecuency trading
Automated trading
At milisecond speed
Able to trade multiple exchanges at once
*VERY* expensive to do:
Software licenses for CEPs started at $10,000
for cpu core.
Now it’s different
HOW to make money
trading cryptocurrencies?
(if you don’t have too many bugs)
Meet the
orderbook
The orderbook
The
orderbook is a
queue
Think about a queue in a staircase.
Every step is a bid/ask Price
On every step you can have one or more orders in
a queue.
ORDERS are executed on a FIRST-COME-FIRST-
SERVE basis.
Orderbook
and Liquidity
There is a STRONG incentive to be early in the
orderbook…
… because you’re the first in the line to execute
your orders.
BTW: Some markets have 0% trading fee for
market MAKERS.
Strategy
•Be early in the orderbook: send
orders ASAP.
•Be a Market maker (low/0% fees)
HOW?
Kafka
Kafka streams
KSQL
Use case :
Shotgun order
Orderbook inside a Kafka topic
=
Orderbook from topic to stream
CHANGE DATATYPES (tricky with arrays)
select price, sum(amount) from ob_USDBTC group by price ;
Finally see if the orderbook spot is occupied
• Make a Price_Candidates topics
• Put there the prices you might want to trade.
• I mean, the prices your _automated_ strategy believes it’s ok to trade.
• Join that with the data values you have in the orderbook.
• Those are the prices you DO NOT want to trade
• Why? because someone else has an order there.
create table xUSDBTC (price varchar, amount double, count double) with
(KEY='price', kafka_topic=‘ob_USDBTC', value_format='json’);
Create stream do_not_trade_here as 
select x.Price from xUSDBTC x 
left join Price_candidates pc on x.Price = pc.Price ;
The big picture:
What we need in
the real world™
Get
market
data
Store
market
data
Replay
market
data
Test
strategy
Watch
fror entry
signals
Watch for
exit
signals
Execute
trades
Manage
Risk
Predict
orderbok
changes
Thanks! ¡Gracias!
Danke! Obrigado 谢谢
Iñigo Gonzalez
@exocert

More Related Content

Similar to Big data spain 2017 - Iñigo Gonzalez: Trading at market speed with the latest kafka features

#GeodeSummit - Wall St. Derivative Risk Solutions Using Geode
#GeodeSummit - Wall St. Derivative Risk Solutions Using Geode#GeodeSummit - Wall St. Derivative Risk Solutions Using Geode
#GeodeSummit - Wall St. Derivative Risk Solutions Using GeodePivotalOpenSourceHub
 
Building Wall St Risk Systems with Apache Geode
Building Wall St Risk Systems with Apache GeodeBuilding Wall St Risk Systems with Apache Geode
Building Wall St Risk Systems with Apache GeodeAndre Langevin
 
Data Science and Machine Learning for eCommerce and Retail
Data Science and Machine Learning for eCommerce and RetailData Science and Machine Learning for eCommerce and Retail
Data Science and Machine Learning for eCommerce and RetailAndrei Lopatenko
 
Quant congressusa2011algotradinglast
Quant congressusa2011algotradinglastQuant congressusa2011algotradinglast
Quant congressusa2011algotradinglastTomasz Waszczyk
 
Algorithmic and high-frequency_trading 2011
Algorithmic and high-frequency_trading 2011Algorithmic and high-frequency_trading 2011
Algorithmic and high-frequency_trading 2011jy Torres
 
Brains & Brawn: the Logic and Implementation of a Redesigned Advertising Mark...
Brains & Brawn: the Logic and Implementation of a Redesigned Advertising Mark...Brains & Brawn: the Logic and Implementation of a Redesigned Advertising Mark...
Brains & Brawn: the Logic and Implementation of a Redesigned Advertising Mark...PyData
 
How to win big - Several Interesting Examples of Exploiting Financial & Gambl...
How to win big - Several Interesting Examples of Exploiting Financial & Gambl...How to win big - Several Interesting Examples of Exploiting Financial & Gambl...
How to win big - Several Interesting Examples of Exploiting Financial & Gambl...Soroush Dalili
 
Episerver commerce 2019 developer meetup
Episerver commerce 2019 developer meetupEpiserver commerce 2019 developer meetup
Episerver commerce 2019 developer meetupScott Reed
 
EXTENT-2015: Prognoz Market Surveillance
EXTENT-2015: Prognoz  Market SurveillanceEXTENT-2015: Prognoz  Market Surveillance
EXTENT-2015: Prognoz Market SurveillanceIosif Itkin
 
Should You Build Your Own Backtester? by Michael Halls-Moore at QuantCon 2016
Should You Build Your Own Backtester? by Michael Halls-Moore at QuantCon 2016Should You Build Your Own Backtester? by Michael Halls-Moore at QuantCon 2016
Should You Build Your Own Backtester? by Michael Halls-Moore at QuantCon 2016Quantopian
 
ContentsPhase 1 Design Concepts2Project Description2Use.docx
ContentsPhase 1 Design Concepts2Project Description2Use.docxContentsPhase 1 Design Concepts2Project Description2Use.docx
ContentsPhase 1 Design Concepts2Project Description2Use.docxmaxinesmith73660
 
Marketing Automation Hacks: Marketo
Marketing Automation Hacks: MarketoMarketing Automation Hacks: Marketo
Marketing Automation Hacks: MarketoUberflip
 
Transactional Streaming: If you can compute it, you can probably stream it.
Transactional Streaming: If you can compute it, you can probably stream it.Transactional Streaming: If you can compute it, you can probably stream it.
Transactional Streaming: If you can compute it, you can probably stream it.jhugg
 
Measuring 2.0 - How to handle 100K events/sec - Berlin Buzzwords 2019
Measuring 2.0 - How to handle 100K events/sec - Berlin Buzzwords 2019Measuring 2.0 - How to handle 100K events/sec - Berlin Buzzwords 2019
Measuring 2.0 - How to handle 100K events/sec - Berlin Buzzwords 2019Niels Basjes
 
AWS re:Invent 2016: Learn How FINRA Aligns Billions of Time Ordered Events wi...
AWS re:Invent 2016: Learn How FINRA Aligns Billions of Time Ordered Events wi...AWS re:Invent 2016: Learn How FINRA Aligns Billions of Time Ordered Events wi...
AWS re:Invent 2016: Learn How FINRA Aligns Billions of Time Ordered Events wi...Amazon Web Services
 
[DSC Europe 23][AICommerce] Ayoub Fakir Critical components for a successful ...
[DSC Europe 23][AICommerce] Ayoub Fakir Critical components for a successful ...[DSC Europe 23][AICommerce] Ayoub Fakir Critical components for a successful ...
[DSC Europe 23][AICommerce] Ayoub Fakir Critical components for a successful ...DataScienceConferenc1
 
Analytic servise BI Datawiz
Analytic servise BI DatawizAnalytic servise BI Datawiz
Analytic servise BI DatawizDatawiz.io
 
WSO2Con USA 2017: Analytics Patterns for Your Digital Enterprise
WSO2Con USA 2017: Analytics Patterns for Your Digital EnterpriseWSO2Con USA 2017: Analytics Patterns for Your Digital Enterprise
WSO2Con USA 2017: Analytics Patterns for Your Digital EnterpriseWSO2
 

Similar to Big data spain 2017 - Iñigo Gonzalez: Trading at market speed with the latest kafka features (20)

Automated Trading
Automated TradingAutomated Trading
Automated Trading
 
#GeodeSummit - Wall St. Derivative Risk Solutions Using Geode
#GeodeSummit - Wall St. Derivative Risk Solutions Using Geode#GeodeSummit - Wall St. Derivative Risk Solutions Using Geode
#GeodeSummit - Wall St. Derivative Risk Solutions Using Geode
 
Building Wall St Risk Systems with Apache Geode
Building Wall St Risk Systems with Apache GeodeBuilding Wall St Risk Systems with Apache Geode
Building Wall St Risk Systems with Apache Geode
 
Data Science and Machine Learning for eCommerce and Retail
Data Science and Machine Learning for eCommerce and RetailData Science and Machine Learning for eCommerce and Retail
Data Science and Machine Learning for eCommerce and Retail
 
Quant congressusa2011algotradinglast
Quant congressusa2011algotradinglastQuant congressusa2011algotradinglast
Quant congressusa2011algotradinglast
 
Algorithmic and high-frequency_trading 2011
Algorithmic and high-frequency_trading 2011Algorithmic and high-frequency_trading 2011
Algorithmic and high-frequency_trading 2011
 
Brains & Brawn: the Logic and Implementation of a Redesigned Advertising Mark...
Brains & Brawn: the Logic and Implementation of a Redesigned Advertising Mark...Brains & Brawn: the Logic and Implementation of a Redesigned Advertising Mark...
Brains & Brawn: the Logic and Implementation of a Redesigned Advertising Mark...
 
How to win big - Several Interesting Examples of Exploiting Financial & Gambl...
How to win big - Several Interesting Examples of Exploiting Financial & Gambl...How to win big - Several Interesting Examples of Exploiting Financial & Gambl...
How to win big - Several Interesting Examples of Exploiting Financial & Gambl...
 
Episerver commerce 2019 developer meetup
Episerver commerce 2019 developer meetupEpiserver commerce 2019 developer meetup
Episerver commerce 2019 developer meetup
 
presentation slides
presentation slidespresentation slides
presentation slides
 
EXTENT-2015: Prognoz Market Surveillance
EXTENT-2015: Prognoz  Market SurveillanceEXTENT-2015: Prognoz  Market Surveillance
EXTENT-2015: Prognoz Market Surveillance
 
Should You Build Your Own Backtester? by Michael Halls-Moore at QuantCon 2016
Should You Build Your Own Backtester? by Michael Halls-Moore at QuantCon 2016Should You Build Your Own Backtester? by Michael Halls-Moore at QuantCon 2016
Should You Build Your Own Backtester? by Michael Halls-Moore at QuantCon 2016
 
ContentsPhase 1 Design Concepts2Project Description2Use.docx
ContentsPhase 1 Design Concepts2Project Description2Use.docxContentsPhase 1 Design Concepts2Project Description2Use.docx
ContentsPhase 1 Design Concepts2Project Description2Use.docx
 
Marketing Automation Hacks: Marketo
Marketing Automation Hacks: MarketoMarketing Automation Hacks: Marketo
Marketing Automation Hacks: Marketo
 
Transactional Streaming: If you can compute it, you can probably stream it.
Transactional Streaming: If you can compute it, you can probably stream it.Transactional Streaming: If you can compute it, you can probably stream it.
Transactional Streaming: If you can compute it, you can probably stream it.
 
Measuring 2.0 - How to handle 100K events/sec - Berlin Buzzwords 2019
Measuring 2.0 - How to handle 100K events/sec - Berlin Buzzwords 2019Measuring 2.0 - How to handle 100K events/sec - Berlin Buzzwords 2019
Measuring 2.0 - How to handle 100K events/sec - Berlin Buzzwords 2019
 
AWS re:Invent 2016: Learn How FINRA Aligns Billions of Time Ordered Events wi...
AWS re:Invent 2016: Learn How FINRA Aligns Billions of Time Ordered Events wi...AWS re:Invent 2016: Learn How FINRA Aligns Billions of Time Ordered Events wi...
AWS re:Invent 2016: Learn How FINRA Aligns Billions of Time Ordered Events wi...
 
[DSC Europe 23][AICommerce] Ayoub Fakir Critical components for a successful ...
[DSC Europe 23][AICommerce] Ayoub Fakir Critical components for a successful ...[DSC Europe 23][AICommerce] Ayoub Fakir Critical components for a successful ...
[DSC Europe 23][AICommerce] Ayoub Fakir Critical components for a successful ...
 
Analytic servise BI Datawiz
Analytic servise BI DatawizAnalytic servise BI Datawiz
Analytic servise BI Datawiz
 
WSO2Con USA 2017: Analytics Patterns for Your Digital Enterprise
WSO2Con USA 2017: Analytics Patterns for Your Digital EnterpriseWSO2Con USA 2017: Analytics Patterns for Your Digital Enterprise
WSO2Con USA 2017: Analytics Patterns for Your Digital Enterprise
 

Recently uploaded

Data Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxData Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxFurkanTasci3
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptxthyngster
 
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiLow Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiSuhani Kapoor
 
Unveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystUnveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystSamantha Rae Coolbeth
 
20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdfHuman37
 
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfSocial Samosa
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxEmmanuel Dauda
 
Spark3's new memory model/management
Spark3's new memory model/managementSpark3's new memory model/management
Spark3's new memory model/managementakshesh doshi
 
Call Girls In Noida City Center Metro 24/7✡️9711147426✡️ Escorts Service
Call Girls In Noida City Center Metro 24/7✡️9711147426✡️ Escorts ServiceCall Girls In Noida City Center Metro 24/7✡️9711147426✡️ Escorts Service
Call Girls In Noida City Center Metro 24/7✡️9711147426✡️ Escorts Servicejennyeacort
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...soniya singh
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998YohFuh
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfLars Albertsson
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxStephen266013
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...Florian Roscheck
 
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiSuhani Kapoor
 
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...shivangimorya083
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingNeil Barnes
 
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Sapana Sha
 

Recently uploaded (20)

Data Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxData Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptx
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
 
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiLow Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
 
Unveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystUnveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data Analyst
 
20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf
 
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptx
 
Spark3's new memory model/management
Spark3's new memory model/managementSpark3's new memory model/management
Spark3's new memory model/management
 
Call Girls In Noida City Center Metro 24/7✡️9711147426✡️ Escorts Service
Call Girls In Noida City Center Metro 24/7✡️9711147426✡️ Escorts ServiceCall Girls In Noida City Center Metro 24/7✡️9711147426✡️ Escorts Service
Call Girls In Noida City Center Metro 24/7✡️9711147426✡️ Escorts Service
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdf
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docx
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
 
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
 
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data Storytelling
 
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
 
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
 

Big data spain 2017 - Iñigo Gonzalez: Trading at market speed with the latest kafka features

  • 1. Trading at market speed with the latest KAFKA features Íñigo González Ponce @exocert
  • 2. • Didn’t like databases, stats • Very critical about so-called ‘big-data’ stacks. Tell me why later. • Sysadmin for more than 20 years. • Data & ML Product @One2One • Data Science Awards 2016: Best data Engineer.Íñigo González @exocert $> whoami
  • 3. Disclaimer •VERY HIGH RISK • Don’t risk money you cannot afford to loose. • You’ll be trading high volatility markets. Easily manipulated, too. • Software bugs might make you loose money. 6/6Inversión de muy alto riesgo. Ud. Puede perder hasta la camisa por un error en su código o por situaciones que están fuera de su control. Tenga miedito. Es más seguro. This talk reflect my views and opinion, not my employer’s.
  • 4. Automated trading (late 80’s) The ability of trading in a market without continuous human intervention. You need: Something that watches the market Something able to execute orders based on your instructions.
  • 5. High Frecuency trading Automated trading At milisecond speed Able to trade multiple exchanges at once *VERY* expensive to do: Software licenses for CEPs started at $10,000 for cpu core. Now it’s different
  • 6. HOW to make money trading cryptocurrencies? (if you don’t have too many bugs)
  • 7.
  • 10. The orderbook is a queue Think about a queue in a staircase. Every step is a bid/ask Price On every step you can have one or more orders in a queue. ORDERS are executed on a FIRST-COME-FIRST- SERVE basis.
  • 11. Orderbook and Liquidity There is a STRONG incentive to be early in the orderbook… … because you’re the first in the line to execute your orders. BTW: Some markets have 0% trading fee for market MAKERS.
  • 12. Strategy •Be early in the orderbook: send orders ASAP. •Be a Market maker (low/0% fees)
  • 13. HOW?
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 23.
  • 24. Orderbook inside a Kafka topic =
  • 25. Orderbook from topic to stream
  • 26. CHANGE DATATYPES (tricky with arrays)
  • 27. select price, sum(amount) from ob_USDBTC group by price ;
  • 28. Finally see if the orderbook spot is occupied • Make a Price_Candidates topics • Put there the prices you might want to trade. • I mean, the prices your _automated_ strategy believes it’s ok to trade. • Join that with the data values you have in the orderbook. • Those are the prices you DO NOT want to trade • Why? because someone else has an order there. create table xUSDBTC (price varchar, amount double, count double) with (KEY='price', kafka_topic=‘ob_USDBTC', value_format='json’); Create stream do_not_trade_here as select x.Price from xUSDBTC x left join Price_candidates pc on x.Price = pc.Price ;
  • 29. The big picture: What we need in the real world™ Get market data Store market data Replay market data Test strategy Watch fror entry signals Watch for exit signals Execute trades Manage Risk Predict orderbok changes
  • 30. Thanks! ¡Gracias! Danke! Obrigado 谢谢 Iñigo Gonzalez @exocert