Skills

Seasonal

Seasonal/calendar-effect strategy.

Install

npx skills add HKUDS/Vibe-Trading --skill seasonal -g -a claude-code -y
Repository
HKUDS/Vibe-Trading37.4k
Category
Engineering
Updated
3d ago
License
MIT
Context cost
Lightabout 516 tokens
Runs scripts
Yes, review before use

What it does

Seasonal/calendar-effect strategy. Generates trading signals from time-based patterns such as month-of-year effects and day-of-week effects. Suitable for any OHLCV data.

Seasonal / Calendar Effect Strategy

Purpose

Uses time-based regularities in financial markets (month effects, day-of-week effects, and similar patterns) to generate trading signals. Examples include the China A-share "spring rally" (January-March) and the "sell in May" effect.

Signal Logic

Month Effect (Default)

  • Specified bullish months → go long
  • Specified bearish months → go short / stay out
  • All other months → stay flat

Day-of-Week Effect (Optional Overlay)

  • Monday / Friday effects
  • Start-of-month / end-of-month effects

Combined Mode

Month signal × weekday signal; open a position only when both confirm.

Common Calendar Effects Reference

EffectDescriptionReference Configuration
Spring rallyHigher probability of gains in China A-shares from January to Marchbullish_months=[1,2,3]
Sell in MayWeaker performance from May to Octoberbearish_months=[5,6,7,8,9,10]
Year-end effectInstitutional rebalancing in Decemberbullish_months=[11,12]
Monday effectLower returns on Mondaysbearish_weekdays=[0]
Friday effectHigher returns on Fridaysbullish_weekdays=[4]

Parameters

ParameterDefaultDescription
bullish_months[1, 2, 3, 11, 12]Bullish months
bearish_months[5, 6, 7, 8, 9]Bearish months
use_weekdayFalseWhether to enable weekday effects
bullish_weekdays[4]Bullish weekdays (0=Monday, 4=Friday)
bearish_weekdays[0]Bearish weekdays

Common Pitfalls

  • pd.DatetimeIndex.month starts from 1 (1=January)
  • pd.DatetimeIndex.weekday starts from 0 (0=Monday, 4=Friday)
  • Seasonal strategies are statistical regularities, not deterministic signals, so pay attention to sample size in backtests
  • Neutral months (neither in bullish nor bearish) should output 0 and must not be skipped

Dependencies

pip install pandas numpy

Signal Convention

Read the whole SKILL.md on GitHub

More in Engineering