A timeline of ideas想法的时间线.
Revisit each exploration by its first publication date.按首次分享时间,回看每一次探索。
202641 NOTES
Futures and arbitrage: margin, cash flows and spreads期货交易与套利:从保证金到价差模型
Follow a hedged inventory trade from entry to delivery, then derive calendar, processing and statistical spread models with explicit costs, contract quantities and funding limits.从一笔买现货、卖期货的交易出发,讲清保证金与每日结算,再推导跨期、产业链和统计套利模型,核对成本、合约数量与资金约束。
Financial Statements 13: Compare five Chinese insurers through time and across peers财报阅读 13:五家保险公司的纵向与横向比较
Compare 2024–2025 annual results and 2026 year-to-date disclosures for CPIC, New China Life, Ping An, China Life and PICC. Separate profit changes from business quality and distributable cash.用 2024、2025 年年报及 2026 年三季报比较中国太保、新华保险、中国平安、中国人寿和中国人保,拆开利润波动、业务质量与股东现金回报。
Financial Statements 08: CPIC and the quality of insurance earnings财报阅读 08:中国太保,拆开保险公司的利润
Compare CPIC’s annual and nine-month disclosures to separate reported profit, operating earnings and new-policy value, then trace the constraints on shareholder distributions.从太保年度与前三季度披露中,区分会计利润、营运利润与新保单价值,追踪股东现金回报受到的约束。
Financial Statements 09: New China Life and the assumptions behind growth财报阅读 09:新华保险,检验新业务价值的含金量
Trace New China Life’s value growth to its distribution channels, test the investment assumptions, and separate insurance service gains from market-driven earnings.追踪新华保险价值增长的渠道来源,检验投资回报假设,区分保险服务改善与行情推动的利润。
Financial Statements 10: Ping An, from group profit to shareholder cash财报阅读 10:中国平安,利润怎样变成股东现金
Separate operating profit, subsidiary dividends and capital needs using Ping An’s 2024–2026 disclosures.结合平安 2024—2026 年披露,拆开营运利润、子公司分红与资本需求,判断股东现金回报的来源。
Financial Statements 11: China Life, assets and promises财报阅读 11:中国人寿,投资收益背后的保单承诺
Read investment income alongside policyholder promises, CSM and solvency using China Life’s 2024–2026 disclosures.结合中国人寿 2024—2026 年披露,把投资收益、保单承诺、CSM 与偿付能力放在一起,理解利润为何不等于股东可分配回报。
Financial Statements 12: PICC and the discipline behind insurance float财报阅读 12:中国人保,浮存金背后的承保纪律
PICC’s underwriting margin improves while group profit falls. Separate liability quality, investment volatility and distributable capital using its 2024–2026 disclosures.中国人保的承保表现改善,集团净利润却下降。沿着 2024—2026 年披露,拆开负债质量、投资波动与可分配资本,理解浮存金何时创造价值。
Financial Statements 01: Connect the three statements财报阅读 01:读通三张报表
Connect a shop’s accounts, then reconcile Apple’s FY2025 cash balance. Profit, operating cash flow and cash on hand answer different questions.先核对一家商店的账目,再核对 Apple 2025 财年的现金变动,分清利润、经营现金流与现金余额。
Financial Statements 02: How much profit can reach shareholders?财报阅读 02:利润里有多少能归股东
Apple’s cash spending shows why free cash flow differs from sustainable owner earnings; a worked example estimates a range for the investment needed to maintain a business.结合 Apple 的现金支出,分清自由现金流与可持续所有者盈余,并用算例估计维持经营所需的投入区间。
Financial Statements 03: Where do high returns on capital come from?财报阅读 03:高回报从哪里来
See’s Candies shows how customer preference and working-capital needs shape returns on capital, and why a small accounting denominator can make a return look stronger than the business warrants.通过喜诗糖果,理解顾客偏好与营运资本需求如何影响资本回报,并区分持久的竞争优势与偏小分母带来的高比率。
Financial Statements 04: How incentives shape management decisions财报阅读 04:管理层为什么这样用钱
Read Apple’s compensation terms, distinguish annual targets from long-term rewards, and compare incentives with how management allocates capital and the results of those decisions.阅读 Apple 的薪酬条款,分清年度目标与长期奖励,再把激励同实际资金用途及其结果对照。
Financial Statements 05: Can the business survive a cash shortfall?财报阅读 05:好生意能否熬过现金低谷
Use Apple’s debt maturity schedule to distinguish annual profitability from cash available on payment dates, then test whether a delay in receipts creates a cash shortfall.借助 Apple 债务到期表,区分全年盈利与付款日可用现金,再检验回款延迟会不会造成现金缺口。
Financial Statements 06: What is a good business worth?财报阅读 06:好生意值多少钱
Distinguish See’s return on operating capital from the buyer’s earnings yield; then examine cash-flow assumptions, buyback prices and alternative investments.区分喜诗的经营资本回报率与买入时的盈利收益率,再检验现金流假设、回购价格和其他投资选择。
Financial Statements 07: Write an evidence-based research memo财报阅读 07:用真实年报写一份研究笔记
Trace the gap between profit and cash flow in Apple’s FY2025 report, then write down the facts, estimates and evidence that would change your conclusions.从 Apple 2025 财年年报中追踪利润与现金流的差异,写清已知事实、估计依据,以及何时需要重新审视结论。
Smart Money Concepts: liquidity, price formation and returnsSmart Money Concepts:流动性、价格形成与交易收益
Interpret SMC through financial economics: the price of immediacy, information and inventory effects, large-order execution, and the difference between a profitable trade and risk-adjusted return.从金融学理解 SMC:立即成交的代价、信息与库存怎样影响价格、大单为什么拆分,以及交易利润与风险调整收益之间的区别。
Kronos in quantitative finance: from forecasts to tradesKronos 金融量化研究:从预测到交易
How does a market forecast become a testable trading signal? Read Kronos through return labels, factor evaluation, portfolio risk, transaction costs and out-of-sample evidence, then examine its model and source code.市场预测如何成为可检验的交易信号?从收益标签、因子评价、组合风险、交易成本和样本外证据理解 Kronos,再拆解它的模型机制与源码。
Roadster engineering 06: thermal limits and repeatable performanceRoadster 技术拆解 06:热管理与重复性能
A 1 MW, 3 s duty cycle exposes the limits of repeatable output. Calculate temperature rise, compare thermal capacity with cooling, and size the recovery interval for gas replenishment.以 1 MW、3 秒的重复输出工况,计算何时超温、增加热容或散热是否有效,以及喷气后的补气时间如何限制重复周期。
Roadster engineering 05: force allocation and yaw controlRoadster 技术拆解 05:受力分配与偏航控制
Calculate how thrust offset changes longitudinal force and yaw reserve, then examine compensation delay and force reallocation after a loss of tyre capacity. Includes assumptions, worked examples and validation requirements.从受力与力矩平衡出发,计算推力偏置对纵向力和偏航余量的影响,再分析补偿延迟与轮胎能力下降后的重分配。给出模型假设、计算实例和验证要求。
When does running a model yourself pay off?本地部署大模型,多久能回本?
Compare the API bill with the full cost of running a model. One worked example explains monthly savings, payback, ROI and NPV before you enter your own numbers.先算每月省多少钱,再算多久收回设备投入。用一笔账讲清 ROI、回本周期与 NPV,再换成自己的模型、用量和成本。
Roadster engineering 04: how long can cold-gas thrust last?Roadster 技术拆解 04:冷气推力,能撑过这一秒吗?
A 10 kN peak says little about the rest of a launch. Derive the gas flow, tank cooling and pressure decay, then compare useful impulse, installed mass and the energy needed to refill.10 kN 的峰值推力,说明不了一秒之后还剩什么。从动量与能量守恒推导耗气、降温和失压,再把可用冲量、装车质量与补气能耗放进同一份工程预算。
DGX Spark or Mac Studio Ultra: choosing a local LLM systemDGX Spark 还是 Mac Studio Ultra:本地大模型怎么选?
Choose a local LLM machine by working backward from the model, context and software stack. Compare DGX Spark with the current M5 Ultra Mac Studio, calculate memory and bandwidth limits, then deploy a local API with MLX or vLLM.从模型、上下文和软件栈倒推硬件。对比 DGX Spark 与当前 M5 Ultra Mac Studio,计算内存和带宽的约束,再用 MLX 或 vLLM 部署本地模型服务,给出个人推理、研发与团队服务的选型建议。
Roadster engineering 03: where should downforce act?Roadster 技术拆解 03:下压力应该加在哪里?
Downforce has to reach the right contact patches. Follow four wheel loads through braking and cornering, then calculate how tyre load sensitivity and aerodynamic balance limit the force a car can use.下压力需要落到真正缺少余量的车轮上。从制动与转弯时的四轮载荷出发,计算轮胎载荷敏感性与下压力分配如何限制车辆能用上的力。
Roadster engineering 02: power or grip for a one-second launch?Roadster 技术拆解 02:一秒加速,先补功率还是抓地力?
More power does not always shorten a launch. Compare the target with the force available at each speed, then test power, gearing, mass and downforce changes against the same model.加大功率,不一定缩短起步用时。把目标与不同车速下的可用驱动力放在一起,再用同一个模型比较功率、减速比、质量与下压力的改动。
Roadster engineering 01: beyond the tyre limitRoadster 技术拆解 01:突破轮胎限制
Start with a target: reach 60 mph in one second. Derive the required force, compare suction with direct thrust, and make each added system justify its power and mass.先定目标:一秒达到 60 mph。反算需要的力,比较负压与直接推力,再检查每一套新增装置能否挣回自己的功耗与重量。
Parallel matrix–vector benchmark: C++, Rust and Python并行矩阵向量乘法基准测试:C++、Rust 与 Python
Sixteen CPU implementations of dense GEMV and CSR SpMV, including OpenMP, oneTBB, Rayon, Python executors, NumPy/SciPy and Numba. Measurements cover warm calls, startup, sustained throughput and process-tree PSS, with workload-specific selection guidance.对比 OpenMP、oneTBB、Rayon、Python 执行器、NumPy/SciPy、Numba 等十六种 CPU 实现,测量稠密 GEMV 与 CSR SpMV 的热调用、启动成本、持续吞吐和进程树 PSS,给出按负载划分的选型建议。
Beneath the ice: how neutrinos become evidence冰下的宇宙:怎样捕捉中微子的踪迹
The 2026 Nobel Prize in Physics recognises Francis Halzen’s contributions to IceCube and high-energy astrophysical neutrinos. Rare interactions produce charged particles and Cherenkov light; timing and light patterns reconstruct events, while background comparisons establish a cosmic population.2026 年诺贝尔物理学奖表彰 Francis Halzen 对 IceCube 与高能天体中微子发现的贡献。罕见的相互作用产生带电粒子与切伦科夫光;光信号的时序与空间分布用于重建事件,再由背景比较判断是否存在宇宙来源的粒子群。
The operator contract: schemas and code generation算子的接口契约:Schema 与代码生成
An operator schema specifies arguments, returns, aliasing and mutation. Following the add family through native_functions.yaml and torchgen shows how PyTorch generates interfaces and registrations, which numerical and derivative rules still need definitions, and why this build-time work differs from torch.compile.算子 schema 描述参数、返回值、别名与修改约定。沿着 add 家族追踪 native_functions.yaml 与 torchgen,可以看清 PyTorch 怎样生成接口和注册代码、哪些数值与求导规则仍需定义,以及这项构建期工作与 torch.compile 的区别。
Chaoshan, from old streets to the sea潮汕,骑楼下,海风里
Under Shantou’s old shop signs, along Nan’ao’s coast, beside the Han River in Chaozhou. A journey of salt air and lingering flavours, with two fans keeping the moments I was reluctant to leave.汕头的旧招牌下,南澳的海风里,潮州的韩江边。走过一程山海,记住几味咸鲜,两把轻轻的扇子,把舍不得走的片刻留了下来。
Jiuzhaigou, in the depths of blue九寨沟,水色深处
A turquoise lake holds the mountains in reflection; streams wind through the meadows. Colour first draws the eye in Jiuzhaigou, then small details make it linger.一湖青碧收着山影,几湾流水绕过草甸。九寨沟的山水,初看是颜色,久看是让人舍不得移开目光的细处。
Human vision: from retinal biology to optical limits and engineering人的视觉系统:从生物现象、光学约束到工程实现
Light reflected by a red cup forms a retinal image. Cones convert it into graded electrical signals; retinal circuits encode color and local contrast, while cortical processing supports shape and motion perception. Photon noise, filtering and event sensing connect this pathway to imaging engineering.红色杯子反射的光在视网膜上成像,视锥将光转换为渐变电信号,视网膜回路编码颜色与局部对比,皮层处理参与形状和运动知觉。沿着这条通路,光子噪声、空间滤波和事件感知将生物视觉与成像工程联系起来。
From torch.compile to generated kernels: capture, guards and fusion从 torch.compile 到生成内核:图捕获、守卫与融合
TorchDynamo captures tensor operations into FX graphs and guards the assumptions used to specialize them. AOTAutograd prepares differentiation graphs; TorchInductor lowers and schedules computation, fusing compatible operations to avoid materialized intermediates. Cached code is reused only when its guards hold.TorchDynamo 将张量操作捕获为 FX 图,并用守卫检查特化所依赖的条件。AOTAutograd 准备求导图,TorchInductor 将图转换为低层中间表示并调度计算,将兼容操作融合以减少中间张量的物化。只有守卫满足时,缓存代码才能复用。
Autograd nodes and the backward engine: how gradients meetAutograd 节点与反向引擎:梯度如何汇合
Backward nodes apply vector–Jacobian products. The autograd engine accumulates incoming contributions in input buffers and schedules a node when its dependencies are satisfied. AccumulateGrad then writes or adds the resulting gradient to a leaf tensor’s .grad.反向节点计算向量–雅可比积。Autograd 引擎用输入缓冲区汇总梯度贡献,在依赖满足后调度节点;AccumulateGrad 随后将结果写入或累加到叶子张量的 .grad。
CUDA streams, kernels and timing: when is the GPU actually done?CUDA 流、内核与计时:GPU 到底什么时候算完?
CUDA streams order submitted work; events connect dependencies across streams. Host return, event completion and tensor storage lifetime are different boundaries. Timing a matrix multiplication requires choosing which boundary to measure and accounting for warm-up, precision and synchronization.CUDA 流为提交的操作建立顺序,事件连接跨流依赖。主机调用返回、事件完成和张量存储生命周期是不同的边界。测量矩阵乘法前,需要明确计时边界,并控制预热、计算精度与同步方式。
Operator registration and dispatch: how PyTorch selects a kernel算子注册与调度:PyTorch 如何选择内核
PyTorch separates operator schemas from implementations. The dispatcher combines tensor dispatch keys with thread-local state, selects an operator-specific table entry, and lets wrappers redispatch to lower layers. Autograd dispatch and gradient recording are separate decisions.PyTorch 将算子接口与实现分开注册。调度器合并张量的调度键与线程局部状态,从算子专属的调度表中选择入口;包装层再通过 redispatch 进入下层实现。进入 Autograd 调度层与记录反向图是两个不同的判断。
Tensor, strides, and storage: why a transpose can be freeTensor、步幅与存储:转置为什么可以不搬数据
For a dense strided tensor, strides and storage_offset map logical indices to storage locations. Transpose shares the original storage by swapping sizes and strides; making a noncontiguous result contiguous requires copying its data.对稠密步幅张量,strides 与 storage_offset 决定逻辑索引对应的存储位置。转置通过交换形状和步幅共享原存储;将非连续结果转为连续布局则需要复制数据。
How do spikes learn to compute?脉冲如何学会计算?
LIF describes membrane integration, threshold firing and reset. BPTT propagates gradients through time, STDP updates synapses from spike timing, and EventProp differentiates continuous event trajectories. UltraLIF modifies the forward model to support differentiable training.LIF 描述膜电位积分、阈值发放与重置。BPTT 沿时间展开图传播梯度,STDP 根据脉冲时序更新突触,EventProp 对连续时间的事件轨迹求导。UltraLIF 则调整前向模型以支持可微训练。
Rust vs C++: two paths to performanceRust vs C++:高性能的两条路
Safe Rust uses ownership and borrowing rules to restrict invalid references and unsynchronized shared mutation. C++ uses RAII to manage resource lifetimes, while reference validity depends on API contracts and program design. Performance in either language depends on data layout, algorithms and generated code.Safe Rust 通过所有权和借用规则约束无效引用与未同步的共享修改。C++ 用 RAII 管理资源生命周期,引用有效性仍依赖接口约定和程序设计。两者的性能都取决于数据布局、算法与生成的机器码。
CUDA Rust: from threads to tilesCUDA Rust:从线程到 Tile,理解两条 Kernel 路线
SIMT kernels assign scalar work to individual threads; tile kernels express operations over data blocks and leave thread mapping to the compiler. Correct output partitioning and boundary handling prevent duplicate writes and omissions, while memory access and data reuse shape performance.SIMT 内核为单个线程分配标量计算,Tile 内核则描述数据块上的运算,由编译器组织线程映射。正确的输出分区与边界处理避免重复写入和遗漏,访存方式与数据复用影响性能表现。
What is PyTorch? Inside torch.matmulPyTorch 到底是什么?跟踪一次 torch.matmul
For dense 2-D inputs in eager mode, torch.matmul calls mm and dispatches to a CPU or CUDA implementation. With gradient recording enabled and inputs requiring gradients, autograd records dependencies for backward to apply the chain rule and accumulate leaf gradients.在即时执行模式下,稠密二维张量的 torch.matmul 调用 mm,并分派到 CPU 或 CUDA 实现。开启梯度记录且输入需要梯度时,autograd 记录依赖关系,供反向传播应用链式法则并累积叶子张量的梯度。
How much faster? Benchmark with evidence快了多少?从一次测量到可信的基准测试
Warm-up reduces initial JIT compilation effects, batched timing amortizes timer overhead, and repeated samples reveal runtime variability. Performance comparisons require consistent inputs and equivalent results; medians and quartiles describe the measured runtime distribution.预热减轻首次 JIT 编译的影响,批量计时摊薄计时开销,重复采样揭示耗时波动。性能比较以输入一致、结果等价为前提,再用中位数和四分位数描述实测耗时的分布。
Waves, phase & superposition波、相位与叠加:让公式动起来
In a linear model, waves superpose by adding their displacements. For two sinusoidal waves with equal amplitude, frequency and wave number, phase difference sets the resultant amplitude: zero phase difference doubles it, while π produces complete cancellation.在线性模型中,波的叠加等于位移相加。两列振幅、频率和波数相同的正弦波,其合成振幅由相位差决定:同相时振幅加倍,相差 π 时完全相消。
20212 NOTES
Band Storage GAXPY带状矩阵的紧凑存储
Band storage keeps only diagonals within the lower and upper bandwidths, allowing GAXPY to skip entries outside the band. For an n×n narrow-band matrix with stored band width w, storage and arithmetic work scale as O(nw) rather than O(n²).带状存储只保留上下带宽以内的对角线,使 GAXPY 跳过带外元素。对于 n×n 窄带矩阵,若存储带宽为 w,存储量与运算量均由 O(n²) 降为 O(nw)。
Symmetric Storage GAXPY对称矩阵的压缩存储
A real symmetric matrix can store its lower triangle in n(n+1)/2 entries. In GAXPY, each off-diagonal entry contributes to two output components, so storage is nearly halved while arithmetic work remains O(n²).实对称矩阵只需保存下三角的 n(n+1)/2 个元素。GAXPY 中,每个非对角元素都要贡献到两个输出分量,因此存储量接近减半,运算量仍为 O(n²)。
20193 NOTES
Fast Matrix–Vector Products快速矩阵向量乘法
Radix-2 FFT recursively splits a DFT into transforms over even- and odd-indexed samples. Butterfly operations reuse these results, reducing arithmetic from O(n²) to O(n log n) while computing the same discrete Fourier transform.基 2 FFT 将 DFT 递归分解为偶数位置与奇数位置样本的变换,再通过蝶形运算复用子问题的结果。它计算的仍是同一个离散傅里叶变换,运算量却从 O(n²) 降为 O(n log n)。
Matrix Multiplication矩阵乘法:结构与效率
Loop order determines memory strides and opportunities for data reuse. Contiguous accesses use cache lines efficiently, while blocking reuses submatrices in cache to reduce data movement without changing the arithmetic work.矩阵乘法的循环顺序决定访存步长与数据复用机会。连续访问有利于利用缓存行,分块则反复使用缓存中的子矩阵,在算术量不变的情况下减少数据搬运。
Frank–Wolfe AlgorithmFrank–Wolfe 条件梯度法
Frank–Wolfe minimizes a linear approximation over a convex feasible set, then updates the iterate by a convex combination, preserving feasibility without projection. For a differentiable convex objective, the Frank–Wolfe gap bounds the remaining objective error.Frank–Wolfe 在凸可行域上求解线性化子问题,再以凸组合更新迭代点,从而无需投影即可保持可行性。对可微凸目标,Frank–Wolfe 间隙给出剩余目标误差的上界。