Syllabus – ALGORITHMIC TRADING – NYU GLOBAL ONLINE COURSE

Algorithmic Trading
NYU SPS – Online, Adjunct Instructor: Ted Hruzd 
Spring 2023 GLOBAL ON-LINE 1/26-3/20

8 weeks, with 3-hour weekly ZOOM sessions.      Schedule subject to change.

Course Description

Algorithmic Trading is a broad subfield of finance that combines machine learning, data analytics, and market knowledge to trade a wide variety of systematic and automated strategies.      

This course provides a broad surveillance of essential concepts underlying multiple widely used Algorithmic Trading strategies and discusses how to creatively customize and adapt proprietary strategies.  Students learn cornerstone and recent best practices in systematic trading to optimize returns, mitigate market risks, and increase probabilities of superior performance.  Techniques covered include most recent advances in Machine Learning and AI specifically for Algorithmic Trading.  This includes how to take advantage of applying AI triggers to optimize multiple trading strategies.

On-Line Registration – https://www.sps.nyu.edu/professional-pathways/courses/FINA1-CE9317-algorithmic-trading.html

Course Structure

The instructor will provide numerous documents and links to enable class to be up-to-date with Algorithmic Trading best practices; during online sessions, instructors will conduct interactive training to track class progress and also include presentations and discussions.  The primary course materials will be PowerPoints created by the instructors. All assignments will be targeting to apply what the class has recently learned.

Learning OUTCOMES    

By the end of this course, students will be able to:    

  • Evaluate gamut of Algorithmic Trading strategies to choose the strategies most applicable to evolving trading goals.
  • Design and contrast systematic strategies across different asset classes and time horizons.      
  • Validate strategies to outperform standard benchmarks.
  • Utilize Machine Learning and AI technologies to accurately project trading results

IDEAL FOR

  • Quants, Developers, Data Scientists, Machine Learning Engineers
  • Execution Traders, Quantitative Investors, Risk Managers
  • Application and Infrastructure Architects with skills in servers, networks market data protocols, Machine Learning / AI

Communication Policy

You are expected to regularly check email and NYU-Classes multiple times per week for announcements concerning assignments, exam dates, class changes or cancellations, and other important information. NYU Classes course-mail supports student privacy and FERPA guidelines. The instructor will communicate with students through NYU Classes course-mail and will typically respond to any questions, comments, or concerns within 24 hours.

Course Expectations

Course expectations include the following:

  • The course will make use of all aspects of the class portal to communicate course content, assignment, provide additional resources, news articles, and assign and collect homework. Please familiarize yourself with the website if you have not already.
  • Thorough reading and analysis of all reading assignments for each class session.  Each class date reflects the readings we will be discussing on that date in the syllabus outline or as communicated through your email and NYU Classes. Prior to that class, you must read any assigned materials for that session. You must read the assigned readings and participate fully in class.
  • All assignments must be submitted prior to the start of class on the date due.  Assignments must be submitted through NYU Classes.  Missed assignments will lower the student’s grade based on the percentage of the grade allocable to it. Late assignments are permitted only with notice to, and permission from, the instructor.  Assignments and readings must be executed and are due on the dates indicated.  The assignment will be graded for content, grammar, and clarity.  
  • No work for this course may be all or part of assignments prepared for or used in previous or current courses.
  • Students are expected to attend all classes. Excused absences are granted in cases of documented serious illness, family emergency, religious observance, or civic obligation.  In the case of religious observance or civic obligation, this should be reported in advance.  Unexcused absences from sessions may have a negative impact on a student’s final grade.  Students are responsible for assignments given during any absence. Each unexcused absence may result in a student’s grade being lowered by a fraction of a grade (+/-).  A student who has three unexcused absences may earn a Fail grade.

Assessment Strategy

Grading will be based on class participation and three assignments where students apply recently learned material to algorithmic trading strategies.  Grading will assess how student knowledge of trading strategies compares with the current real-world best practices.    

This includes how data is utilized to invoke trading triggers, optimize routing, and risk checks.

Class Grading:

  • Homework assignments: 3 assignments, each comprising 25% of the overall grade    
  • In-class participation – 25%

Late assignments will drop 1 letter increment grade per day late ( ex: B to B-).    

MODULE 1 – Fundamentals of Trading:      Course overview, components of systematic trading    

  • Start with high-level Algo Trading overview while identifying most significant inferences to optimize returns 
  • Comparison of various market participants, their goals and execution patterns
  • How markets transact: the order book
  • Comparison of various order types, fundamental tradeoff between passive and aggressive orders
    • Extra focus on IEX new order types:
    • D-Limit
    • D-Peg
    • P-Peg
    • C-Peg
  • How to set up ‘triggers’ to improve algo trading returns
  • optimize MBO (Market-By-Order) & MBP (Market-By-Price) for exchange feeds.

 Reference CME offering to their subscribers: https://www.cmegroup.com/education/market-by-order-mbo.html

  • Cost-driven algorithms & implementation shortfall
  • Highlight emerging use of timely triggers for Algo Trading
  • Highlight increased attention to market liquidity to maximize Algo Trading
  • Highlight why ML/AI and choice of infrastructure are increasing their significance for Algo Trading

MODULE 2 – Canonical Predictive Signals: Factor Investing     

  • Cross-Sectional factor portfolio construction
  • Value: The original quant signal. History and evolution, comparing definitions across asset classes
  • Momentum: Comparison between relative value and time-series strategies
  • Carry: A risk premia? Performance in macro asset classes
  • Defensive: The “other half” of Warren Buffett’s alpha

HOMEWORK:

Read a QuantInsti Doc; then detail areas in end-end order flow architecture that are most significant for algo trading optimizations

MODULE 3 – Market Microstructure    

  • Transaction costs- decomposition, comparison of models and measures
  • Optimal order placement, aggression vs passive strategies, order book dynamics
  • Hidden orders, Layering, slicing

MODULE 4 – Systematic Volatility Trading    

  • Introduction to option contracts
  • Introduction to Crypto Trading
    • Exchanges
    • Smart Order Routers
    • Role of Liquidity for Disaggregated & Global Market Data
  • Why does the volatility risk premium exist?
  • Considerations for constructing a systematic volatility strategy
  • Can you actively time volatility trades?

MODULE 5 -Intro to Statistical Analysis and Machine Learning and AI for Modeling Markets for Price Prediction    

  • Linear modeling
  • Extension to Cointegration
  • Dickey-Fuller
  • The state-measure problem & univariate      Kalman filter
  • Multivariable Kalman Filtering with Control

HOMEWORK:

  • Reading “Ex-Citadel Quants are Gunning for the $3.8 Trillion Muni Market”.
  • Identify and write report on a tradeable market with demonstrated low current competition from established systematic players, describe how to get 10+ years of transaction data and potential strategies to run.

MODULE 6 – Machine Learning and Alternative Data    

  • Defining Machine Learning, Deep Learning, Reinforcement Learning, Anomaly Engines, LSTM Recurrent Neural Networks
  • Key applications to finance and algorithmic trading
  • Horse race between linear, penalized and tree models for price fitting
  • Alternative data
  • Neural networks – Feed Froward vs Recurrent

     MODULE 7 (2-weeks) – Advanced ML/AI: 

  • math behind neural networks and inferences one can obtain from ML/AI for Algo Trading
    •                
  • Latest Best Practices – Analytics 
    • Pricing projections
    • Historical and Real Time Market Data
    • Market Data ‘Capture Ratio’
    • Order ‘Hit Rates’ and Algo Trading Hit Rates
    • Market Data Tick Data analytics
    • News / Media Sentiment Analytics (RavenPack demo)
  • Subsets of Python, Tensor Flow programming relevant for ML/AL
    • How quants can quickly develop ML within few days
    • Tensor Flow 2.0 API’s – tailored for non-expert Developers
  • Most Relevant ML Models for Algo Trading
    • Neural Networks, especially LSTM Recurrent Neural Networks (RNN)
    • Decision Trees and Random Forests
    • Reinforcement Learning
    • Anomaly Engines
  • Infrastructure & Application Architectures to optimize Algo Trading
    • Accelerated hardware
      • Role of FPGA’s in immediately acting on triggers for competitive advantage
    • ROI projections for new or upgraded Architectures for Algo Trading
  • Rise of Auto AI and ML.AI – Ops
    • Impacts on Algo Traders, quants, and data scientists
    • How to take advantage of this trend
    • Impact on Time-2-Market for new and updated strategies
  • BlockChain and AI – opportunities with emerging technologies for Crypto, Futures, Fixed Income, FX Algo Trading
  • ML/AI to project Stable Coin prices and volatility
  • ML/AI for positive returns even during sharply declining asset prices

HOMEWORK:

Ted will demo a Python / Tensor Flow Reinforcement ML model      to “learn” over time what specific actions (Buy, Hold, Sell) optimize returns per designed market data “rolling windows” (circular FIFO).  Students will be tasked to examine output, infer from output, rate the model, and determine next steps that may enable it to be promoted to Prod

Prerequisites – (for most, expecting basic to intermediate expertise, unless noted)

  • Baseline familiarity with trading and markets, eg knowledge of a few example predictive signals and understanding of how to execute a trade.
  • Students without a baseline market background must read the following open-source documents before starting the class:
  • Investing with Style (JOIM, Asness 2015)
  • Securities Trading: Principles and Procedures: Chapters 2, 4, 6, 14, 15 (NYU, Hasbrouck)
  • Programming knowledge / expertise is helpful but not required
  • R programming (nice to have. Will use basics that one can learn in 1-2 hours), then extend upon that in classes for class hands-on Machine Learning
  • Python (very basic will be fine – a 2 hour reading assignment will be arranged for beginners). We will use a text written for traders with zero programming experience that quickly trains them how to use small set of Python for creating trading algos.    
  • Example recommended background: at least 2 years working with, on, or directing data-driven trading decisions/applications as Quant (preferred), Developer, Trader, CTO, CIO, CEO, SA, Risk manager, network admin/engineer, Architect, manager, vendor or consultant providing algo trading technology to Wall Street IT

FPGA Triggers for Ultra Low Latency Trading

December 2022

Currently I consult for Magmio.com, a leading FPGA development firm, touting value of C++/HLS development for ULL with Magmio API’s.

https://www.magmio.com/news/91-the-new-magmio-product-video  –click on ‘High-frequency trading acceleration with…

HLS

FPGA IP Cores in blue; Access & set up Triggers via Magmio C++/HLS API’s

https://www.youtube.com/watch?v=4Wklh0XS5i0  — click skip adds to view *** Optimizing Trading Strategies for FPGAs in C/C++ | Milan Dvorak – in detail describes C++ coding modifications, that lead to 15 ns and why.  I strongly recommend viewing this video.  Decreasing variable sizes to what is absolutely necessary and using a reciprocal for multiplication instead of division, lead to the significant reduction from 224 ns to 15 ns.

micro price

Key indicators leading to ULL trading successes:

Capture Ratio – % of all relevant Symbol quotes from last trade to exact point your app creates an order.  For Best Execution, to fill trades at best current price, Sell Side execution brokers should be at least 80%, while Prop Trading firms should be at least 90%.

Fill Rate – % of your order quantities being executed.  In out NYU ULL class, Our ‘tuned’ LSTM Recurrent Neural Network Machine Learning (ML) model accurately projected Fill Rates +/- 4%.  Utilizing same input data, our Decision Tree Machine Learning model identified what factors determined higher fill rates, such as specific venues to route to, specific orders by size and type (ML-enhanced SOR).

