Expand model tag support: add GLM-5.1, simplify Anthropic IDs, scan tags anywhere in message
- Flink update_bars debouncing - update_bars subscription idempotency bugfix - Price decimal correction bugfix of previous commit - Add GLM-5.1 model tag alongside renamed GLM-5 - Use short Anthropic model IDs (sonnet/haiku/opus) instead of full version strings - Allow @tags anywhere in message content, not just at start - Return hasOtherContent flag instead of trimmed rest string - Only trigger greeting stream when tag has no other content - Update workspace knowledge base references to platform/workspace and platform/shapes - Hierarchical knowledge base catalog - 151 Trading Strategies knowledge base articles - Shapes knowledge base article - MutateShapes tool instead of workspace patch
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
---
|
||||
description: "A macro strategy that holds equities exclusively on important economic announcement days (FOMC, etc.) and switches to risk-free assets on all other days, exploiting the empirical announcement premium."
|
||||
tags: [global-macro, event-driven, fomc, announcement, equities]
|
||||
---
|
||||
|
||||
# Trading on Economic Announcements
|
||||
|
||||
**Section**: 19.5 | **Asset Class**: Global Macro | **Type**: Event-driven / Calendar-based
|
||||
|
||||
## Overview
|
||||
|
||||
Empirical evidence suggests that stocks tend to yield higher returns on important announcement dates — such as Federal Open Market Committee (FOMC) announcement days — than on other trading days. A simple macro trading strategy exploits this "announcement premium" by holding equities (via ETFs or futures) only on announcement days (ADs) and switching to risk-free assets (e.g., Treasuries) during all non-announcement days (NDAs). The strategy rotates 100% between equity exposure and Treasury exposure based solely on the calendar of scheduled announcements.
|
||||
|
||||
## Construction / Mechanics
|
||||
|
||||
### Signal Construction
|
||||
|
||||
1. Identify a set of important economic announcement dates (ADs). The primary example is FOMC announcement days, but other relevant announcements may include:
|
||||
- Non-Farm Payrolls (NFP)
|
||||
- CPI/inflation releases
|
||||
- GDP advance estimates
|
||||
- Other major central bank decisions (ECB, BoE, etc.)
|
||||
|
||||
2. For each trading day `t`:
|
||||
- If `t` is an announcement day (AD): hold equity ETFs/futures
|
||||
- If `t` is a non-announcement day (NDA): hold risk-free assets (e.g., T-bills or short-term Treasuries)
|
||||
|
||||
### Execution
|
||||
|
||||
- Implemented via ETFs (e.g., SPY for U.S. equities, SHY/BIL for short-term Treasuries) or futures (e.g., E-mini S&P 500 futures + T-bond futures)
|
||||
- Positions are switched at the open or close on the day before/day of each announcement
|
||||
- The strategy moves from 100% equities on ADs to 100% Treasuries on NDAs (binary switching)
|
||||
- Individual stocks are not used — the strategy operates at the index/ETF level
|
||||
|
||||
### Optional Technical Filters
|
||||
|
||||
The basic binary strategy can be augmented with various technical filters (e.g., momentum filters on the equity index) to further refine the signal and potentially improve the risk-adjusted return profile.
|
||||
|
||||
## Return Profile / Objective
|
||||
|
||||
The strategy captures the empirically documented "announcement premium" — the excess return accruing to equity holders on announcement days relative to non-announcement days. By being fully invested in equities only on ADs and earning the risk-free rate otherwise, the strategy aims to achieve equity-like returns with substantially reduced time-in-market and potentially lower overall risk. Returns are driven by the persistence of the announcement premium rather than by market direction.
|
||||
|
||||
## Key Parameters / Signals
|
||||
|
||||
- **Announcement calendar**: the set of ADs used (FOMC dates are the primary source; typically 8 per year for FOMC)
|
||||
- **Equity instrument**: broad index ETF or futures (e.g., S&P 500)
|
||||
- **Risk-free instrument**: T-bills, overnight repo, or short-term Treasury ETF
|
||||
- **Switching timing**: day-before close vs. announcement-day open; affects transaction costs
|
||||
- **Technical filter (optional)**: momentum or trend filter applied to the equity index to gate the switch
|
||||
- **Announcement types included**: FOMC only vs. broader macro announcement set
|
||||
|
||||
## Variations
|
||||
|
||||
- **Multi-announcement strategy**: include NFP, CPI, GDP, and other macro releases in addition to FOMC
|
||||
- **International extension**: apply to other central bank announcements (ECB, BoJ, BoE) for non-U.S. equity indexes
|
||||
- **Sector rotation on announcements**: hold rate-sensitive sectors on specific announcement types
|
||||
- **Options-based implementation**: use straddles around announcement dates to capture realized volatility premium
|
||||
- **Partial allocation**: hold a fixed fraction (e.g., 50%) in equities always, and increase to 100% only on ADs
|
||||
|
||||
## Notes
|
||||
|
||||
The existence and persistence of the FOMC announcement premium is well-documented in the academic literature (Savor and Wilson, 2013; Lucca and Moench, 2012). The premium is thought to reflect compensation for macroeconomic uncertainty resolved at announcement events. Transaction costs are relatively low given the infrequent switching (8 FOMC dates per year). The strategy's main risk is that the announcement premium may attenuate or disappear if it becomes widely exploited. Technical filters can help adapt to changing regimes. Because the strategy uses ETFs rather than individual stocks, execution is straightforward and liquidity is not a constraint for most portfolio sizes.
|
||||
@@ -0,0 +1,59 @@
|
||||
---
|
||||
description: "A systematic macro momentum strategy that buys assets favored by incoming macroeconomic trends and sells adversely affected assets, using four state variables to rank global equity indexes, currencies, and bonds."
|
||||
tags: [global-macro, momentum, systematic, multi-asset]
|
||||
---
|
||||
|
||||
# Fundamental Macro Momentum
|
||||
|
||||
**Section**: 19.2 | **Asset Class**: Global Macro | **Type**: Systematic momentum / Cross-sectional ranking
|
||||
|
||||
## Overview
|
||||
|
||||
This strategy aims to capture returns from the market's underreaction to changes in macroeconomic trends by buying assets favored by incoming macroeconomic trends and selling (shorting) assets adversely affected by them. It is a systematic (non-discretionary) strategy that can be applied across different asset classes — global equity indexes, currencies, government bonds, commodities, etc. — and exploits the tendency of prices to lag macroeconomic fundamentals.
|
||||
|
||||
## Construction / Mechanics
|
||||
|
||||
### State Variables
|
||||
|
||||
Four macroeconomic state variables are used to characterize conditions in each country:
|
||||
|
||||
1. **Business cycle trend**: estimated using 1-year changes in real GDP growth and CPI inflation forecast, each contributing with a 50% weight
|
||||
2. **International trade trend**: estimated using 1-year changes in spot FX rates against an export-weighted basket
|
||||
3. **Monetary policy trend**: estimated using 1-year changes in short-term interest rates
|
||||
4. **Risk sentiment trend**: estimated using 1-year equity market excess returns
|
||||
|
||||
Note: different asset classes are affected by macroeconomic trends differently. For example, increasing growth is positive for equities and currencies but negative for bonds.
|
||||
|
||||
### Portfolio Construction
|
||||
|
||||
1. For a given asset class (e.g., global equity indexes), rank each country's asset using the values of the four state variables
|
||||
2. Construct a zero-cost long-short portfolio by going long the assets in the top decile and shorting those in the bottom decile
|
||||
3. Portfolios for various asset classes can be combined, e.g., with equal weights
|
||||
4. Holding period typically ranges from three to six months
|
||||
|
||||
Multiple ranking and portfolio construction methods are available (see also Subsection 3.6 for multifactor portfolio construction approaches).
|
||||
|
||||
## Return Profile / Objective
|
||||
|
||||
Returns are driven by the market's systematic underreaction to macroeconomic trends: as trends gradually become recognized by market participants, prices adjust and the long positions appreciate while short positions decline. The strategy is fundamentally a momentum strategy but grounded in macroeconomic state variables rather than pure price momentum. Typical holding periods of 3–6 months mean lower turnover and transaction costs compared to short-term momentum.
|
||||
|
||||
## Key Parameters / Signals
|
||||
|
||||
- **Business cycle signal**: 1-year change in real GDP growth + CPI inflation forecast (50/50 weight)
|
||||
- **International trade signal**: 1-year change in spot FX rate vs. export-weighted basket
|
||||
- **Monetary policy signal**: 1-year change in short-term rates
|
||||
- **Risk sentiment signal**: 1-year equity market excess return
|
||||
- **Decile cutoffs**: top/bottom decile thresholds for portfolio construction
|
||||
- **Asset class weighting**: equal weight across combined asset class portfolios
|
||||
- **Holding period**: 3–6 months typical
|
||||
|
||||
## Variations
|
||||
|
||||
- **Single asset class**: apply the strategy only to equity indexes, only to currencies, or only to government bonds
|
||||
- **Broader factor set**: add additional state variables (e.g., current account balance, credit conditions)
|
||||
- **Discretionary overlay**: combine the systematic signal with analyst judgment
|
||||
- **CTA/managed futures extension**: apply the framework to futures contracts on equity indexes, bonds, and currencies
|
||||
|
||||
## Notes
|
||||
|
||||
Macro trading strategies constitute an investment style, not an asset class — they are not limited to any particular asset class or geographic region. The strategy can be classified as directional, long-short, or relative value depending on implementation. The three broad categories of macro strategies are discretionary macro, systematic macro, and CTA/managed futures. This strategy falls in the systematic macro category. Transaction costs are relatively modest given the 3–6 month holding period, but liquidity varies significantly across country assets. Care must be taken when applying this strategy to emerging markets where data quality and market access can be constraints.
|
||||
@@ -0,0 +1,63 @@
|
||||
---
|
||||
description: "A systematic macro strategy that ranks government bonds from multiple countries using fundamental factors (GDP, inflation, sovereign risk, real interest rate, momentum, term spread, Cochrane-Piazzesi) to construct a zero-cost long-short bond portfolio."
|
||||
tags: [global-macro, fixed-income, bonds, systematic, factor-investing]
|
||||
---
|
||||
|
||||
# Global Fixed-Income Strategy
|
||||
|
||||
**Section**: 19.4 | **Asset Class**: Global Macro | **Type**: Systematic / Cross-sectional factor investing
|
||||
|
||||
## Overview
|
||||
|
||||
This systematic macro trading strategy is based on a cross-sectional analysis of government bonds from various countries. Bonds are ranked using a set of fundamental and quantitative factors, and a zero-cost long-short portfolio is constructed by buying top-ranked bonds and selling bottom-ranked bonds. Country-bond ETFs are typically used as the investment vehicle.
|
||||
|
||||
## Construction / Mechanics
|
||||
|
||||
### Factor Set
|
||||
|
||||
Government bonds are evaluated and ranked using the following variables:
|
||||
|
||||
1. **GDP**: economic growth expectations; stronger GDP growth typically is negative for bonds (higher rates expected)
|
||||
2. **Inflation**: higher inflation erodes bond values; used as a negative signal for bonds
|
||||
3. **Sovereign risk**: credit quality of the government issuer; higher sovereign risk is negative for bonds
|
||||
4. **Real interest rate**: nominal rate minus inflation; higher real rates may indicate better bond valuations
|
||||
5. **Output gap**: difference between actual and potential GDP; affects future inflation and monetary policy expectations
|
||||
6. **Value**: valuation metric for bonds (e.g., yield relative to historical norms)
|
||||
7. **Momentum**: recent price/return trend of the bond
|
||||
8. **Term spread**: difference between long-term and short-term yields; an indicator of the yield curve shape and expected monetary policy
|
||||
9. **Cochrane-Piazzesi predictor**: a combination of forward rates that predicts excess bond returns (from Cochrane and Piazzesi, 2005)
|
||||
|
||||
### Portfolio Construction
|
||||
|
||||
1. For each country, compute the factor scores for its government bond
|
||||
2. Rank bonds across all countries based on the combined factor scores
|
||||
3. Construct a zero-cost portfolio: buy bonds in the top quantile, sell bonds in the bottom quantile
|
||||
4. Multifactor portfolios can also be constructed (analogous to Subsection 3.6)
|
||||
5. Investment vehicle: typically country-bond ETFs
|
||||
|
||||
## Return Profile / Objective
|
||||
|
||||
Returns are driven by systematic differences in bond valuations and expected returns across countries, as captured by the factor set. The strategy captures value, momentum, carry, and macro-fundamental signals simultaneously. Because it is long-short and zero-cost, returns are driven purely by relative differences rather than by the overall level of bond markets. The Cochrane-Piazzesi predictor specifically targets excess return predictability from the term structure of interest rates.
|
||||
|
||||
## Key Parameters / Signals
|
||||
|
||||
- **GDP growth**: typically 1-year change; positive for equities, negative for bonds
|
||||
- **Inflation**: YoY CPI; negative for nominal bonds
|
||||
- **Sovereign risk**: credit rating or CDS spread; negative signal for bonds
|
||||
- **Real interest rate**: nominal yield minus breakeven inflation
|
||||
- **Output gap**: estimated as deviation of GDP from potential (HP filter or similar)
|
||||
- **Value**: yield spread vs. historical average or fair-value model
|
||||
- **Momentum**: 12-month (or other lookback) return of the bond/ETF
|
||||
- **Term spread**: 10Y-2Y yield spread or similar
|
||||
- **Cochrane-Piazzesi (CP) predictor**: `cp_t = a + b * (y^5_t - (1/5)*sum_{n=1}^{5} f^n_t)` — a linear combination of forward rates that predicts excess returns on bonds
|
||||
|
||||
## Variations
|
||||
|
||||
- **Single-factor strategies**: pure momentum, pure value, or pure carry in government bonds
|
||||
- **Equity + bond combined macro**: extend the fundamental macro momentum framework (Section 19.2) to include bond rankings alongside equity index rankings
|
||||
- **Emerging market bonds**: apply the framework to EM sovereign debt, with additional currency risk considerations
|
||||
- **Corporate bond extension**: apply analogous factors to cross-sectional corporate bond strategies
|
||||
|
||||
## Notes
|
||||
|
||||
Cross-sectional government bond strategies require careful attention to currency risk — unless currency-hedged, returns are affected by both bond prices and exchange rate movements. Country-bond ETFs provide liquid access but may introduce tracking error relative to the underlying bond indexes. The Cochrane-Piazzesi predictor has been widely studied and validated in the academic literature for predicting U.S. Treasury excess returns, and has been extended internationally. Factor construction requires consistent data across countries, which can be challenging for some emerging market sovereign bonds.
|
||||
@@ -0,0 +1,77 @@
|
||||
---
|
||||
description: "A global macro inflation hedging strategy that allocates to commodities based on the spread between headline and core inflation, using ETFs or futures to execute the hedge."
|
||||
tags: [global-macro, inflation, commodities, hedging]
|
||||
---
|
||||
|
||||
# Global Macro Inflation Hedge
|
||||
|
||||
**Section**: 19.3 | **Asset Class**: Global Macro | **Type**: Inflation hedging / Commodity allocation
|
||||
|
||||
## Overview
|
||||
|
||||
Exogenous shocks — such as political or geopolitical events — can cause commodity prices (e.g., oil) to rise, leading to increased prices in oil-dependent economies. This strategy uses the spread between headline inflation (HI) and core inflation (CI) as a signal to determine the appropriate commodity allocation within a portfolio as an inflation hedge. The hedge is executed via ETFs, futures, or direct commodity exposure.
|
||||
|
||||
## Construction / Mechanics
|
||||
|
||||
### Inflation Pass-Through Mechanism
|
||||
|
||||
There are two steps in the inflation transmission process:
|
||||
|
||||
1. **Pass-through from commodity prices to headline inflation (HI)**: commodity price shocks quickly reflect in the headline Consumer Price Index (CPI), which covers a broad basket of goods and services
|
||||
2. **Pass-through from HI to core inflation (CI)**: core inflation excludes commodities (and other volatile components like food) and adjusts more slowly
|
||||
|
||||
**HI** is the raw inflation measured by indices such as the Consumer Price Index (CPI) based on prices of goods and services in a broad basket.
|
||||
**CI** excludes some products such as commodities, which are highly volatile and add noise to the index.
|
||||
|
||||
HI quickly reflects exogenous shocks around the world, while CI lags.
|
||||
|
||||
### Commodity Allocation Formula
|
||||
|
||||
The commodity allocation percentage (CA) within the portfolio is:
|
||||
|
||||
```
|
||||
CA = max(0, min(HI_YoY - CI_YoY / HI_YoY, 1)) (547)
|
||||
```
|
||||
|
||||
More precisely:
|
||||
```
|
||||
CA = max(0, min((HI_YoY - CI_YoY) / HI_YoY, 1))
|
||||
```
|
||||
|
||||
Where "YoY" stands for "year-on-year" change in the respective inflation measure.
|
||||
|
||||
**Interpretation:**
|
||||
- When `HI_YoY > CI_YoY`: the commodity-driven component of inflation is elevated; increase commodity allocation
|
||||
- When `HI_YoY <= CI_YoY`: no commodity-driven inflation premium; commodity allocation goes to zero
|
||||
- The formula is capped at 1 (100%) to prevent over-allocation
|
||||
- The floor at 0 prevents negative (short) commodity allocation
|
||||
|
||||
### Execution
|
||||
|
||||
The commodity exposure can be implemented by buying a basket of various commodities through:
|
||||
- ETFs (e.g., broad commodity ETFs, energy ETFs)
|
||||
- Futures contracts on commodity indexes or individual commodities
|
||||
- Direct commodity positions
|
||||
|
||||
## Return Profile / Objective
|
||||
|
||||
The strategy profits when commodity prices rise and the portfolio's commodity allocation benefits from this appreciation, offsetting inflationary erosion of the rest of the portfolio. The return profile is asymmetric: the allocation increases when the inflation signal is elevated and goes to zero when it is absent. This is a hedging strategy, so the primary objective is inflation protection rather than alpha generation.
|
||||
|
||||
## Key Parameters / Signals
|
||||
|
||||
- **HI_YoY**: year-on-year headline inflation rate (e.g., CPI)
|
||||
- **CI_YoY**: year-on-year core inflation rate (CPI excluding volatile components)
|
||||
- **Spread (HI - CI)**: the commodity-driven inflation component; the hedge signal
|
||||
- **CA**: resulting commodity allocation percentage, bounded in [0, 1]
|
||||
- **Commodity basket composition**: choice of ETFs or futures instruments used to implement the allocation
|
||||
|
||||
## Variations
|
||||
|
||||
- **Sector-specific commodity hedge**: allocate specifically to energy, metals, or agricultural commodities depending on the shock source
|
||||
- **Gold-only hedge**: use gold as the sole inflation hedge instrument (simpler but less diversified)
|
||||
- **TIPS overlay**: complement commodity allocation with Treasury Inflation-Protected Securities (TIPS)
|
||||
- **Dynamic basket rebalancing**: adjust the commodity basket weights based on which commodity categories are driving HI above CI
|
||||
|
||||
## Notes
|
||||
|
||||
Infrastructure assets (Chapter 20) can also serve as an inflation hedge, albeit with some heterogeneity. The two-step pass-through mechanism (commodity prices → HI → CI) means CI is a lagging indicator, providing a systematic signal with some temporal stability. The strategy is inherently defensive — it reduces underperformance during inflationary episodes without requiring a directional forecast on commodity prices per se. The formula naturally results in zero allocation during stable, non-commodity-driven inflation environments, which is appropriate since unneeded commodity exposure introduces unnecessary volatility.
|
||||
Reference in New Issue
Block a user