OpenBB icon indicating copy to clipboard operation
OpenBB copied to clipboard

[Bug] Insider Names Incorrectly Displayed in Reverse Order

Open deadghost opened this issue 2 years ago • 4 comments

Describe the bug When running openbb.stocks.ins.act, the names of insiders are displayed in reverse order.

To Reproduce open.stocks.ins.act on GME.

What I get:

           Shares Traded   Shares Held   Price  Type Option             Insider
Date                                                                           
2022-03-20      3,000.00      8,022.00   96.46   Buy     No  Saadeh-Jajeh Diana
2022-03-21      6,734.00  9,008,032.00   97.52   Buy     No  Saadeh-Jajeh Diana
2022-03-21     16,528.00  9,024,560.00   98.33   Buy     No     Furlong Matthew
2022-03-21      7,812.00  9,032,372.00   99.41   Buy     No     Patel Nir Vinay
2022-03-21     14,880.00  9,047,252.00  100.39   Buy     No     Patel Nir Vinay
2022-03-21     20,118.00  9,067,370.00  101.37   Buy     No         Attal Alain
2022-03-21      6,261.00  9,073,631.00  102.26   Buy     No             Xu Yang
2022-03-21         31.00  9,073,662.00  103.88   Buy     No         Grube James
2022-03-21      3,169.00  9,076,831.00  104.33   Buy     No      Cheng Lawrence
2022-03-21      8,835.00  9,085,666.00  105.44   Buy     No         Attal Alain
2022-03-21      3,534.00  9,089,200.00  106.55   Buy     No  Saadeh-Jajeh Diana
2022-03-21        298.00  9,001,298.00   96.85   Buy     No          Cohen Ryan
2022-03-21      3,900.00  9,093,100.00  107.26   Buy     No          Cohen Ryan
2022-03-21        743.00     18,825.00  125.00  Sell     No          Cohen Ryan
2022-03-21      7,900.00  9,101,000.00  108.28   Buy     No          Cohen Ryan
2022-03-23      1,500.00    130,423.00  129.91   Buy     No          Cohen Ryan
2022-06-14      1,750.00      9,772.00  114.32   Buy     No          Cohen Ryan
2022-06-14      1,750.00      3,773.00  114.32   Buy     No          Cohen Ryan
2022-06-14      1,750.00      2,772.00  114.32   Buy     No          Cohen Ryan
2022-06-14      1,750.00    132,173.00  114.32   Buy     No          Cohen Ryan
2022-06-30    112,677.00    112,677.00     n/a   Buy     No          Cohen Ryan
2022-06-30    169,015.00    281,692.00     n/a   Buy     No          Cohen Ryan
2022-06-30      1,584.00     71,094.00  123.42  Sell     No          Cohen Ryan
2022-07-10      7,731.00     26,556.00     n/a   Buy     No          Cohen Ryan
2022-10-02      1,347.00    104,877.00   24.85  Sell     No      Cheng Lawrence

What I expect (from Business Insider): Screenshot_2023-02-28_10-33-41

Desktop (please complete the following information):

  • OS: Ubuntu 20
  • Python 3.10.9

deadghost avatar Feb 28 '23 15:02 deadghost

This is how open insider reports it:

Screenshot 2023-02-28 at 1 41 47 PM

jmaslek avatar Feb 28 '23 18:02 jmaslek

@jmaslek Look carefully at the names and dates. They don't match up with the actual Form 4 filings. For some reason, only the Insider column is sorted in the wrong direction.

deadghost avatar Mar 01 '23 02:03 deadghost

I read your post as meaning it was reporting last name first name instead of first name last name. (Ie Cohen ryan instead of ryan Cohen). My bad. Will dig

jmaslek avatar Mar 01 '23 03:03 jmaslek

Hey @jmaslek , the issue is due to the sorting based on "date" Index, since here we want data in chronological(recent to later) order. Will raise a PR to reverse the sorting

Raghavendrapara avatar Mar 06 '23 16:03 Raghavendrapara