Add another key indicator that Magmio optimizes – ‘Algo-Trading Hit Rate’ – defined as follows:

  • How often are your real time analytics inferences or triggers timely hitting your algo trading strategies at most opportune times – to BEAT YOUR COMPETITORS?  Analytics inferences and triggers can ne derived from ULL ML/AI in FPGA’s or non ML/AL – simply deriving triggers from live and historical data.
  • Way below I list many triggers that can lead to high algp-trading hit rates.

Common HFT-Trigger: micro-price

However, for a quick Magmio enhanced example let’s focus on a common HFT trigger — ‘microprice’– actually a weighted mid-price.  Microprice is defined by formula:

 (Pa × Qb + Pb × Qa )/(Qb + Qa ),

 where Pa is ask price, Pb is bid price, Qa is ask quantity, and Qb is bid quantity. 

https://www.magmio.com/white-papers  click on ‘Acceleration of trading algorithms with MAGMIO’ for a quick review of how microprice calculations, with C++/HSL decreased from 224 ns to 15 ns .

Triggers – 100 ns for Trigger based strategies

Consider then many other triggers that can be created via C++/HLS running as FPGA in a FPGA card in an over-clocked server.  Then forward them to your algo strategy in approximately 100 ns.  Triggers can include following:

  1. Specific bid/ask price spreads
  2. Specific microprice levels
  3. Immediate action on momentum-based analytics (as we learned in ULL class – RSI, MACD, Fast Quant)
  4. Specific variances in real time vs historical volumes for specific symbols at precise times in the trading day  — ex: 9:45:00 AM.  Volume – Participation algo model may be set up to trade larger volumes in a symbol, index, future option, ETF, FX, T-Bills, etc ..  as volume rates increase, subsequent to real time risk analytics
  5. Variances or anomalies in Pairs Trading
  6. ‘Density’ signals – ex: ML/AI Anomaly Engine identifies specific symbol # of quotes in  rolling windows 100 ms, that per prior analysis indicates certain actions to optimize trading.
  7. LSTM Recurrent Neural Network predicts ‘density’ signal based on deep ML analysis (recent data strongly correlates with prior)
  8. Our Decision Tree or Random Forest ML identifies that Venue A, and definitely not Venues B or C, for best Fill Rates; hence triggers can optimize an SOR
  9. A trigger on a precise VIX level or a specific rapid change to VIX –ex: calculus 1st or2nd derivative VIX rate where prior analysis points to specific trading to take advantage of volatility.
    • Crypto exchanges & Traders: After determining VIX & BitCoin correlations, a trigger on a precise VIX level or a specific rapid change to VIX –ex: calculus 1st or2nd derivative VIX rate where prior analysis points to specific trading to take advantage of volatility.
  10. Set special triggers on market data
  11. Set special triggers on alternate data -ex: http://RavenPack.com or – https://www.cloudquant.com/products/

We can add many more; these are just samples.

Key point is:

Take advantage of Magmio C/C++/HLS API accessing FPGA IP Cores to identify triggers to act on in 100 ns

Other key ULL aspects of MAGMIO include:

  • CME Tick-2-Trade < 300 ns
  • Book Builds < 350 ns
  • Test framework before you decide to buy; this is via software simulator that evaluates C++/ HLS compiler
  • A partner of Cisco; work to extend Cisco/ExaBlaze Smart NIC’s – ex: NEXUS V9P-3 FPGA SmartNIC Adapter
    • Pre-allocate buffers of FIX order messages ready in FPGA
  • Set up Level 4 market data in FPGA to determine your places all book levels (are you first in line for best prices?)

Whether your firm is HFT, Prop Trading, Market Making, Quant Hedge, Sell Side Execution Broker, Buy Side, Crypto Exchange – Broker -or Liquidity Aggregator or SOR, 100% dedicated for BestEx for clients, Magmio.com solutions can catapult you past your competition.

To speed up understanding how a Magmio solution can best work for your trading, please contact me at ai-fit@ai-fit.org

Best regards,

Ted Hruzd

CEO of AI-Fit LLC & a Magmio partner

AI-Fit Optimizes Bitcoin Portfolio via Machine Learning

AI Fit successfully back-tested Machine Learning (ML) inferences attained from gamut of financial, economic, and trading metrics.

Back-testing with ML inferences gained 12.09% over 72 hours (May 9-11).  Portfolio that did not trade over this period lost 16.22%.  Comparing the 2 portfolios, the one utilizing ML inferences exceeded the non-trading portfolio by 33.79%.

Below are charts for reference.

AI Fit is under NDA with a confidential Data provider’s new product.  However, AI Fit can set up access to this data for pilots and also provide specific ML training to generate inferences. Machine Learning and anomaly engines based on Mahalanobis Distance vectors were use for inferences.

*** Please email ai-fit@ai-fit.org if you have interest in pursuing this, or simply or more details.

Ted Hruzd, AI-Fit LLC Founder and CEO

https://www.barrons.com/articles/bitcoin-ethereum-crypto-prices-today-51657541722?mod=hp_DAY_8

AI-Fit LLC Further Expands Digital Asset / Crypto Offerings

May 31, 2022 — AI-Fit LLC is expanding via:

1 – Low Latency and even Ultra Low (ULL) Latency infrastructure and application architectures for timely, very up-2-date crypto Smart Order Routers (SOR). With crypto so fragmented, more and faster market data updates ASAP may significantly address Best Ex and Transaction Cost Analytics (TCA). Furthermore, timely breath of market data can mitigate impacts of crypto volatility, as we experienced May 9-12 (Terra – LUNA Black Swan event).

AI-Fit has already approached few crypto exchanges with its FPGA partner for ULL market data and risk checks via half length PCIe FPFA cards in over-clocked servers

2 – ML/AI software to optimize crypto portfolio’s – both short and long term, even ones in beginning stages of High Frequency Trading (HFT) -via short term trading signals

3 – ML/AI software for risk checks and alerts for stable coin providers to prevent or mitigate stable coin algorithmic trading from failing or degrading.

All above are Development phases.

To learn more and to assess consulting engagements and POC’s, please send e-mail to ai-fit@ai-fit.org

Ted Hruzd, CEO and Founder – AI-Fit LLC

View at Medium.com

AI Fit LLC Touts Digital Asset Consulting

AI Fit LLC aggressively champions nascent Digital Asset industry, providing following consulting:

Designing and/or Optimizing Digital Asset Exchanges / Brokers for competetive advantages via practical implementation of emerging technologies.

Integrating accelerated compute (ex: FPGA aggregation of partial crypto order books as NIC cards in over-clocked servers)

Ultra Low Latency (ULL) ML/AI for custom alpha seeking strategies for Digital Assets, portfolio optimizations, even algo trading, and combining crypto with traditional finacial assets such as equities, derivatives, commodities, T-Bills, etc..

Site Reliability Engineering (SRE) frameworks to ensure Deterministic processing and High Availability. Much can be created with Python / Tensor Flow – either as part of AWS Sage Maker, or simply Jupyter.

For more information, please email: ai-fit@ai-fit.org

Exect more details over next several days on http://ai-fit.org

NYU ULL Architectures For Electronic Trading – course update

ULL (Ultra Low Latency) Architectures for Electronic Trading
NYU SPS – Online, Adjunct Instructor: Ted Hruzd 
SPRING-2022 GLOBAL ON-LINE Apr1—May21

3 modules, 3 assignments, 3 hour weekly Saturday ZOOM sessions plus collaboration with BYU BrightSpace and WhatsApp with my responses within 24 hours

On-Line Registration – https://www.sps.nyu.edu/professional-pathways/certificates/finance/fintech/FINA1-CE9515-ull-ultra-low-latency-architectures-for-electronic-trading.html

Course Description

Develop advanced skills in architecting electronic trading (ET) and market data applications for ultra-low latency (ULL), for competitive advantage, and for positive ROI.  At end of course, one will have developed expertise in end-end architecture of ET applications and infrastructure, including:

  • roles of FPGA’s, GPU’s, IPU’s over-clocked servers, and high-end Intel and AM EPYC Rome servers
  • hybrid over-clocked servers/FPGA
  • what is possible with 100% or near 100% FPGA architecture
  • ROI analysis
  • new chips, highly parallel processors with ULL memories – for ULL analytics, risk checks, ML/AI from GraphCore IPU’s and Blaize
  • Examine what aspects of ULL architectures are tactically and strategically applicable to crypto trading
  • Speed up of ingesting and acting on crypto market data will be a priority, along with optimizing Mkt Data à OMS à Trade execution
  • Crypto Tick-2-Trade, Market Data ‘Capture-Ratio’ and other metrics to guide exchanges & traders to competitive advantage
  • Linux kernel and NIC kernel bypass tuning,
  • options available for architecting ULL networks from infrastructure and application perspectives
  • network performance analysis via WireShark
  • Machine Learning (ML), AI, Neural Networks including LSTM (Long Short Term Memory) Recurrent Neural Networks via Python / Tensor Flow, Decision Trees, Random Forests, Anomaly Detection Engines, Reinforcement Learning Engines,  Pattern Recognition, Classification Models with R – Studio and ML models include alpha seeking, smart order routing, fill rate predictions. Even if you have little or no experience in developing ML, you will learn subsets of R, Python, and Tensor Flow 2.0, to develop your own upon course completion
  • Examine subset of plethora of open source Crypto ML/AI models, customize some, and assess which are of most accurate for price, trade volume, latency, PnL projections along with Anomaly Engines to identify unusual trading patters for preemptive alerts – SRE related
  • We will use CloudQuant’s CQ-AI Tool for ML/AI
  • New LL and ULL application designs, including best practices in use of micro services
  • Best practices from promising start-ups that address enterprise scalability, including LL Software Defined Infrastructures (SDI) and a multi-cluster “OS” for ULL analytics and Ethernet PCIE-FPGA (and GPU) protocol, NIC, Switch speedup vendor GigaIO
  • Best practices in FPGA development via updated libraries and software tools from Xilinx
  • Intro to Block Chain, exploring how to scales Block Chain for financial apps

Course Structure

Instructor will provide numerous documents and links to enable class to be up-to-date with ULL Electronic Trading best practices; during online sessions, instructor will conduct interactive training to track class progress and also include presentations and discussions.  The primary course materials will be PowerPoints created by the instructors. All assignments will be targeting to apply what the class has recently learned.

Learning Outcomes

By the end of this course, students will be able to:    

 Evaluate gamut of ULL Electronic Trading Architecture options and strategies  to   choose the architectures most applicable to evolving trading goals.

● Design and contrast  optimal  architectures across different asset classes and time horizons.    

● Project Return on Investment (ROI)

● Utilize  Machine Learning and AI technologies to accurately project trading patterns such as fill rates and latencies

IDEAL For

  • Strategic infrastructure and application architects, engineers, and product and project managers
  • System administrators, developers, production support, and QA analysts with intermediate skills in Linux, servers, networks, bash, FIX, and market data protocols

Communication Policy

You are expected to regularly check email and NYU-Classes multiple times per week for announcements concerning assignments, exam dates, class changes or cancellations, and other important information. NYU Classes course-mail supports student privacy and FERPA guidelines. The instructor will communicate with students through NYU Classes course-mail and will typically respond to any questions, comments, or concerns within 24 hours.

Course Expectations

Course expectations include the following:

  • The course will make use of all aspects of NYU Classes to communicate course content, assignment, provide additional resources, news articles, and assign and collect homework. Please familiarize yourself with the website if you have not already.
  • Thorough reading and analysis of all reading assignments for each class session.  Each class date reflects the readings we will be discussing on that date in the syllabus outline or as communicated through your email and NYU Classes. Prior to that class, you must read any assigned materials for that session. You must read the assigned readings and participate fully in class.
  • All assignments must be submitted prior to the start of class on the date due.  Assignments must be submitted through NYU Classes.  Missed assignments will lower the student’s grade based on the percentage of the grade allocable to it. Late assignments are permitted only with notice to, and permission from, the instructor.  Assignments and readings must be executed and are due on the dates indicated.  The assignment will be graded for content, grammar, and clarity.  
  • No work for this course may be all or part of assignments prepared for or used in previous or current courses.
  • Students are expected to attend all classes. Excused absences are granted in cases of documented serious illness, family emergency, religious observance, or civic obligation.  In the case of religious observance or civic obligation, this should be reported in advance.  Unexcused absences from sessions may have a negative impact on a student’s final grade.  Students are responsible for assignments given during any absence. Each unexcused absence may result in a student’s grade being lowered by a fraction of a grade (+/-).  A student who has three unexcused absences may earn a Fail grade.

Assessment Strategy

Grading will be based on class participation and 3 assignments where students apply      recently learned material to ULL Electronic Trading. Grading will assess how student knowledge of ULL Electronic Trading compares with the current real-world best practices.

MODULES   

MODULE-1: Hardware/Application Accelerated Architectures

  • Tick-2-Trade applications with single digit micro seconds, even with sub 1 micro seconds
  • How to architect for deterministic latencies even in times of volume spikes
  • Why ‘Meta-Speed’ (info how to used speed) is more important than pure speed
  • Proper use of multi-layer ULL switches, FPGA’s, GPU’s, MicroWave wireless RF network technologies, short-wave for trading signals, & over-clocked servers
  • Options available with FPGA’s integrated in multi-layer ULL switches (ex: Market Data normalization & Book Builds)
  • Best practices in fanning out raw market data to pool of FPGA’s for scaling
  • Assess advantages among the leading FPGA vendors Intel/Altera and Xilinx
    • Examine each for both trading & analytics
    • Assess each vendor’s capabilities for FPGA applications based on OpenCL, C++ using FPGA libraries
    • Learn best practices in FPGA architectures for market data, order routing, Machine Learning & AI
    • Learn AI Engine 2/from memory optimizations on FPGA’s
  • NVIDIA DGX-2 GPU processors role for precision analytics
  • ULL Fabrics for Seamless Messaging CPU 2/from FPGA’s, GPU’s, NVMe
  • OpenCAPI for CPU 2/from FPGA’s
  • Compare FPGA’s vs GPU’s and also vs GraphCores IPU’s and Blaize processors  for ML Deep Learning
  • Explore relevancy to ULL ET and ML of new “Processor in Memory” or PIM architectures from Intel and NVIDIA (speed up data ingestion to CPU & GPU processing cycles)
  • Alternate role Data Direct Networks (DDN) for above data/processing speedups for HPC, HFT, AI
  • Accelerations available with PCIe4/5
  • Cache coherency between CPU’s and FPGA’s via CXL protocol
  • Market Data Feed Handlers in FPGA; Order Books in Intel Cores or FPGA’s – achieve 20 x’s parallelization for full depth books?
  • Integration of FPGA’s and Intel cores via high speed caches, FPGA’s and cores on same die (Intel-Altera and Xilinx —  current and upcoming enhancements)
  • FIX engines in FPGA based NIC’s and appliances
  • Multi core, high speed cache Intel based servers + Intel’s new MESH socket interconnects for ULL and deterministic memory I/O
  • Leading FPGA based NIC(s) – from SolarFlare, Mellanox, ExaBlaze, Enyx
  • SolarFlare Direct TCP
  • Layer 1 and multi layer network switches (Arista/Metamako, ExaBlaze)
  • ExaBlaze FDK (FPGA Developer Kit) one can use within FPGA NICs within Servers, FDK on ExaBlaze Fusion switches that offer 4 lane PCIe breakout cable
  • Fundamentals of FPGA design and programming
  • OpenCL and C++ for ULL programming best practices & FPGA programming
  • How to create / automate FPGA SRE via FPGA vendor tools
  • How to create / automate Hybrid Over-Clocked Servers-FPGA SRE
  • Intel’s optimizing C++ with deep vectors AVX-512, Thread Building blocks (TBB), and Intel’s new AVX 512 VNNI for Neural Network speedups
  • Intel C++ best practice design pattern of internally vectorize code inside a loop or interaction, and externally parallelize the code vi pragma’s and specific code
  • How to optimize app code performance with hardware server config (NUMA)
  • Prospects for Application Specific Integrated Circuits (ASICs) supplanting FPGA’s in future years for most latency sensitive applications
  • Best Practices for Prop Traders, Market Makers,  Hedge Funds, & High Freq Traders (HFT)
  • Automated ULL software
  • Wide range of markets
  • Role of ML & AI
  • Direct Market Access (DMA) architectures
  • Risk Mgt
  • Colo Configurations
  • Resiliency & High Availability, DR
  • High Performance Compute Clusters
  • News Sentiment Analytics (ex: RavenPack)
  • Best Practices for Algo Trading including Crypto
    • Use of Micro Services instead of legacy DLL C++ or JVM’s
    • Micro Services – Chronicle Software
      • FIX engine
      • OMS
      • Adaptations for Crypto trading, with focus on market data, client connectivity, and trade execution flow + Transaction Cost Analytics
    • SRE for algo trading and also Crypto – using Mahalanobis Distance Vector Anomaly Engine for preemptive SRE alerts pertaining to
      • Security
      • Application / Infrastructure anomalies
      • Unusual trading patterns
      • Architecting ULL Networks + how to diagnose/resolve network problems vi Corvil and Wireshark
  • ULL network configuration best practices
  • Spine-Leaf architectures
  • Multicast best practices
  • Examine ULL Multicast architectures available from lightfleet.com; determine applicability for ULL networks and how to project resulting performance (latency) improvements
  • Network protocols including TCP, UD, BRP, OSPF, LLDP
  • Remote access to a Corvil appliance for deep dive in network and transaction diagnostics
  • How to utilize Corvil decoders for FIX protocol, LBM messaging, and market data feeds
  • Wireshark – to supplement Corvil analytics with deep dive network diagnostics to identify RCA of latencies
  • Best practices in architecting Corvil’s new App Agent software for software processing insights
  • ULL messaging middleware (29 West LBM/UME) and 60 East Tech AMPS
  • PTP architectures for large market data / trading application infrastructures
  • Network appliances – detailed timings/analytics – network, market data, and order routing – Corvil, Instrumentix, SolarCapture
  • ULL Networks, including options for integrating multi-layer switches, FPGA appliances, new approaches to ULL multi-cast market data distribution
  • ULL storage networks, including NVMeOF fabrics, Intel Optane, 3D XPoint, EverSpin new MRAM deterministic memory + persistent storage options.  Special focus on DDN and Pure Storage
  • How ULL deterministic memory can lower end-2-end latencies for subset of application flows, especially those based on ULL analytics
  • Correlation of ULL networks and fill rates
  • Tools (some free, several with RH Linux) to attain network performance optimization insights

HOMEWORK:

Ted will present 3 Visio ULL architectures of end-end trading systems and ask class to critique all infrastructure components individually and in the aggregate, along with 1st steps to start ROI analysis.  In addition, students will be required to enhance the architecture they chose as the “best”, or develop their own – End-2-End from CoLo raw Market Data à FIX Engines / OMS à SOR à Exchange Connectivity

MODULE-2: Linux kernel tuning + NIC kernel bypass technologies and configurations

  • Detail benefits of Red Hat Linux Network-Latency profile (ex favors performance over power savings)
  • Linux 7.3/4/5/6 and Linux 8 kernel and NIC tuning for kernel bypass –
  • Quick sum: major differences Linux 6 vs latest Linux 7.x and 8
  • Identify niche kernel tuning for extremely high message processing
  • Kernel bypass technologies including RDMA and LDMA
  • Infiniband (IB) and RDMA over Ethernet (RoCE) protocols for ULL
  • Identify additional tuning for ultimate ULL kernel and micro services frameworks
  • How to validate tuned OS via load tests and commands such as sysctl -a
  • SolarFlare (SF) latency benefits of Open OnLoad kernel bypass and how to further configure/ tune subsequent to analysis via sfnettest, sfjitter, SF Dump, jhickup, and performance load tests
  • SF ef_vi, TCP Direct and role on “raw” Tick-2-Trade (T2T) times of under 100 ns via OnLoad + LDA-Tech LightFleet FPGA appliance + Penguine servers (STAC T0 benchmark) and other potential options
  • Mellanox VMA kernel bypass, 40Gig E NICs, up to 100 Gig switches, how to integrate  with IB and Exegy Market Data appliance
  •  

HOMEWORK:

Ted will pose several technical questions pertaining to kernel tuning and bypass for class to answer.

MODULE-3: Machine Leaning (ML) & Artificial Intelligence (AI) for both ULL Equities, Dervatives, Futures, FX, and Crypto Electronic Trading NEW: use CQ-AI for ML/AI in Python/Tensor Flow + CQ API’s (only basic Python skills require .. Ted to provide dos in advance to inexperienced Python developers

  • Math behind multiple ML models, with deep dive into Neural Networks (NN), especially LSTM Recurrent NN, Auto Encoding NN for Anomaly Detection Engines
    • Will learn the subset of Python & Tensor Flow code to create a RNN that predicts future stock prices, fill rates, and even trading revenue; then integrate a Decision Tree model in R utilizing same input data to identify what factors may be “tuned” to render more accurate projections; also we will learn how to use the ML insights to identify options to improve fill rates / increase revenues
    • Explore how Reinforcement Learning ML can integrate with near real time NN for competitive advantages via ULL insights to alpha, risk, routes (SOR), TCA, compliance) 
  • ML / NN for seeking alpha via basic R programming + specific ML libraries
  • Specific ML models using Reinforcement Learning relevant to quants trading
  • Supervised vs unsupervised ML
  • Synergies with Data Mining
  • Optimal Architectures for ML: Infrastructure, Software
  • Role of SME in ML & AI
  • Determining what model to choose
  • How to interpret results
  • How to verify models
  • Tensor Flow for parallelization of ML models
  • How to tune, tweak models for greater accuracy and predictive value
  • ML and Event Stream processing, real time analytics for seeking alpha (trade opportunities)
  • Definition of Deep Learning (DL)
  • DL Models and use cases
  • Role that an ML/AI “Anomaly Engine” can become a near real time tool for proactive and preemptive alert of unusual (ex: never seen before trading activity).  Ultimate benefit of Anomaly Engine (subsequent to rigorous UAT/certification) may be to mitigate and even avert trading disruptions (per automation), thus positively impacting trading revenues / profits
  • Define AI; provide use cases
  • ML and DL as inputs to AI
  • Time-2-Market & ROI projections for ML / AI initiatives end-2-end
  • Best Practices in AI in our industry
  • Options to integrate ML/AI alpha seeking capabilities in CoLo environments
  • How to decrease Total Cost of Ownership (TCO) in CoLo architectures
  • In Class (Hands-On)
    • RStudio & H20
    • Portfolio analysis via Classification Model using R/H20
    • Predictive analysis of new trading strategies via Decision Trees (R or Python)
    • Pattern Recognition of Trading Patterns to provide am Alpha service for Buy-Side
  • Blockchain – more depth than Module 1
  • Blockchain scaling limitations
  • Assess CFTC BlockChain plans for near real time clearing (then extend the BlockChain for low volume trading, ultimately to higher volume trading of commodities, derivatives, options)
  • How to integrate real time ML and AI with BlockChain architectures
  • Learn a rapidly pervasive BlockChain related protocol “Smart Contracts” that may largely solve BlockChain scaling limittions
  • Assess Ant Financial Wealth Mgt BlockChain plans (examine its use of Smart Contracts)
  • ML/AI op optimize Crypto Currency trading
  • Reinforcement Learning model to optimize BitCoin trading portfolio

