wahidsaleemi / finance

Stock scripts
MIT License
3 stars 0 forks source link

Earnings 0 days ago doesn't work properly from AU (timezones ahead of exchange) #8

Open SCCMAdmin opened 4 years ago

SCCMAdmin commented 4 years ago

ConvertVVExportToIBTWSCSVImport_1.1.ps1 output example:

VMC has earnings in 21 days AAN has earnings in 21 days UNP had earnings 0 days ago, IV could be falling from elevated levels! CBOE has earnings in 15 days CE has earnings less than 14 days, in 7. Removing from list. LUV had earnings 0 days ago, IV could be falling from elevated levels! UAL has earnings in 89 days CME has earnings in 20 days

Regarding these lines in particular: UNP had earnings 0 days ago, IV could be falling from elevated levels! LUV had earnings 0 days ago, IV could be falling from elevated levels!

If the script was run in US, the output would say (Symbol) has earnings less than 14 days, in 1. Removing from list.

However, when the script is run from AU - currently 16hrs ahead of NYSE time (ET) the script outputs UNP had earnings 0 days ago, IV could be falling from elevated levels! LUV had earnings 0 days ago, IV could be falling from elevated levels! which is incorrect. UNP and LUV will release earnings today, but they are not released yet. This could create a bad trading decision.

I will leave the original script as is. It will suit most global players. I will create a copy of the script and attempt to adjust the date by 1 day. OR I will create a full script update which first sets the time as US ET time/date and then does the comparison to earnings source. This will fix the actual root cause which is the script currently uses local PC time and not NYSE time hence the mismatch in results in the output.

Logging this as work to do. I will attempt to do it myself.