Quote Source

When Venice is running, it needs to access quotes from a local source. It cannot work directly with quotes from the internet. Venice does support downloading quotes from the internet, but you need to store them locally before they can be used. Venice currently supports three local quote sources. You can store your quotes in an external database (MySQL, PostgreSQL and HSQLDB are tested, but other databases should also work), an internal database automatically set up by Venice (HSQLDB) or you can work with the sample quotes provided.

The best way of storing your quotes is to set up an external database. This provides the best performance. However, using the internal database is extremely easy because it requires no setup. The sample quotes are only provided as a demonstration.

You can reach the quote source configuration page by:

Samples

Venice has some inbuilt sample quotes, so you can test Venice without going to all the trouble of importing stock quotes. It contains a small selection of quotes from the Australian Stock Exchange (ASX) from 1986. Venice will default to using the sample quotes when you run it for the first time.

Internal

Venice supports storing quotes in an internal database. This does not provide particularly good performance, but requires no setup. Venice will default to using the sample quotes when you run it for the first time, but as soon as you try to import quotes, it will switch to the internal database. So you don't need to select this option manually. If you wish to change from another quote source specifically, once you have reached the quote source page, click on the Internal tab and select the Use Internal radio button.

Database

Once you have played with Venice for a while you might get annoyed at the time it takes Venice to load quotes from the internal database. You can fix this by reading quotes from an external database. Currently Venice is only tested with MySQL, PostgreSQL and HSQLDB, but other databases (SQL) should also work. To read quotes from an external database, you'll need to download a copy of the database software and the relevant Java software driver (JDBC) that lets Venice talk to the database. However, if you use MySQL, then you do not need to download the Java software driver, as that is already included in Venice.

You can download MySQL from http://www.mysql.com. Once the database is set up you'll need to create a database for Venice. Call the database shares.

Next you'll need to configure Venice to use the database. From the quote source page, to tell Venice to read quotes from an external database click on the Database tab and select the Use Database radio button. You'll be presented with several fields you need to fill in:

Finally you'll need to import the quotes into the database, you can do this by using the Import Quotes dialog.

Good luck!

Venice will automatically create the necessary database tables. For reference, this is the format of the table created:

+--------+----------+------+-----+------------+-------+
| Field  | Type     | Null | Key | Default    | Extra |
+--------+----------+------+-----+------------+-------+
| date   | date     |      | PRI | 0000-00-00 |       |
| symbol | char(12) |      | PRI |            |       |
| open   | float    | YES  |     | 0          |       |
| close  | float    | YES  |     | 0          |       |
| high   | float    | YES  |     | 0          |       |
| low    | float    | YES  |     | 0          |       |
| volume | int(11)  | YES  |     | 0          |       |
+--------+----------+------+-----+------------+-------+