One type tool that I believe is essential for trading starbonds is one that calculates the next adjust price. Kaigee and HowProfitable are excellent tools for this purpose, but if those sites should go away or fail to be kept up to date then starbonds would be difficult to trade. Thus I'd like to develop a tool of my own.
HSX used to provide XML feeds that provided lots of useful information about securities, but now that those feeds are gone. The development of a starbond tool requires an application to fetch an HTML page of a starbond, parse the content, and then fetch and parse each individual moviestock page to get information about price, gross, release pattern, etc. Besides the obvious inefficiences and waste of HSX resources and bandwith, there are challenges with the data on the html pages. One of the biggest challenges is the release pattern. It is extremely difficult to programmatically determine the estimated adjust price because the release pattern has no standard format such as those used for other fields like "Status". Without a standard format, it is difficult to determine the adjust date and order of adjust. Sites like Kaigee and HowProfitable have managed to figure it out, but I haven't been able to reliably do so.
Can anyone (especially @Kaigee or @elchan) who has developed a tool provide any insight into how to reliably determine the release pattern? Regular expressions would be terrific, but any info would be helpful.
Here are a few regexps I currently use, but I know this is not reliable for parsing the non-standard "Release Pattern":
case pattern
when /\Awide\Z/i then "WIDE"
when /\Alimited\Z/i then "LIMITED"
when /[^\;]*\;.*?\bwide\b/i then "WIDE" # i.e limited 12/11; wide 12/18
when /\ANY\/LA\Z/i then "LIMITED"
else "UNKNOWN"
end
Thanks!