How to Load Option Chains from Google Finance to Databases
Google Finance allows viewing option chain data online but has no download links.
So available solutions load and parse option chain JSON data from the Google Finance website.
You can try a ready-to-use solution described below to solve this task.
RTD.DB allows using Microsoft SQL Server, SQL Server Compact, Oracle Database, IBM DB2, MySQL, PostgreSQL, and NuoDB.
The download package includes SQL codes and batch files to create ready-to-use databases in a couple of minutes.
Loading Option Chains to Databases Using RTD.DB
You can install RTD.DB using a standalone setup package:
- Download and install RTD.DB.
- Run RTD.DB using the link from 'Start, All Programs, Gartle, RTD.DB'.
You will see the following application screen:
RTD.DB will start updating the preconfigured local Microsoft SQL Server Compact database with data from Yahoo Finance for currencies, stocks, and options.
For example, you can see the OptionDayHistoryYahoo row.
Click the Stop button.
Further, you have to make the following steps:
- Create an RTD database on your server.
- Configure a connection to your server.
- Configure updated database tables.
- Configure a list of option contracts to refresh.
Creating RTD Database
Steps:
- Open the folder of the unzipped download package.
- Open the RTD Database folder and open a folder for the target database platform.
- Run the 1-edit-config.cmd batch file and edit the connection strings to your database server.
- Run the 2-create-database.cmd batch file.
- Run the 3-rtd-setup.cmd batch file.
- Run the 4-rtd-list.cmd batch file.
- Run the 5-rtd-grant.cmd batch file.
As a result, you will have the RTD database on your target server.
If the files have other names, please, read the readme.txt in the setup folder.
Configuring Connections
Steps:
- Run RTD.DB if it is not started.
- Click the Connections button.
- Edit and enable the connection string to your server and disable the default SQL Server Compact database.
- Click the Save button and close the application.
- Click the RTD.DB Stop button and then click the Start button.
Here is a screenshot of the gConnectionManager application used for editing connecting strings.
Configuring Updated Database Tables
The RTD database contains preconfigured tables for loading various data from various data sources with various time frames.
Steps to activate or deactivate loading data:
- Open the RTD database in your database manager.
- Open the rtd.RealTimeTables (rtd.real_time_tables) table in edit mode.
- Set 1 into the IS_DISABLED column to disable loading and set the value to NULL to enable loading.
- Save changes.
- Click the RTD.DB Stop button and then click the Start button.
Here is an example of the table for Microsoft SQL Server:
See RTD.DB Database Configuration about configuration tables.
Editing Configuration Tables in Microsoft Excel
You can use Microsoft Excel to edit configuration tables if you have SaveToDB add-in installed.
Preparation steps:
- Open Microsoft Excel.
- Open the RTD Workbooks folder in the downloaded package.
- Open the workbook for your target server. For example, rtd-mysql.xlsx for MySQL.
- Open the SaveToDB tab, click Wizards menu, Change Connection Wizard.
- Specify a server, a database, and database credentials for your database. Click Next.
- Click Finish to change connections for the selected tables.
- Save the workbook to your location.
Configuration steps:
- Open the prepared workbook connected to your database.
- Open the RealTimeTables worksheet.
- Open the SaveToDB tab and click the Reload button.
- Set 1 into the IS_DISABLED column to disable loading and clear the value to enable loading.
- Open the SaveToDB tab and click the Save button.
Configuring List of Option Contracts to Refresh
As you can see above, option tables for Google Finance are configured with the following code in the LOAD_CODE field:
SELECT Code FROM rtd.OptionListGoogle
You can change this SQL code for loading option codes from your existing table.
Or you can use the preconfigured rtd.OptionListGoogle table.
The rtd.OptionListGoogle table contains test option codes:
You can insert required option codes into the table using any available method.
Note that you can use the workbook prepared in the previous step.
Copy the OptionListYahoo worksheet to a new one, rename it to OptionListGoogle, click SaveToDB, Wizards, Data Connection
Wizard, and connect to the rtd.OptionListGoogle table.
Note that you have to remove expired option codes from the table also.
Different editions of RTD.DB have different limits for a number of updated option codes.
The Personal edition ($100) allows updating option codes for up to 1000 stocks.
See RTD.DB Edition Comparison for details.
Getting Option Codes
RTD.DB loads option data for specified option codes. It does not load entire option chains automatically.
Downloads
Products for Traders and Investors | |
---|---|
RTD.DB
The app saves data from trading platforms like Thinkorswim to databases Version: 5.25 | 04/30/2024 | 12.8MB | Getting Started | What's New | Edition Comparison |
Download |
Disclaimer
Google Finance is a logo and registered trademark of Google Inc.