Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

QuiverInsiderTrading reader throws IndexOutOfRange on legacy 14-column CSV rows after Name field added

オープン
#9 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
csharp
領域
backend, data

調査の方向性

Start in QuiverInsiderTrading.cs:157-181 and reproduce the failure with the supplied 14-column rows. Compare the legacy and current column layouts, then inspect QuiverInsiderTradingDataDownloader.cs:135 and QuiverInsiderTradingUniverse.cs for related schema assumptions. Done means legacy rows no longer throw, current rows still parse correctly, and the affected historical data path is verified.

索引モデルが issue の本文から書いたものです。

説明

Summary

Adding the Name field to QuiverInsiderTrading in 84a9a18 ("Add insider transactor Name field and tighten Date/FileDate types") shifted the on-wire CSV schema from 14 to 15 columns, but the historical CSVs on /Data/alternative/quiver/insidertrading/ have not been reprocessed. The new Reader in QuiverInsiderTrading.cs:178-180 indexes csv[14] for IsOther, and every pre-update row only has indices 0–13, so the parser throws IndexOutOfRangeException on the first row of nearly every ticker.

Evidence

Reader after 84a9a18 (QuiverInsiderTrading.cs:157-181):

Time = uploadedDate.AddDays(-1),
...
DirectOrIndirectOwnership = ... csv[8] ...,
Name         = csv[9],          // new
OfficerTitle = csv[10],         // was csv[9]
IsDirector   = csv[11],         // was csv[10]
IsOfficer    = csv[12],         // was csv[11]
IsTenPercentOwner = csv[13],    // was csv[12]
IsOther      = csv[14],         // was csv[13]  ← OOB on legacy rows

QuiverInsiderTradingDataDownloader.cs:135 now emits the 15-column line with name between ownership and officerTitle, but only for forward fetches — the prior content on /Data was written by the 14-column emitter.

Customer-reported lines that reproduce (ticket 215474489535029, two unrelated tickers, same shape):

20210804,,20210514,G,0,4010.0,324164.0,D,D,SVP GC and Secretary,F,T,F,F      # AAPL
20210602,,20210601,M,57.29,1830.0,29428.0,A,D,President & CEO,T,T,F,F        # ADI

Both are 14 columns; csv[9] is OfficerTitle-style content ("SVP GC and Secretary" / "President & CEO"), not an insider name — confirming these were written by the pre-84a9a18 downloader.

Customer-reported error message (matches IndexOutOfRangeException bubbling through the SubscriptionDataReader):

Error invoking AAPL.QuiverInsiderTrading data reader.
Line: 20210804,,20210514,G,0,4010.0,324164.0,D,D,SVP GC and Secretary,F,T,F,F
Error: Index was outside the bounds of the array.

Proposed change

Two viable paths; the first is the minimum fix, the second is the cleaner long-term shape:

  1. Backfill the /Data/alternative/quiver/insidertrading/ corpus by re-running QuiverInsiderTradingDataDownloader over the full Quiver history so every row carries the 15-column schema with Name populated where Quiver has it (Quiver's /historical/insiders endpoint exposes Name for the post-2021 records the customer is targeting). Without a backfill, even after fix (2) the customer's "two-year routine vs non-routine insider" filter has nothing to filter on.

  2. Make the Reader tolerant of the legacy 14-column rows so the dataset is usable while the backfill runs:

    var csv = line.Split(',');
    var hasName = csv.Length >= 15;
    ...
    Name         = hasName ? csv[9]  : null,
    OfficerTitle = hasName ? csv[10] : csv[9],
    IsDirector   = QuiverQuantCsvExtensions.ToNullableBool(hasName ? csv[11] : csv[10]),
    IsOfficer    = QuiverQuantCsvExtensions.ToNullableBool(hasName ? csv[12] : csv[11]),
    IsTenPercentOwner = QuiverQuantCsvExtensions.ToNullableBool(hasName ? csv[13] : csv[12]),
    IsOther      = QuiverQuantCsvExtensions.ToNullableBool(hasName ? csv[14] : csv[13]),
    

    This unbreaks every existing strategy immediately and degrades gracefully (Name is null on legacy rows) until the backfill lands.

QuiverInsiderTradingUniverse.cs should be checked for the same shift — it was edited in the same commit and likely has the same OOB exposure on legacy universe rows.

Open questions for the customer

None blocking — the failure mode is fully explained by the schema bump, and the two failing rows are sufficient to reproduce.

Reference

Intercom conversation: 215474489535029 (David LeBlanc / dlquant05@gmail.com, project 32229080).

主要言語
C#
スター
0
フォーク
3
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

QuantConnect/Lean.DataSource.QuiverQuant のほかの issue

QuantConnect/Lean.DataSource.QuiverQuant の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。