HOMEWORK:

  • Ted will provide several “how-to” docs with all code / procedures to run to create multiple ML models. Students will run at least 1 of these models and respond with what predictive insights they provide.  ** NO Coding will be required.  But there will be one simple ML model where one will have option to alter or add code to improve accuracy or provide more meaningful insights (extra credit)

Comment regarding Low Latency for Crypto

Class will adapt to students demands regarding crypto trading, as this and other digital assets are accelerating trading, in large part due to increased institutional trading.  This has resulted in many new ex traditional Wall Street IT hires into these spaces.  This class does cover crypto trading from 8 aspects – listed below.  To extent possible we plan to cover as much crypto and digital assets as we can while ensuring we cover all core requisite ULL aspects – (1) accelerated compute & networks; (2) Linux kernel tuning and NIC kernel bypass; AI/ML for ULL Electronic Trading.

Expect 4 weeks for module 1, 1 week for Module 2, 3 weeks for Module 3.

Crypto / Digital Assets 8 Aspects:

  1. Specific Low Latency architectures for all aspects of crypto trading – Client connectivity à Market Data à OMS à Trade Execution à Analytics  
  2. How to optimize Tick-2-Trade and Market Data ‘Capture Ratio’ to increase trade fills
  3. ML/AI + SRE regarding price, trade, latency, PnL projections, and trade pattern anomalies
  4. Use of academic ML/AI Tool CQ-AI
  5. Chronicle Software Micro Services (C++ or Java) for Low Latency Software for trading
  6. Design of an Anomaly Engine to automate SRE for Crypto trading
  7. Optimize BlockChain, Software Defined Networks, and Smart Contracts to speed up crypto trading End-2-End across DeFi architecture
  8. ML/AI Reinforcement Learning to optimize crypto trading results (PnL)

Course Logistics

References:

More to follow during classes as we cover some emerging but practical technologies as they occur.

2/15/2022

is natural enough to wonder what the CPU and GPU designer will do with what they have acquired. Not only the FPGA programmable logic that is at the heart of Xilinx devices, but also with the hard blocks of transistors that have become common on all FPGA hybrids, things such as DSP engines, AI accelerators, memory controllers, I/O controllers, and other kinds of interconnect SerDes.

Vitis software stack, is what make Xilinx worth more above and beyond the value of acquiring a company that has revenue and profit streams in other sectors with little overlap with the core AMD business. It immediately translates into a wider total addressable market that AMD chief executive officer Lisa Su now pegs at $135 billion, which is quite a bit larger than the $79 billion addressable market Su said that AMD had six months before the Xilinx deal was announced.

For instance, imagine a datacenter-scale Infinity Fabric switch fabric based on Xilinx SerDes and a packet processing engine co-created by the converged AMD and Xilinx teams? Imagine something akin to the memory area network that IBM has created for its Power10 processors, but running across racks and racks and rows and rows of Epyc CPUs and Instinct CPU accelerators. Imagine not caring at all about Ethernet or InfiniBand, except as entry points into the cluster. How cool would that be?

Take a look at a Xilinx FPGA hybrid device in the “Everest” generation of the Versal family:

Those AI matrix engines for machine learning inference processing and DSP engines for various kinds of signal processing are hard blocks that used to be implemented in programmable logic – what Xilinx has been calling adaptable engines in its Versal line – but because of space, thermal, and performance issues, it was far more efficient to implement these blocks as an ASIC and use a high-speed interconnect on the chip to connect all of these blocks to each other and the programmable logic.

Every one of those hard blocks, including the Arm cores, is available to AMD’s engineers to play with as they contemplate how to architect compute engines, systems, and clusters. And every computing device AMD designs, whether it is a monolithic chip or a collection of chiplets in a package, can have a smear of programmable logic added as AMD sees fit.

So what will AMD do with Xilinx, aside from running the business largely unchanged? It has not said yet, other than to say that AMD was already licensing some Xilinx IP before the deal went down and that whatever that IP is – and don’t assume it was programmable logic – is set to appear in an AMD chip sometime before the end of next year.

2/16/2022

2/17/2022

Intel 3 process (what we might have in the past called a 5 nanometer process) is coming along so well in the labs that it is being moved forward a year from 2025, with the speculated “Diamond Rapids” Xeon SP v7 processor, to the now officially acknowledged “Granite Rapids” Xeon SP v6 CPUs due in 2024.

official Xeon server chip roadmap as it stands today:

It is not clear what happened to the Intel 4 process (what we would have called a rev on the 7 nanometer process), but clearly if Intel is going to assert undeniable and unquestioned “transistor performance per watt leadership” by 2025, as it has promised, it needs to leapfrog its own process roadmap at Intel Foundry Services to catch up with what AMD and the Arm collective will be doing with transistor etching techniques from Taiwan Semiconductor Manufacturing Co. It is arguable that Intel 3 will not be able to keep pace, but jumping once process ahead one year ahead is a step in the right direction

“Ice Lake” Xeon SP v2 announced last year had a 40-core Ultra Core Count variant that looks like a Sapphire Rapids layout with a 10-core compute block, but all laid out on one monolithic chip. Take a look:

HOW #AI CAN LEAD NFL PASS RUSHERS – UPDATE #1

DE-college

In prior  AI Fitness model https://homerunfitness.wordpress.com/2020/03/12/how-ai-can-lead-nfl-pass-rushers/, we used an AI Anomaly Engine to guide one to optimize training results.  This post uses another relevant AL model – Reinforcement Learning or RL.  In below graph, simulated data was used with logic to generate greater rewards when one would choose “Medium” (2 on Right Y axis) or “Heavy” (3 on Right Y axis) workouts per 5 days awakening heart rates in 40’s and low 50’s per minute.  “Light” is 1 on Right Y axis.  The target is to increate Max VO2 or max oxygen utilization capacity – closely correlated with increase in lactate threshold, which is closely correlated with repeated short bursts of energy – 5-15 seconds with 30 seconds or less rest.  That relates to Defensive Linemen & Edge Rushers ability to play at near peak levels in 4th quarter.  Prior post elaborates.

RL-Apr-14

A Key point of this post: less input data to an RL AL model can also fairly predict peak performance training choices when compared to the Anomaly AI model.  Hence, takeaway – low on inputs, RL AI models may suffice.

 While training and utilizing this approach, the athlete will input workout results.  The RL model will ‘learn from past predictions and results and with additional data points project more accurately.

 Both AI models used simulated data to prove models work well.  Let’s get to use real data.  How?

 *** contact me tedhruzd@gmail.com.  As a data scientist, lifetime athlete, ACSM personal trainer with 12 years experience, I’ll use what is available in AI to optimize multiple sports & different positions optimally and in less time

MORE DETAIS — Update regarding AI FIT:

 

  1. I developed software for a “Reinforcement Learning” (RL) model for quick way to guide training when the inputs are only a few, instead of the 17 inputs I had in the Anomaly Engine.  The inputs may include just Heart rate, BP, respiration rate at awakening (call them ‘vitals’) with several specific training sessions the athlete can choose for that day (even a day of rest).  I have software function with rules pointing to which training programs athlete should choose based on exercise physiology and any empirical evidence.  But the athlete will have Max VO2 and Lactate Threshold recorded to validate training choices and the RL model will adapt and learn – this is core Machine Learning at its best!.  Individuals vary (ex: % fast twitch vs slow twitch muscle fibers percentages).  The broad software functions (rules) will not work exactly same with all athletes.  Hence, a RL model can optimize training programs for individuals.  Then the Anomaly Engine acting on this data can further validate RL model.  Much math and multi variable correlations are parts of  these models.  Only I, the Data Scientist, needs meticulously interpret the math output and explain why to all.

 

  1. Cheap way for these models is for the athlete or trainer record the data. More involved is to automatically input wearables stats to the models that will run on my computers.  I will research how to quickly set that up.

 

  1. I can add more events with synthetic data points  to the Anomaly Engine.  Also instead of Anomaly Engine for 1 athlete, I can simulate event data for 10 or more similar athletes; more data points usually lead to greater accuracy of predictions.  The more models and scenarios I can display, the greater odds I’ll get interest to input real data from an innovative NFL team
  2. https://www.exerciseismedicine.org/ — AI can be used to optimize training programs for doctor patients that are on verge of (or already have) cardio vascular disease, hypertension, type 2 diabetes, heart weakness on way to hear failure left unchecked. AI can design specific unique individual programs and trach its progress (and predict what next workout(s) should be).
  3. https://sema4.com/ Sema4 uses genetics to project future health status of subjects. Sema4 are  – expert in using AI for this.  But AI FIT are the experts in adapting training programs with AI to do all to prevent any ominous Sema4 predictions of, for ex,  a subject that is projected to develop diabetes. AI FIT can collaborate with Sema4.

*** This is all part-time work for me.  Timing may be to try connect with an NFL team around May 15 – optimistic we’ll defeat most of the severe ramifications of Corona impacts and be close to full sports by May15.  Then NFL team can be encouraged to follow AI FIT models starting mid May, with 2 months to prepare for official pre season full time training camp.

Let’s have a chat soon like over WhatsApp or Zoom.

BTW – a friend of mine works for Sema4 and had offered some great advise to me.

Stay Safe & Well

Ted

#NFL #ACSM #Fitness #NYJETS #AI #MachineLearning #MLB #NBA #AI

 

 

 

 

 

 

 

ULL (ULTRA LOW LATENCY) ARCHITECTURES FOR ELECTRONIC TRADING: NYU GLOBAL ONLINE COURSE

Capture-NYU-SUMMER-SYLLABUS

ULL (Ultra Low Latency) Architectures for Electronic Trading
NYU SPS – Online, Adjunct Instructor: Ted Hruzd 
SUMMER-2020 GLOBAL ON-LINE JUNE 4 – JULY 28

9 weeks with 4 modules, 5 assignments, 90 minute optional weekly Saturday ZOOM sessions plus collaboration with WhatsApp with my responses within 24 hours

On-Line Registration – https://www.sps.nyu.edu/professional-pathways/topics/finance/asset-management-and-investment-strategies/FINA1-CE9515-ull-ultra-low-latency-architectures-for-electronic-trading.html

WhatsApp will be set up also so we can all communicate / collaborate / discuss assignments / etc …  Then an optional 90 minute ZOOM session will be setup Saturday morning New York Time likely 9 am – 10:30 am

Course Objectives

Develop advanced skills in architecting electronic trading (ET) and market data applications for ultra low latency (ULL), for competitive advantage, and for positive ROI.  At end of course, one will have developed expertise in end-end architecture of ET applications and infrastructure, including:

  • roles of FPGA’s, GPU’s, over-clocked servers, and high end Intel Cascade Lake servers and AM EPYC Rome servers, IBM Power 9/10 for ULL ML/AI
  • Linux kernel and NIC kernel bypass tuning,
  • options available for architecting ULL networks from infrastructure and application perspectives
  • network performance analysis via WireShark and Corvil (hands-on tech expertise via remote access to a simulate trading app). How about Instrumentix?
  • Machine Learning (ML), AI, Neural Networks including LSTM (Long Short Term Memory) Recurrent Neural Networks via Python / Tensor Flow, Decision Trees, Random Forests, Anomaly Detection Engines, Reinforcement Learning Engines, Pattern Recognition, Classification Models with R – Studio and ML models include alpha seeking, smart order routing, fill rate predictions. Even if you have little or no experience in developing ML, you will learn subsets of R, Python, and Tensor Flow 2.0, to develop your own upon course completion
  • New LL and ULL application designs, including best practices in use of micro services
  • Best practices from promising start-ups that address enterprise scalability, including LL Software Defined Infrastructures (SDI) and a multi-cluster “OS” for ULL analytics and AI via startups TidalScale and GigaIO
  • Best practices in FPGA development via updated libraries and software tools from Xilinx and Intel
  • Intro to Block Chain, exploring how to scales Block Chain for financial apps

 

