[Bug] - SDK - openbb.stocks.ins.lins - Missed year in Date
jczernia opened this issue · 3 comments
Describe the bug
Date format is wrong, expected MM/DD/YYYY or something like that
To Reproduce
call
traded = openbb.stocks.ins.lins('INTC')
traded.to_csv('INTC.csv', index=True)
see the date format is like 'Nov 16' without year. Result of print(traded.axes)
[Index(['Nov 16', 'Nov 08', 'Nov 04', 'Oct 31', 'Aug 24', 'May 03', 'May 02',
'Feb 22', 'Feb 22', 'Feb 02', 'Feb 01', 'Dec 03'],
Note in Windows App date format is MM/DD/YYYY
Desktop (please complete the following information):
SDK installed by PyPi openpb 0.0.1
Comparison with Windows installed teminal v1.9.0
Issue exists in openbb 2.0.0 installed through pip
So I am digging in and this is actually the response from the finviz library we use (https://github.com/mariostoev/finviz) :
import finviz
finviz.get_insider("INTC")
This prints out the date format you see here. If we were to parse this into a date, we would have to add in the year by hand, which may or may not be correct (and this would actualy need to change in a month when they report january data).
In order to get this changed, the best bet would be to open an issue in the finviz library that get_insider() does not return year on the data -- once it is changed there, we can update.
Hi @jczernia,
This fix for #3608 is more complicated than it might seem, and would likely require a second request per insider transaction. Finviz doesn't provide the year at all, but does provide a link to the respective SEC Form 4, which provides all the necessary details.
A fix in this case would require an additional request to the respective SEC Form 4 per insider transaction (hosted on the SEC's website), which would then be scraped for the necessary details.
Ex. https://finviz.com/quote.ashx?t=AAPL&p=d
Regards,
James