weekly-analysis

Fetch end-of-week prices, compute returns and momentum, and merge Rice Data Portal fundamentals.

Updated Jun 20, 2025
One-click install
npx skills add https://github.com/kerryback/mgmt638 --skill weekly-analysis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: weekly-analysis
Source: https://github.com/kerryback/mgmt638/tree/main/.claude/skills/weekly-analysis
Command: npx skills add https://github.com/kerryback/mgmt638 --skill weekly-analysis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires requests, pandas, numpy, python-dotenv, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a complete, self-contained workflow for weekly stock analysis, including fetching end-of-week prices, computing returns and momentum, and merging with fundamental data from the Rice Data Portal. It is designed to streamline weekly research and portfolio analysis with minimal manual steps.

Core Features & Use Cases

  • Automated weekly price retrieval: Fetch end-of-week prices and compute weekly returns.
  • Momentum and sizing: Calculate momentum and size-related indicators for week-over-week analysis.
  • Fundamental integration: Merge price signals with SEC/Rice fundamentals and shift data to avoid look-ahead bias.
  • Use Case: A portfolio analyst wants a reproducible weekly analysis that combines price signals with fundamentals for backtesting.

Quick Start

Use the weekly-analysis skill to fetch data starting from a specific date, then merge with fundamentals:

  1. python .claude/skills/weekly-analysis/scripts/fetch_weekly_data.py 2020-01-01 weekly.parquet
  2. python .claude/skills/weekly-analysis/scripts/merge_weekly_fundamentals.py weekly.parquet fundamentals.parquet weekly_merged.parquet

Frequently Asked Questions about weekly-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate weekly stock analysis with price data and fundamentals?

Weekly stock analysis automation fetches end-of-week prices, computes returns and momentum, then merges SEC fundamentals from the Rice Data Portal. This Skill provides a self-contained pipeline that outputs ticker, week, return, momentum, close price, marketcap, sector, industry, and size metrics in a structured dataset.

Can I combine weekly price signals with fundamental data to avoid look-ahead bias?

Yes. This Skill shifts daily and SF1 variables to prevent look-ahead bias, applies ISO week handling, and merges price data with precomputed ratio checks from the Rice Data Portal, ensuring your backtesting and portfolio analysis use temporally aligned signals.

What's the best way to set up a reproducible weekly portfolio analysis pipeline?

Use this Skill to fetch end-of-week prices starting from your target date, compute weekly returns and momentum indicators, then merge with fundamental data. The output is a structured parquet dataset ready for backtesting or further analysis without manual preprocessing steps.

Does this work for backtesting strategies that require weekly-frequency returns?

Yes. The Skill is designed specifically for weekly frequency analysis, computing week-over-week returns, momentum, and lag metrics while integrating fundamentals. It handles end-of-week price retrieval and look-ahead bias mitigation required for robust backtesting.

What data do I need before running weekly analysis?

You need access to end-of-week stock prices and Rice Data Portal credentials for SEC fundamentals. The Skill requires Python, requests, pandas, numpy, and python-dotenv. It fetches and merges data automatically from those sources into a single weekly dataset.

Why is shifting variables important in weekly stock analysis?

Shifting daily and fundamental variables prevents look-ahead bias in backtesting by ensuring you only use data that was actually available at the time of analysis. This Skill applies these shifts automatically to produce temporally valid signals for portfolio decisions.