MODULE-1: Hardware/Application Accelerated Architectures

  • Tick-2-Trade applications with single digit micro seconds, even with sub 1 micro seconds
  • How to architect for deterministic latencies even in times of volume spikes
  • Why ‘Meta-Speed’ (info how to used speed) is more important than pure speed
  • Proper use of multi-layer ULL switches, FPGA’s, GPU’s, MicroWave wireless RF network technologies & over-clocked servers
  • Options available with FPGA’s integrated in multi-layer ULL switches (ex: Market Data normalization & Book Builds)
  • Best practices in fanning out raw market data to pool of FPGA’s for scaling
  • Assess advantages among the leading FPGA vendors Intel/Altera and Xilinx
    • Examine each for both trading & analytics
    • Assess each vendor’s capabilities for FPGA applications based on OpenCL, C++ using FPGA libraries
    • Learn best practices in FPGA architectures for market data, order routing, Machine Learning & AI
    • Learn AI Engine 2/from memory optimizations on FPGA’s
  • NVIDIA DGX-2 GPU processors role for precision analytics
  • ULL Fabrics for Seamless Messaging CPU 2/from FPGA’s, GPU’s, NVMe
  • OpenCAPI for CPU 2/from FPGA’s
  • Compare FPGA’s vs GPU’s for ML Deep Learning
  • Explore relevancy to ULL ET and ML of new “Processor in Memory” or PIM architectures from Intel and NVIDIA (speed up data ingestion to CPU & GPU processing cycles)
  • Alternate role Data Direct Networks (DDN) for above data/processing speedups for HPC, HFT, AI
  • Accelerations available with PCIe4
  • Market Data Feed Handlers in FPGA; Order Books in Intel Cores or FPGA’s – achieve 20 x’s parallelization for full depth books?
  • Integration of FPGA’s and Intel cores via high speed caches, FPGA’s and cores on same die (Intel-Altera and Xilinx — current and upcoming enhancements)
  • FIX engines in FPGA based NIC’s and appliances
  • Multi core, high speed cache Intel based servers + Intel’s new MESH socket interconnects for ULL and deterministic memory I/O
  • Leading FPGA based NIC(s) – from SolarFlare, Mellanox, ExaBlaze, Enyx
  • SolarFlare Direct TCP
  • Layer 1 and multi layer network switches (Arista/Metamako, ExaBlaze)
  • Fundamentals of FPGA design and programming
  • OpenCL and C++ for ULL programming best practices & FPGA programming
  • Intel’s optimizing C++ with deep vectors AVX-512, Thread Building blocks (TBB), and Intel’s new AVX 512 VNNI for Neural Network speedups
  • Intel C++ best practice design pattern of internally vectorize code inside a loop or interaction, and externally parallelize the code vi pragma’s and specific code
  • How to optimize app code performance with hardware server config (NUMA)
  • Prospects for Application Specific Integrated Circuits (ASICs) supplanting FPGA’s in future years for most latency sensitive applications
  • Best Practices for Prop Traders, Market Makers, Hedge Funds, & High Freq Traders (HFT)
    • Automated ULL software
    • Wide range of markets
    • Role of ML & AI
    • Direct Market Access (DMA) architectures
    • Risk Mgt
    • Colo Configurations
    • Resiliency & High Availability, DR
    • High Performance Compute Clusters
    • News Sentiment Analytics
  • Python development of basic Algo strategies & software design/analysis for back testing Algo’s
  • Hot right now – Chronicle: a Java based microservices framework touting superior mem mgt + horizontal scalability for FIX Engines and more
  • Intro to BlockChain – can common interests least to technology to benefit all & cut costs, speed up settlements – LL settlements, enhance TCA?
    • What electronic trading applications can integrate with BlockChain?
    • How to architect such applications
  • ROI analysis

HOMEWORK:

Ted will present 3 Visio ULL architectures of end-end trading systems and ask class to critique all infrastructure components individually and in the aggregate, along with 1st steps to start ROI analysis.  In addition, students will be required to enhance the architecture they chose as the “best”, or develop their own – End-2-End from CoLo raw Market Data à FIX Engines / OMS à SOR à Exchange Connectivity

 

MODULE-2: Linux kernel tuning + NIC kernel bypass technologies and configurations

  • Detail benefits of Red Hat Linux Network-Latency profile (ex favors performance over power savings)
  • Linux 7.3/4/5/6 and Linux 8 kernel and NIC tuning for kernel bypass –
  • Quick sum: major differences Linux 6 vs latest Linux 7.x and 8
  • Identify niche kernel tuning for extremely high message processing
  • Kernel bypass technologies including RDMA and LDMA
  • Infiniband (IB) and RDMA over Ethernet (RoCE) protocols for ULL
  • Identify additional tuning for ultimate ULL kernel and micro services frameworks
  • How to validate tuned OS via load tests and commands such as sysctl -a
  • SolarFlare (SF) latency benefits of Open OnLoad kernel bypass and how to further configure/ tune subsequent to analysis via sfnettest, sfjitter, SF Dump, jhickup, and performance load tests
  • SF ef_vi, TCP Direct and role on “raw” Tick-2-Trade (T2T) times of under 100 ns via OnLoad + LDA-Tech LightFleet FPGA appliance + Penguine servers (STAC T0 benchmark) and other potential options
  • Mellanox VMA kernel bypass, 40Gig E NICs, up to 100 Gig switches, how to integrate with IB and Exegy Market Data appliance

HOMEWORK:

Ted will pose several technical questions pertaining to kernel tuning and bypass for class to answer.

MODULE-3: Machine Leaning (ML) & Artificial Intelligence (AI) for both ULL Electronic Trading, Wealth Mgt, and BlockChain applications

  • Math behind multiple ML models, with deep dive into Neural Networks (NN), especially LSTM Recurrent NN, Auto Encoding NN for Anomaly Detection Engines
    • Will learn the subset of Python & Tensor Flow code to create a RNN that predicts future stock prices, fill rates, and even trading revenue; then integrate a Decision Tree model in R utilizing same input data to identify what factors may be “tuned” to render more accurate projections; also we will learn how to use the ML insights to identify options to improve fill rates / increase revenues
    • Explore how Reinforcement Learning ML can integrate with near real time NN for competitive advantages via ULL insights to alpha, risk, routes (SOR), TCA, compliance)
  • ML / NN for seeking alpha via basic R programming + specific ML libraries
  • Specific ML models using Reinforcement Learning relevant to quants trading
  • Supervised vs unsupervised ML
  • Synergies with Data Mining
  • Optimal Architectures for ML: Infrastructure, Software
  • Role of SME in ML & AI
  • Determining what model to choose
  • How to interpret results
  • How to verify models
  • Tensor Flow for parallelization of ML models
  • How to tune, tweak models for greater accuracy and predictive value
  • ML and Event Stream processing, real time analytics for seeking alpha (trade opportunities)
  • Definition of Deep Learning (DL)
  • DL Models and use cases
  • Role that an ML/AI “Anomaly Engine” can become a near real time tool for proactive and preemptive alert of unusual (ex: never seen before trading activity). Ultimate benefit of Anomaly Engine (subsequent to rigorous UAT/certification) may be to mitigate and even avert trading disruptions (per automation), thus positively impacting trading revenues / profits
  • Define AI; provide use cases
  • ML and DL as inputs to AI
  • Time-2-Market & ROI projections for ML / AI initiatives end-2-end
  • Best Practices in AI in our industry
  • Options to integrate ML/AI alpha seeking capabilities in CoLo environments
    • How to decrease Total Cost of Ownership (TCO) in CoLo architectures
  • In Class (Hands-On)
    • RStudio & H20
    • Portfolio analysis via Classification Model using R/H20
    • Predictive analysis of new trading strategies via Decision Trees (R or Python)
    • Pattern Recognition of Trading Patterns to provide am Alpha service for Buy-Side
  • Blockchain – more depth than Module 1
  • Blockchain scaling limitations
  • Assess CFTC BlockChain plans for near real time clearing (then extend the BlockChain for low volume trading, ultimately to higher volume trading of commodities, derivatives, options)
  • How to integrate real time ML and AI with BlockChain architectures
  • Learn a rapidly pervasive BlockChain related protocol “Smart Contracts” that may largely solve BlockChain scaling limittions
  • Assess Ant Financial Wealth Mgt BlockChain plans (examine its use of Smart Contracts)
  • ML/AI op optimize Crypto Currency trading

HOMEWORK:

  • Ted will provide several “how-to” docs with all code / procedures to run to create multiple ML models. Students will run at least 1 of these models and respond with what predictive insights they provide.  ** NO Coding will be required.  But there will be one simple ML model where one will have option to alter or add code to improve accuracy or provide more meaningful insights (extra credit)

 

 MODULE-4: Architecting ULL Networks + how to diagnose/resolve network problems vi Corvil and Wireshark

  • ULL network configuration best practices
  • Spine-Leaf architectures
  • Multicast best practices
  • Examine ULL Multicast architectures available from lightfleet.com; determine applicability for ULL networks and how to project resulting performance (latency) improvements
  • Network protocols including TCP, UD, BRP, OSPF, LLDP
  • Remote access to a Corvil appliance for deep dive in network and transaction diagnostics
  • How to utilize Corvil decoders for FIX protocol, LBM messaging, and market data feeds
  • Wireshark – to supplement Corvil analytics with deep dive network diagnostics to identify RCA of latencies
  • Best practices in architecting Corvil’s new App Agent software for software processing insights
  • ULL messaging middleware (29 West LBM/UME) and 60 East Tech AMPS
  • PTP architectures for large market data / trading application infrastructures
  • Network appliances – detailed timings/analytics – network, market data, and order routing – Corvil, Instrumentix, SolarCapture
  • ULL Networks, including options for integrating multi-layer switches, FPGA appliances, new approaches to ULL multi-cast market data distribution
  • ULL storage networks, including NVMeOF fabrics, Intel Optane, 3D XPoint, EverSpin new MRAM deterministic memory + persistent storage options. Special focus on DDN and Pure Storage
  • How ULL deterministic memory can lower end-2-end latencies for subset of application flows, especially those based on ULL analytics
  • Correlation of ULL networks and fill rates
  • Tools (some free, several with RH Linux) to attain network performance optimization insights

HOMEWORK

  • Assignment#4: Specific hands on Corvil exercises for class to evaluate results and propose mitigation of network problems and strategic redesigns

FINAL ASSIGNMENT#5: Architect and End-2-End ULL Electronic Trading App integrated with ULL ML/AI for Alpha, Risk, Routing (SOR), TCA, Compliance

  • Ted will detail requirements

