Class LiveTradingDemo

java.lang.Object
com.quantfinlib.examples.LiveTradingDemo

public final class LiveTradingDemo extends Object
The five-minute live demo: real market data → streaming strategy → paper execution → live dashboard, in one command.
   java -cp target/classes com.quantfinlib.examples.LiveTradingDemo
   → open http://localhost:8080
 

What it wires (public crypto data — no keys, no cost, no license):

  1. Binance trade stream (BTC + ETH) → WebSocketFeedHftMarketDataBus;
  2. a streaming EMA(20/60) crossover per symbol on the bus consumer thread, with tick-to-decision latency recorded;
  3. signals → PaperTradingGateway market orders ($100k paper account, real commission accounting);
  4. positions/P&L/fills/latency live at localhost:8080 via TradingDashboard.

This is the SIMULATION lane end to end on live data: convenient String-keyed paper venue, synchronized accounting — the point is seeing the whole loop run, not nanoseconds. The measured hot lane is the same shape with HftOrderGateway/HftQuoter instead of the paper venue (see the benchmarks). Runs until Ctrl-C; prints a session summary on exit. No network? It says so and exits politely.

  • Constructor Details

    • LiveTradingDemo

      public LiveTradingDemo()
  • Method Details