wahidsaleemi / finance

Stock scripts
MIT License
3 stars 0 forks source link

Issue/Enhancement: ConvertTo-TWS.ps1 Needs To Bypass Unknown Symbols #6

Open SCCMAdmin opened 5 years ago

SCCMAdmin commented 5 years ago

As suggested in Issue #4 :

ConvertTo-TWS.ps1 is outputting errors when the data source https://www.earningswhispers.com/ returns an error page due to an unknown symbol not found scenario. I have noticed ETFs are not included because these don't announce earnings like stocks would. So any ETF in the input file (exported from VV) would result in errors.

See #4 to see what they look like. See between COG and GPS, there are errors. The data does not know these symbols, IEF, IEI, TFI, VGIT. Confirmed by visiting https://www.earningswhispers.com/ and typing in IEF, the error page appears: https://www.earningswhispers.com/error?aspxerrorpath=/stocks.aspx. This is what the code is trying to parse and can't do it.

I would suggest coding for this error page when detected and suggested output would be like: IEF symbol was not found. Removing from list *yellow text like other removals. This looks more elegant than large errors in console.

Make a code comment to suggest ETFs are not hosted and therefore will be removed from the output file even though we have not explicitly stated ETF in the output comment. It could be erroneous to do that as a symbol which is not an ETF could be legitimately missing and the suggestion above is sufficient for stocks and ETFs which are missing symbols. You likely don't want to be selling a spread on an ETF in my opinion, but if you do, you have no earnings event to be concerned about and wouldn't be using this script with -CheckEarnings switch if you had a 100% ETF strategy.

As I found these unknown symbols are all ETFs, these could be filtered out in VV prior to exporting as a workaround. Or better still, filter out ETFs in the UniSearch searches. This is a low priority item to resolve.