PreReq – (for most, expecting basic to intermediate expertise, unless noted)

  • Most important: at least 2 years working with electronic trading applications/infrastructures as Developer, SA, network admin/engineer, Architect, QA analyst, tech project mgr, operations engineer, manager, CTO, CIO, CEO, vendor or consultant providing technology to Wall Street IT,
  • TCP/IP, UDP, multicast (basic knowledge),
  • Linux OS and shell or scripting (ex bash, perl); at minimum basic familiarity of output and usefulness of core Linux commands such as sysctl –a, ethtool, ifconfig, top, ls, grep, awk, sed, and others listed later in this syllabus
  • Intel servers, cores, sockets, GHz clock speed, NUMA
  • Network routers, switches
  • 1 or more network protocols from BGP, OSPF, EIGRP, MPLS, IB
  • FIX protocol
  • Market Data, at minimum contents of equities consolidated feeds
  • Visio (will use for homework assignments; HOWEVER – to save time I will accept ‘pictures’ of white board architectures / designs)
  • R programming (nice to have. Will use basics that one can learn in 1-2 hours), then extend upon that in classes for class hands-on Machine Learning
  • Python (very basic will be fine – a 2 hour reading assignment will be arranged for beginners). We will use a text written for traders with zero programming experience that quickly trains them how to use small set of Python for creating trading algo’s

Course Logistics

 

How #AI can Lead NFL Pass Rushers

How #AI can Lead NFL Pass Rushers
https://www.buccaneers.com/news/shaq-barrett-bucs-new-sack-king-17-5-warren-sapp

Above chart depicts deviations (y axis) from a centroid (orange) -most normal point- of the correlation of multiple dimensions (blue) impact on Max VO2 (ML/KG/MINUTE) in this instance …. Ted Hruzd, Data Scientist & ACSM Certified Personal Trainer… March 2020

INTRO

Can Machine Learning (ML) and AI lead to most optimized fitness programs for specific goals such as:

1. Allow best NFL Defense Line (DL) and Edge Rushers play at top speed every defensive down? 4th Qtr sacks may ice victories.

2. Simultaneously lead Running Backs to simultaneously build more power while developing greater speed (ex: 40 yard dash times) ? 1 or 2 long runs per game be become a game changer?

3. Enable any serious athlete pro or not to recover more quickly from training sessions, thus train intensely 1 more day per week? May allow longer golf drives or faster, more accurate tennis servers, 102 MPH fastball in April (up from max 98 MPH in prior year’s playoffs) for a much needed strikeout for a save and how about a Championship?

Machine Learning / AI can improve accuracy of fitness training progress (Return-On-Investment or ROI) & thus speed up reaching fitness goals (Time-2-Market)

We focus on #1 for now – AI for team’s Best DT’s, DE’s, Edge Rushers
SUMMARY
We focus on #1 above. A first step may be to identify multiple factors, which we will refer to as “dimensions” (let’s try about 17). The multi-dimensions in combination at optimal values, can impact positively the lactate threshold of a D Lineman (DL). Results: more 4th Quarter Sacks!
Reference the LACTATE THRESHOLD OPTIMIZATIONS for FOOTBALL DEFENSIVE LINEMEN Section in the 2nd part of the appendix. It provides evidence that Max VO2 (peak aerobic capacity) and Lactate Threshold (LT) are related. Thus, training for Max VO2, at shorter intervals, projects to improve LT. Max VO2 is oxygen utilized per kilogram per minute when at peak aerobic exercise. LT is the level at which blood proteins increase acid in blood stream, limiting muscle cells capacity to fire at peak rates. Try running a sprint at peak speed for longer than 400 yards and chances are you will be forced to slow down significantly unless you are an elite athlete. Proper use of AI can lead even elite athletes to amazing levels! Try running 10 or more 60 yard dashes at top speed with 15 seconds in between. Most will feel fatigued and not be able to keep up top speed. This simulates what college and DL may experience, especially in the 4th quarter and with quick snap counts.
HYPOTHESIS with sample data
Improving LT will enable DL to play all D downs at or near full speed. LT is a limiting factor for continuing repeated downs, some of which can last 5-15 seconds, and exhaust a DL during a drive with quick snap counts. Smart offenses take advantage of this when they see DL sucking air. See below sample raw data I created, essentially to present how the ML model works and how to interpret the results. Imagine if the hypotheses was that:

• running more sprints daily
• speeding up intense exercise recovery via 3 minute sub zero temp nitrogen air baths (equiv of 1 hour ice baths), per R3 Labs – https://www.r3recoverylab.com/
• High % of weight training reps (to max or near max) in range of 8-16 reps
• Increased protein
• Fertilized Egg or Fortetropin (all natural supplement ) produced by https://yolked.com/

Would result in greater improvement in Max VO2 which is correlated with LT

Per my bias in creating sample data, the ML/AI model provides inferences to guide work-outs. Major purposes of this exercise is to
1. prove ML can optimize sports performance
2. encourage DL and Edge Rushers, in this instance, to implement ML/AI with their own data per software I created.

The model identifies anomalies in day-to-day training. The “anomalies” are result of a “Mahalanobis Distance” ML Model. Imagine a 17-dimension ellipsoid with a centroid per all 17 dimensions (factors) all correlated as a group of 17. All accept the outliers may point to improvements in Max VO2. Athletes would be trained to follow training programs as close as possible to the centroid.

Why Machine Learning (ML)
There have been tremendous improvements in accelerated servers and software to speed up inferences from running ML models. The software is near a point where SME’s with just beginners – intermediate programming skills may develop useful ML models.

What is a MAHALANOBIS DISTANCE (MD) VECTOR ML Model

The 2 pictures below depict possible outputs from an MD model. More follow in the appendix.
The first picture plots in blue the deviations of every event (with each event comprised of multiple dimensions) in terms of how far the points deviate from the multi-dimensional centroid. The red line is the threshold. This is actual data from NASA that implemented an MD ML model to define a threshold, then anomalies / alerts prior to outright machine failure. Hence MD ML models can be proactive, even preemptive in their inferences.
The second picture depicts multiple factors (dimensions) via different colors. It is important to realize that all individual dimensions are “normalized” (ex: to account for individual standard deviations). Oval outside the ellipsoid define threshold for anomalies.

 

Links below will further detail the math behind MD ML. The key points are that in MD ML:
1. All factors are dimensions
2. MD Math calculates multi-dimensions’ correlations for each event. Events may be a day or a second but with data for all dimensions (day in chart below). The multi-dimensional correlations result in deviations form the most common or normal event – the centroid of multiple dimensions.
Next 2 pages: pictures

References:
https://towardsdatascience.com/search?q=machine-learning-for-anomaly

Mahalanobis Distance – Understanding the math with examples (python)


RAW DATA
For NFL MD ML
snippet

Description of all Dimensions (Inputs)
• Day – for MD ML I will dive deep in is the Event – ex Day 0 1st day of training
• Mob dist, Thresh, Anomaly attained after MD ML runs and provides the Threshold ceiling for all events, with Anomaly column rating whether event is Anomaly or not
The above are derived, not Dimensions.
Dimensions start with:
• sVO_2 – starting Max VO2, will be same for all events
• AM_HR – heart rate upon awakening … rule or guide whether to train or not or how heavy
• AM_BP_S- Systolic BP upon awakening … rule or guide whether to train or not or how heavy,
• AM_BP_D- Diastolic BP upon awakening … rule or guide whether to train or not or how heavy,
• AM_Resp – breaths per minute upon awakening … guide whether to train or not or how heavy
• GM_PROT – grams protein
• YOLK_d – servings of fortetropin
• FATpc – Body Fat % at least within past 7 days
• pcRep_8_16 – % of strength training sets that were in rage of 8-16 reps for sets carried to failure or near, may have correlation with MaxVO2
• GM_Pro_LB – ratio of grams of protein to pounds
• # Sprints that last between 30-60 seconds at near all out speed – evidence to support positive impact on both lactate threshold (LT) and Max VO2
• Nitro_bath – minutes in sub zero Nitrogn tank for muscle and cardio recovery
• WATT – Power / energy expended in cycling – peak 30 second rate. This is used in a formula that results in predicting Max VO2
• LB & KG– players weight in pounds & KG. KG is used in formula for Max VO2
• VO2 – Column lists calculated MAX VO2 – ML O2 per KG / MINUTE
• RATIO – ratio of current Max VO2 vs starting (sVO_2). See event 7 1.029 means it increased by 2.9%. This is the GOAL – increase Max VO2 which is correlated with increases in Lactate Threshold (LT).

Next page details how to interpret MD ML results.

FORENSICS
The MD ML will point to just prior events that lead to Anomalies.
Threshold was exceeded

Forensics just before the anomalies point to combined effect of multiple dimensions that together contributed to increases in Max VO2 – rows with green; then same dimensions Day 37 changed significantly, ranging from
• increased morning heart rate (flag for over training)
• increased BP
• increased respiration rate (flag for over training)
• decreases in protein & Yolked (fortetropin); both which tend to work together to maintain, increase muscle mass & strength
• decrease in # sets with 8-16 reps per set as part of strength training .. this rep range 8-16 (for at or near max) may be most optimum for LT
• decrease in 30-60 second sprints; repeated 30-60 second sprints are a core recommendation for increasing Max VO2 & LT … 10 may be optimum although it can vary person-person; timing of the sprints should be considered. Most training programs advocate near end of work-out
• decrease in time spent in R3Labs nitro sub zero booth: R3 nitro booths speed up recovery post r intense workouts

Next – View where Threshold came close to being exceeded
I leave it up to the reader to rate the below forensics and provide the inference insights.
It is interesting to note though, that the threshold was close to being exceeded while the success criteria was degrading. One thus may need to lower the threshold for anomalies; or one may need to run exercise training sessions very close to low deviations from the multi-dimensional centroid.

How to Tweak ML further
One can decrease the dimensions to determine which together are most relevant together. Another ML “autoencoder neural network” can be run on the same data that will accomplish this.

ML often is an iterative process.

Also one can run multiple ML models but with different hyper partners which may lead to more accurate projections – all on the same data, concurrently in Docker containers in GPU’s or other accelerated compute platforms. So I digress into deep Tech …. & return now return back to practical recommendations how to proceed with this.
CONCLUSIONS & NEXT STEPS

The example showcased here depicts what is possible with ML/AI for Fitness. One can attain very useful inferences for the MD ML presented here. This may be enhanced by adding additional dimensions such as nutrition related:

• Mg Coenzyme Q
• Tart Cherry Juice
• Nitric Oxide Precursors

Or Practice Field related
• # reps on blocking sled
• # minutes agility drills
• # simulated pass rushing drills like 15 second downs with 15 seconds in between the drills, simulating quick snap counts

Anomaly Engines can be combined with Reinforcement Learning (RL) ML’s. RL learns over time what are most successful actions to reach clear goals. The 1st 2 RL links pertain to my main world – Electronic Trading, to attain best prices and thus revenue in trading securities. The next 3 links are more generic.

A specific RL model can be developed and run so it continuously learn of optimal exercise training programs for our task here  improve LT / Max VO2 so the best DL linemen and Edge Rushers can play every Defensive down at top speed / energy, come up with 4th Qtr sacks to secure wins. Combining that with Anomaly Engine will further increase accuracy.

https://towardsdatascience.com/aifortrading-2edd6fac689d

View at Medium.com

https://towardsdatascience.com/reinforcement-learning-101-e24b50e1d292

https://towardsdatascience.com/deep-reinforcement-learning-tutorial-with-open-ai-gym-c0de4471f368

https://towardsdatascience.com/reinforcement-learning-from-scratch-designing-and-solving-a-task-all-within-a-python-notebook-48c40021da4

AI FIT LLC (soon to be) Consulting
About the Author

Ted Hruzd combines his passion as a personal fitness trainer with technical leadership in Artificial Intelligence and Machine Learning.  That enabled him to create an  individualized training program that maximizes an athlete’s performance when it counts the most “In the Game”!   Together it improves accuracy of fitness training progress and speeds up reaching fitness goals.

Ted delivers innovative AI and ML solutions in high speed trading on Wall Street and teaches his craft as a lecturer at NYU and previously at Rutgers, where he  also provided ML/AI for Pharma and Fitness industries.  He is also an #ACSM personal fitness trainer with over 12  years of experience.

If interested, or require more details, discuss this further per a Zoom Session with Ted:  tedhruzd@gmail.com or 1-917-318-2318

Ted

Appendix follows

Appendix

More pictures

AI-FIT

https://www.google.com/amp/s/www.standard.co.uk/tech/ai-fitness-app-perfect-squat-challenge-app-a3871881.html%3famp

Above KAIA is the company
Partner?

https://kaia-perfect-squats.app.link/challenge

LACTATE THRESHOLD OPTIMIZATIONS for FOOTBALL DEFENSIVE LINEMEN

Lactate Threshold (LT) & VO2 Max do correlate

https://hvmn.com/blog/training/vo2-max-training-to-use-oxygen-efficiently

anaerobic respiration: The only fuel that can be burned anaerobically is carbohydrate, being converted into a substance called pyruvate through glycolysis and then into lactate via anaerobic metabolism.

On verge of Lactate Threshold (LT), the blood becomes more acidic, which in turn can compromise muscle function.

LT is expressed in milliliters of oxygen per minute per kilogram of bodyweight–this is the relative number most often considered a VO2 max.

Optimal way to test is in lab tests. A facemask is placed on subjects to measure the volume and gas concentrations of inhaled and exhaled air. Similar to lactate testing in a sports lab, athletes run on a treadmill (or sometimes use a stationary bike or rowing machine, depending on sport) and the exercise intensity increases every few minutes until exhaustion (read: you start having tunnel vision, hit the red stop button and collapse into a sweaty heap). The test is designed this way to achieve maximal exercise effort from the subject.

Training will be geared toward improving this point, at which the body begins to accumulate lactate in the blood.
Similar tests can be replicated outside of labs with less accuracy.
Your maximum heart rate: This formula might oversimplify things, but it’s effective for the purposes of a loose VO2 max calculation. To find your max heart rate, subtract your age from 220. So, if you’re 30 years old, your maximum heart rate is 190 beats per minute (bpm).
Use this formula to find your simple VO2 max: 15 x (max heart rate / resting heart rate).
Rockport Fitness Walking Test (RFWT)

This walking test can also calculate a VO2 max, and studies have proven its accuracy.
First, stretch and warm up. Then, find a track or mostly flat surface on which to walk a mile as fast as possible. It’s important to walk, and not to cross over into jogging territory. After walking exactly one mile, note exactly how long it took and your heart rate at the end of the mile. Using those numbers, you’ll be able to find an estimated VO2 max using this formula:

Walk
VO2 max = 132.853 – (0.0769 x W) – (0.3877 x A) + (6.315 x G) – (3.2649 x T) – (0.1565 x H)
W = weight (in pounds)
A = age
G = gender (1 for men, 0 for women)
T = time to complete the mile (in minutes)
H heart rate

Bike
O2 max = [(10.8 x W) / K] + 7
W = average wattage
K = weight in kilograms
Training is designed to have you spend as much time as possible at 95% – 100% of your current VO2 max as possible.
Because lactate threshold and VO2 max are linked, Interval training often results in the most improvement of VO2 max.
1000 meters
you are good at pacing yourself, sessions made up of long (4 minutes or so) intervals at your hardest sustainable effort are a good way to increase VO2 max. Between each interval, you should keep moving; active recovery will keep VO2 elevated during the process. Plan to do 4-6 sets.
Save enough energy so that your last set is the hardest intensity.
Athletes who did a similar workout improved their VO2 maxes by 10%. Time to exhaustion, blood volume, vein and artery function all improved after the training period.

Short interval sprints of under one minute can also improve VO2 max as long as they’re conducted at almost maximal effort level.

Exercise test here is 8-10 sets of 1 minute sprints. Again, make sure you are properly warmed up–these workouts carry a risk of injury because of the amount of power produced. You have to give it your all during each interval without holding anything back.

From the same study mentioned above, those doing ten sets of one-minute high-intensity sprints on a treadmill at maximum rate (with a 1 minute rest in between each interval) increased VO2 max by 3%.
Time to exhaustion, plasma volume and hemoglobin mass increased with this routine. However, results demonstrated that long interval training garnered the most dramatic results.
https://hvmn.com/blog/training/lactate-threshold-is-misunderstood#optimizing-lactate-metabolism

For many, the goal of training is to maintain increased power and speed without crossing over this threshold. Most athletes want to stave off blood lactate accumulation, training so they clear it faster and produce less.
Nutrition a key

Glucose gets metabolized by a process called glycolysis, resulting in pyruvate. There are two possible uses for pyruvate: anaerobic or aerobic energy production. Lactate caries a proton (an acid) when it’s released, and the build up of protons decreases the pH of the blood. When the body gets more acidic, function becomes compromised because the protons interfere with energy production and muscle contraction. But upon arriving at the lactate threshold, the blood concentration of lactate begins to exponentially increase. Usually that intensity hovers around 80% of an athlete’s maximum heart rate, or 75% of their maximum oxygen intake–but you can also link it to speed or power.

Well-designed training programs target both sides of the lactate threshold; there should be some training sessions working at or above LT. These sessions are harder on the body, but this forces adaptations that ultimately increase speed on race day.

ATP is produced from carbs through a three-step process: Glycolysis, Krebs Cycle and Electron Transport Chain (ETC). Products from Glycolysis feed Krebs which feeds ETC.

Protocols to determine lactate threshold are sport-specific. Many consider the running speed at lactate threshold (RSLT) to be the best indicator of running fitness and the most reliable barometer of endurance performance.

Cycling, step-tests (where power is increased at regular intervals until you are exhausted) are the gold standard for measuring physiological performance markers, such as lactate threshold.

Concrete way to determine lactate threshold is to take a series of blood samples as exercise is conducted at increasing intensities. This type of lactate testing occurs at an exercise physiology laboratory, and tends to be expensive (but worth it).

Lactate threshold test, athletes exercise on a treadmill or stationary bike while increasing intensity every few minutes until exhaustion. A blood sample is taken during the each stage of the test–similar to testing for ketones, through the fingertip or earlobe–illustrating blood lactate readings at various running speeds or cycling power outputs. Results are then plotted on a curve to show the speed or power at which the lactate threshold occurs.

Lactate threshold changes as more training is done to build your aerobic base. So in order to maintain an updated understanding of your lactate threshold, you’d have to visit the lab again after a block of trainin
endurance athletes choose to estimate their lactate threshold by measuring heart rate and/or VO2 max at different training zones (there’s even a portable lactate blood analyzer some use to further cement results).
Note correlation
VDOT (or VO2 max) Chart
example, running at a 7:49 mile pace at max effort corresponds to a VDOT number of 36. That VDOT number illustrates the pace at which training should be done to maintain lactate recycling: 8:55. For a more in-depth analysis of interval training and different distances, refer to these charts here
heart rate against speed; the deflection point in the graph (where your heart rate goes up much more than your speed) roughly corresponds to speed at lactate threshold
heart rate at the 10-minute mark to heart rate at the 30-minute mark–that’s your lactate threshold heart rate. And your average pace for the entire 30-minute test (assuming it was steady) is your lactate threshold pace
However, lactate threshold is impacted by training and changes over time. So keeping regular on these types of tests will indicate an improving lactate threshold through focused training.
Warming up is important to reducing risk for injury and minimizing potential lactate buildup. During a warm-up, heart rate increases, and blood vessels dilate, meaning there is more blood flow and more oxygen reaching your muscles.
Equally, cooling down and stretching immediately after a workout is especially important. Gentle exercise (slow jogging or spinning on a bike) or using a foam roller can help clear lactic acid buildup from the muscle by stimulating blood flow and encouraging lymphatic drainage.
key to dealing with high lactate production is dealing with the acid associated with it (that pesky little proton). Two “buffer supplements,” sodium bicarbonate and beta-alanine, work by mopping up that proton. This means lactate levels can go higher than before without triggering fatigue because the proton is taken care of.
Beta-alanine works inside the muscles to clean up protons before they affect muscle contraction. Compounding effects of beta-alanine powder (~5g per day) happen after several weeks, but studies show around a 2-3% performance boost.4

Bicarbonate is the main buffer usually binding protons to stop blood from becoming too acidic. About an hour before exercise, taking bicarb powder dissolved in water, at 0.3kg per body weight, has shown to improve performance.5 Be weary of stomach aches when first introducing bicarb. But there are bicarbonate gels that provide the same buffing effect without the side-effects.6
Exogenous ketones can lower lactate production. By drinking pre-workout exogenous ketones, like HVMN Ketone, your body can use the ketones for energy instead of carbohydrates–glycolysis decreases and therefore, so does lactate production.
the whole body, the heart muscle gets stronger, building more small blood vessels. These small blood vessels mean more oxygen-rich blood can be transported to the muscles, requiring less demand for anaerobic respiration and lactate production.
On a muscular level, cells can produce more mitochondria, which are the site of aerobic respiration. This helps increase reliance on that energy system. Muscle cells also express more of the transport proteins for lactate, so lactate doesn’t build up inside the cells and compromise their function.8

runners, one way to work on lactate threshold is to breakdown a run into mile sections: the first mile or two should be run at a pace just below lactate threshold, while the proceeding mile section should be slower, thus allowing the body to process the lactate. Active recovery is more effective at clearing lactate than passive recovery.9 This allows a high volume of miles without going overboard.
altering how the body responds to lactate with nutrition supplements like HVMN Ketone and bicarb gels. And in the process, we’re rewriting the old story about lactic acid.

VO2 max: The Apple Watch metric that reveals your aerobic fitness

If you want to know how you compare to typical VO2 max levels, check out this chart.

https://hvmn.com/blog/training/vo2-max-training-to-use-oxygen-efficiently

https://hvmn.com/blog/training/lactate-threshold-is-misunderstood#optimizing-lactate-metabolism

ULL (ULTRA LOW LATENCY) ARCHITECTURES FOR ELECTRONIC TRADING SEP 18 – NOV 7 2019 — GLOBAL ONLINE, NYU ADJUNCT INSTRUCTOR TED HRUZD

CAP-2019-2019-2019

ULL (Ultra Low Latency) Architectures for Electronic Trading
NYU SPS – Online, Adjunct Instructor: Ted Hruzd 
FALL 2019 GLOBAL ON-LINE SEP 18 – NOV7

8 weeks with 4 modules, 5 assignments 90 minute optional weekly Google hangout sessions plus collaboration with WhatsApp with my responses within 24 hours

On-Line Registration – https://www.sps.nyu.edu/professional-pathways/topics/finance/asset-management-and-investment-strategies/FINA1-CE9515-ull-ultra-low-latency-architectures-for-electronic-trading.html

*** All course content will be online by Sep 16 for Sep 18 start.  WhatsApp will be set up also so we can all communicate / collaborate / discuss assignments / etc …  Then an optional 90 minute Google Hangouts session will be setup Saturday morning New York Time likely 9 am – 10:30 am

Course Objectives

