Class LiveTradingDemo
java.lang.Object
com.quantfinlib.examples.LiveTradingDemo
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):
- Binance trade stream (BTC + ETH) →
WebSocketFeed→HftMarketDataBus; - a streaming EMA(20/60) crossover per symbol on the bus consumer thread, with tick-to-decision latency recorded;
- signals →
PaperTradingGatewaymarket orders ($100k paper account, real commission accounting); - 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 Summary
Constructors -
Method Summary
-
Constructor Details
-
LiveTradingDemo
public LiveTradingDemo()
-
-
Method Details
-
main
-