Skip to content

Support quintile and decile long-short portfolio sorts #2

Description

@Yuning598

Background

The current equity pipeline hard-codes monthly decile assignments and the explorer labels the spread as 10-1. The analysis should also report quintile portfolios so that 5-1 and 10-1 results can be compared consistently.

Scope

  • Parameterize the number of portfolios instead of hard-coding ten groups.
  • Build both quintile (5-1) and decile (10-1) long-short series.
  • Support the existing equal-weighted and value-weighted variants for both sorts.
  • Expose the selected sort in the explorer, chart subtitle, hover text, caption, and output metadata.

Acceptance criteria

  • scripts/build_long_short_portfolios.py produces reproducible 5-1 and 10-1 outputs from the same source release.
  • Direction handling remains consistent for characteristics whose expected premium is negative.
  • chars/scripts/long-short-explorer.js allows users to distinguish or select quintile and decile results.
  • No quintile result is labeled as 10-1 or as a decile portfolio.
  • Tests cover portfolio membership, long/short leg selection, and both weighting schemes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions