<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Gerard Wu</title><link>https://gerardwu.com/</link><description>Recent content on Gerard Wu</description><generator>Hugo -- gohugo.io</generator><language>en-US</language><lastBuildDate>Thu, 30 Jul 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://gerardwu.com/index.xml" rel="self" type="application/rss+xml"/><item><title>Historical Market News Search</title><link>https://gerardwu.com/p/historical-market-news-search/</link><pubDate>Thu, 30 Jul 2026 00:00:00 +0000</pubDate><guid>https://gerardwu.com/p/historical-market-news-search/</guid><description>&lt;img src="https://gerardwu.com/p/historical-market-news-search/images/historical-market-news-search.png" alt="Featured image of post Historical Market News Search" /&gt;&lt;h1 id="historical-market-news-search"&gt;Historical market news search&#10;&lt;/h1&gt;&lt;p&gt;I built this project for two related jobs:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Stop at a past date, read only the news available then, make a forecast, and reveal the outcome afterward. This trains human market judgment without hindsight.&lt;/li&gt;&#10;&lt;li&gt;Give an artificial intelligence (AI) agent the same date-limited news, then send its forecast to a separate backtest.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;Repository: &lt;a class="link" href="https://github.com/GerardWu100/news" target="_blank" rel="noopener"&#10; &gt;github.com/GerardWu100/news&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;img alt="Historical Market News Search browser" class="gallery-image" data-flex-basis="314px" data-flex-grow="130" height="1100" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://gerardwu.com/p/historical-market-news-search/images/historical-market-news-search.png" srcset="https://gerardwu.com/p/historical-market-news-search/images/historical-market-news-search_hu_b92f2fa93cf6bdd9.png 800w, https://gerardwu.com/p/historical-market-news-search/images/historical-market-news-search.png 1440w" width="1440"&gt;&lt;/p&gt;</description></item><item><title>Does Gamma Exposure Predict Next-Day SPY Volatility?</title><link>https://gerardwu.com/p/gamma-exposure-next-day-spy-volatility/</link><pubDate>Sun, 12 Jul 2026 00:00:00 +0000</pubDate><guid>https://gerardwu.com/p/gamma-exposure-next-day-spy-volatility/</guid><description>&lt;img src="https://gerardwu.com/p/gamma-exposure-next-day-spy-volatility/images/01_aligned_series.png" alt="Featured image of post Does Gamma Exposure Predict Next-Day SPY Volatility?" /&gt;&lt;h1 id="does-gamma-exposure-predict-next-day-spy-volatility"&gt;Does gamma exposure predict next-day SPY volatility?&#10;&lt;/h1&gt;&lt;p&gt;Options traders often use gamma exposure to identify levels where dealer hedging may dampen or amplify market moves. The mechanism makes sense. A dealer who is long gamma tends to buy after declines and sell after rallies. A short-gamma dealer tends to hedge in the same direction as the move. The first flow stabilizes the market. The second can reinforce volatility.&lt;/p&gt;&#10;&lt;p&gt;That story leaves an empirical question: does today&amp;rsquo;s option gamma structure tell us anything about SPY&amp;rsquo;s intraday behavior on the next trading day?&lt;/p&gt;</description></item><item><title>Free Data, Short Memory: Building a Long-Term Hyperliquid Candle Archive</title><link>https://gerardwu.com/p/free-data-short-memory-building-a-long-term-hyperliquid-candle-archive/</link><pubDate>Tue, 30 Jun 2026 00:00:00 +0000</pubDate><guid>https://gerardwu.com/p/free-data-short-memory-building-a-long-term-hyperliquid-candle-archive/</guid><description>&lt;img src="https://gerardwu.com/p/free-data-short-memory-building-a-long-term-hyperliquid-candle-archive/images/hero.png" alt="Featured image of post Free Data, Short Memory: Building a Long-Term Hyperliquid Candle Archive" /&gt;&lt;p&gt;Hyperliquid provides recent market data through a free public application programming interface (API). For one-minute candles, free does not mean permanent. The &lt;code&gt;candleSnapshot&lt;/code&gt; endpoint returns only the latest 5,000 candles, or about 3 days, 11 hours, and 20 minutes of history.&lt;/p&gt;&#10;&lt;p&gt;That short window changes the problem. I cannot wait until I have a research question and then request several years of one-minute data. I need to collect each candle while it is still available and keep the archive running through routine failures.&lt;/p&gt;</description></item><item><title>Mapping IBKR's API Surfaces for Instrument Discovery</title><link>https://gerardwu.com/p/mapping-ibkrs-api-surfaces-for-instrument-discovery/</link><pubDate>Sat, 18 Apr 2026 00:00:00 +0000</pubDate><guid>https://gerardwu.com/p/mapping-ibkrs-api-surfaces-for-instrument-discovery/</guid><description>&lt;img src="https://gerardwu.com/p/mapping-ibkrs-api-surfaces-for-instrument-discovery/images/api-surface-map.svg" alt="Featured image of post Mapping IBKR's API Surfaces for Instrument Discovery" /&gt;&lt;h1 id="mapping-ibkr-apis-for-instrument-discovery"&gt;Mapping IBKR APIs for instrument discovery&#10;&lt;/h1&gt;&lt;p&gt;The first problem in broker-based research is not trade execution. It is knowing what the broker can actually see.&lt;/p&gt;&#10;&lt;p&gt;Interactive Brokers exposes many contract families, but discovery is uneven. Some instruments can be listed directly. Others can only be qualified once the symbol, root, exchange or identifier is already known. Some appear in scanner metadata but do not form an exhaustive tradable universe. I separate those cases before building screens, backtests or execution tools on assumptions that the API cannot support.&lt;/p&gt;</description></item><item><title>Building a Local ClickHouse Warehouse for Market Data</title><link>https://gerardwu.com/p/building-a-local-clickhouse-warehouse-for-market-data/</link><pubDate>Fri, 10 Apr 2026 00:00:00 +0000</pubDate><guid>https://gerardwu.com/p/building-a-local-clickhouse-warehouse-for-market-data/</guid><description>&lt;img src="https://gerardwu.com/p/building-a-local-clickhouse-warehouse-for-market-data/images/ivydb_year_compression.png" alt="Featured image of post Building a Local ClickHouse Warehouse for Market Data" /&gt;&lt;p&gt;I built this warehouse to load several large market data dumps into ClickHouse once, then query them without reshaping the source data beyond recognition. The original version used FirstRateData for regular market bars and options, plus CoinMetrics for crypto perpetuals. I later replaced the options data with OptionMetrics IvyDB US.&lt;/p&gt;&#10;&lt;p&gt;IvyDB is an institutional options database. Its option-price tables are wide. Some fields repeat heavily, while implied volatility and the Greeks are much noisier. The final load has 30 yearly tables, &lt;code&gt;opprcd1996&lt;/code&gt; through &lt;code&gt;opprcd2025&lt;/code&gt;, with 4.31 billion rows in total. ClickHouse compresses 521.59 GiB of column data to 64.79 GiB, a ratio of 8.05x.&lt;/p&gt;</description></item><item><title>Setting Up OpenClaw on a Hardened Cloud Server</title><link>https://gerardwu.com/p/setting-up-openclaw-on-a-hardened-cloud-server/</link><pubDate>Sun, 15 Mar 2026 00:00:00 +0000</pubDate><guid>https://gerardwu.com/p/setting-up-openclaw-on-a-hardened-cloud-server/</guid><description>&lt;img src="https://gerardwu.com/p/setting-up-openclaw-on-a-hardened-cloud-server/images/banner.png" alt="Featured image of post Setting Up OpenClaw on a Hardened Cloud Server" /&gt;&lt;h1 id="setting-up-openclaw-on-a-hardened-cloud-server"&gt;Setting up OpenClaw on a hardened cloud server&#10;&lt;/h1&gt;&lt;p&gt;&lt;a class="link" href="https://openclaw.ai" target="_blank" rel="noopener"&#10; &gt;OpenClaw&lt;/a&gt; is an open-source AI agent that runs on your own server. Its persistent gateway connects to the language model you configure with your own API keys. The agent can browse the web, run code, read and write files and call external services.&lt;/p&gt;&#10;&lt;p&gt;The agent follows a &lt;a class="link" href="https://react-lm.github.io/" target="_blank" rel="noopener"&#10; &gt;ReAct&lt;/a&gt; loop. It reasons, acts and observes until the task finishes or it needs input. Every action passes through an explicit tool authorization layer, so the agent can use only the tools you allow.&lt;/p&gt;</description></item><item><title>How I Construct My Own ETF Portfolio</title><link>https://gerardwu.com/p/how-i-construct-my-own-etf-portfolio/</link><pubDate>Tue, 17 Feb 2026 00:00:00 +0000</pubDate><guid>https://gerardwu.com/p/how-i-construct-my-own-etf-portfolio/</guid><description>&lt;img src="https://gerardwu.com/p/how-i-construct-my-own-etf-portfolio/images/hrp_tree_weights.png" alt="Featured image of post How I Construct My Own ETF Portfolio" /&gt;&lt;h1 id="how-i-construct-my-etf-portfolio"&gt;How I construct my ETF portfolio&#10;&lt;/h1&gt;&lt;p&gt;I want a long-term exchange-traded fund, or ETF, portfolio that does not amount&#10;to several labels on the same exposure. The job has two parts:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;First, select a group of ETFs with low correlation to each other.&lt;/li&gt;&#10;&lt;li&gt;Second, run portfolio optimization to decide the weights.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;Selection asks which ETFs belong in the basket. Weighting asks how to divide&#10;capital after the basket is fixed. Mixing those questions makes it harder to&#10;see whether a result comes from the assets or the optimizer.&lt;/p&gt;</description></item><item><title>Credit Risk Modelling: Multivariate Gaussian vs. Gaussian Copula</title><link>https://gerardwu.com/p/credit-risk-modelling-multivariate-gaussian-vs.-gaussian-copula/</link><pubDate>Sat, 06 Jan 2024 00:00:00 +0000</pubDate><guid>https://gerardwu.com/p/credit-risk-modelling-multivariate-gaussian-vs.-gaussian-copula/</guid><description>&lt;img src="https://gerardwu.com/p/credit-risk-modelling-multivariate-gaussian-vs.-gaussian-copula/images/var_comparison.png" alt="Featured image of post Credit Risk Modelling: Multivariate Gaussian vs. Gaussian Copula" /&gt;&lt;h1 id="credit-risk-modelling-with-a-multivariate-gaussian-and-a-gaussian-copula"&gt;Credit risk modelling with a multivariate Gaussian and a Gaussian copula&#10;&lt;/h1&gt;&lt;h2 id="setup"&gt;Setup&#10;&lt;/h2&gt;&lt;p&gt;The default probability of one bond tells me little about how a portfolio behaves under stress. I also need to know whether several bonds can deteriorate together. When losses cluster, diversification offers the least protection precisely when the portfolio needs it.&lt;/p&gt;&#10;&lt;h3 id="the-problem"&gt;The problem&#10;&lt;/h3&gt;&lt;p&gt;I start with &lt;strong&gt;two BBB-rated bonds&lt;/strong&gt; that have identical characteristics. Over a one-year horizon, each bond follows the historical rating transition probabilities below.&lt;/p&gt;</description></item><item><title>Building a Crypto Data Pipeline with QuestDB</title><link>https://gerardwu.com/p/building-a-crypto-data-pipeline-with-questdb/</link><pubDate>Fri, 05 Jan 2024 00:00:00 +0000</pubDate><guid>https://gerardwu.com/p/building-a-crypto-data-pipeline-with-questdb/</guid><description>&lt;img src="https://gerardwu.com/p/building-a-crypto-data-pipeline-with-questdb/images/Screenshot.png" alt="Featured image of post Building a Crypto Data Pipeline with QuestDB" /&gt;&lt;h1 id="building-a-crypto-candle-pipeline-with-questdb"&gt;Building a crypto candle pipeline with QuestDB&#10;&lt;/h1&gt;&lt;h2 id="why-i-chose-questdb"&gt;Why I chose QuestDB&#10;&lt;/h2&gt;&lt;p&gt;I needed to store minute candles across hundreds of crypto futures markets and still query them with ordinary SQL. QuestDB fit the job for specific reasons:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Columnar storage&lt;/strong&gt; for better compression and fast analytical queries&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Native time-series optimizations&lt;/strong&gt; including designated timestamps and time-based partitioning&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;SQL interface&lt;/strong&gt; so I could query it directly without learning another language&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;The feed contains OHLCV candles, meaning open, high, low, close, and volume, for every minute across a large market set. Designated timestamps and daily partitions matched that access pattern better than the general relational setup I had considered.&lt;/p&gt;</description></item><item><title>A Difference-in-Differences Analysis of the Ethereum Merges</title><link>https://gerardwu.com/p/a-difference-in-differences-analysis-of-the-ethereum-merges/</link><pubDate>Thu, 04 Jan 2024 00:00:00 +0000</pubDate><guid>https://gerardwu.com/p/a-difference-in-differences-analysis-of-the-ethereum-merges/</guid><description>&lt;img src="https://gerardwu.com/p/a-difference-in-differences-analysis-of-the-ethereum-merges/images/eth-merge-diagram.webp" alt="Featured image of post A Difference-in-Differences Analysis of the Ethereum Merges" /&gt;&lt;h1 id="did-the-ethereum-merge-break-the-futures-basis-signal"&gt;Did the Ethereum Merge break the futures basis signal?&#10;&lt;/h1&gt;&lt;h2 id="futures-basis-before-and-after-the-merge"&gt;Futures basis before and after the Merge&#10;&lt;/h2&gt;&lt;h3 id="why-basis-matters"&gt;Why basis matters&#10;&lt;/h3&gt;&lt;p&gt;Futures basis is the gap between futures and spot prices. It can carry information about expected volatility because traders often demand a larger premium when they expect more price movement. Before the Merge, I could treat that relationship as a useful signal for forward volatility.&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;Pre-Merge futures pricing (both BTC and ETH):&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>Static Replication of Barrier Options</title><link>https://gerardwu.com/p/static-replication-of-barrier-options/</link><pubDate>Wed, 03 Jan 2024 00:00:00 +0000</pubDate><guid>https://gerardwu.com/p/static-replication-of-barrier-options/</guid><description>&lt;img src="https://gerardwu.com/p/static-replication-of-barrier-options/featured.png" alt="Featured image of post Static Replication of Barrier Options" /&gt;&lt;h1 id="static-replication-of-barrier-options"&gt;Static replication of barrier options&#10;&lt;/h1&gt;&lt;h2 id="pricing-a-path-dependent-option"&gt;Pricing a path-dependent option&#10;&lt;/h2&gt;&lt;p&gt;The contract is a &lt;strong&gt;down-and-in barrier put&lt;/strong&gt;. If the barrier is never touched, the option expires worthless. If the barrier is hit on a monitoring date, the holder receives an ordinary European put.&lt;/p&gt;&#10;&lt;p&gt;The practical question is whether I can price and hedge that payoff without constant rebalancing. I use &lt;strong&gt;static replication&lt;/strong&gt;, a fixed portfolio of vanilla options calibrated to the barrier at each monitoring date.&lt;/p&gt;</description></item><item><title>Risk Analysis and Backtesting a Pairs Trading Strategy (Part II)</title><link>https://gerardwu.com/p/risk-analysis-and-backtesting-a-pairs-trading-strategy-part-ii/</link><pubDate>Tue, 02 Jan 2024 00:00:00 +0000</pubDate><guid>https://gerardwu.com/p/risk-analysis-and-backtesting-a-pairs-trading-strategy-part-ii/</guid><description>&lt;img src="https://gerardwu.com/p/risk-analysis-and-backtesting-a-pairs-trading-strategy-part-ii/images/strategy_sample_paths.png" alt="Featured image of post Risk Analysis and Backtesting a Pairs Trading Strategy (Part II)" /&gt;&lt;h1 id="risk-analysis-and-backtesting-for-a-pairs-trade-part-ii"&gt;Risk analysis and backtesting for a pairs trade, part II&#10;&lt;/h1&gt;&lt;p&gt;Part I built the simulation. Here I use it to estimate model-implied risk, then check that picture against a simple historical backtest. The contrast is uncomfortable but useful. A strategy that looks attractive inside its model can still lose badly on realised prices.&lt;/p&gt;&#10;&lt;h2 id="monte-carlo-risk-analysis"&gt;Monte Carlo risk analysis&#10;&lt;/h2&gt;&lt;h3 id="portfolio-construction"&gt;Portfolio construction&#10;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Capital allocation:&lt;/strong&gt; $100,000 (October 9, 2023)&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;Position sizing:&lt;/strong&gt;&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Long PEP: 663 shares × $150.67 = $99,892&lt;/li&gt;&#10;&lt;li&gt;Short KO: 2,008 shares × $49.80 = $99,990&lt;/li&gt;&#10;&lt;li&gt;Gross exposure: $199,882&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;&lt;strong&gt;Initial spread:&lt;/strong&gt; $S_0 = \$49.80 - 0.333 \times $150.67 = -$0.38$&lt;/p&gt;</description></item><item><title>A Monte Carlo Simulation for Pairs Trading Using an OU Process (Part I)</title><link>https://gerardwu.com/p/a-monte-carlo-simulation-for-pairs-trading-using-an-ou-process-part-i/</link><pubDate>Mon, 01 Jan 2024 00:00:00 +0000</pubDate><guid>https://gerardwu.com/p/a-monte-carlo-simulation-for-pairs-trading-using-an-ou-process-part-i/</guid><description>&lt;img src="https://gerardwu.com/p/a-monte-carlo-simulation-for-pairs-trading-using-an-ou-process-part-i/images/01_historical_prices.png" alt="Featured image of post A Monte Carlo Simulation for Pairs Trading Using an OU Process (Part I)" /&gt;&lt;h1 id="simulating-the-ko-pep-pairs-trade-with-an-ou-process-part-i"&gt;Simulating the KO-PEP pairs trade with an OU process, part I&#10;&lt;/h1&gt;&lt;p&gt;I wanted a simple simulation of the classic KO-PEP pairs trade. The model has two jobs. It must keep the stock returns correlated while pulling the spread back toward its mean.&lt;/p&gt;&#10;&lt;h2 id="data"&gt;Data&#10;&lt;/h2&gt;&lt;h3 id="getting-the-data"&gt;Getting the data&#10;&lt;/h3&gt;&lt;p&gt;I pulled 45 years of adjusted closing prices for KO and PEP from Yahoo Finance. The long history reduces the influence of any single short market regime on the parameter estimates.&lt;/p&gt;</description></item></channel></rss>