Develop advanced skills in architecting electronic trading (ET) and market data applications for ultra low latency (ULL), for competitive advantage, and for positive ROI.  At end of course, one will have developed expertise in end-end architecture of ET applications and infrastructure, including:

  • roles of FPGA’s, GPU’s, over-clocked servers, and high end Intel Cascade Lake servers and AM EPYC Rome servers
  • Linux kernel and NIC kernel bypass tuning,
  • options available for architecting ULL networks from infrastructure and application perspectives
  • network performance analysis via WireShark and Corvil (hands-on tech expertise via remote access to a simulate trading app)
  • Machine Learning (ML), AI, Neural Networks including LSTM (Long Short Term Memory) Recurrent Neural Networks via Python / Tensor Flow, Decision Trees, Random Forests, Anomaly Detection Engines, Reinforcement Learning Engines, Pattern Recognition, Classification Models with R – Studio and ML models include alpha seeking, smart order routing, fill rate predictions. Even if you have little or no experience in developing ML, you will learn subsets of R and Python to develop your own upon course completion
  • Intro to Block Chain, exploring how to scales Block Chain for financial apps

 

MODULE-1: Hardware/Application Accelerated Architectures

  • Tick-2-Trade applications with single digit micro seconds, even with sub 1 micro seconds
  • How to architect for deterministic latencies even in times of volume spikes
  • Why ‘Meta-Speed’ (info how to used speed) is more important than pure speed
  • Proper use of multi-layer ULL switches, FPGA’s, GPU’s, MicroWave wireless RF network technologies & over-clocked servers
  • Options available with FPGA’s integrated in multi-layer ULL switches (ex: Market Data normalization & Book Builds)
  • Assess advantages among the leading FPGA vendors Intel/Altera and Xilinx
    • Examine each for both trading & analytics
    • Assess each vendor’s capabilities for FPGA applications based on OpenCL, C++ using FPGA libraries
    • Learn best practices in FPGA architectures for market data, order routing, Machine Learning & AI
    • Learn Engine 2/from memory optimizations on FPGA’s
  • NVIDIA DGX-2 GPU processors role for precision analytics
  • Compare FPGA’s vs GPU’s for ML Deep Learning
  • Explore relevancy to ULL ET and ML of new “Processor in Memory” or PIM architectures from Intel and NVIDIA (speed up data ingestion to CPU & GPU processing cycles)
  • Alternate role Data Direct Networks (DDN) for above data/processing speedups for HPC, HFT, AI
  • Market Data Feed Handlers in FPGA; Order Books in Intel Cores or FPGA’s – achieve 20 x’s parallelization for full depth books?
  • Integration of FPGA’s and Intel cores via high speed caches, FPGA’s and cores on same die (Intel-Altera and Xilinx — current and upcoming enhancements)
  • FIX engines in FPGA based NIC’s and appliances
  • Multi core, high speed cache Intel based servers + Intel’s new MESH socket interconnects for ULL and deterministic memory I/O
  • Leading FPGA based NIC(s) – from SolarFlare, Mellanox, ExaBlaze, Enyx
  • SolarFlare Direct TCP
  • Layer 1 and multi layer network switches (Arista/Metamako, ExaBlaze)
  • Fundamentals of FPGA design and programming
  • OpenCL and C++ for ULL programming best practices & FPGA programming
  • Intel’s optimizing C++ with deep vectors AVX-512, Thread Building blocks (TBB), and Intel’s new AVX 512 VNNI for Neural Network speedups
  • Intel C++ best practice design pattern of internally vectorize code inside a loop or interaction, and externally parallelize the code vi pragma’s and specific code
  • How to optimize app code performance with hardware server config (NUMA)
  • Prospects for Application Specific Integrated Circuits (ASICs) supplanting FPGA’s in 1-3 years for most latency sensitive applications
  • Best Practices for Market Makers & High Freq Traders (HFT)
    • Automated ULL software
    • Wide range of markets
    • Role of ML & AI
    • Direct Market Access (DMA) architectures
    • Risk Mgt
    • Colo Configurtions
    • Resiliency & High Availability, DR
    • High Performance Compute Clusters
    • News Sentiment Analytics
  • Python development of basic Algo strategies & software design/analysis for back testing Algo’s
  • Intel’s new “HPAT” Python compiler with directives to parallelize Python code
  • Hot right now – Chronicle: a Java based microservices framework touting superior mem mgt + horizontal scalability for FIX Engines and more
  • Intro to BlockChain – can common interests least to technology to benefit all & cut costs, speed up settlements – LL settlements, enhance TCA?
    • What electronic trading applications can integrate with BlockChain?
    • How to architect such applications
  • ROI analysis

HOMEWORK:

Ted will present 3 Visio ULL architectures of end-end trading systems and ask class to critique all infrastructure components individually and in the aggregate, along with 1st steps to start ROI analysis.  In addition, students will be required to enhance the architecture they chose as the “best”

 

MODULE-2: Linux kernel tuning + NIC kernel bypass technologies and configurations

  • Detail benefits of Red Hat Linux Network-Latency profile (ex favors performance over power savings)
  • Linux 7.3/4/5/6 and Linux 8 kernel and NIC tuning for kernel bypass –
  • Identify niche kernel tuning for extremely high message processing
  • Kernel bypass technologies including RDMA and LDMA
  • Infiniband (IB) and RDMA over Ethernet (RoCE) protocols for ULL
  • Identify additional tuning for ultimate ULL kernel and micro services frameworks
  • How to validate tuned OS via load tests and commands such as sysctl -a
  • SolarFlare (SF) latency benefits of Open OnLoad kernel bypass and how to further configure/ tune subsequent to analysis via sfnettest, sfjitter, SF Dump, jhickup, and performance load tests
  • SF ef_vi, TCP Direct and role on “raw” Tick-2-Trade (T2T) times of under 100 ns via OnLoad + LDA-Tech LightFleet FPGA appliance + Penguine servers (STAC T0 benchmark) and other potential options
  • Mellanox VMA kernel bypass, 40Gig E NICs, up to 100 Gig switches, how to integrate with IB and Exegy Market Data appliance

HOMEWORK:

Ted will pose several technical questions pertaining to kernel tuning and bypass for class to answer.

MODULE-3: Machine Leaning (ML) & Artificial Intelligence (AI) for both ULL Electronic Trading, Wealth Mgt, and BlockChain applications

  • Math behind multiple ML models, with deep dive into Neural Networks (NN), especially LSTM Recurrent NN, Auto Encoding NN for Anomaly Detection Engines
    • Will learn the subset of Python & Tensor Flow code to create a RNN that predicts future stock prices, fill rates, and even trading revenue; then integrate a Decision Tree model in R utilizing same input data to identify what factors may be “tuned” to render more accurate projections; also we will learn how to use the ML insights to identify options to improve fill rates / increase revenues
    • Explore how Reinforcement Learning ML can integrate with near real time NN for competitive advantages via ULL insights to alpha, risk, routes (SOR), TCA, compliance)
  • ML / NN for seeking alpha via basic R programming + specific ML libraries
  • Supervised vs unsupervised ML
  • Synergies with Data Mining
  • Optimal Architectures for ML: Infrastructure, Software
  • Role of SME in ML & AI
  • Determining what model to choose
  • How to interpret results
  • How to verify models
  • Tensor Flow for parallelization of ML models
  • How to tune, tweak models for greater accuracy and predictive value
  • ML and Event Stream processing, real time analytics for seeking alpha (trade opportunities)
  • Definition of Deep Learning (DL)
  • DL Models and use cases
  • Define AI; provide use cases
  • ML and DL as inputs to AI
  • Time-2-Market & ROI projections for ML / AI initiatives end-2-end
  • Best Practices in AI in our industry
  • Options to integrate ML/AI alpha seeking capabilities in CoLo environments
    • How to decrease Total Cost of Ownership (TCO) in CoLo architectures
  • In Class (Hands-On)
    • RStudio & H20
    • Portfolio analysis via Classification Model using R/H20
    • Predictive analysis of new trading strategies via Decision Trees (R or Python)
    • Pattern Recognition of Trading Patterns to provide am Alpha service for Buy-Side
  • Blockchain – more depth than Module 1
  • Blockchain scaling limitations
  • Assess CFTC BlockChain plans for near real time clearing (then extend the BlockChain for low volume trading, ultimately to higher volume trading of commodities, derivatives, options)
  • How to integrate real time ML and AI with BlockChain architectures
  • Learn a rapidly pervasive BlockChain related protocol “Smart Contracts” that may largely solve BlockChain scaling limittions
  • Assess Ant Financial Wealth Mgt BlockChain plans (examine its use of Smart Contracts)

HOMEWORK:

  • Ted will provide several “how-to” docs with all code / procedures to run to create multiple ML models. Students will run at least 1 of these models and respond with what predictive insights they provide.  ** NO Coding will be required.  But there will be one simple ML model where one will have option to alter or add code to improve accuracy or provide more meaningful insights (extra credit)

 

 MODULE-4: Architecting ULL Networks + how to diagnose/resolve network problems vi Corvil and Wireshark

  • ULL network configuration best practices
  • Spine-Leaf architectures
  • Multicast best practices
  • Examine ULL Multicast architectures available from lightfleet.com; determine applicability for ULL networks and how to project resulting performance (latency) improvements
  • Network protocols including TCP, UD, BRP, OSPF, LLDP
  • Remote access to a Corvil appliance for deep dive in network and transaction diagnostics
  • How to utilize Corvil decoders for FIX protocol, LBM messaging, and market data feeds
  • Wireshark – to supplement Corvil analytics with deep dive network diagnostics to identify RCA of latencies
  • Best practices in architecting Corvil’s new App Agent software for software processing insights
  • ULL messaging middleware (29 West LBM/UME) and 60 East Tech AMPS
  • PTP architectures for large market data / trading application infrastructures
  • Network appliances – detailed timings/analytics – network, market data, and order routing – Corvil, Instrumentix, SolarCapture
  • ULL Networks, including options for integrating multi-layer switches, FPGA appliances, new approaches to ULL multi-cast market data distribution
  • ULL storage networks, including NVMeOF fabrics, Intel Optane, 3D XPoint, EverSpin new MRAM deterministic memory + persistent storage options. Special focus on DDN and Pure Storage
  • How ULL deterministic memory can lower end-2-end latencies for subset of application flows, especially those based on ULL analytics
  • Correlation of ULL networks and fill rates
  • Tools (some free, several with RH Linux) to attain network performance optimization insights

HOMEWORK

  • Specific hands on Corvil exercises for class to evaluate results and propose mitigation of network problems and strategic redesigns

FINAL ASSIGNMENT: Architect and End-2-End ULL Eectroinic Trading App integrated with ULL ML/AI for Alpha, Risk, Routing (SOR), TCA, Complaince

  • Ted will detail requirements by Oct 23, with 2 weeks to complete

 

PreReq – (for most, expecting basic to intermediate expertise, unless noted)

  • Most important: at least 2 years working with electronic trading applications/infrastructures as Developer, SA, network admin/engineer, Architect, QA analyst, tech project mgr, operations engineer, manager, CTO, CIO, CEO, vendor or consultant providing technology to Wall Street IT,
  • TCP/IP, UDP, multicast (basic knowledge),
  • Linux OS and shell or scripting (ex bash, perl); at minimum basic familiarity of output and usefulness of core Linux commands such as sysctl –a, ethtool, ifconfig, top, ls, grep, awk, sed, and others listed later in this syllabus
  • Intel servers, cores, sockets, GHz clock speed, NUMA
  • Network routers, switches
  • 1 or more network protocols from BGP, OSPF, EIGRP, MPLS, IB
  • FIX protocol
  • Market Data, at minimum contents of equities consolidated feeds
  • Visio (will use for homework assignments; HOWEVER – to save time I will accept ‘pictures’ of white board architectures / designs)
  • R programming (nice to have. Will use basics that one can learn in 1-2 hours), then extend upon that in classes for class hands-on Machine Learning
  • Python (very basic will be fine – a 2 hour reading assignment will be arranged for beginners). We will use a text written for traders with zero programming experience that quickly trains them how to use small set of Python for creating trading algo’s

Course Logistics