Skip to content

Instantly share code, notes, and snippets.

View yongkangc's full-sized avatar
🎃
Focusing

YK yongkangc

🎃
Focusing
View GitHub Profile
@yongkangc
yongkangc / 4. Trade Execution.md
Created April 12, 2026 11:13
4. Trade Execution
  1. Trade Execution

Planning needs to be done in sports, in construction, and in trading. In sports or construction, once the game has begun those plans can go out the window. Conditions on the field can change or real estate conditions can affect the development of a skyscraper. The same can hold true in implementing a TOMIC trading plan. However, unlike with sports and construction projects, the TOMIC trader has a much greater ability to control outcomes. The key, as it is in many businesses, is executing a plan in a way that is disciplined but adaptive, a form of having guidelines and an approach without having “trading rules.” Just as in a James Dean movie, rules are made to be broken, so traders need to be flexible. In this section you will walk through the process of implementing a TOMIC plan from start to finish. To do so, you will follow a checklist that demands a thought process, guiding you in your trading decisions. Then you will walk through getting an order filled effectively.

Conditions of the

@yongkangc
yongkangc / history-stage-repro-20260331.md
Last active March 31, 2026 04:29
storage_v2 history stage repro and before/after timings

storage_v2 history stage repro

Manual repro for the storage_v2 account/storage history stage bottleneck and the combined fix:

  • remove the full-history count pre-pass from the live-tail history stage path
  • make account_changeset_count() and storage_changeset_count() O(1) per static file by reading only the last committed .csoff record

Command

@yongkangc
yongkangc / signflip_sweep_3d.html
Created March 9, 2026 07:07
LogReg Taker Sign-Flip Parameter Sweep - 3D Plotly visualization
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LogReg Taker: Sign-Flip Parameter Sweep</title>
<script src="https://cdn.plot.ly/plotly-2.27.0.min.js"></script>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
@yongkangc
yongkangc / cexlead_sweep_v3_14d_surface.html
Created March 3, 2026 15:38
CexLead Sweep v3 — ETH 15m — 14d train/13d test — realistic execution
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CexLead Sweep v3 — ETH 15m — 14d Train / 13d Test</title>
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
@yongkangc
yongkangc / cexlead_horizon_sweep_surface.html
Created March 3, 2026 15:23
CexLead Exit Horizon Sweep — ETH 15m — 400ms to 5000ms (3bps/d≤0.20)
<!DOCTYPE html>
<html>
<head>
<title>CexLead Exit Horizon Sweep — ETH 15m</title>
<script src="https://cdn.plot.ly/plotly-2.27.0.min.js"></script>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
background: #0d1117;
color: #c9d1d9;
@yongkangc
yongkangc / cexlead_fine_sweep_v2_surface.html
Last active March 3, 2026 15:06
CexLead Fine Sweep v2 — ETH 15m — realistic execution (spread + tick size)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CexLead Sweep v2 — ETH 15m — Realistic Execution</title>
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
<style>
* { box-sizing: border-box; }
body {
background: #0d1117;
@yongkangc
yongkangc / cexlead_fine_sweep_surface.html
Created March 3, 2026 14:30
CexLead Fine Sweep — ETH 15m (1-8bps × distance)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CexLead Fine Sweep — ETH 15m (1-8bps × distance)</title>
<script src="https://cdn.plot.ly/plotly-2.27.0.min.js"></script>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
background: #0d1117; color: #c9d1d9;
@yongkangc
yongkangc / cexlead_signal_sweep_surface.html
Created March 3, 2026 13:59
CexLead Signal Sweep — ETH 15m Returns Surface (Feb 23–Mar 1 2026)
<!DOCTYPE html>
<html>
<head>
<title>CexLead Signal Sweep — ETH 15m Returns Surface</title>
<script src="https://cdn.plot.ly/plotly-2.27.0.min.js"></script>
<style>
body { margin: 0; background: #0d1117; color: #c9d1d9; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.container { max-width: 1400px; margin: 0 auto; padding: 20px; }
h1 { text-align: center; font-size: 1.5em; margin-bottom: 4px; }
.subtitle { text-align: center; color: #8b949e; font-size: 0.9em; margin-bottom: 20px; }
@yongkangc
yongkangc / mcuq_equity_curve_embed.html
Created February 18, 2026 14:47
MCUQ + Force Trending equity curve (Feb 11-18 2026)
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABLAAAASTCAIAAADle1MAAAAQAElEQVR4nOzdB3wTZ54//lGXLVnFRXKTjQtgMJhgQ8CQYHoNJQmQQkiW1P8m2d0ke3ebbEuye7fJ3t1m97ebcimEJJAGpAAJobcEDAHbwcbGgAu23CRZVrG6RtL/GUmu2GDABsv+vF/Z2cdfjUajKWK+8515hhshV1IAAAAAAAAw/HApAAAAAAAAGJaQEAIAAAAAAAxTSAgBAAAAAACGKSSEAAAAAAAAwxQSQgAAAAAAgGEKCSEAAAAAAMAwhYQQAAAAAABgmEJCCAAAAAAAMEwhIQQAAAAAABimkBACAAAAAAAMU0gIAQAAAAAAhikkhAAAAAAAAMMUEkIAAAAAAIBhCgkhAAAAAADAMIWEEAAAAAAAYJhCQggAAAAAADBMISEEAAAAAAAYppAQAgAAAAAADFNICAEAAAAAAIYpJIQAAAAAAADDFBJCAAAAAACAYQoJIQAAAAAAwDCFhBAAAAAAAGCYQkIIAAAAAAAwTCEhBAAAAAAAGKaQEAIAAAAAAAxTbApgkBCkPbKlUl1fr67c83y2hPw99tEtF8if9ZXbnsoWUNAbLCgAAAAAuEb9VyEUpD2waccr06T+Pxz5Ly5d+16Zs9Orj2za8VL7q8/PX7uxsv1VSdqCVWuXz8xOT0tPU0mFlEOrrlOXHdz4xhtbinSBMXJf3LH10XTy1tI3Vq18tdDc0+dqtz08/+nduvYXYrIXrFq1fGYmmWy6QuowqSsrKyoKd2/etO1QpZnqT12+ew/UH61c+EJ+/37mdZFkv7hjB7M8L8Nx7IX5D2zqWEvQV5KZr+z6+EFV7yOYjj2//IGNA7toBYl5ax9dkFi5/Y3Nx3XX90mCxKnL1q5amJ2ZTnYlBdk/TVpdXWn+lvf+tulQHbYPAAAAgJA2QJeMCicumJa2saw9IxQkTpuZ2VO+JIiZ+ujf3/jtLEWXdytU
@yongkangc
yongkangc / multiproof-chunk-sweep.md
Last active February 16, 2026 09:07
Multiproof chunk size benchmark sweep — 8 chunks × 4 gas levels (reth, 2026-02-16)

Multiproof Chunk Size Benchmark Sweep

Tested 8 chunk sizes (15, 30, 60, 75, 100, 120, 160, 240) across 4 gas levels (10M, 20M, 30M, 40M).

  • Branch: yk/storage-tries-prune-retain
  • Unwind target block: 24463558
  • Binary: /home/ubuntu/reth/target/maxperf-symbols/reth
  • Machine: dev-yk
  • Date: 2026-02-16
  • Method: warmup pass (discarded) + measured pass per chunk/gas combo