Database

Ferris Yahoo! Finance JMCE works with a PostgreSQL database. This documents the tables and their use.

MARKETS

This table is used to store data about what markets, futures, and securities the application will screen scrape Yahoo! for information. The primary key of this table is used as foreign keys in other tables to link their data to a particular market. This table is updated manually. A new market means code updates to handle the market properly.

YEAR_END_PRICES

This table is used to store data about the closing values on the last day of the year for the various markets of the MARKETS table. This table is updated automatically on the last day of the year.

DAY_END_PRICES

This table is used to store data about the closing values of the day for the various markets of the MARKETS table. This table is updated daily.

FUTURES_EXPIRATIONS

This table is used to store contract expiration dates for futures such as oil. Typically, when a news anchor refers to the "current price of oil" what the anchor is actually referring to is the price of oil for the current active contract. A contract has a starting and ending date then the next contract becomes active. This table holds data about the starting and ending dates of the contracts for the year so the application can determine which contact is active on any given date of the year. This table needs to be updated yearly with the contract expiration dates for the futures of the MARKETS table (i.e oil).

EMAIL_ADDRESSES

This table is used to store data about different kind of email addresses, the most important of which is the address with the value "to" in the type field since these are the addresses which get emailed the financial summary report after it is generated. There of course can be multiple addresses of type "to" in the table so multiple people can get the report. However there can only be one address of type "from" and one address of type "reply". The "from" and "reply" addresses are used to set the from and reply to information of the email message. There can only be one address of type "admin". This address is emailed when something goes wrong with the application, typically a stack trace. A field 'active' has been added to easily toggle on and off an email address, best used by the "to" type of email addresses