Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#9 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Tranquilla
Stack tecnologico
csharp
Ambito
backend, data

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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).

Lingua principale
C#
Stelle
0
Fork
3
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di QuantConnect/Lean.DataSource.QuiverQuant

Tutte le issue di QuantConnect/Lean.DataSource.QuiverQuant

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.