Ligang Yan

Ligang Yan

Software engineer based in Halifax, Canada, focused on applying AI/ML to finance and quantitative investing. This blog is where I write about life and what I learn along the way.

  1. Writing
    Finishing Campus2Market Discover: What Seven Weeks of Entrepreneurship Training Taught MeI completed Dal Innovates' seven-week Campus2Market Discover program. Four lessons: fall in love with the problem, how to run customer interviews, the constraints hiding in a business model, and why pitching forces clarity. Plus SweetValueLab, which I refined along the way.
  2. Writing
    First Place at RBC HubHacks 2026: An AI Fish-Counting Workspace for a Conservation Charity, Built in Five DaysOur team, The Coastal Coders, won first place on the Coastal Action problem at RBC HubHacks 2026. What the brief was, what Tideflow does, how we went from a single detection model to a full platform in five days, and what we learned from the pitch and the judges.
  3. Reading
    量化交易从入门到精通:如何构建你的算法交易系统Finished “量化交易从入门到精通:如何构建你的算法交易系统”[加]欧内斯特·陈
  4. Writing
    Can You Store It, Show It, Sell It? What the Terms of 29 Market Data Sources AllowI read the terms pages of 29 US market data sources. Ten let you store, show and commercially use their data, and every one of those is public-domain data. None of the nine price APIs lets you show prices to your users on a self-serve plan.
  5. Writing
    US vs Canada government benefits compared (2026)One table covering the main government benefits in the US and Canada: retirement, health care, unemployment, children, food, home buying, student aid and more across 17 categories, with amounts as of October 2026.
  6. Writing
    LU Decomposition by Hand: Splitting a 3×3 Matrix into L·ULU decomposition is Gaussian elimination with the work saved: U is what elimination leaves behind, L records how many times each row was subtracted. Working one 3×3 matrix all the way through, then using it to solve equations and get a determinant, why row swaps are needed (PA = LU), and what it's actually good for.
  7. Writing
    SVD by Hand: Splitting a 2×3 Matrix into UΣVᵀSingular value decomposition breaks any matrix into a rotation, a stretch and another rotation. Working one 2×3 matrix all the way through: eigenvalues of AAᵀ, square roots for the singular values, U and V column by column, and a check that multiplies it all back. Along the way, why the square root and why signs can go wrong.
  8. Writing
    A Vibe Coding Guide: Mistakes I Made and a Self-Check List for Your AIWhat I learned from 787 commits written with Claude and some forty mistakes along the way. Every item comes with a self-check prompt: paste the whole post into your AI and it can go through your project item by item.
  9. Writing
    Gradient Descent, Line by Line: Twelve Lines of Python and the Calculus Behind ThemA twelve-line function fits the best straight line through a cloud of points: it starts flat at zero and 900 times over asks which way is less wrong. Taking it apart one line at a time — what a gradient actually is, where the formulas come from, why the minus sign, and what alpha does.
  10. Writing
    Rebuilding my personal site on Astro and Cloudflare WorkersThe first post on the new site, on why I picked this stack and how the site is meant to grow.
  11. Investing
    2025 关税冲击全纪录七周 −18.9%,一天 +9.52%,十一周后创新高——全程由政策而非基本面驱动。按真实日线还原完整时间线,附 VIX 路径与四条复盘。历史复盘
  12. Investing
    基础材料板块手册从挖矿到卖螺丝,五个子板块、五种生意、五套估值锚。周期股为什么低市盈率反而是卖出信号,以及周期每个阶段该盯什么。不含任何当前行情。板块手册
  13. Investing
    六个月后回看2026 年 3 月写的六份个股报告,每份都设了止损、加仓和止盈价位。用真实日线逐条对账:哪些触发了,哪些没有,以及一份把止损和加仓画进同一个 13 美元区间的计划。研报对账
  14. Investing
    八篇财报快报,五个月后四月两天里写的八篇 Q1 财报快报,同一套模板、同一个宏观变量。五个月后六只金融股等权 +8.8%,XLF 是 +8.4%——六份深度分析换来 0.4 个百分点,还没扣成本。整批对账
  15. Milestone
    ◆ This site went live
  16. Investing
    Costco, two enginesOne membership card, two engines that depend on each other: merchandise makes no money so members renew, and the fees are the profit. Placing 45× earnings inside Costco's own twelve-year history to work out which year, and what growth, the market is paying for.Two-engine breakdown + reverse-engineered pricing
  17. Investing
    SpaceX, taken apartOne company, three completely different businesses. Space, Connectivity and AI are valued separately against their own peers and added back together, to see which assumptions a buyer at $151 is paying for.Sum-of-the-parts valuation
  18. Writing
    Does Canada really have no estate tax? The real gap between the two countries' death taxesCanada has no estate tax but it has deemed disposition: every unrealised gain is taxed at once on the final return, and an RRSP is included at 100%. The US has step-up in basis and a $15 million exemption. Four household scenarios with the bill worked out, plus a trap few people know about: a Canadian holding more than $60,000 of US stocks has a US estate-tax filing obligation.
  19. Investing
    One causal chain for US equities in H2 2026From the Iran war to the QQQ drawdown in eight steps: imported inflation, a Fed debating hikes, a higher discount rate, and why long duration got hit first. Three scenarios, then two places on the chain to act: EOG as the hedge, Alphabet as the offence.Macro · eight steps · two stocks
  20. Reading
    金钱心理学 (全新增订版)Finished “金钱心理学 (全新增订版)”[美]摩根·豪泽尔“14条通往财务独立之旅的建议”